/* ==========================================================================
   雪绒花 · 竞情雷达 — 视觉系统
   ========================================================================== */
:root {
  --ink: #17231f;
  --ink-2: #354640;
  --muted: #74827c;
  --muted-2: #95a09b;
  --paper: #f5f3ed;
  --surface: #fffdf8;
  --surface-2: #f1efe8;
  --surface-3: #eae8df;
  --line: #e3e2d9;
  --line-strong: #d3d5cb;
  --brand: #1e5b4f;
  --brand-2: #2f7667;
  --brand-soft: #e7f0ec;
  --brand-deep: #123d34;
  --rose: #c86757;
  --rose-soft: #f8e9e5;
  --gold: #b58a46;
  --gold-soft: #f7efdf;
  --danger: #bd4b3e;
  --danger-soft: #f9e7e3;
  --warning: #b07a24;
  --warning-soft: #faf0dc;
  --success: #2d7756;
  --success-soft: #e7f3ec;
  --info: #3d6f9e;
  --info-soft: #e9f1f8;
  --shadow-sm: 0 1px 2px rgba(23, 35, 31, .04);
  --shadow: 0 1px 2px rgba(23, 35, 31, .04), 0 18px 40px -30px rgba(23, 35, 31, .32);
  --radius: 18px;
  --radius-sm: 12px;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", sans-serif;
  --font-display: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "STSong", Georgia, serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Avenir Next", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 90% -10%, rgba(214, 198, 166, .16), transparent 60%),
    radial-gradient(800px 500px at 10% 100%, rgba(30, 91, 79, .07), transparent 55%),
    var(--paper);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
::selection { background: #cfe2da; color: var(--brand-deep); }

/* ---------- Layout ---------- */
.app { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 258px; z-index: 40;
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px 16px 18px;
  background:
    radial-gradient(600px 300px at 30% -10%, rgba(197, 167, 105, .17), transparent 70%),
    linear-gradient(175deg, #173f37 0%, #12332d 58%, #0f2b26 100%);
  color: #edf2ec;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.20'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
.sidebar > * { position: relative; z-index: 1; }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 4px 8px 16px; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; color: #e5d2a7;
  border: 1px solid rgba(229, 210, 167, .38); border-radius: 12px;
  background: rgba(255, 255, 255, .05);
}
.brand-mark svg { width: 31px; height: 31px; }
.brand-words { display: flex; flex-direction: column; line-height: 1.1; }
.brand-words b { font-family: var(--font-display); font-size: 20px; letter-spacing: .08em; font-weight: 700; color: #fffaf0; }
.brand-words em { font-style: normal; font-size: 10px; letter-spacing: .34em; color: #c5b180; margin-top: 5px; }
.workspace-switch {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 10px 11px; color: #dbe6df; background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 12px;
  transition: .18s ease;
}
.workspace-switch:hover { background: rgba(255, 255, 255, .09); }
.workspace-dot { width: 8px; height: 8px; border-radius: 50%; background: #c8a86b; box-shadow: 0 0 0 4px rgba(200, 168, 107, .14); flex: none; }
.workspace-switch span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.workspace-switch small { font-size: 9px; letter-spacing: .12em; color: #9fb6ac; text-transform: uppercase; }
.workspace-switch b { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-switch svg { width: 16px; height: 16px; color: #8fa79d; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav-label {
  margin: 17px 10px 6px; font-size: 9.5px; letter-spacing: .18em;
  text-transform: uppercase; color: #7f9b90; font-weight: 600;
}
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 10px; color: #c9d7d0; font-size: 13px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .065); }
.nav a.active { color: #17231f; background: #f4f0e5; box-shadow: 0 5px 16px rgba(0, 0, 0, .14); font-weight: 600; }
.nav a.active .nav-ic { color: var(--brand); }
.nav-ic { width: 18px; height: 18px; color: #90a89e; flex: none; }
.nav-ic svg { width: 18px; height: 18px; }
.nav-count {
  margin-left: auto; min-width: 21px; height: 19px; padding: 0 6px; border-radius: 9px;
  display: grid; place-items: center; font-size: 10px; font-weight: 600;
  background: rgba(255, 255, 255, .11); color: #dce7e1;
}
.nav a.active .nav-count { background: var(--brand-soft); color: var(--brand); }
.nav-count.hot { background: #b95445; color: #fff; }
.nav a.active .nav-count.hot { background: #b95445; color: #fff; }
.nav-dot { width: 4px; height: 4px; border-radius: 50%; background: #c8a86b; margin-left: auto; opacity: .7; }
.sidebar-foot { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.health-card {
  padding: 12px 13px; border-radius: 13px; border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .045);
}
.health-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: #b3c6bd; }
.health-top b { font-family: var(--font-num); font-size: 22px; color: #f1e7cf; font-weight: 500; }
.health-bar { height: 4px; margin: 7px 0 7px; border-radius: 4px; background: rgba(255, 255, 255, .13); overflow: hidden; }
.health-bar span { display: block; height: 100%; width: 86%; border-radius: inherit; background: linear-gradient(90deg, #b28b4e, #e4d2a6); }
.health-card p { margin: 0; color: #89a297; font-size: 10.5px; }
.user-mini { display: flex; align-items: center; gap: 9px; padding: 2px 5px; }
.user-mini > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.user-mini b { font-weight: 600; font-size: 12px; color: #f1f4ef; }
.user-mini small { font-size: 10px; color: #89a297; }
.avatar, .top-avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: #d8c49a; color: #3b3322; font-family: var(--font-display); font-weight: 700; font-size: 14px;
  flex: none;
}
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: #8ea69c; transition: .16s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.icon-btn svg { width: 18px; height: 18px; }

.main-shell { margin-left: 258px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 68px; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 0 32px;
  background: rgba(247, 245, 239, .82);
  border-bottom: 1px solid rgba(214, 213, 203, .7);
  backdrop-filter: blur(14px);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crumb { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.crumb i { font-style: normal; color: #c0c5bd; }
.crumb b { color: var(--ink); font-weight: 600; }
.menu-btn { display: none; color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.demo-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 29px; padding: 0 11px;
  border-radius: 999px; background: #fff8e8; border: 1px solid #eadaba;
  color: #866426; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
}
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: #b4883c; box-shadow: 0 0 0 0 rgba(180, 136, 60, .5); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(180, 136, 60, .45); } 70% { box-shadow: 0 0 0 6px rgba(180, 136, 60, 0); } 100% { box-shadow: 0 0 0 0 rgba(180, 136, 60, 0); } }
.search-btn {
  display: flex; align-items: center; gap: 8px; height: 35px; padding: 0 8px 0 11px;
  border: 1px solid var(--line); background: rgba(255, 253, 248, .74); border-radius: 10px;
  color: var(--muted); font-size: 11.5px; transition: .16s ease;
}
.search-btn:hover { border-color: var(--line-strong); background: #fff; }
.search-btn svg { width: 15px; height: 15px; }
.search-btn kbd { font-family: var(--font-sans); font-size: 9.5px; color: #99a39d; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.notif-btn { position: relative; color: var(--ink-2); border-color: var(--line); background: rgba(255, 253, 248, .7); }
.notif-btn:hover { background: #fff; color: var(--brand); }
.notif-badge {
  position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--rose); color: #fff; font-size: 9px;
  display: grid; place-items: center; border: 2px solid var(--paper);
}
.top-avatar { width: 34px; height: 34px; font-size: 13px; }
.view { flex: 1; width: 100%; max-width: 1540px; margin: 0 auto; padding: 28px 32px 28px; outline: none; }
.app-foot {
  display: flex; justify-content: space-between; gap: 20px; padding: 14px 32px 22px;
  color: #9aa39d; font-size: 10px; border-top: 1px solid rgba(214, 213, 203, .55);
}
.boot-screen { min-height: 60vh; display: grid; place-content: center; justify-items: center; color: var(--muted); gap: 14px; }
.boot-mark { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sidebar-scrim { display: none; }

/* ---------- Type & primitives ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.eyebrow {
  display: flex; align-items: center; gap: 8px; color: var(--brand); font-size: 10.5px;
  font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 7px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--gold); }
.page-head h1 { margin: 0; font-family: var(--font-display); font-size: 29px; font-weight: 700; letter-spacing: .01em; line-height: 1.25; }
.page-head p { margin: 7px 0 0; color: var(--muted); font-size: 12.5px; max-width: 720px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 35px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 11.5px; font-weight: 600;
  transition: .16s ease; white-space: nowrap;
}
.btn:hover { border-color: var(--line-strong); background: #fff; transform: translateY(-1px); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 5px 14px -7px rgba(30, 91, 79, .55); }
.btn-primary:hover { background: #266a5c; border-color: #266a5c; }
.btn-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.btn-soft:hover { background: #dbeae4; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { min-height: 29px; padding: 0 10px; font-size: 10.5px; border-radius: 7px; }
.btn-icon { width: 35px; padding: 0; }

.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; gap: 2px; }
.seg button {
  border: 0; background: transparent; color: var(--muted); border-radius: 6px;
  padding: 5px 10px; font-size: 10.5px; font-weight: 600; transition: .15s ease; white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-label { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px;
  border-radius: 7px; border: 1px solid var(--line); background: var(--surface);
  font-size: 10.5px; color: var(--muted); transition: .15s ease; white-space: nowrap;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.on { color: var(--brand); border-color: #b8d1c7; background: var(--brand-soft); font-weight: 600; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.chip.on .dot { background: var(--brand); }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card.pad { padding: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px 0; }
.card-head h2, .card-head h3 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .01em; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; }
.card-body { padding: 16px 20px 20px; }
.card-link { border: 0; background: transparent; color: var(--brand); font-size: 10.5px; font-weight: 600; padding: 2px 0; display: inline-flex; align-items: center; gap: 4px; }
.card-link:hover { text-decoration: underline; }
.card-link svg { width: 12px; height: 12px; }
.card-tool { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.micro { font-size: 9.5px; color: var(--muted); }
.section-title { display: flex; align-items: center; gap: 9px; margin: 26px 0 12px; }
.section-title h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.section-title span { font-size: 10px; color: var(--muted); }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; }
.c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; }
.c9 { grid-column: span 9; } .c12 { grid-column: span 12; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.kpi-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi {
  position: relative; overflow: hidden; min-height: 128px; padding: 16px 17px 13px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm);
}
.kpi::after {
  content: ""; position: absolute; inset: auto -25% -55% auto; width: 150px; height: 150px;
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent, var(--brand)) 13%, transparent), transparent 70%);
  pointer-events: none;
}
.kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 10.5px; }
.kpi-top .mini-tag { font-size: 8.5px; padding: 2px 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.kpi-val { display: flex; align-items: baseline; gap: 5px; margin-top: 10px; }
.kpi-val b { font-family: var(--font-num); font-size: 28px; line-height: 1; font-weight: 600; letter-spacing: -.02em; }
.kpi-val small { font-size: 10px; color: var(--muted); }
.kpi-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: 12px; min-height: 32px; }
.kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; }
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }
.kpi-delta.flat { color: var(--muted); }
.kpi-delta span { color: var(--muted); font-weight: 400; }
.sparkline { width: 82px; height: 30px; opacity: .85; }
.kpi .sparkline { position: absolute; right: 14px; bottom: 12px; width: 72px; }

.brief {
  position: relative; overflow: hidden; color: #f3f5ef; border-radius: var(--radius);
  background:
    radial-gradient(720px 280px at 88% -20%, rgba(213, 187, 128, .22), transparent 65%),
    radial-gradient(520px 300px at 8% 120%, rgba(105, 155, 137, .20), transparent 65%),
    linear-gradient(110deg, #173f37, #1e5146 62%, #234f45);
  border: 1px solid rgba(255, 255, 255, .10); box-shadow: 0 20px 48px -34px rgba(18, 61, 52, .75);
  padding: 22px 24px;
}
.brief::before {
  content: "“"; position: absolute; right: 26px; top: -26px; font-family: var(--font-display);
  font-size: 150px; color: rgba(232, 214, 177, .10); line-height: 1;
}
.brief-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.brief-tag { display: inline-flex; align-items: center; gap: 7px; color: #d9c69b; font-size: 9.5px; font-weight: 700; letter-spacing: .16em; }
.brief-tag::before { content: ""; width: 16px; height: 1px; background: currentColor; }
.brief-date { color: #9fb6ab; font-size: 9.5px; }
.brief h2 { margin: 0 0 6px; font-family: var(--font-display); font-weight: 600; font-size: 21px; line-height: 1.35; letter-spacing: .01em; max-width: 850px; }
.brief h2 em { font-style: normal; color: #e4cea0; }
.brief p { margin: 0; max-width: 840px; color: #b9cbc2; font-size: 11.5px; line-height: 1.7; }
.brief-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.brief-foot .btn { background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .16); color: #f6f5ee; }
.brief-foot .btn:hover { background: rgba(255, 255, 255, .17); }
.brief-foot .btn-primary { background: #e8d4a8; border-color: #e8d4a8; color: #2a3b30; }
.brief-foot .btn-primary:hover { background: #f0dfb9; }
.brief-stats { display: flex; gap: 22px; margin-left: auto; }
.brief-stat { display: flex; flex-direction: column; }
.brief-stat b { font-family: var(--font-num); font-size: 18px; font-weight: 500; color: #f2e8d2; }
.brief-stat span { font-size: 9px; color: #94ada1; }

/* ---------- Tables / lists ---------- */
.table-wrap { overflow-x: auto; scrollbar-width: thin; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.data-table th {
  padding: 8px 9px; text-align: left; font-size: 9.5px; letter-spacing: .04em; font-weight: 600;
  color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; background: transparent;
}
.data-table td { padding: 10px 9px; border-bottom: 1px solid #efeee7; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .14s ease; }
.data-table tbody tr:hover { background: #faf8f2; }
.data-table .num { font-family: var(--font-num); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.data-table th.num { text-align: right; }
.data-table .strong { font-weight: 600; color: var(--ink); }
.table-sub { color: var(--muted); font-size: 9.5px; margin-top: 2px; }
.brand-cell { display: flex; align-items: center; gap: 8px; min-width: 112px; }
.brand-avatar {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 700; flex: none;
}
.brand-cell b { display: block; font-size: 11.5px; line-height: 1.25; }
.brand-cell small { display: block; color: var(--muted); font-size: 9px; }
.rank-no { width: 18px; font-family: var(--font-num); color: var(--muted); font-size: 10px; }
.rank-no.top { color: var(--gold); font-weight: 700; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 5px;
  font-size: 9px; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.badge.green { background: var(--success-soft); color: var(--success); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.amber { background: var(--warning-soft); color: var(--warning); }
.badge.blue { background: var(--info-soft); color: var(--info); }
.badge.gray { background: var(--surface-2); color: var(--muted); }
.badge.gold { background: var(--gold-soft); color: #8b6426; }
.badge.outline { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.badge.wrap { white-space: normal; text-align: left; line-height: 1.5; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-num); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.trend.up { color: var(--success); }
.trend.down { color: var(--danger); }
.trend.flat { color: var(--muted); }
.trend svg { width: 10px; height: 10px; }
.progress { height: 5px; border-radius: 4px; background: var(--surface-3); overflow: hidden; min-width: 54px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.progress.gold span { background: var(--gold); }
.progress.rose span { background: var(--rose); }
.score-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-num); font-size: 10.5px; font-weight: 600; }
.score-pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- Insights ---------- */
.insight-list { display: flex; flex-direction: column; }
.insight-item { display: flex; gap: 11px; padding: 13px 0; border-bottom: 1px solid #efeee7; }
.insight-item:first-child { padding-top: 2px; }
.insight-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.insight-tone { width: 4px; height: 4px; border-radius: 50%; margin-top: 8px; flex: none; }
.insight-tone.danger { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.insight-tone.warning { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.insight-tone.opportunity { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.insight-tone.neutral { background: var(--info); box-shadow: 0 0 0 4px var(--info-soft); }
.insight-item h4 { margin: 0 0 3px; font-size: 11.5px; font-weight: 700; line-height: 1.4; }
.insight-item p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.insight-item .evidence { display: inline-flex; margin-top: 6px; padding: 2px 6px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); font-size: 9px; }
.insight-item .action { margin-top: 7px; padding-left: 9px; border-left: 2px solid var(--gold); color: var(--ink-2); font-size: 10px; line-height: 1.55; }

/* ---------- Charts ---------- */
.chart-svg { width: 100%; height: auto; overflow: visible; }
.chart-box { padding: 8px 12px 2px; }
.grid-line { stroke: #ecebe3; stroke-width: 1; stroke-dasharray: 3 4; }
.axis-text { font-family: var(--font-num); font-size: 9px; fill: #94a099; }
.axis-title { font-family: var(--font-sans); font-size: 9px; fill: #87938d; }
.chart-hit { cursor: crosshair; }
.chart-hit:hover { fill: rgba(30, 91, 79, .035); }
.donut-svg { max-width: 205px; margin: 0 auto; }
.donut-value { font-family: var(--font-num); font-size: 24px; font-weight: 600; fill: var(--ink); }
.donut-label { font-family: var(--font-sans); font-size: 9px; fill: var(--muted); }
.radar-svg { max-height: 310px; }
.radar-label { font-family: var(--font-sans); font-size: 9px; fill: #6f7d76; }
.dot-label { font-family: var(--font-sans); font-size: 9px; font-weight: 700; pointer-events: none; }
.quad-label { font-family: var(--font-sans); font-size: 8.5px; fill: #a3aca6; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.legend-item i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend-item.gold i { background: var(--gold); }
.chart-note { color: var(--muted); font-size: 9px; margin: 4px 20px 14px; line-height: 1.5; }
.chart-legend-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 20px 8px; flex-wrap: wrap; }

/* ---------- Channels ---------- */
.channel-tabs { display: flex; gap: 5px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.channel-tab {
  display: flex; align-items: center; gap: 6px; padding: 7px 11px; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 600; white-space: nowrap;
}
.channel-tab .cdot { width: 6px; height: 6px; border-radius: 50%; }
.channel-tab.on { background: var(--surface-2); color: var(--ink); }
.channel-hero { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; }
.channel-emblem {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; flex: none;
  font-family: var(--font-display); font-size: 16px; font-weight: 700; border: 1px solid rgba(0, 0, 0, .05);
}
.channel-hero h2 { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 700; }
.channel-hero p { margin: 4px 0 0; color: var(--muted); font-size: 11px; max-width: 640px; }
.channel-hero .channel-meta { margin-left: auto; text-align: right; flex: none; }
.channel-hero .channel-meta b { display: block; font-family: var(--font-num); font-size: 21px; color: var(--brand); }
.channel-hero .channel-meta span { font-size: 9px; color: var(--muted); }
.bid-ladder { display: flex; flex-direction: column; gap: 11px; }
.bid-row { display: grid; grid-template-columns: 72px 1fr 62px; align-items: center; gap: 9px; }
.bid-name { font-size: 10.5px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.bid-name .brand-avatar { width: 20px; height: 20px; border-radius: 6px; font-size: 9px; }
.bid-track { position: relative; height: 22px; background: linear-gradient(90deg, #f3f1e9, #eef0e9); border-radius: 5px; overflow: visible; }
.bid-range { position: absolute; top: 5px; height: 12px; border-radius: 4px; opacity: .75; }
.bid-marker { position: absolute; top: 2px; width: 2px; height: 18px; background: var(--ink); }
.bid-value { text-align: right; font-family: var(--font-num); font-size: 10.5px; font-weight: 600; }
.bid-scale { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 8px; padding: 0 72px 0 81px; }
.playbook { display: flex; flex-direction: column; gap: 11px; }
.playbook-item { display: flex; gap: 9px; }
.playbook-item b { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border-radius: 5px; background: var(--brand-soft); color: var(--brand); font-family: var(--font-num); font-size: 9px; }
.playbook-item p { margin: 0; font-size: 10.5px; color: var(--ink-2); line-height: 1.6; }
.playbook-item p span { color: var(--muted); }

/* ---------- Competitor cards ---------- */
.comp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.comp-card {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  border-radius: 15px; padding: 16px; transition: .18s ease; cursor: pointer;
}
.comp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d2d6cc; }
.comp-card.self { border-color: #b6d1c6; background: linear-gradient(180deg, #fbfdfa, #fffdf8 70%); }
.comp-top { display: flex; align-items: flex-start; gap: 10px; }
.comp-avatar { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-family: var(--font-display); font-size: 16px; font-weight: 700; flex: none; }
.comp-title { flex: 1; min-width: 0; }
.comp-title h3 { margin: 0; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.comp-title p { margin: 2px 0 0; font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.threat { flex: none; text-align: right; }
.threat b { font-family: var(--font-num); font-size: 18px; font-weight: 600; display: block; line-height: 1; }
.threat span { font-size: 8px; color: var(--muted); letter-spacing: .06em; }
.comp-tags { display: flex; gap: 5px; flex-wrap: wrap; margin: 11px 0; }
.comp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 10px 0; border-top: 1px solid #efeee7; border-bottom: 1px solid #efeee7; }
.comp-stat b { display: block; font-family: var(--font-num); font-size: 13px; font-weight: 600; }
.comp-stat span { font-size: 8.5px; color: var(--muted); }
.comp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.comp-foot .signal { font-size: 9.5px; color: var(--muted); }
.comp-foot .signal b { color: var(--ink-2); }
.score-ring { width: 39px; height: 39px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.score-ring span { width: 31px; height: 31px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--font-num); font-size: 10px; font-weight: 700; }

/* ---------- Drawer / modal ---------- */
.modal-backdrop, .drawer-backdrop {
  position: fixed; inset: 0; z-index: 80; background: rgba(16, 28, 24, .46);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fade .18s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(620px, 96vw); max-height: 88vh; overflow: auto; background: var(--surface);
  border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(10, 24, 20, .3);
  animation: pop .2s ease both;
}
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
.modal.wide { width: min(820px, 96vw); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.modal-head p { margin: 3px 0 0; color: var(--muted); font-size: 10.5px; }
.modal-close { border: 0; background: var(--surface-2); color: var(--muted); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.modal-close:hover { color: var(--ink); background: var(--surface-3); }
.modal-body { padding: 18px 20px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--line); background: #fbfaf5; border-radius: 0 0 18px 18px; }
.drawer-backdrop { justify-content: flex-end; padding: 0; }
.drawer {
  width: min(640px, 96vw); height: 100vh; overflow: auto; background: var(--paper);
  box-shadow: -30px 0 70px rgba(10, 24, 20, .24); animation: slide .24s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes slide { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { position: sticky; top: 0; z-index: 2; background: rgba(245, 243, 237, .92); backdrop-filter: blur(12px); padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 18px 22px 40px; }
.drawer-close { position: absolute; right: 18px; top: 18px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 10px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: #fff; outline: none; font-size: 11.5px; transition: .15s ease;
}
.field textarea { min-height: 74px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47, 118, 103, .10); }
.field small { font-size: 9px; color: var(--muted); }
.check-row { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--ink-2); }
.check-row input { accent-color: var(--brand); }
.switch { position: relative; width: 34px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; }
.switch i { display: block; width: 34px; height: 20px; border-radius: 12px; background: #d5d9d3; transition: .18s ease; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .18s ease; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(14px); }
.upload-zone {
  border: 1.5px dashed #cbd3ca; border-radius: 13px; padding: 24px 18px; text-align: center;
  background: #fbfaf4; transition: .18s ease;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--brand-2); background: var(--brand-soft); }
.upload-zone svg { width: 28px; height: 28px; margin: 0 auto 8px; color: var(--brand); }
.upload-zone b { display: block; font-size: 12px; }
.upload-zone p { margin: 3px 0 9px; color: var(--muted); font-size: 9.5px; }
.upload-zone input { display: none; }

/* ---------- Alerts ---------- */
.alert-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.alert-stat { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.alert-stat span { display: block; font-size: 9.5px; color: var(--muted); }
.alert-stat b { display: block; font-family: var(--font-num); font-size: 22px; line-height: 1.3; font-weight: 600; }
.alert-feed { display: flex; flex-direction: column; }
.alert-item { display: flex; gap: 11px; padding: 14px 0; border-bottom: 1px solid #efeee7; }
.alert-item:first-child { padding-top: 2px; }
.alert-item:last-child { border-bottom: 0; }
.alert-sev { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex: none; }
.alert-sev.high { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.alert-sev.medium { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.alert-sev.low { background: var(--info); box-shadow: 0 0 0 4px var(--info-soft); }
.alert-main { flex: 1; min-width: 0; }
.alert-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.alert-meta time { margin-left: auto; color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.alert-main h4 { margin: 0 0 2px; font-size: 11.5px; font-weight: 700; line-height: 1.45; }
.alert-main p { margin: 0; font-size: 10px; color: var(--muted); line-height: 1.6; }
.alert-actions { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.alert-done { opacity: .55; }
.alert-done h4 { text-decoration: line-through; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 17px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 5px; bottom: 5px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 15px 4px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -16.5px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.tl-item.danger::before { border-color: var(--danger); }
.tl-item.gold::before { border-color: var(--gold); }
.tl-date { font-family: var(--font-num); font-size: 8.5px; color: var(--muted-2); letter-spacing: .03em; }
.tl-item h4 { margin: 2px 0 2px; font-size: 10.8px; font-weight: 700; line-height: 1.45; }
.tl-item p { margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.55; }
.tl-item .tl-foot { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
.tl-item .tl-foot b { font-size: 9px; color: var(--success); font-weight: 600; }
.tl-item .tl-foot b.neg { color: var(--danger); }

/* ---------- Creative wall ---------- */
.creative-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.creative {
  background: var(--surface); border: 1px solid var(--line); border-radius: 15px; overflow: hidden;
  transition: .18s ease; cursor: pointer;
}
.creative:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d2d6cc; }
.creative-art {
  position: relative; height: 198px; overflow: hidden; padding: 16px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(24, 20, 14, .24), rgba(24, 20, 14, .04) 42%, rgba(24, 20, 14, .30)),
    linear-gradient(145deg, var(--a), var(--b));
}
.creative-art::before {
  content: ""; position: absolute; width: 210px; height: 210px; right: -66px; top: -66px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.36);
  box-shadow: 0 0 0 24px rgba(255,255,255,.08), 0 0 0 52px rgba(255,255,255,.05);
}
.creative-art::after {
  content: ""; position: absolute; left: -35px; bottom: -70px; width: 170px; height: 170px;
  border-radius: 42% 58% 61% 39% / 46% 40% 60% 54%; background: rgba(255,255,255,.15);
}
.creative-art .art-kicker { position: relative; z-index: 1; font-size: 8px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.76); }
.creative-art .art-title {
  position: relative; z-index: 1; font-family: var(--font-display); font-size: 20px; line-height: 1.32;
  color: #fff; max-width: 86%; text-shadow: 0 2px 18px rgba(18, 12, 8, .38), 0 1px 2px rgba(18, 12, 8, .2);
}
.creative-art .art-cta { position: relative; z-index: 1; display: inline-flex; width: fit-content; padding: 4px 9px; border: 1px solid rgba(255,255,255,.55); border-radius: 5px; color: #fff; font-size: 9px; }
.creative-art .art-brand { position: absolute; right: 14px; bottom: 14px; z-index: 1; color: rgba(255,255,255,.82); font-family: var(--font-display); font-size: 11px; letter-spacing: .08em; }
.creative-meta { padding: 11px 13px 13px; }
.creative-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.creative-top b { font-size: 10.5px; }
.creative-top .badge { font-size: 8px; }
.creative-hook { margin: 6px 0 9px; color: var(--ink-2); font-size: 10px; line-height: 1.5; min-height: 30px; }
.creative-stats { display: flex; gap: 12px; padding-top: 8px; border-top: 1px solid #efeee7; }
.creative-stats span { font-size: 8.5px; color: var(--muted); }
.creative-stats b { display: block; font-family: var(--font-num); font-size: 11px; color: var(--ink); font-weight: 600; }
.art-price { position: absolute; z-index: 1; right: 14px; top: 14px; color: rgba(255,255,255,.95); font-family: var(--font-num); font-size: 12px; border-bottom: 1px solid rgba(255,255,255,.45); padding-bottom: 2px; }

/* ---------- Sentiment ---------- */
.sentiment-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--surface-3); }
.sentiment-bar span { height: 100%; }
.sentiment-legend { display: flex; justify-content: space-between; margin-top: 8px; }
.sentiment-legend div { display: flex; align-items: center; gap: 5px; font-size: 9px; color: var(--muted); }
.sentiment-legend i { width: 6px; height: 6px; border-radius: 50%; }
.word-cloud { display: flex; flex-wrap: wrap; gap: 7px 11px; align-items: center; padding: 4px 0; }
.word-cloud span { font-weight: 600; line-height: 1.3; color: var(--brand); }
.word-cloud span.neg { color: var(--rose); }
.word-cloud span.neu { color: var(--muted); }
.word-cloud small { font-family: var(--font-num); font-size: 8px; color: var(--muted-2); vertical-align: super; margin-left: 1px; }
.review-item { padding: 11px 0; border-bottom: 1px solid #efeee7; }
.review-item:last-child { border-bottom: 0; }
.review-top { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.review-top b { font-size: 10px; }
.stars { color: var(--gold); font-size: 9px; letter-spacing: 1px; }
.review-item p { margin: 0; color: var(--ink-2); font-size: 10px; line-height: 1.6; }
.review-tags { display: flex; gap: 4px; margin-top: 5px; }
.review-tags span { font-size: 8px; color: var(--muted); background: var(--surface-2); border-radius: 3px; padding: 1px 5px; }
.review-select { height: 30px; padding: 3px 26px 3px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 10px; color: var(--ink-2); outline: none; }
.heatmap { display: grid; grid-template-columns: 26px repeat(7, 1fr); gap: 4px; align-items: center; }
.heatmap span { font-size: 8px; color: var(--muted); }
.heatcell { height: 16px; border-radius: 3px; background: var(--brand-soft); }
.heatcell.l2 { background: #cfe2da; } .heatcell.l3 { background: #9fc5b8; } .heatcell.l4 { background: #5f9c8b; } .heatcell.l5 { background: var(--brand); }

/* ---------- Sources ---------- */
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.source-card { padding: 15px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.source-top { display: flex; align-items: flex-start; gap: 10px; }
.source-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-display); font-size: 12px; font-weight: 700; flex: none; }
.source-title { flex: 1; }
.source-title b { display: block; font-size: 12px; }
.source-title small { display: block; color: var(--muted); font-size: 9px; margin-top: 1px; }
.source-status { display: inline-flex; align-items: center; gap: 5px; font-size: 8.5px; color: var(--muted); white-space: nowrap; }
.source-status i { width: 5px; height: 5px; border-radius: 50%; }
.source-status.ok i { background: var(--success); }
.source-status.partial i { background: var(--warning); }
.source-status.manual i { background: var(--info); }
.source-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin: 11px 0 9px; padding-top: 9px; border-top: 1px solid #efeee7; }
.source-meta div span { display: block; color: var(--muted); font-size: 8.5px; }
.source-meta div b { font-family: var(--font-num); font-size: 10.5px; font-weight: 600; }
.source-note { color: var(--muted); font-size: 9px; line-height: 1.55; margin: 0; }
.coverage-table td, .coverage-table th { font-size: 9.5px; }
.upload-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: start; }
.import-history { display: flex; flex-direction: column; gap: 7px; }
.import-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: 9.5px; }
.import-item b { flex: 1; font-weight: 600; }
.import-item span { color: var(--muted); }

/* ---------- Report ---------- */
.report-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.report-paper {
  background: #fff; border: 1px solid #e7e4da; border-radius: 3px; padding: 42px 48px;
  box-shadow: 0 18px 44px -32px rgba(23, 35, 31, .45); max-width: 840px; margin: 0 auto;
}
.report-brand { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--brand); padding-bottom: 14px; }
.report-brand .rb-left b { display: block; font-family: var(--font-display); font-size: 19px; letter-spacing: .08em; color: var(--brand); }
.report-brand .rb-left span { font-size: 8.5px; letter-spacing: .2em; color: var(--muted); }
.report-brand .rb-right { text-align: right; font-size: 9px; color: var(--muted); }
.report-title { margin: 26px 0 4px; font-family: var(--font-display); font-size: 27px; line-height: 1.3; }
.report-sub { color: var(--muted); font-size: 10px; margin-bottom: 24px; }
.report-section { margin: 22px 0; }
.report-section h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.report-section h3::before { content: ""; width: 3px; height: 14px; background: var(--gold); }
.report-section p { margin: 0 0 7px; font-size: 10.5px; line-height: 1.8; color: var(--ink-2); }
.report-section li { font-size: 10.5px; line-height: 1.8; }
.report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 13px 0; }
.report-kpi { border: 1px solid var(--line); border-radius: 7px; padding: 9px 10px; }
.report-kpi span { font-size: 8px; color: var(--muted); display: block; }
.report-kpi b { font-family: var(--font-num); font-size: 16px; font-weight: 600; }
.report-table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 9px; }
.report-table th { text-align: left; background: #f4f2eb; padding: 6px; border: 1px solid #e8e5db; font-weight: 600; }
.report-table td { padding: 6px; border: 1px solid #e8e5db; }
.report-callout { background: #f7f4ea; border-left: 3px solid var(--gold); padding: 10px 12px; margin: 12px 0; font-size: 10px; line-height: 1.7; }
.report-foot { margin-top: 30px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; line-height: 1.6; }
.report-control { padding: 16px; }
.report-control h3 { margin: 0 0 3px; font-size: 13px; }
.report-control p { margin: 0 0 12px; color: var(--muted); font-size: 9.5px; }
.report-section-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.report-section-list label { display: flex; align-items: center; gap: 7px; font-size: 10.5px; }
.report-section-list input { accent-color: var(--brand); }

/* ---------- Empty / misc ---------- */
.empty { padding: 36px 12px; text-align: center; color: var(--muted); font-size: 11px; }
.empty b { display: block; color: var(--ink-2); font-size: 12px; margin-bottom: 3px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-stat { padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.mini-stat span { display: block; font-size: 9px; color: var(--muted); }
.mini-stat b { display: block; font-family: var(--font-num); font-size: 18px; font-weight: 600; margin-top: 2px; }
.mini-stat small { font-size: 9px; color: var(--muted); }
.notice {
  display: flex; gap: 9px; padding: 10px 12px; border-radius: 9px; font-size: 9.5px; line-height: 1.6;
  background: var(--warning-soft); border: 1px solid #ead9b8; color: #7c5d27;
}
.notice svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.notice.blue { background: var(--info-soft); border-color: #cfdeeb; color: #315c80; }
.notice.green { background: var(--success-soft); border-color: #cfe4d8; color: #2c644c; }
.tag-list { display: flex; gap: 5px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 10px; }
.tiny { font-size: 9px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mb0 { margin-bottom: 0; }
.w100 { width: 100%; }
.hidden { display: none !important; }

/* Toast */
.toast-root { position: fixed; right: 24px; bottom: 24px; z-index: 120; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  min-width: 250px; max-width: 380px; padding: 11px 14px; border-radius: 10px;
  background: #173f37; color: #f4f5ef; font-size: 11px; box-shadow: 0 14px 36px rgba(10, 24, 20, .28);
  display: flex; align-items: flex-start; gap: 8px; animation: toastIn .22s ease both; pointer-events: auto;
}
.toast::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #d8bd85; margin-top: 5px; flex: none; }
.toast.out { animation: toastOut .2s ease both; }
@keyframes toastIn { from { transform: translateY(7px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateY(5px); opacity: 0; } }

/* Reveal */
.reveal { animation: rise .35s ease both; animation-delay: calc(var(--d, 0) * 35ms); }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .sidebar { width: 236px; }
  .main-shell { margin-left: 236px; }
  .topbar, .view { padding-left: 24px; padding-right: 24px; }
  .app-foot { padding-left: 24px; padding-right: 24px; }
  .kpi-row { grid-template-columns: repeat(5, minmax(145px, 1fr)); overflow-x: auto; padding-bottom: 2px; }
  .comp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .creative-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; width: 258px; }
  .app.menu-open .sidebar { transform: none; }
  .main-shell { margin-left: 0; }
  .menu-btn { display: grid; }
  .sidebar-scrim { display: none; position: fixed; inset: 0; z-index: 35; background: rgba(15, 28, 24, .4); }
  .app.menu-open .sidebar-scrim { display: block; }
  .search-btn span, .search-btn kbd { display: none; }
  .search-btn { width: 35px; padding: 0; justify-content: center; }
  .report-layout { grid-template-columns: 260px 1fr; }
  .report-paper { padding: 30px; }
}
@media (max-width: 900px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .c3, .c4, .c5, .c6, .c7, .c8, .c9 { grid-column: span 12; }
  .comp-grid, .creative-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-grid { grid-template-columns: 1fr; }
  .report-layout { grid-template-columns: 1fr; }
  .report-control { order: 2; }
  .upload-panel { grid-template-columns: 1fr; }
  .alert-stats { grid-template-columns: repeat(2, 1fr); }
  .brief-stats { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .head-actions { width: 100%; }
}
@media (max-width: 680px) {
  .topbar { height: 60px; padding: 0 15px; }
  .view { padding: 18px 15px 22px; }
  .app-foot { padding: 12px 15px 18px; flex-direction: column; gap: 4px; }
  .crumb { font-size: 11px; }
  .demo-pill { display: none; }
  .page-head h1 { font-size: 24px; }
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi { min-height: 118px; padding: 13px; }
  .kpi-val b { font-size: 23px; }
  .comp-grid, .creative-grid, .two-col { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .brief { padding: 18px; }
  .brief h2 { font-size: 18px; }
  .head-actions { flex-wrap: wrap; }
  .head-actions .btn { flex: 1; }
  .channel-hero { flex-wrap: wrap; }
  .channel-hero .channel-meta { text-align: left; margin-left: 64px; }
  .report-paper { padding: 22px 18px; }
  .report-kpis { grid-template-columns: repeat(2, 1fr); }
  .alert-item { gap: 8px; }
  .seg button { padding: 5px 8px; }
  .toast-root { left: 15px; right: 15px; bottom: 15px; }
  .toast { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Print ---------- */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  .sidebar, .topbar, .app-foot, .report-control, .head-actions, .toast-root, .sidebar-scrim, .no-print { display: none !important; }
  .main-shell { margin: 0; }
  .view { max-width: none; padding: 0; }
  .page-head { display: none; }
  .report-layout { display: block; }
  .report-paper { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .report-section { break-inside: avoid; }
  .reveal { animation: none; }
}
