/* ═══════════════════════════════════════════════════════════════
   lightwork – Option C overlay
   Drop-in patch on top of static/css/main.css.
   Link AFTER main.css in base.html and login.html.
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Rozha+One&display=swap');

:root {
  /* Brand accent: Tailwind blue → firstlight navy */
  --accent: #0D0B6B;
  --accent-hover: #1a1789;
  --accent-glow: rgba(13, 11, 107, 0.08);

  /* Paper & sidebar: light, quiet, warm */
  --bg: #fcfcfa;
  --surface: #ffffff;
  --border: #ededea;

  /* Light sidebar */
  --sidebar-bg: #fcfcfa;
  --sidebar-text: #6b6b63;
  --sidebar-active: #0D0B6B;
  --sidebar-hover: #f3f2ee;
  --sidebar-active-bg: #eeeef7;

  /* Ink & muted (sidebar umbrella design) */
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --muted-soft: #9a9a90;
  --rule: #e7e7e2;
  --paper: #ffffff;

  /* Softer priority palette */
  --high:    #b84a1f;  --high-bg:   #fdece8;  --high-border:   #f8d6cb;
  --medium:  #96590a;  --medium-bg: #fff4e0;  --medium-border: #f5e2b9;
  --low:     #525e72;  --low-bg:    #eef1f6;  --low-border:    #e0e5ed;
}

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar { border-right: 1px solid var(--border); }
.sidebar-header, .sidebar-footer { border-color: var(--border); }
.sidebar-brand {
  font-family: 'Rozha One', serif;
  font-weight: 400;
  font-size: 22px;
  color: #0D0B6B;
  letter-spacing: -0.01em;
}
.sidebar-sub, .sidebar-footer-meta { color: #9a9a90; }
.sidebar-footer-link { color: var(--sidebar-text); }
.sidebar-footer-link:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-active);
}

/* ── Titles ───────────────────────────────────────────────────── */
.page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.opp-detail-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* ── Stat cards: flat at rest, lift on hover ─────────────────── */
.stats-grid { gap: 16px; }
.stat-card {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 16px 18px 14px;
  box-shadow: none;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.stat-card:hover {
  background: #ffffff;
  border-color: #ededea;
  box-shadow:
    0 1px 2px rgba(13, 11, 107, 0.04),
    0 8px 20px -12px rgba(13, 11, 107, 0.12);
}
.stat-value {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

/* ── Badges → rounded pastel pills ───────────────────────────── */
.badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}
.type-badge   { border-radius: 999px; padding: 3px 10px; font-weight: 600; }
.paused-badge { border-radius: 999px; padding: 2px 10px; }
.brief-tag    { border-radius: 999px; padding: 3px 10px; }
.prefs-badge  { border-radius: 999px; padding: 2px 10px; }

/* ── Tabs, buttons, filters: rounded ─────────────────────────── */
.view-tabs {
  background: var(--sidebar-hover);
  border-radius: 999px;
  padding: 3px;
}
.view-tab { border-radius: 999px; }
.view-tab.active {
  background: #1a1a1a;
  color: #fff;
  box-shadow: none;
}

.btn { border-radius: 999px; padding: 6px 14px; }
.btn-sm { padding: 5px 12px; }

/* ── Cards, tables, rows: softer corners + lighter dividers ──── */
.card,
.brief-nav-card,
.opp-detail-layout,
.table-wrap,
.query-disclosure { border-radius: 12px; }

.opp-card,
.opp-card:first-child,
.brief-card,
.brief-card:first-child,
.sweep-row,
.sweep-row:first-child,
.sweep-opp-row,
tbody td { border-color: #f0f0ec; }

/* ── Sources: pill-shaped ────────────────────────────────────── */
.sources-list a { border-radius: 999px; padding: 4px 12px; }

/* ── Triage buttons: round ───────────────────────────────────── */
.triage-btn { border-radius: 999px; }

/* ── Sweep header: calmer layout ─────────────────────────────── */
/* Optional – only applies if you adopt the Jinja tweak in sweep.html */
.sweep-header-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.sweep-header-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  justify-content: start;
}

/* ── Login: Rozha wordmark, navy glow, round inputs ──────────── */
.login-title,
.login-cursor {
  font-family: 'Rozha One', serif;
  font-weight: 400;
  font-size: 48px;
  letter-spacing: -0.02em;
}
.login-cursor { color: #E19B55; }
.login-input, .login-btn { border-radius: 999px; }

/* ── Dashboard v2 ─────────────────────────────────────────────── */

/* Stat card icons (top-right tinted square, tone-driven) */
.stat-card { position: relative; overflow: hidden; }
.stat-icon {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center;
}
.stat-icon svg { width: 15px; height: 15px; }
.stat-card[data-tone="high"]   .stat-icon { background: var(--high-bg);   color: var(--high); }
.stat-card[data-tone="medium"] .stat-icon { background: var(--medium-bg); color: var(--medium); }
.stat-card[data-tone="low"]    .stat-icon { background: var(--low-bg);    color: var(--low); }
.stat-card[data-tone="total"]  .stat-icon { background: var(--type-sector-bg); color: var(--type-sector); }
/* Subtitle trend chip — replaces per-card .stat-delta */
.subtitle-trend {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text); font-weight: 500;
}
.subtitle-trend svg { width: 10px; height: 10px; }

/* Type stripe (display-only count chips) */
.type-stripe { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.type-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
}
.type-pill:hover { color: var(--text); border-color: var(--text-muted); }
.type-pill .swatch { width: 8px; height: 8px; border-radius: 50%; }
.type-pill.active { color: var(--text); border-color: var(--text); }
.swatch.client { background: var(--type-client); }
.swatch.sector { background: var(--type-sector); }
.swatch.issues { background: var(--type-issues); }

/* Two-column row for feed + briefs panel */
.row-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 12px; }
@media (max-width: 768px) { .row-2 { grid-template-columns: 1fr; } }

/* Card primitive used by both panels */
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.dash-card .card-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.dash-card .card-head h2 { margin: 0; font-size: 15px; letter-spacing: -0.01em; }
.dash-card .card-head .h-sub { font-size: 12px; color: var(--text-muted); }
.dash-card .card-action { font-size: 12px; color: var(--text-muted); }
.dash-card .card-action:hover { color: var(--accent); }

/* Feed rows (latest opportunities) */
.feed-row {
  display: grid; grid-template-columns: 70px 1fr auto;
  align-items: start; gap: 14px;
  padding: 12px 4px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit;
}
.feed-row:last-child { border-bottom: none; }
.feed-row:hover { background: var(--sidebar-hover); }
.signal {
  display: inline-flex; justify-content: center; align-items: center;
  min-width: 64px; height: 22px; padding: 0 10px;
  border-radius: 999px; font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.signal--high   { background: var(--high-bg);   color: var(--high);   border: 1px solid var(--high-border); }
.signal--medium { background: var(--medium-bg); color: var(--medium); border: 1px solid var(--medium-border); }
.signal--low    { background: var(--low-bg);    color: var(--low);    border: 1px solid var(--low-border); }
.feed-title { font-size: 13.5px; font-weight: 500; line-height: 1.35; margin-bottom: 4px; }
.feed-meta { font-size: 11.5px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.feed-meta .dot-sep { width: 2px; height: 2px; border-radius: 50%; background: var(--text-muted); opacity: 0.5; }
.feed-time { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }

/* Type tags (re-used on feed rows and brief rows) */
.type-tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 999px; font-weight: 600;
  display: inline-block;
}
.type-tag.client { background: var(--type-client-bg); color: var(--type-client); border: 1px solid var(--type-client-border); }
.type-tag.sector { background: var(--type-sector-bg); color: var(--type-sector); border: 1px solid var(--type-sector-border); }
.type-tag.issues { background: var(--type-issues-bg); color: var(--type-issues); border: 1px solid var(--type-issues-border); }

/* Brief rows (active briefs panel) */
.brief-row {
  display: grid; grid-template-columns: 76px 1fr auto;
  align-items: center; gap: 12px;
  padding: 11px 4px; border-bottom: 1px solid var(--border);
  font-size: 13px; text-decoration: none; color: inherit;
}
.brief-row:last-child { border-bottom: none; }
.brief-row:hover { background: var(--sidebar-hover); }
.brief-name { font-size: 13px; font-weight: 500; }
.brief-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.count-pill {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: var(--bg); color: var(--text-muted); border: 1px solid var(--border);
}

/* Sidebar nav icons */
.nav-link { display: flex; align-items: center; gap: 10px; }
.nav-link svg { width: 14px; height: 14px; opacity: 0.6; flex-shrink: 0; }
.nav-link.active svg { opacity: 1; }
