:root {
  color-scheme: dark;
  --ink-0: oklch(99% 0.006 270);
  --ink-1: oklch(89% 0.014 270);
  --ink-2: oklch(72% 0.018 270);
  --ink-3: oklch(53% 0.018 270);
  --canvas: oklch(13% 0.016 270);
  --sidebar: oklch(11% 0.014 270);
  --surface: oklch(17% 0.018 270);
  --surface-raised: oklch(20% 0.02 270);
  --surface-sunken: oklch(10% 0.014 270);
  --border-subtle: oklch(100% 0 0 / 0.07);
  --border-strong: oklch(100% 0 0 / 0.13);
  --accent: oklch(66% 0.18 290);
  --accent-soft: oklch(66% 0.18 290 / 0.14);
  --accent-strong: oklch(72% 0.16 290);
  --success: oklch(74% 0.16 164);
  --warning: oklch(79% 0.15 78);
  --danger: oklch(70% 0.18 30);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-raised: 0 1px 0 oklch(100% 0 0 / 0.045) inset, 0 14px 36px oklch(4% 0.018 270 / 0.16);
  --duration-fast: 150ms;
  --duration-normal: 220ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { min-width: 320px; margin: 0; background: var(--canvas); color: var(--ink-0); font-size: 14px; line-height: 1.45; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 16px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent); color: var(--ink-0); transition: top var(--duration-fast) var(--ease-out); }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 24px 14px 18px; border-right: 1px solid var(--border-subtle); background: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 9px; padding: 5px 10px 26px; font-size: 15px; font-weight: 680; letter-spacing: -0.035em; }
.brand-mark { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 8px; background: var(--accent); color: var(--canvas); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 17px; font-weight: 800; }
.brand-dot { color: var(--accent-strong); }
.primary-nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border-radius: var(--radius-sm); color: var(--ink-2); transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
.nav-item:hover { background: oklch(100% 0 0 / 0.045); color: var(--ink-0); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-strong); }
.nav-icon { width: 18px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; text-align: center; font-size: 17px; }
.nav-count { margin-left: auto; min-width: 20px; padding: 1px 5px; border-radius: 999px; background: oklch(100% 0 0 / 0.08); color: var(--ink-1); font-size: 11px; font-variant-numeric: tabular-nums; text-align: center; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 12px 10px; border-top: 1px solid var(--border-subtle); color: var(--ink-3); font-size: 12px; }
.connection-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px oklch(74% 0.16 164 / 0.08); }

.main-content { min-width: 0; padding: 22px clamp(16px, 2.2vw, 34px) 28px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; max-width: 1660px; margin: 0 auto 18px; }
.eyebrow { margin: 0 0 4px; color: var(--ink-3); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(25px, 2vw, 32px); line-height: 1.1; letter-spacing: -0.04em; }
h2 { margin: 0; font-size: 17px; line-height: 1.2; letter-spacing: -0.025em; }
h3 { margin: 0; font-size: 15px; letter-spacing: -0.015em; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.sync-status { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 12px; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--border-subtle); border-radius: 50%; background: transparent; color: var(--ink-2); font-weight: 700; transition: border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
.icon-button:hover { border-color: var(--border-strong); color: var(--ink-0); }

.metric-grid { display: grid; grid-template-columns: 1.45fr repeat(3, minmax(144px, 1fr)); gap: 12px; max-width: 1660px; margin: 0 auto 14px; }
.metric-card { position: relative; min-height: 116px; overflow: hidden; padding: 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-raised); }
.metric-card-primary { background: linear-gradient(135deg, oklch(66% 0.18 290 / 0.13), oklch(20% 0.02 270) 46%); }
.metric-card p { margin-bottom: 6px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.metric-card strong { display: block; font-size: 31px; line-height: 1; letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
.metric-card-primary strong { color: var(--accent-strong); font-size: 40px; }
.metric-line { display: flex; align-items: baseline; gap: 8px; }
.metric-line span { color: var(--ink-2); font-size: 12px; }
.metric-note { display: block; max-width: 240px; margin-top: 10px; color: var(--ink-3); font-size: 11px; line-height: 1.35; }
.sparkline { position: absolute; right: 12px; bottom: 13px; width: 118px; height: 28px; opacity: 0.86; }
.sparkline-fill { fill: oklch(66% 0.18 290 / 0.17); }
.sparkline-line { fill: none; stroke: var(--accent-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.workspace { display: grid; grid-template-columns: minmax(500px, 1fr) minmax(330px, 0.42fr); gap: 14px; max-width: 1660px; margin: 0 auto; align-items: stretch; }
.queue-panel, .detail-panel { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-raised); }
.queue-panel { min-width: 0; padding: 18px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.search-box { display: flex; align-items: center; gap: 8px; width: 170px; min-height: 36px; padding: 0 10px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink-3); }
.search-box:focus-within { border-color: var(--accent); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink-0); font-size: 12px; }
.search-box input::placeholder { color: var(--ink-3); }

.trend-card { display: grid; grid-template-columns: 108px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 134px; margin-top: 16px; padding: 14px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--surface-sunken); }
.trend-copy { align-self: start; }
.trend-copy strong { display: block; margin-top: 4px; font-size: 21px; letter-spacing: -0.04em; }
.trend-title { color: var(--ink-3); font-size: 11px; line-height: 1.25; }
.trend-chart { width: 100%; height: 108px; overflow: visible; }
.chart-grid { fill: none; stroke: oklch(100% 0 0 / 0.065); stroke-width: 1; }
.chart-area { fill: url(#area-fill); }
.chart-line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chart-line-incoming { stroke: var(--accent-strong); }
.chart-line-resolved { stroke: oklch(84% 0.025 270); stroke-dasharray: 4 5; }
.chart-labels { fill: var(--ink-3); font-size: 9px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.chart-key { display: grid; gap: 7px; min-width: 74px; color: var(--ink-2); font-size: 10px; }
.chart-key span { display: flex; align-items: center; gap: 5px; }
.key-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.key-dot.incoming { background: var(--accent-strong); }.key-dot.resolved { background: oklch(84% 0.025 270); }

.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 8px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-button { min-height: 31px; padding: 0 10px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 11px; transition: color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out); }
.filter-button:hover { background: oklch(100% 0 0 / 0.05); color: var(--ink-0); }
.filter-button.active { border-color: oklch(66% 0.18 290 / 0.35); background: var(--accent-soft); color: var(--accent-strong); }
.text-button { border: 0; background: transparent; color: var(--accent-strong); font-size: 11px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 680px; border-collapse: collapse; }
th { height: 36px; border-bottom: 1px solid var(--border-subtle); color: var(--ink-3); font-size: 11px; font-weight: 600; text-align: left; }
th:nth-child(3), th:nth-child(4) { text-align: right; }
td { height: 60px; border-bottom: 1px solid oklch(100% 0 0 / 0.045); color: var(--ink-1); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tr.comment-row { cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out); }
tr.comment-row:hover { background: oklch(100% 0 0 / 0.035); }
tr.comment-row.selected { background: var(--accent-soft); }
.comment-primary { display: flex; align-items: center; gap: 10px; min-width: 240px; }
.avatar { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border: 1px solid var(--border-subtle); border-radius: 50%; background: oklch(100% 0 0 / 0.055); color: var(--ink-1); font-size: 9px; font-weight: 700; }
.comment-author { display: block; font-size: 12px; font-weight: 650; }
.comment-preview { display: block; max-width: 220px; overflow: hidden; color: var(--ink-3); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.reel-cell { max-width: 165px; overflow: hidden; color: var(--ink-2); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.status-cell, .time-cell { color: var(--ink-2); font-size: 11px; text-align: right; white-space: nowrap; }
.status-value { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.status-dot[data-status="Нужен ответ"] { background: var(--warning); }.status-dot[data-status="Черновик ИИ"] { background: var(--accent-strong); }.status-dot[data-status="Ручная проверка"] { background: var(--danger); }.status-dot[data-status="Отвечено"] { background: var(--success); }
.empty-state { margin: 24px 0 8px; color: var(--ink-3); text-align: center; }

.detail-panel { position: sticky; top: 16px; align-self: start; min-height: 600px; overflow: hidden; }
.detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px; border-bottom: 1px solid var(--border-subtle); }
.detail-header .comment-author { font-size: 14px; }
.priority { color: var(--warning); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; letter-spacing: 0.04em; }
.detail-body { display: grid; gap: 16px; padding: 18px; }
.source-link { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: var(--accent-strong); font-size: 12px; }
.source-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.comment-quote { margin: 0; padding: 13px 14px; border-left: 2px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-sunken); color: var(--ink-1); font-size: 13px; line-height: 1.55; }
.reply-section { display: grid; gap: 8px; padding-top: 2px; }
.reply-section label { color: var(--ink-2); font-size: 12px; font-weight: 650; }
.reply-section textarea { min-height: 134px; resize: vertical; padding: 11px 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink-0); font-size: 12px; line-height: 1.5; }
.reply-section textarea:focus { border-color: var(--accent); outline: 0; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink-3); font-size: 10px; }
.composer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.button-primary, .button-secondary { min-height: 38px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 680; transition: transform var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out); }
.button-primary { border: 1px solid var(--accent); background: var(--accent); color: var(--canvas); }
.button-primary:hover { background: var(--accent-strong); }
.button-secondary { border: 1px solid var(--border-strong); background: transparent; color: var(--ink-1); }
.button-secondary:hover { border-color: var(--ink-2); background: oklch(100% 0 0 / 0.04); }
@media (hover: hover) and (pointer: fine) { .button-primary:hover, .button-secondary:hover { transform: translateY(-1px); } }
.demo-note { margin: 0; color: var(--ink-3); font-size: 10px; line-height: 1.4; }

dialog { width: min(420px, calc(100% - 32px)); padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-raised); color: var(--ink-0); box-shadow: 0 20px 60px oklch(0% 0 0 / 0.5); }
dialog::backdrop { background: oklch(4% 0.014 270 / 0.72); }
.dialog-content { padding: 24px; }.dialog-content h2 { margin-bottom: 10px; font-size: 21px; }.dialog-content p:not(.eyebrow) { margin-bottom: 22px; color: var(--ink-2); }.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }.dialog-actions button { padding: 0 13px; }

@media (max-width: 1160px) { .metric-grid { grid-template-columns: 1.25fr repeat(3, minmax(125px, 1fr)); }.workspace { grid-template-columns: minmax(460px, 1fr) 340px; }.trend-card { grid-template-columns: 92px minmax(0, 1fr); }.chart-key { display: none; } }
@media (max-width: 960px) { .app-shell { grid-template-columns: 1fr; }.sidebar { position: static; display: grid; height: auto; grid-template-columns: auto 1fr auto; align-items: center; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--border-subtle); }.brand { padding: 0; }.primary-nav { display: flex; justify-content: center; }.nav-item { min-height: 34px; }.nav-icon, .nav-count { display: none; }.sidebar-foot { margin: 0; padding: 0; border: 0; }.workspace { grid-template-columns: minmax(0, 1fr); }.detail-panel { position: static; min-height: 0; }.detail-body { grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr); }.detail-body > :not(.reply-section) { grid-column: 1; }.reply-section { grid-column: 2; grid-row: 1 / span 3; }.metric-grid { grid-template-columns: 1.2fr repeat(3, minmax(120px, 1fr)); } }
@media (max-width: 700px) { .main-content { padding: 16px; }.sidebar { grid-template-columns: 1fr auto; }.primary-nav { grid-column: 1 / -1; justify-content: stretch; margin-top: 10px; }.nav-item { flex: 1; justify-content: center; }.sidebar-foot { display: none; }.topbar { align-items: flex-start; margin-bottom: 14px; }.metric-grid { grid-template-columns: 1fr 1fr; }.metric-card-primary { grid-column: 1 / -1; }.metric-card { min-height: 108px; }.metric-card strong { font-size: 26px; }.metric-card-primary strong { font-size: 36px; }.panel-heading { align-items: stretch; flex-direction: column; }.search-box { width: 100%; }.trend-card { grid-template-columns: 1fr; }.trend-copy { display: flex; align-items: baseline; justify-content: space-between; }.trend-copy strong { margin: 0; }.trend-chart { height: 86px; }.filter-row { align-items: flex-start; }.filter-tabs { max-width: calc(100% - 64px); }.queue-panel { padding: 14px; }.detail-body { display: grid; }.detail-body > :not(.reply-section), .reply-section { grid-column: auto; grid-row: auto; }.detail-header { padding: 16px; }.detail-body { padding: 16px; }.composer-actions { grid-template-columns: 1fr; }.dialog-actions { display: grid; grid-template-columns: 1fr; }.dialog-actions button { width: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; } }

/* Reference alignment pass: keeps the existing data and interactions, changes the shell. */
:root {
  --canvas: #090b0f;
  --sidebar: #0c0f14;
  --surface: #11151c;
  --surface-raised: #151a22;
  --surface-sunken: #0d1016;
  --border-subtle: rgba(214, 220, 240, 0.11);
  --border-strong: rgba(214, 220, 240, 0.22);
  --ink-0: #edf0f7;
  --ink-1: #d5d9e5;
  --ink-2: #a4aaba;
  --ink-3: #777f90;
  --accent: #5b60ff;
  --accent-strong: #8887ff;
  --accent-soft: rgba(91, 96, 255, 0.16);
  --success: #50d787;
  --warning: #f3b43f;
  --danger: #ff6d67;
}

.app-shell { grid-template-columns: 156px minmax(0, 1fr); }
.sidebar { padding: 20px 12px 18px; background: linear-gradient(180deg, #0e1117, #090b0f); }
.brand { padding: 2px 10px 28px; font-size: 14px; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; font-size: 20px; }
.primary-nav { gap: 5px; }
.nav-item { min-height: 40px; padding: 0 10px; font-size: 12px; }
.nav-item.active { color: var(--ink-0); background: rgba(91, 96, 255, 0.16); }
.nav-item.active .nav-icon { color: var(--accent-strong); }
.nav-icon { width: 18px; color: var(--ink-2); font-size: 15px; }
.nav-count { background: var(--accent); color: white; }
.sidebar-foot { font-size: 11px; }

.main-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 376px;
  column-gap: 14px;
  align-items: start;
  max-width: 1920px;
  margin: 0 auto;
  padding: 18px 20px 24px;
}
.topbar { grid-column: 1 / -1; max-width: none; align-items: center; margin: 0 0 18px; }
.topbar h1 { font-size: 23px; font-weight: 560; letter-spacing: -0.04em; }
.topbar h1 span { font-size: 29px; font-weight: 750; }.topbar h1 i { margin: 0 6px; color: var(--ink-3); font-style: normal; }.topbar-actions { gap: 12px; }
.topbar-button { min-height: 36px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 7px; background: transparent; color: var(--ink-1); font-weight: 600; }.topbar-button:hover { border-color: var(--accent-strong); color: var(--ink-0); }
.icon-button { width: 32px; height: 32px; border-color: transparent; color: var(--ink-3); }

.metric-grid { grid-column: 1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: none; margin: 0 0 12px; }
.metric-card, .metric-card-primary { min-height: 130px; padding: 18px; border-radius: 9px; background: linear-gradient(145deg, rgba(255,255,255,0.022), rgba(255,255,255,0.008)); box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset; }
.metric-card p { margin-bottom: 14px; color: var(--ink-2); font-size: 12px; font-weight: 500; }
.metric-card strong, .metric-card-primary strong { font-size: 34px; color: var(--ink-0); font-weight: 540; }
.metric-note { margin-top: 8px; font-size: 12px; }.metric-positive { color: var(--success); }.metric-warning { color: var(--warning); }.metric-accent { color: #76a9ff; }

.trend-card-wide { grid-column: 1; display: block; min-height: 230px; margin: 0 0 12px; padding: 16px 16px 10px; border: 1px solid var(--border-subtle); border-radius: 9px; background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset; }
.trend-wide-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }.trend-wide-heading h2 { font-size: 14px; font-weight: 600; }
.trend-card-wide .trend-chart { display: block; width: 100%; height: 170px; }.trend-card-wide .chart-grid { stroke: rgba(255,255,255,0.075); }.trend-card-wide .chart-line { stroke-width: 2.25; }.trend-card-wide .chart-line-resolved { stroke: #bd6cff; stroke-dasharray: none; }.trend-card-wide .chart-line-incoming { stroke: #5d9dff; }.trend-card-wide .chart-points.incoming-points { fill: #5d9dff; }.trend-card-wide .chart-points.resolved-points { fill: #bd6cff; }.trend-card-wide .chart-labels { fill: var(--ink-3); font-size: 11px; }.trend-card-wide .chart-key { display: flex; min-width: 0; flex-direction: row; gap: 18px; font-size: 11px; }.trend-card-wide .key-dot.incoming { background: #5d9dff; }.trend-card-wide .key-dot.resolved { background: #bd6cff; }

.workspace { display: contents; }
.queue-panel { position: relative; grid-column: 1; min-width: 0; padding: 0; overflow: visible; border-radius: 9px; background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset; }
.panel-heading { min-height: 50px; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--border-subtle); }.panel-heading h2 { font-size: 15px; }.queue-count { display: inline-grid; min-width: 22px; height: 22px; margin-left: 7px; place-items: center; border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.search-box { width: 128px; min-height: 31px; border-color: transparent; background: #0b0d12; }.search-box input { font-size: 11px; }
.filter-row { position: absolute; z-index: 2; margin: 0; transform: translate(0, -42px); right: 172px; }.filter-menu { position: relative; }.filter-menu summary { list-style: none; min-height: 30px; padding: 6px 9px; border: 1px solid transparent; border-radius: 6px; color: var(--ink-2); font-size: 11px; cursor: pointer; }.filter-menu summary::-webkit-details-marker { display: none; }.filter-menu[open] { width: 270px; padding: 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-raised); box-shadow: 0 16px 32px rgba(0,0,0,0.35); }.filter-menu[open] summary { padding: 0 0 8px; }.filter-tabs { gap: 5px; }.filter-button { min-height: 28px; padding: 0 8px; font-size: 10px; }
.table-scroll { overflow-x: auto; }.queue-panel table { min-width: 980px; }.queue-panel th { height: 39px; padding: 0 9px; color: var(--ink-3); font-size: 10px; font-weight: 500; white-space: nowrap; }.queue-panel th:nth-child(6), .queue-panel th:nth-child(7) { text-align: left; }.queue-panel td { height: 63px; padding: 0 9px; }.queue-panel tr.comment-row { outline: 1px solid transparent; outline-offset: -1px; }.queue-panel tr.comment-row.selected { outline-color: var(--accent); background: linear-gradient(90deg, rgba(91,96,255,0.16), rgba(91,96,255,0.055)); }.poster-cell { width: 57px; }.reel-poster { position: relative; display: grid; width: 38px; height: 48px; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,0.16); border-radius: 4px; }.reel-poster::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,0.08), rgba(0,0,0,0.44)); }.reel-poster i { z-index: 1; display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; background: rgba(7,9,12,0.66); color: #fff; font-size: 8px; font-style: normal; }.poster-1 { background: linear-gradient(145deg, #896348 0%, #d4b78d 48%, #252f39 49%, #79664d 100%); }.poster-2 { background: linear-gradient(145deg, #4c645e 0%, #f4d7b2 45%, #7a523b 100%); }.poster-3 { background: linear-gradient(145deg, #635a6e 0%, #b7d0cf 52%, #404b38 100%); }.poster-4 { background: linear-gradient(145deg, #9b876c 0%, #343139 50%, #cdb68c 100%); }
.comment-primary { min-width: 100px; gap: 7px; }.avatar { flex-basis: 26px; width: 26px; height: 26px; font-size: 8px; }.comment-author { font-size: 11px; font-weight: 600; }.comment-preview { display: block; max-width: 220px; color: var(--ink-1); font-size: 11px; line-height: 1.35; white-space: normal; }.queue-panel .reel-cell { max-width: 135px; color: var(--ink-1); white-space: normal; }.status-cell, .time-cell { text-align: left; font-size: 10px; }.status-value { justify-content: flex-start; }.mode-cell { color: var(--ink-2); font-size: 10px; white-space: nowrap; }.response-mode { display: inline-flex; align-items: center; gap: 4px; }.response-mode.ai { color: #c287ff; }.response-mode.ai::before { content: "✦"; }.open-cell { width: 76px; }.open-row { min-height: 28px; padding: 0 10px; border: 1px solid #5869ff; border-radius: 5px; background: transparent; color: #a7aeff; font-size: 10px; }.open-row:hover { background: var(--accent-soft); }

.detail-panel { position: sticky; top: 16px; grid-column: 2; grid-row: 2 / span 4; align-self: stretch; min-height: 0; overflow: hidden; border-radius: 9px; background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset; }.detail-panel-title { display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 0 18px; border-bottom: 1px solid var(--border-subtle); }.detail-panel-title h2 { font-size: 20px; font-weight: 540; letter-spacing: -0.035em; }.detail-panel-title span { color: var(--ink-1); font-size: 30px; font-weight: 200; line-height: 1; }
.detail-comment { padding: 24px 18px 16px; border-bottom: 1px solid var(--border-subtle); }.detail-label { margin-bottom: 15px; color: var(--ink-2); font-size: 12px; font-weight: 600; }.detail-author { display: flex; align-items: center; gap: 8px; }.detail-author strong { font-size: 13px; }.detail-author time { margin-left: auto; color: var(--ink-2); font-size: 11px; }.detail-message { margin: 15px 0 8px; color: var(--ink-1); font-size: 13px; line-height: 1.48; }.detail-reel { margin: 0; color: var(--ink-2); font-size: 11px; }
.detail-body { display: block; padding: 20px 18px 18px; }.reply-section { display: grid; gap: 11px; }.reply-section label { font-size: 13px; }.reply-section textarea { min-height: 216px; padding: 14px; border-color: rgba(139,135,255,0.75); border-radius: 7px; background: #10141b; font-size: 13px; line-height: 1.48; }.composer-footer { margin-top: -2px; }.template-hint { display: inline-flex; padding: 6px 9px; border-radius: 5px; background: rgba(91,96,255,0.12); color: #a9a9ff; font-size: 10px; }.composer-actions { grid-template-columns: 1fr 1fr; }.button-primary, .button-secondary { min-height: 40px; border-radius: 6px; }.button-primary { background: #545aff; color: white; }.publish-button { width: 100%; min-height: 48px; margin-top: 1px; font-size: 14px; }.demo-note { padding-top: 5px; font-size: 10px; }

@media (max-width: 1240px) { .main-content { grid-template-columns: minmax(0, 1fr) 330px; padding-inline: 16px; }.metric-card { padding: 14px; }.metric-card strong { font-size: 29px; }.filter-row { right: 154px; } }
@media (max-width: 1040px) { .main-content { display: block; }.metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }.trend-card-wide { min-height: 220px; }.workspace { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }.detail-panel { position: static; grid-column: auto; grid-row: auto; }.detail-panel textarea { min-height: 150px; } }
@media (max-width: 700px) { .app-shell { grid-template-columns: 1fr; }.sidebar { position: static; height: auto; padding: 12px 14px; }.brand { padding: 0; }.primary-nav { display: flex; overflow-x: auto; margin-top: 11px; }.nav-item { flex: 0 0 auto; }.nav-item:nth-child(n+5) { display: none; }.sidebar-foot { display: none; }.main-content { padding: 14px; }.topbar { align-items: flex-start; }.topbar h1 { font-size: 18px; }.topbar h1 span { font-size: 24px; }.sync-status { display: none; }.topbar-button { padding-inline: 10px; }.metric-grid { gap: 8px; }.metric-card { min-height: 105px; padding: 12px; }.metric-card strong { font-size: 27px; }.trend-card-wide { min-height: 190px; padding: 13px; }.trend-card-wide .trend-chart { height: 130px; }.trend-wide-heading h2 { font-size: 12px; }.trend-card-wide .chart-key { gap: 8px; font-size: 9px; }.filter-row { right: 145px; }.queue-panel th, .queue-panel td { padding-inline: 8px; }.detail-panel-title { min-height: 60px; }.detail-panel-title h2 { font-size: 18px; } }

/* Interactive links and theme controls. */
:root { color-scheme: dark; }

button.nav-item { width: 100%; border: 0; background: transparent; font-family: inherit; text-align: left; cursor: pointer; }
.reel-title-link, .detail-reel-link { color: inherit; text-decoration: none; }
.reel-title-link:hover, .detail-reel-link:hover { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.reel-poster:focus-visible, .reel-title-link:focus-visible, .detail-reel-link:focus-visible, .theme-option:has(input:focus-visible), .settings-close:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }

.settings-panel { position: fixed; z-index: 20; top: 76px; left: 172px; width: min(322px, calc(100vw - 196px)); overflow: hidden; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-raised); box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28), 0 2px 7px rgba(0, 0, 0, 0.2); }
.settings-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px; border-bottom: 1px solid var(--border-subtle); }.settings-kicker { margin: 0 0 5px; color: var(--ink-3); font-size: 11px; }.settings-header h2 { margin: 0; color: var(--ink-0); font-size: 17px; font-weight: 620; letter-spacing: -0.025em; }
.settings-close { display: grid; width: 32px; height: 32px; margin: -5px -5px 0 0; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 24px; font-weight: 300; line-height: 1; cursor: pointer; }.settings-close:hover { background: var(--surface-sunken); color: var(--ink-0); }
.theme-options { display: grid; gap: 7px; margin: 0; padding: 16px 18px 12px; border: 0; }.theme-options legend { margin-bottom: 7px; padding: 0; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.theme-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 58px; padding: 9px 10px; border: 1px solid transparent; border-radius: 7px; color: var(--ink-1); cursor: pointer; }.theme-option:hover { background: var(--surface-sunken); }.theme-option:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 48%, transparent); background: var(--accent-soft); }.theme-option input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }.theme-option span { display: grid; gap: 2px; }.theme-option strong { font-size: 12px; font-weight: 620; }.theme-option small { color: var(--ink-3); font-size: 11px; line-height: 1.25; }
.settings-note { margin: 0; padding: 0 18px 18px; color: var(--ink-3); font-size: 11px; line-height: 1.4; }

:root[data-theme="light"] { color-scheme: light; --canvas: #f3f5f8; --sidebar: #edf0f5; --surface: #ffffff; --surface-raised: #ffffff; --surface-sunken: #f0f3f7; --border-subtle: rgba(36, 45, 64, 0.12); --border-strong: rgba(36, 45, 64, 0.22); --ink-0: #202635; --ink-1: #394256; --ink-2: #667086; --ink-3: #8790a2; --accent: #5056df; --accent-strong: #454ac7; --accent-soft: rgba(80, 86, 223, 0.12); --success: #238858; --warning: #a66e00; --danger: #cf4e50; }
:root[data-theme="light"] .sidebar { background: linear-gradient(180deg, #f7f8fb, #edf0f5); }
:root[data-theme="light"] .metric-card, :root[data-theme="light"] .metric-card-primary { background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(242, 245, 249, 0.92)); box-shadow: 0 1px 0 rgba(36, 45, 64, 0.04) inset, 0 1px 2px rgba(36, 45, 64, 0.04); }
:root[data-theme="light"] .search-box, :root[data-theme="light"] .reply-section textarea { background: #f7f9fc; }
:root[data-theme="light"] .filter-menu[open] { box-shadow: 0 16px 32px rgba(50, 61, 84, 0.14); }
:root[data-theme="light"] .queue-panel tr.comment-row:hover { background: rgba(56, 68, 92, 0.035); }
:root[data-theme="light"] .reel-poster { border-color: rgba(36, 45, 64, 0.18); }
:root[data-theme="light"] .settings-panel { box-shadow: 0 18px 36px rgba(50, 61, 84, 0.14), 0 2px 7px rgba(50, 61, 84, 0.08); }

.sync-status[data-state="unavailable"], .sync-status[data-state="error"] { color: var(--warning); }
.sync-status[data-state="ready"] { color: var(--ink-1); }
.sync-status[data-state="unavailable"] .connection-dot, .sync-status[data-state="error"] .connection-dot { background: var(--warning); }

.draft-state { display: grid; gap: 3px; padding: 10px 11px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--surface-sunken); color: var(--ink-2); font-size: 11px; line-height: 1.35; }
.draft-state strong { color: var(--ink-1); font-size: 11px; font-weight: 650; }
.draft-state-loading { border-color: color-mix(in srgb, var(--accent) 38%, var(--border-subtle)); }
.draft-state-loading strong { color: var(--accent-strong); }
.draft-state-error { border-color: color-mix(in srgb, var(--warning) 45%, var(--border-subtle)); }
.draft-state-error strong { color: var(--warning); }
.draft-state-review { border-color: color-mix(in srgb, var(--warning) 36%, var(--border-subtle)); background: color-mix(in srgb, var(--warning) 8%, var(--surface-sunken)); }
.draft-state-review strong { color: var(--warning); }
.draft-state-ready { border-color: color-mix(in srgb, var(--success) 34%, var(--border-subtle)); }
.draft-state-ready strong, .action-success { color: var(--success); }
.reply-section textarea:disabled { opacity: 0.76; cursor: not-allowed; }
.button-primary:disabled, .button-secondary:disabled { cursor: wait; opacity: 0.65; }
.action-error, .action-success, .api-note { margin: 0; font-size: 11px; line-height: 1.45; }
.action-error { color: var(--danger); }
.api-note { color: var(--ink-3); }

.login-gate { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; background: var(--canvas); }
.login-gate[hidden] { display: none !important; }
.login-card { display: grid; width: min(100%, 380px); gap: 12px; padding: 28px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28); }
.login-card .brand-mark { margin-bottom: 4px; }.login-card h1 { margin: 0; font-size: 26px; }.login-card p:not(.eyebrow):not(.login-error) { margin: 0 0 4px; color: var(--ink-2); line-height: 1.5; }
.login-card label { color: var(--ink-1); font-size: 12px; font-weight: 620; }.login-card input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-sunken); color: var(--ink-0); }.login-card input:focus { border-color: var(--accent); outline: 0; }
.login-card .button-primary { width: 100%; margin-top: 4px; }.login-error { margin: 0; color: var(--danger); font-size: 12px; line-height: 1.4; }

@media (max-width: 700px) { button.nav-item { width: auto; } .settings-panel { top: 72px; left: 14px; width: calc(100vw - 28px); } }
