/**
 * TradeForge — Workspace Integration Styles
 *
 * Unified styles for audit trail, company interactions,
 * demo mode indicator, and merged activity feed within
 * the project workspace.
 */

/* ── Demo Mode Banner ──────────────────────────────── */
.ws-demo-banner {
  background: linear-gradient(90deg, rgba(140,106,62,.18), rgba(140,106,62,.08));
  border: 1px solid rgba(140,106,62,.35);
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--light, #e8e9ea);
}
.ws-demo-banner svg {
  width: 18px; height: 18px; flex-shrink: 0;
  color: var(--bronze, #8C6A3E);
}
.ws-demo-banner-label {
  font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--bronze, #8C6A3E);
  white-space: nowrap;
}
.ws-demo-banner-text {
  color: var(--muted, #b5b7b9); font-size: 12px; line-height: 1.5;
}
.ws-demo-banner-exit {
  margin-left: auto; font-size: 11px; font-weight: 600;
  color: var(--bronze, #8C6A3E); cursor: pointer;
  background: rgba(140,106,62,.12); border: 1px solid rgba(140,106,62,.3);
  border-radius: 6px; padding: 5px 12px; white-space: nowrap;
  transition: background .15s;
}
.ws-demo-banner-exit:hover { background: rgba(140,106,62,.22); }

/* ── Audit Trail Panel ─────────────────────────────── */
.ws-audit-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px; margin-bottom: 18px;
}
.ws-audit-stat {
  background: rgba(46,49,54,.6);
  border: 1px solid rgba(181,183,185,.08);
  border-radius: 10px; padding: 14px 12px; text-align: center;
}
.ws-audit-stat-val {
  font-size: 24px; font-weight: 700; color: var(--light, #e8e9ea);
}
.ws-audit-stat-label {
  font-size: 11px; color: var(--muted, #b5b7b9); margin-top: 2px;
  font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}

.ws-audit-filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
  align-items: end;
}
.ws-audit-filters select,
.ws-audit-filters input {
  background: rgba(46,49,54,.8); color: var(--light, #e8e9ea);
  border: 1px solid rgba(181,183,185,.12); border-radius: 6px;
  padding: 7px 10px; font-size: 12px; min-width: 130px;
}

.ws-audit-entry {
  background: rgba(46,49,54,.5);
  border: 1px solid rgba(181,183,185,.06);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 8px;
  display: flex; gap: 12px; align-items: flex-start;
}
.ws-audit-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: rgba(140,106,62,.12);
}
.ws-audit-icon svg { width: 16px; height: 16px; color: var(--bronze, #8C6A3E); }
.ws-audit-body { flex: 1; min-width: 0; }
.ws-audit-title { font-size: 13px; font-weight: 600; color: var(--light, #e8e9ea); }
.ws-audit-meta {
  font-size: 11px; color: var(--muted, #b5b7b9); margin-top: 3px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.ws-audit-meta span { display: inline-flex; align-items: center; gap: 3px; }
.ws-audit-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: 2px 7px; border-radius: 4px;
  background: rgba(140,106,62,.15); color: var(--bronze, #8C6A3E);
  border: 1px solid rgba(140,106,62,.25);
}

/* ── Company Interactions Panel ────────────────────── */
.ws-company-card {
  background: rgba(46,49,54,.5);
  border: 1px solid rgba(181,183,185,.06);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 10px;
}
.ws-company-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.ws-company-name {
  font-size: 14px; font-weight: 700; color: var(--light, #e8e9ea);
}
.ws-company-role {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--bronze, #8C6A3E);
}
.ws-company-detail {
  font-size: 12px; color: var(--muted, #b5b7b9); line-height: 1.55;
}
.ws-company-actions {
  display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap;
}
.ws-company-actions .btn {
  font-size: 11px; padding: 5px 12px;
}

.ws-interaction-entry {
  background: rgba(46,49,54,.4);
  border-left: 3px solid rgba(140,106,62,.4);
  border-radius: 0 8px 8px 0; padding: 10px 14px; margin-bottom: 8px;
}
.ws-interaction-title {
  font-size: 13px; font-weight: 600; color: var(--light, #e8e9ea);
}
.ws-interaction-meta {
  font-size: 11px; color: var(--muted, #b5b7b9); margin-top: 3px;
}

/* ── Unified Feed Enhancements ─────────────────────── */
.ws-feed-source-tag {
  display: inline-block; font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 1px 6px; border-radius: 3px; margin-left: 6px;
  vertical-align: middle;
}
.ws-feed-source-tag.audit {
  background: rgba(59,130,246,.12); color: #60a5fa;
  border: 1px solid rgba(59,130,246,.25);
}
.ws-feed-source-tag.company {
  background: rgba(140,106,62,.12); color: var(--bronze, #8C6A3E);
  border: 1px solid rgba(140,106,62,.25);
}
.ws-feed-source-tag.project {
  background: rgba(106,191,105,.12); color: #6abf69;
  border: 1px solid rgba(106,191,105,.25);
}

/* ── Section Headers ───────────────────────────────── */
.ws-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap; gap: 8px;
}
.ws-section-head h3 {
  font-size: 16px; font-weight: 700; color: var(--light, #e8e9ea);
  display: flex; align-items: center; gap: 8px; margin: 0;
}
.ws-section-head h3 svg {
  width: 18px; height: 18px; color: var(--bronze, #8C6A3E);
}
.ws-section-kicker {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--bronze, #8C6A3E);
  margin-bottom: 6px;
}
.ws-section-desc {
  font-size: 13px; color: var(--muted, #b5b7b9); line-height: 1.55;
  margin-bottom: 14px; max-width: 72ch;
}

/* ── Empty States ──────────────────────────────────── */
.ws-empty {
  text-align: center; padding: 32px 20px;
  color: var(--muted, #b5b7b9); font-size: 13px;
}
.ws-empty svg {
  width: 28px; height: 28px; color: var(--bronze, #8C6A3E);
  margin-bottom: 8px; opacity: .6;
}

/* ── Mobile Responsiveness ─────────────────────────── */
@media (max-width: 768px) {
  .ws-audit-summary {
    grid-template-columns: repeat(2, 1fr);
  }
  .ws-audit-filters {
    flex-direction: column;
  }
  .ws-audit-filters select,
  .ws-audit-filters input {
    width: 100%; min-width: 0;
  }
  .ws-audit-entry {
    flex-direction: column; gap: 8px;
  }
  .ws-company-card-head {
    flex-direction: column; align-items: flex-start; gap: 4px;
  }
  .ws-demo-banner {
    flex-direction: column; text-align: center; gap: 8px;
  }
  .ws-demo-banner-exit {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .ws-audit-summary {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .ws-audit-stat {
    padding: 10px 8px;
  }
  .ws-audit-stat-val {
    font-size: 20px;
  }
}
