/* 观潮 · 客户工作台 — 设计变量、外壳与共享组件
   One warm accent on quiet neutral surfaces. membership.css and api.css build on these tokens.
   Class names are shared with the page scripts — restyle here, do not rename. */

:root {
  color-scheme: light;
  --font: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --ink-900: #101828;
  --ink-800: #1d2939;
  --ink-700: #344054;
  --ink-600: #475467;
  --ink-500: #667085;
  --ink-400: #98a2b3;
  --ink-300: #d0d5dd;
  --line: #e4e7ec;
  --line-soft: #eef0f4;
  --canvas: #f4f5f7;
  --surface-2: #f9fafb;

  --accent: #f0622d;
  --accent-600: #d9501f;
  --accent-soft: #fff3ec;
  --accent-line: #fbd5c2;
  --accent-ring: rgba(240, 98, 45, .2);
  --accent-gradient: linear-gradient(180deg, #f6753f 0%, #eb5b26 100%);

  --green: #067a57;
  --green-soft: #e6f6ee;
  --amber: #a15c07;
  --amber-soft: #fff6e5;
  --blue: #2a62c9;
  --blue-soft: #eaf1fe;
  --red: #c4372f;
  --red-soft: #fff0ee;
  --violet: #6247d6;
  --violet-soft: #f0edff;

  /* Names kept for markup and rules written against the previous stylesheet. */
  --text: var(--ink-700);
  --muted: var(--ink-500);
  --border: var(--line);
  --bg: var(--canvas);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .08), 0 2px 6px rgba(16, 24, 40, .04);
  --shadow-lg: 0 32px 80px rgba(13, 20, 36, .28), 0 8px 24px rgba(13, 20, 36, .12);

  --sidebar: 232px;
  --topbar: 60px;

  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-700);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); }
body.customer-site { display: flex; flex-direction: column; min-height: 100vh; }
.customer-site > #app { flex: 1; }
.site-registration { flex: none; padding: 16px 24px; text-align: center; font-size: 12px; line-height: 1.8; color: var(--ink-500); }
.site-registration a { color: inherit; }
.site-registration a:hover, .site-registration a:focus-visible { color: var(--accent-600); text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
svg { flex: none; vertical-align: middle; }
a { color: var(--accent-600); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--ink-900); }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.3px; line-height: 1.3; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
small { font-size: 12px; }
::selection { background: #ffd9c7; }

button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { outline: 0; }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; flex: none; vertical-align: middle; accent-color: var(--accent); cursor: pointer; }
input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Sidebar ---------- */
.sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 20; width: var(--sidebar); display: flex; flex-direction: column; padding: 20px 14px 14px; border-right: 1px solid var(--line); background: #fff; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 10px 20px; color: var(--ink-900); }
.brand img { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 6px 14px rgba(240, 98, 45, .3); }
.brand-name { font-size: 21px; font-weight: 700; line-height: 1.15; letter-spacing: 3px; }
.brand-name small { display: block; margin-top: 3px; font-size: 9px; font-weight: 500; letter-spacing: 3px; color: var(--ink-400); }
.workspace { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); color: var(--ink-800); font-size: 13px; font-weight: 500; }
.workspace-icon { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--accent); }
.workspace .chev { margin-left: auto; color: var(--ink-400); }
.nav-label { margin: 16px 0 6px; padding: 0 12px; font-size: 11px; letter-spacing: 1px; color: var(--ink-400); }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; margin: 1px 0; padding: 0 12px; border-radius: 9px; color: var(--ink-600); font-size: 13.5px; text-align: left; transition: background .15s, color .15s; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { background: #f3f4f7; color: var(--ink-900); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-600); font-weight: 600; }
.nav-item.active:hover { background: #ffeadf; color: var(--accent-600); }
.nav-item .count { margin-left: auto; padding: 1px 7px; border-radius: 999px; background: #eef0f4; color: var(--ink-500); font-size: 11px; }
.nav-item.active .count { background: #ffdcc9; color: var(--accent-600); }
.sidebar nav { margin-bottom: 12px; }
.sidebar-bottom { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.sidebar-bottom .nav-item { font-size: 13px; color: var(--ink-500); }

/* ---------- Top bar ---------- */
.shell { margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 10; height: var(--topbar); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; border-radius: 9px; color: var(--ink-500); transition: background .15s, color .15s; }
.icon-btn:hover { background: #f1f3f6; color: var(--ink-900); }
.mobile-menu { display: none; }

/* ---------- Page ---------- */
.main { max-width: 1720px; margin: auto; padding: 24px 28px 32px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.heading-title { display: flex; align-items: center; gap: 10px; }
.subtitle { margin-top: 6px; font-size: 13.5px; line-height: 1.7; color: var(--ink-500); }
.heading-actions { display: flex; align-items: center; gap: 8px; }
.footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 6px 2px; font-size: 12px; color: var(--ink-400); }
.footer button { font-size: 12px; color: var(--ink-500); }
.footer button:hover { color: var(--accent-600); }

/* ---------- Buttons + fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 14px; border: 1px solid #d5d9e1; border-radius: var(--radius-sm); background: #fff; color: var(--ink-700); font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, color .15s, transform .05s; }
.btn:hover { border-color: #bcc3ce; background: var(--surface-2); color: var(--ink-900); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { border-color: #e0531e; background: var(--accent-gradient); color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(190, 70, 20, .35), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn.primary:hover { border-color: #d44c1a; background: linear-gradient(180deg, #f26a33 0%, #e25220 100%); color: #fff; }
.btn.sm { min-height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; }
.text-link { display: inline-flex; align-items: center; gap: 3px; color: var(--accent-600); font-size: 12.5px; font-weight: 500; }
.text-link:hover { color: #b83f12; text-decoration: underline; text-underline-offset: 3px; }

.date-select, .form-input, .filter-select {
  border: 1px solid #d5d9e1;
  border-radius: var(--radius-sm);
  background-color: #fff;
  color: var(--ink-800);
  font-size: 13.5px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.date-select:hover, .form-input:hover, .filter-select:hover { border-color: #bcc3ce; }
.date-select:focus, .form-input:focus, .filter-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
/* Carets are drawn with gradients: the embedded detail sheets only allow remote images. */
.date-select, select.form-input, .filter-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #8a94a6 50%), linear-gradient(135deg, #8a94a6 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.date-select { min-height: 36px; padding-left: 12px; font-size: 13px; }
.filter-select { min-width: 104px; min-height: 34px; padding-left: 10px; font-size: 13px; }
.form-label { display: block; margin-bottom: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-600); }
.form-input { display: block; width: 100%; min-height: 40px; margin-bottom: 16px; padding: 0 12px; }
.form-input::placeholder { color: var(--ink-400); }
textarea.form-input { padding: 10px 12px; line-height: 1.7; }
.form-label > .form-input { margin-top: 7px; font-weight: 400; }
.form-label:has(> .form-input) { margin-bottom: 0; }
.checkbox-label { display: flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; }

/* ---------- KPI cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card { position: relative; overflow: hidden; padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.kpi-top { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-500); }
.kpi-top .kpi-symbol { display: grid; place-items: center; width: 34px; height: 34px; margin-left: auto; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.kpi-card:nth-child(2) .kpi-symbol { background: var(--blue-soft); color: var(--blue); }
.kpi-card:nth-child(3) .kpi-symbol { background: var(--green-soft); color: var(--green); }
.kpi-card:nth-child(4) .kpi-symbol { background: var(--violet-soft); color: var(--violet); }
.kpi-value { margin: 6px 0 8px; color: var(--ink-900); font-size: 28px; font-weight: 700; line-height: 1.3; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.kpi-value small { margin-left: 5px; color: var(--ink-400); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }

/* ---------- Panels + tables ---------- */
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.panel-title { display: flex; align-items: center; gap: 8px; }
.panel-title h2, .panel-head > h2 { font-size: 15px; }
.panel-title svg { color: var(--ink-400); }
.title-badge, .panel-head .title-badge { margin-left: 2px; padding: 1px 8px; border-radius: 999px; background: #eef0f4; color: var(--ink-600); font-size: 11.5px; font-weight: 500; }
.table-panel { margin-bottom: 20px; overflow: hidden; }
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 20px 14px; }
.search-field { display: flex; align-items: center; gap: 8px; min-width: 260px; min-height: 36px; padding: 0 12px; border: 1px solid #d5d9e1; border-radius: var(--radius-sm); background: #fff; color: var(--ink-400); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.search-field input { width: 100%; border: 0; background: none; color: var(--ink-800); font-size: 13px; outline: 0; }
.search-field input::placeholder { color: var(--ink-400); }
.toolbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: 12px; color: var(--ink-400); }

.table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; white-space: nowrap; }
thead { background: var(--surface-2); }
th { height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--ink-500); font-size: 12px; font-weight: 600; }
td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink-700); font-variant-numeric: tabular-nums; vertical-align: middle; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #fafbfc; }
th button { display: inline-flex; align-items: center; gap: 4px; color: inherit; font-size: inherit; font-weight: inherit; }
th button:hover { color: var(--ink-900); }
.compare-table th, .compare-table td { height: auto; padding: 13px 16px; font-size: 13px; }
.compare-table td:first-child { color: var(--ink-500); }

.avatar { position: relative; flex: none; display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid #fff; border-radius: 50%; background: var(--avatar, #a4b4ba); color: #fff; font-size: 12px; font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.avatar::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .28), transparent 65%); pointer-events: none; }
.star-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--ink-300); transition: background .15s, color .15s; }
.star-btn:hover { background: #fff6e0; color: #f5a524; }
.star-btn.is-watched { color: #f5a524; }
.star-btn.is-watched svg { fill: #ffe7a8; }

.platform-symbol { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; border-radius: 8px; }
.platform-symbol.douyin { background: #f1f3f6; color: #16181d; }
.platform-symbol.wechat { background: #e8f8ef; color: #07a35a; }
.platform-symbol.kuaishou { background: #fff1e6; color: #f7761f; }
.platform-symbol.bilibili { background: #ffeef4; color: #e8618f; }
.platform-symbol.channels { background: #fff5e2; color: #e08b17; }

.empty { padding: 48px 20px; text-align: center; color: var(--ink-500); font-size: 13.5px; line-height: 1.8; }
.empty > svg { display: block; width: 52px; height: 52px; margin: 0 auto 14px; padding: 12px; border: 1px dashed var(--ink-300); border-radius: 16px; background: var(--surface-2); color: var(--ink-400); }
.empty .btn { margin-top: 14px; }

/* ---------- Selection bar ---------- */
.selected-bar { position: fixed; bottom: 24px; left: calc(50% + var(--sidebar) / 2); z-index: 15; display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 18px; border-radius: 14px; background: var(--ink-900); color: #fff; font-size: 13px; box-shadow: var(--shadow-lg); transform: translateX(-50%); animation: rise-in .2s ease; }
.selected-bar > span { margin-right: 6px; font-weight: 600; }
.selected-bar button { color: #c9d1de; font-size: 13px; }
.selected-bar button:hover { color: #fff; }
.selected-bar .btn { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .1); color: #fff; box-shadow: none; }
.selected-bar .btn:hover { background: rgba(255, 255, 255, .18); }
.selected-bar .btn:last-child { border-color: #e0531e; background: var(--accent-gradient); }

/* ---------- Overlays ---------- */
.overlay-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(13, 20, 36, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade-in .16s ease; }
.modal { position: absolute; top: 50%; left: 50%; width: min(520px, calc(100vw - 28px)); max-height: 90vh; overflow: auto; border-radius: 18px; background: #fff; box-shadow: var(--shadow-lg); transform: translate(-50%, -50%); animation: modal-in .2s cubic-bezier(.2, .8, .3, 1); }
.modal.wide { width: min(860px, calc(100vw - 30px)); }
.modal-header, .drawer-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 16px 22px; border-bottom: 1px solid var(--line-soft); background: #fff; }
.modal-header h2, .drawer-header h2 { font-size: 17px; font-weight: 650; }
.modal-body { padding: 22px; }
.modal-subtitle { margin-bottom: 18px; font-size: 13px; line-height: 1.8; color: var(--ink-500); }
.modal-info { padding: 11px 14px; border: 1px solid #f5e2bf; border-radius: 10px; background: #fffaf0; color: #7a5310; font-size: 12.5px; line-height: 1.75; }
.drawer { position: absolute; top: 0; right: 0; width: min(580px, 100vw); height: 100%; overflow-y: auto; background: #fff; box-shadow: -16px 0 48px rgba(13, 20, 36, .16); animation: slide-in .22s cubic-bezier(.2, .8, .3, 1); }
.drawer-body { padding: 24px; }

.detail-profile { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.detail-profile .avatar { width: 64px; height: 64px; font-size: 19px; }
.detail-profile h2 { margin-bottom: 4px; font-size: 22px; font-weight: 700; }
.detail-profile p { font-size: 12.5px; color: var(--ink-500); }
.detail-bio { margin-bottom: 16px; font-size: 13.5px; line-height: 1.85; color: var(--ink-600); }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.detail-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.detail-kpi { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.detail-kpi small { display: block; margin-bottom: 6px; font-size: 12px; color: var(--ink-500); }
.detail-kpi strong { color: var(--ink-900); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.detail-section { margin-top: 24px; }
.detail-section h3 { margin-bottom: 12px; font-size: 15px; font-weight: 650; }
.detail-section .table-scroll { border: 1px solid var(--line); border-radius: 12px; }
.detail-note { margin-top: 14px; font-size: 12px; line-height: 1.8; color: var(--ink-500); }
.definition { margin-bottom: 20px; }
.definition:last-child { margin-bottom: 0; }
.definition h3 { margin-bottom: 6px; font-size: 14.5px; font-weight: 650; }
.definition p { font-size: 13.5px; line-height: 1.85; color: var(--ink-600); }
.definition p + p { margin-top: 8px; }

/* ---------- Toast ---------- */
.toast { position: fixed; top: 76px; left: 50%; z-index: 200; display: flex; align-items: center; gap: 9px; max-width: 92vw; padding: 11px 18px; border-radius: 12px; background: var(--ink-900); color: #fff; font-size: 13.5px; line-height: 1.6; box-shadow: var(--shadow-lg); transform: translateX(-50%); animation: toast-in .22s ease; }
.toast svg { color: #6ee7b7; }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; border: 0; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(30px); } }
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes rise-in { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- Responsive ---------- */
@media (min-width: 1600px) {
  .main { padding: 28px 40px 36px; }
  .topbar { padding: 0 40px; }
  .kpi-card { padding: 22px 24px 18px; }
  .kpi-value { font-size: 32px; }
}
@media (max-width: 1200px) {
  :root { --sidebar: 204px; }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .main { padding: 20px; }
  .topbar { padding: 0 20px; }
  .kpi-card { padding: 15px 16px; }
  .kpi-value { font-size: 25px; }
}
@media (max-width: 1000px) {
  .heading-actions { gap: 6px; }
  .kpi-grid { gap: 10px; }
  .kpi-top { font-size: 12px; }
  .kpi-value { font-size: 23px; }
}
@media (max-width: 760px) {
  :root { --sidebar: 0px; --topbar: 56px; }
  .sidebar { width: 236px; padding: 18px 12px 14px; overflow-y: auto; transform: translateX(-100%); transition: transform .22s ease; }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: 16px 0 48px rgba(13, 20, 36, .22); }
  .topbar { gap: 8px; padding: 0 12px; }
  .mobile-menu { display: inline-flex; }
  .top-actions { flex: none; gap: 6px; }
  .main { min-width: 0; padding: 16px 14px 24px; }
  .page-heading { align-items: flex-start; gap: 12px; }
  .heading-title h1 { font-size: 22px; }
  .subtitle { font-size: 13px; }
  .date-select { min-height: 34px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-card { padding: 14px; }
  .kpi-value { font-size: 24px; white-space: nowrap; }
  .kpi-top .kpi-symbol { width: 28px; height: 28px; }
  .panel-head { padding: 14px 16px 0; }
  .table-toolbar { gap: 8px; padding: 12px 16px; }
  .search-field { flex: 1; min-width: 140px; }
  .toolbar-right { width: 100%; justify-content: space-between; margin-top: 2px; }
  .footer { flex-wrap: wrap; line-height: 1.8; }
  .selected-bar { bottom: 14px; left: 50%; width: max-content; max-width: 95vw; gap: 8px; }
  .modal-body, .drawer-body { padding: 18px; }
  .detail-kpis { gap: 8px; }
  .detail-kpi { padding: 12px 10px; }
  .detail-kpi strong { font-size: 17px; }
  .toast { top: 66px; min-width: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Legacy static prototype (npm run demo) ----------
   Carried over from the previous stylesheet for markup only the historical static
   prototype (app.js) renders; captions below 11px were raised to 11px.
   The live workspace does not use these rules. */
.sidebar-promo{padding:15px 12px;border-radius:7px;background:linear-gradient(120deg,#fff3e9,#fff8f1);position:relative;overflow:hidden}
.sidebar-promo b{font-size:12px;display:block;margin-bottom:6px}
.sidebar-promo p{font-size:11px;color:#b0937d;line-height:1.7}
.sidebar-promo svg{position:absolute;right:-4px;top:10px;width:58px;height:58px;color:#f4caac;transform:rotate(-12deg);opacity:.5}
.platform-tabs{height:100%;display:flex;gap:30px}
.platform-tab{display:flex;align-items:center;gap:9px;height:100%;position:relative;font-size:13px;color:#828792;white-space:nowrap}
.platform-tab.active{color:#242b39;font-weight:600}
.platform-tab.active:after{content:"";position:absolute;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--accent);width:30px;left:calc(50% - 15px)}
.top-search{display:flex;align-items:center;gap:9px;color:#a5aab5;font-size:11px;padding:9px 11px;border:1px solid var(--border);border-radius:6px;width:184px;text-align:left}
.top-search kbd{margin-left:auto;font-size:11px;border:1px solid #e6e8ed;border-radius:3px;padding:0 4px}
.notification-dot{position:absolute;width:5px;height:5px;background:var(--accent);border:1px solid #fff;border-radius:50%;right:7px;top:5px}
.top-divider{height:24px;width:1px;background:var(--border)}
.user-avatar{width:31px;height:31px;border-radius:50%;background:#e9edf4;color:#747f91;display:grid;place-items:center;font-size:11px}
.breadcrumb{display:flex;align-items:center;gap:9px;font-size:11px;color:#9a9faa;margin-bottom:24px}
.breadcrumb .last{color:#656e7e}
.demo-badge{margin-left:auto;font-size:11px;display:flex;align-items:center;gap:5px;color:#929ba6}
.demo-badge i{width:5px;height:5px;border-radius:50%;background:#e6ab5c}
.heading-tag{font-size:11px;padding:3px 7px;border-radius:4px;border:1px solid #f3dbc7;color:#c59469;background:#fff9f3}
.period-caption{font-size:11px;color:#a2a7b0}
.overview-tabs{display:flex;align-items:center;gap:22px;border-bottom:1px solid #e9ecf0;margin-bottom:20px;height:38px}
.overview-tabs button{font-size:12px;height:100%;position:relative;color:#969da8}
.overview-tabs button.active{color:var(--accent);font-weight:600}
.overview-tabs button.active:after{content:"";height:2px;background:var(--accent);width:100%;position:absolute;bottom:-1px;left:0}
.overview-tabs .updated{margin-left:auto;color:#9da4b0;display:flex;align-items:center;gap:5px;font-size:11px}
.kpi-bottom{font-size:11px;color:#a4aab3;display:flex;align-items:center;gap:8px}
.kpi-bottom .mini-chart{position:absolute;right:16px;bottom:15px;width:65px;height:25px;opacity:.75}
.chart-row{display:grid;grid-template-columns:minmax(0,1.92fr) minmax(265px,1fr);gap:20px;margin-bottom:20px}
.segmented{display:flex;gap:1px;border:1px solid #e8ebef;border-radius:5px;padding:2px}
.segmented button{font-size:11px;padding:5px 10px;border-radius:3px;color:#969daa}
.segmented button.active{background:var(--accent-soft);color:var(--accent)}
.legend{display:flex;gap:17px;font-size:11px;color:#9da4af;padding:18px 22px 0}
.legend span{display:flex;align-items:center;gap:6px}
.legend i{width:6px;height:6px;border-radius:50%}
.trend-wrap{padding:6px 15px 2px;height:212px;position:relative}
.trend-chart{width:100%;height:100%;overflow:visible}
.trend-chart text{font-family:inherit;font-size:11px;fill:#a0a7b2}
.chart-dot{cursor:pointer;opacity:0}
.chart-dot:hover{opacity:1}
.chart-tooltip{position:absolute;display:none;pointer-events:none;background:#29323e;color:#fff;font-size:11px;border-radius:5px;padding:7px 10px;white-space:nowrap;z-index:2;box-shadow:0 4px 15px #1d25322a}
.chart-foot{padding:9px 21px 14px;display:flex;gap:6px;align-items:center;font-size:11px;color:#989fab}
.chart-foot strong{color:#dc946d;font-weight:500}
.donut-content{display:flex;align-items:center;gap:22px;justify-content:center;padding:25px 18px 17px}
.donut{width:142px;height:142px;border-radius:50%;position:relative;flex:none;transform:rotate(-90deg)}
.donut:after{position:absolute;content:"";inset:19px;border-radius:50%;background:white}
.donut-label{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:1;transform:rotate(90deg)}
.donut-label strong{font-size:25px;letter-spacing:-.5px}
.donut-label span{font-size:11px;margin-top:5px;color:#a3a9b3}
.distribution-legend{display:flex;flex-direction:column;gap:13px;min-width:95px}
.distribution-legend div{display:flex;align-items:center;gap:8px;font-size:11px;color:#8b94a1}
.distribution-legend i{width:7px;height:7px;border-radius:2px}
.distribution-legend b{font-size:11px;color:#6f7888;font-weight:500;margin-left:auto}
.insight-note{font-size:11px;line-height:1.8;color:#99929b;background:#fcf9f5;margin:2px 20px 16px;border-radius:5px;padding:9px 12px}
.insight-note strong{color:#da9a71;font-weight:500}
.sort-button{display:flex;gap:3px;align-items:center;padding:0;color:inherit;font-size:11px}
.creator-cell{display:flex;align-items:center;gap:10px;cursor:pointer;text-align:left;padding:0;min-width:140px}
.creator-name{font-weight:550;font-size:11px;color:#485365;max-width:180px;overflow:hidden;text-overflow:ellipsis}
.creator-handle{color:#a5acb7;font-size:11px;margin-top:5px;max-width:170px;overflow:hidden;text-overflow:ellipsis}
.live-tag{font-size:11px;color:var(--accent);border:1px solid #f8c8b5;border-radius:3px;display:inline-flex;margin-left:6px;padding:1px 3px;align-items:center;gap:3px}
.live-bars{display:inline-flex;align-items:flex-end;gap:1px;height:7px}
.live-bars i{width:1.5px;height:7px;background:currentColor}
.live-bars i:nth-child(2){height:4px}
.live-bars i:nth-child(3){height:6px}
.category-tag{font-size:11px;background:#f5f6f8;border:1px solid #f0f1f4;padding:3px 7px;border-radius:4px;color:#959dab}
.cell-primary{font-size:12px;font-weight:500}
.sparkline{width:66px;height:25px}
.row-actions{display:flex;gap:11px;align-items:center}
.row-actions .text-link{color:var(--accent);font-size:11px}
.pagination{padding:15px 20px;border-top:1px solid #f2f3f6;display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#a5acb7}
.page-buttons{display:flex;align-items:center;gap:6px}
.page-buttons button{width:25px;height:25px;border:1px solid #e8ebef;border-radius:4px;font-size:11px}
.page-buttons button.active{border-color:#fac5ac;background:#fff5ed;color:var(--accent)}
.page-buttons select{border:1px solid #e8ebef;border-radius:4px;color:#8e98a5;padding:5px;font-size:11px;background:white}
.footer-links{display:flex;gap:18px}
.bottom-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:20px;margin-bottom:20px}
.hot-list{padding:5px 20px 10px}
.hot-item{display:flex;gap:12px;align-items:center;padding:13px 0;border-bottom:1px solid #f1f3f5;text-align:left;width:100%}
.hot-item:last-child{border:0}
.hot-rank{font-size:15px;color:#c0c7d1;width:18px}
.hot-item:first-child .hot-rank{color:var(--accent)}
.hot-item h3{font-size:11px;font-weight:500;line-height:1.7}
.hot-item p{font-size:11px;color:#a4acb8;margin-top:3px}
.hot-views{margin-left:auto;font-size:12px;font-weight:500;white-space:nowrap;color:#768193}
.hot-views small{display:block;font-size:11px;text-align:right;color:#afb6c1;font-weight:400;margin-top:4px}
.signal-list{padding:16px 20px}
.signal{display:flex;gap:11px;align-items:flex-start;margin-bottom:16px}
.signal:last-child{margin:0}
.signal-icon{width:27px;height:27px;display:grid;place-items:center;color:#e8a472;background:#fff6eb;border-radius:6px;flex:none}
.signal h3{font-size:11px;font-weight:500;line-height:1.7}
.signal p{font-size:11px;color:#a2aab6;line-height:1.7;margin-top:3px}
.signal time{color:#b0b6c0;font-size:11px;margin-left:auto;white-space:nowrap;margin-top:4px}
.content-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:20px}
.content-card{border:1px solid #e9edf2;border-radius:7px;overflow:hidden;cursor:pointer;transition:transform .18s,box-shadow .18s;text-align:left;padding:0;background:#fff}
.content-card:hover{transform:translateY(-3px);box-shadow:0 8px 20px #212b3c08}
.thumbnail{height:140px;padding:20px;position:relative;overflow:hidden;color:#fff;background:var(--theme,#9bafa9);display:flex;align-items:center;justify-content:center}
.thumbnail:before{content:"";position:absolute;width:170px;height:170px;border:30px solid #ffffff15;border-radius:50%;top:-65px;right:-35px}
.thumbnail:after{content:"";position:absolute;left:-30px;bottom:-50px;width:160px;height:110px;background:#ffffff10;transform:rotate(-25deg)}
.thumbnail-word{font-weight:650;font-size:24px;line-height:1.4;letter-spacing:3px;max-width:85%;text-align:center;text-shadow:0 2px 20px #00000012;z-index:1}
.thumbnail .content-duration{position:absolute;bottom:8px;right:9px;background:#00000028;padding:2px 5px;border-radius:3px;font-size:11px}
.thumbnail .content-label{position:absolute;top:10px;left:11px;font-size:11px;letter-spacing:1px;border-bottom:1px solid #ffffff80;padding-bottom:4px}
.content-body{padding:13px}
.content-body h3{font-size:12px;line-height:1.7;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.content-meta{display:flex;align-items:center;justify-content:space-between;color:#a5adba;font-size:11px;margin-top:7px}
.content-numbers{border-top:1px solid #f0f2f5;margin-top:12px;padding-top:10px;display:flex;justify-content:space-between;color:#8792a2;font-size:11px}
.content-numbers span{display:flex;gap:4px;align-items:center}
.articles{padding:5px 20px}
.article-row{display:flex;align-items:center;gap:16px;padding:19px 0;border-bottom:1px solid #f0f2f5;width:100%;text-align:left}
.article-row:last-child{border:0}
.article-cover{width:105px;height:74px;border-radius:4px;background:var(--theme);display:grid;place-items:center;color:#fff;flex:none;position:relative;overflow:hidden}
.article-cover strong{font-size:16px;letter-spacing:3px;font-weight:500;z-index:1}
.article-cover:after{content:"";width:85px;height:85px;border:15px solid #ffffff1a;position:absolute;right:-25px;bottom:-30px;border-radius:50%}
.article-info{flex:1;min-width:0}
.article-info h3{font-size:12px;font-weight:500;line-height:1.7}
.article-info p{font-size:11px;color:#a0a9b7;margin-top:7px}
.article-metric{min-width:85px;text-align:right;font-size:15px}
.article-metric small{display:block;font-size:11px;color:#a8b0bb;margin-top:7px}
.article-badge{font-size:11px;color:#41ae87;border:1px solid #d4eddf;border-radius:2px;margin-right:7px;padding:1px 3px}
.live-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;margin-bottom:20px}
.live-card{background:#fff;border:1px solid var(--border);border-radius:8px;padding:18px}
.live-card-head{display:flex;gap:10px;align-items:center}
.live-card-head .live-tag{margin-left:auto}
.live-card p{font-size:11px;color:#a6aeba;margin-top:8px}
.live-stat-row{display:flex;justify-content:space-between;margin-top:18px;padding-top:15px;border-top:1px solid #f0f2f5}
.live-stat-row strong{font-size:19px;font-weight:550}
.live-stat-row small{display:block;font-size:11px;color:#a9b0bb;margin-bottom:7px}
.live-card .btn{width:100%;margin-top:17px}
.engagement-bars{padding:22px}
.bar-row{display:grid;grid-template-columns:47px 1fr 48px;align-items:center;gap:10px;font-size:11px;color:#929dac;margin-bottom:18px}
.bar-track{height:9px;background:#f5f6f9;border-radius:2px;overflow:hidden}
.bar-track i{display:block;height:100%;background:var(--accent);border-radius:2px}
.bar-row b{text-align:right;font-size:11px;font-weight:500}
.platform-intro{display:flex;align-items:center;gap:12px;background:#fcf9f5;border:1px solid #f4e9dd;border-radius:7px;padding:13px 18px;margin-bottom:20px;font-size:11px;color:#b28e6e}
.platform-intro strong{font-weight:500}
.platform-intro .btn{margin-left:auto}
.report-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:20px}
.report-card{padding:25px}
.report-icon{width:46px;height:46px;background:#fff2e8;display:grid;place-items:center;color:#e9a27f;border-radius:10px;margin-bottom:23px}
.report-card h3{font-size:15px}
.report-card p{font-size:11px;color:#a0a9b6;line-height:1.9;margin:10px 0 22px}
.report-card .btn{width:100%}
.form-platforms{display:flex;gap:8px;margin-bottom:20px}
.form-platforms button{display:flex;align-items:center;gap:5px;padding:8px 10px;font-size:11px;border:1px solid #e9edf2;border-radius:6px}
.form-platforms button.active{border-color:#f5ab8b;background:#fff9f4}
.monitor-candidates{max-height:275px;overflow:auto;margin:5px 0 20px}
.monitor-candidate{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid #f1f3f6}
.monitor-candidate .btn{margin-left:auto}
.quick-search-results{max-height:390px;overflow:auto}
.quick-result{display:flex;width:100%;padding:12px;gap:12px;border-radius:6px;text-align:left;align-items:center}
.quick-result:hover{background:#f8f9fb}
.quick-result>svg{margin-left:auto;color:#b6bdc8}
.ranking-banner{display:flex;align-items:center;gap:20px;padding:24px;background:linear-gradient(110deg,#fff5e9,#fdfbf7);border:1px solid #f3e5d5;border-radius:8px;margin-bottom:20px}
.ranking-banner>svg{color:#e0b17d}
.ranking-banner h2{font-size:18px}
.ranking-banner p{font-size:11px;margin-top:8px;color:#b29c87}
.rank-number{font-size:15px;font-style:italic;color:#9ba6b6;font-weight:600}
.rank-number.top{color:#e9a04a}
.report-history{padding:20px}
.history-row{display:flex;align-items:center;gap:15px;border-bottom:1px solid #edf0f4;padding:15px 0;font-size:12px;color:#697689}
.history-row small{color:#a2adba;margin-left:auto}
.intro-stat{margin-left:auto;display:flex;align-items:center;gap:8px;font-size:11px;color:#a59586}
.help-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:15px;font-size:11px}
.help-links a{border:1px solid #e9edf1;padding:7px 10px;border-radius:5px;color:#929dab}
.monitor-status{font-size:11px;color:#39ad8e;display:flex;align-items:center;gap:4px}
.monitor-status:before{content:"";width:4px;height:4px;background:currentColor;border-radius:50%}
.monitor-status.paused{color:#acb1ba}
@media(min-width:1600px){
.trend-wrap{height:240px}
.content-grid{grid-template-columns:repeat(3,1fr)}
.thumbnail{height:170px}
.donut-content{padding-top:40px;gap:30px}
.donut{width:157px;height:157px}
}
@media(max-width:1200px){
.top-search{width:140px}
.platform-tabs{gap:20px}
.chart-row{grid-template-columns:minmax(0,1.6fr) minmax(250px,1fr)}
.donut-content{gap:12px}
.donut{width:120px;height:120px}
.kpi-bottom .mini-chart{width:47px;right:10px}
.period-caption{display:none}
}
@media(max-width:1000px){
.top-search{width:31px;padding:0;border:0}
.top-search span,.top-search kbd{display:none}
.chart-row{grid-template-columns:1fr}
.donut-content{justify-content:flex-start;padding:20px 28px;gap:35px}
.distribution-legend{flex-direction:row;flex-wrap:wrap;gap:20px;max-width:300px}
.distribution-legend div{min-width:115px}
.donut{width:135px;height:135px}
.chart-row .panel:nth-child(2) .insight-note{margin-left:195px;margin-top:-35px;margin-bottom:22px}
.bottom-grid{grid-template-columns:1fr}
.content-grid{grid-template-columns:repeat(2,1fr)}
.report-grid{grid-template-columns:1fr}
.live-strip{grid-template-columns:repeat(2,1fr)}
.live-strip .live-card:nth-child(3){display:none}
}
@media(max-width:760px){
.platform-tabs{gap:14px}
.platform-tab{font-size:11px;gap:5px}
.platform-tab .platform-symbol{width:22px;height:22px}
.top-search,.top-divider{display:none}
.breadcrumb{margin-bottom:20px;font-size:11px}
.demo-badge{font-size:11px}
.heading-tag{display:none}
.kpi-bottom .mini-chart{width:55px}
.overview-tabs{gap:18px}
.overview-tabs .updated{font-size:11px}
.chart-row{gap:12px;margin-bottom:12px}
.segmented button{padding:5px 7px}
.legend{padding-left:15px}
.trend-wrap{height:200px;padding-left:5px;padding-right:7px}
.chart-foot{padding-left:15px;font-size:11px}
.donut-content{padding:20px;gap:25px}
.distribution-legend{gap:12px;max-width:none;flex-direction:column}
.distribution-legend div{min-width:110px}
.chart-row .panel:nth-child(2) .insight-note{margin:0 15px 15px}
.content-grid{padding:15px;gap:12px}
.thumbnail{height:120px;padding:15px}
.thumbnail-word{font-size:19px}
.content-body{padding:10px}
.content-numbers{font-size:11px;gap:5px}
.content-numbers svg{width:12px}
.content-numbers span:nth-child(3){display:none}
.article-row{gap:10px;align-items:flex-start}
.article-cover{width:74px;height:63px}
.article-cover strong{font-size:13px}
.article-info h3{font-size:11px}
.article-metric{min-width:53px;font-size:13px}
.article-metric.extra{display:none}
.article-info p{font-size:11px}
.articles{padding:0 15px}
.live-strip{grid-template-columns:1fr}
.live-strip .live-card:nth-child(3){display:block}
.live-card{padding:15px}
.bottom-grid{gap:12px;margin-bottom:12px}
.footer-links{gap:8px}
.form-platforms{gap:5px}
.form-platforms button{padding:7px;font-size:11px}
.form-platforms .platform-symbol{width:23px}
.platform-intro{font-size:11px;padding:12px}
.platform-intro .intro-stat{display:none}
.hot-item h3{font-size:11px}
.hot-views{font-size:11px}
.report-grid{gap:12px}
.ranking-banner{padding:20px}
.ranking-banner h2{font-size:16px}
.top-actions .user-avatar{display:none}
.platform-tabs{gap:12px}
.platform-tab{gap:4px}
.kpi-bottom .mini-chart{width:42px;opacity:.5}
}
@media(max-width:1050px){
.topbar:has(.auth-top-button) .platform-tabs{min-width:0}
}
@media(max-width:760px){
.topbar:has(.auth-top-button) .platform-tabs{flex:1;overflow-x:auto;overflow-y:hidden;gap:12px;scrollbar-width:none}
.topbar:has(.auth-top-button) .platform-tabs::-webkit-scrollbar{display:none}
.topbar:has(.auth-top-button) .platform-tab{flex:none}
}
.api-mode .platform-tabs{gap:22px}
@media(max-width:1100px){
.api-mode .platform-tabs{gap:12px}
.api-mode .platform-tab{gap:5px}
}
@media(max-width:760px){
.api-mode .platform-tabs{gap:15px;overflow-x:auto;min-width:0;flex:1}
.api-mode .platform-tab{flex-shrink:0}
}
