:root {
  color-scheme: dark;
  --bg: #080b0f;
  --bg-soft: #0c1015;
  --panel: #11161d;
  --panel-2: #151c24;
  --panel-3: #0e1319;
  --border: #26303b;
  --border-soft: rgba(255,255,255,.07);
  --text: #f4f7fa;
  --text-soft: #c9d1da;
  --muted: #8793a1;
  --accent: #ceff4f;
  --accent-soft: rgba(206,255,79,.11);
  --accent-line: rgba(206,255,79,.42);
  --ok: #92e6b2;
  --warning: #ffd477;
  --danger: #ff8383;
  --blue: #7cb6ff;
  --shadow: 0 22px 70px rgba(0,0,0,.30);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 15px/1.58 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% -12%, rgba(206,255,79,.09), transparent 30rem),
    radial-gradient(circle at 96% 4%, rgba(91,134,187,.08), transparent 35rem),
    linear-gradient(180deg, #0a0e13 0, var(--bg) 36rem);
}
a { color: inherit; }
.shell { width: min(1320px, calc(100% - 44px)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(8,11,15,.86);
  backdrop-filter: blur(18px);
}
.topbar-inner { min-height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-weight: 790; letter-spacing: -.025em; text-decoration: none; font-size: 18px; }
.brand-mark { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(206,255,79,.07), 0 0 28px rgba(206,255,79,.45); }
.nav-links { display: flex; align-items: center; gap: 5px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); }
.nav-links a { padding: 7px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 650; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: rgba(255,255,255,.065); }
.top-status { justify-self: end; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 16px rgba(146,230,178,.6); }
.executive-shell { padding: 34px 0 80px; }
.executive-hero, .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 34px; margin: 14px 0 26px; }
.hero-copy { max-width: 850px; }
.eyebrow, .panel-kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 850; }
h1 { margin: 7px 0 0; font-size: clamp(34px, 4.7vw, 62px); line-height: 1; letter-spacing: -.052em; font-weight: 820; }
h2 { margin: 3px 0 0; font-size: 18px; line-height: 1.2; letter-spacing: -.025em; }
.subtitle { max-width: 820px; margin: 13px 0 0; color: var(--muted); font-size: 15px; }
.window-pill { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 8px 11px; border: 1px solid var(--border-soft); border-radius: 10px; background: rgba(255,255,255,.025); font-size: 11px; }
.window-pill span { color: var(--muted); }
.window-pill strong { color: var(--text-soft); font-weight: 650; }
.hero-actions { min-width: 230px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.run-state { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 12px; background: rgba(255,255,255,.024); }
.run-state small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.run-state strong { display: block; margin-top: 1px; font-size: 12px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.status-dot-completed { background: var(--ok); box-shadow: 0 0 15px rgba(146,230,178,.45); }
.status-dot-running { background: var(--warning); box-shadow: 0 0 15px rgba(255,212,119,.45); }
.status-dot-failed, .status-dot-cancelled { background: var(--danger); }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 43px; padding: 0 15px; border-radius: 11px; border: 1px solid transparent; font: inherit; font-size: 12px; font-weight: 780; text-decoration: none; cursor: pointer; }
.button-primary { background: var(--accent); color: #10130b; border-color: var(--accent); }
.button-primary:hover { filter: brightness(1.05); }
.button-danger { background: rgba(255,131,131,.08); color: #ffaaaa; border-color: rgba(255,131,131,.30); }
.button-danger:hover:not(:disabled) { background: rgba(255,131,131,.14); border-color: rgba(255,131,131,.46); }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-secondary { background: var(--panel); color: var(--text); border-color: var(--border); }
.notice { margin-bottom: 16px; padding: 11px 14px; border: 1px solid rgba(206,255,79,.22); border-radius: 11px; background: rgba(206,255,79,.07); color: #e6f3ba; font-size: 12px; }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, rgba(21,28,36,.98), rgba(15,20,26,.98)); box-shadow: var(--shadow); }
.executive-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi-card { min-height: 126px; padding: 17px 18px; border: 1px solid var(--border); border-radius: 15px; background: linear-gradient(180deg, rgba(20,26,34,.95), rgba(14,19,25,.95)); }
.kpi-card.kpi-primary { border-color: rgba(206,255,79,.22); background: linear-gradient(145deg, rgba(206,255,79,.09), rgba(14,19,25,.97) 62%); }
.kpi-label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; font-weight: 720; }
.kpi-value { margin-top: 10px; font-size: clamp(27px, 3vw, 38px); line-height: 1; font-weight: 820; letter-spacing: -.045em; }
.kpi-note { margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.executive-grid { display: grid; gap: 14px; }
.executive-grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(310px, .85fr); }
.executive-grid-secondary { grid-template-columns: .75fr 1.25fr; }
.watch-grid { grid-template-columns: 1.2fr .8fr; }
.executive-panel { padding: 21px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.compact-heading { margin-bottom: 10px; }
.meta { color: var(--muted); font-size: 10.5px; }
.executive-summary { margin: 0; color: #e6ebf0; font-size: 17px; line-height: 1.75; letter-spacing: -.012em; }
.brief-divider { height: 1px; background: var(--border-soft); margin: 18px 0; }
.brief-callout { display: grid; grid-template-columns: 145px 1fr; gap: 16px; align-items: start; }
.callout-label { color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-size: 10px; font-weight: 750; }
.brief-callout p { margin: 0; color: var(--text-soft); line-height: 1.65; }
.chart-frame { margin-top: 8px; }
.line-chart { width: 100%; height: 145px; overflow: visible; }
.chart-axis { stroke: #39434e; stroke-width: 1; }
.chart-grid { stroke: #222a33; stroke-width: 1; stroke-dasharray: 4 5; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.3; vector-effect: non-scaling-stroke; }
.chart-point { fill: var(--panel); stroke: var(--accent); stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.chart-labels { display: flex; justify-content: space-between; gap: 4px; color: #66717e; font-size: 9px; margin-top: -7px; }
.chart-labels span { min-width: 0; }
.chart-legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 10px; }
.chart-legend span { display: flex; align-items: center; gap: 7px; }
.chart-legend strong { color: var(--text-soft); font-weight: 650; }
.legend-accent { width: 14px; height: 2px; background: var(--accent); display: inline-block; }
.tall-chart .line-chart { height: 165px; }
.retrieval-content { min-height: 160px; display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 18px; }
.donut-wrap { position: relative; width: 128px; height: 128px; }
.donut { width: 128px; height: 128px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 3.8; }
.donut-track { stroke: #252d36; }
.donut-value { stroke: var(--accent); stroke-linecap: round; }
.donut-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-label strong { font-size: 24px; letter-spacing: -.04em; }
.donut-label span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.retrieval-stats { display: grid; gap: 7px; }
.retrieval-stats div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid var(--border-soft); }
.retrieval-stats div:last-child { border-bottom: 0; }
.retrieval-stats span { color: var(--muted); font-size: 11px; }
.retrieval-stats strong { font-size: 13px; }
.pipeline { min-height: 116px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: stretch; gap: 9px; }
.pipeline-node { min-height: 90px; display: flex; flex-direction: column; justify-content: center; padding: 12px; border: 1px solid var(--border-soft); border-radius: 13px; background: rgba(255,255,255,.02); }
.pipeline-node span { color: #626e7c; font-size: 9px; letter-spacing: .12em; }
.pipeline-node strong { margin-top: 5px; font-size: 25px; line-height: 1; }
.pipeline-node small { margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.pipeline-node-accent { border-color: rgba(206,255,79,.25); background: rgba(206,255,79,.055); }
.pipeline-node-accent strong { color: var(--accent); }
.pipeline-arrow { color: #56616e; font-size: 18px; }
.pipeline-explainer { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.theme-card { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 13px; border: 1px solid var(--border-soft); border-radius: 12px; background: rgba(255,255,255,.018); }
.theme-count { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; border: 1px solid rgba(206,255,79,.18); color: var(--accent); background: rgba(206,255,79,.05); font-weight: 800; }
.theme-card strong { font-size: 12px; }
.theme-card p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 10px; }
.section-heading h2 { font-size: 21px; }
.section-heading > span { color: var(--muted); font-size: 11px; }
.development-stack { display: grid; gap: 10px; }
.development-card { display: grid; grid-template-columns: 62px 1fr; overflow: hidden; }
.development-index { border-right: 1px solid var(--border-soft); display: flex; justify-content: center; padding-top: 24px; background: rgba(255,255,255,.014); }
.development-index span { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.development-content { padding: 19px 21px; }
.development-topline { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.development-card h3 { margin: 11px 0 0; font-size: 19px; line-height: 1.35; letter-spacing: -.025em; }
.development-card h3 a { text-decoration: none; }
.development-card h3 a:hover { color: var(--accent); }
.development-summary { margin: 9px 0 0; color: var(--text-soft); font-size: 14px; line-height: 1.65; }
.report-block { margin-top: 14px; }
.report-block > span, .report-sources > span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .085em; font-weight: 750; }
.report-block .development-summary { margin-top: 5px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.02); color: #b3bdc8; font-size: 9px; letter-spacing: .035em; }
.badge-accent { border-color: rgba(206,255,79,.28); background: rgba(206,255,79,.08); color: #e5f7ae; }
.executive-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 15px; }
.executive-facts > div { padding: 11px 12px; border-top: 1px solid var(--border-soft); background: rgba(255,255,255,.012); }
.executive-facts span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .085em; font-weight: 750; }
.executive-facts p { margin: 4px 0 0; color: #b7c1cb; font-size: 11.5px; line-height: 1.55; }
.development-footer { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; margin-top: 13px; color: var(--muted); font-size: 10px; }
.report-sources { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.source-link-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.source-link-list a { display: inline-flex; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(124,182,255,.18); background: rgba(124,182,255,.045); color: #b8d5f8; font-size: 9.5px; text-decoration: none; }
.source-link-list a:hover { border-color: rgba(206,255,79,.28); color: var(--accent); }
.entity-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.entity { display: inline-flex; padding: 3px 7px; border-radius: 7px; border: 1px solid rgba(124,182,255,.17); background: rgba(124,182,255,.05); color: #b8d5f8; font-size: 9px; }
.no-development { min-height: 124px; display: flex; align-items: center; gap: 18px; padding: 20px; }
.no-development strong { font-size: 15px; }
.no-development p { max-width: 800px; margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.radar-glyph { position: relative; width: 68px; height: 68px; flex: 0 0 68px; border: 1px solid rgba(206,255,79,.22); border-radius: 50%; background: radial-gradient(circle, rgba(206,255,79,.12) 0 2px, transparent 3px), repeating-radial-gradient(circle, transparent 0 13px, rgba(206,255,79,.08) 14px 15px); }
.radar-glyph::before { content: ""; position: absolute; inset: 50% 5px auto 50%; width: 28px; height: 1px; background: var(--accent); transform-origin: left center; transform: rotate(-35deg); opacity: .75; }
.radar-glyph span { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); left: 40px; top: 21px; box-shadow: 0 0 12px rgba(206,255,79,.7); }
.counter { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; }
.muted-counter { background: rgba(255,255,255,.045); color: var(--muted); }
.watch-row { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 13px 0; border-top: 1px solid var(--border-soft); }
.watch-row:first-of-type { border-top: 0; }
.watch-number { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.watch-row strong, .excluded-row strong { font-size: 12px; line-height: 1.45; }
.watch-row a, .excluded-row a { text-decoration: none; }
.watch-row a:hover, .excluded-row a:hover { color: var(--accent); }
.watch-row p, .excluded-row p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.excluded-row { padding: 13px 0; border-top: 1px solid var(--border-soft); }
.excluded-row:first-of-type { border-top: 0; }
.history-panel { box-shadow: none; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 9px; text-align: left; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
th { color: #6f7b88; font-size: 9px; text-transform: uppercase; letter-spacing: .09em; font-weight: 750; }
td { color: #b5bec8; font-size: 10.5px; }
td a { color: var(--text); text-decoration: none; font-weight: 700; }
.status-chip { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 999px; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.status-chip-completed { background: rgba(146,230,178,.08); color: var(--ok); border: 1px solid rgba(146,230,178,.16); }
.status-chip-running, .status-chip-cancel_requested { background: rgba(255,212,119,.08); color: var(--warning); border: 1px solid rgba(255,212,119,.16); }
.status-chip-failed, .status-chip-cancelled { background: rgba(255,131,131,.08); color: var(--danger); border: 1px solid rgba(255,131,131,.16); }
.text-link { color: #aab5c0; text-decoration: none; font-size: 10px; }
.text-link:hover { color: var(--accent); }
.empty { padding: 35px 20px; text-align: center; color: var(--muted); }
.empty.compact { padding: 16px 0; }
.executive-empty { min-height: 170px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.executive-empty strong { color: var(--text); font-size: 16px; }
.error-box { white-space: pre-wrap; color: #ffc0c0; background: rgba(255,131,131,.055); border: 1px solid rgba(255,131,131,.18); padding: 14px; border-radius: 11px; overflow-x: auto; }
.scan-in-progress { display: flex; align-items: center; gap: 18px; padding: 24px; }
.scan-in-progress h2 { margin-top: 4px; }
.scan-in-progress p { margin: 7px 0 0; color: var(--muted); }
.scan-orbit { width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(206,255,79,.22); position: relative; flex: 0 0 54px; }
.scan-orbit::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; border: 1px solid rgba(206,255,79,.11); }
.scan-orbit span { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); left: 41px; top: 22px; box-shadow: 0 0 14px rgba(206,255,79,.7); }
.page-heading h1 { font-size: clamp(32px, 4vw, 50px); }
.back { display: inline-flex; color: var(--muted); text-decoration: none; font-size: 11px; margin-bottom: 9px; }
.back:hover { color: var(--text); }
.config-list { display: grid; gap: 0; }
.config-list div, .diagnostic-list div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.config-list div:last-child, .diagnostic-list div:last-child { border-bottom: 0; }
.config-list span, .diagnostic-list span { color: var(--muted); font-size: 11px; }
.config-list strong, .diagnostic-list strong { font-size: 11px; }
.ops-bars { display: grid; gap: 13px; }
.ops-bar-row { display: grid; grid-template-columns: 145px 1fr 52px; align-items: center; gap: 10px; }
.ops-bar-row > span { color: var(--muted); font-size: 10px; }
.ops-bar-row > strong { text-align: right; font-size: 11px; }
.ops-bar-track { height: 5px; border-radius: 999px; background: #202832; overflow: hidden; }
.ops-bar-fill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #34404d, #667483); opacity: .45; }
.ops-bar-fill[data-level="accent"] { background: linear-gradient(90deg, #41532e, var(--accent)); }
.ops-bar-fill[data-level="warn"] { background: linear-gradient(90deg, #4e4330, var(--warning)); }
.system-note { margin-top: 15px; padding: 10px 11px; border-radius: 10px; background: rgba(255,255,255,.025); color: var(--muted); font-size: 10.5px; }
.system-note strong { color: var(--text-soft); }
.domain-cloud { border-top: 1px solid var(--border-soft); margin-top: 13px; padding-top: 13px; }
.domain-cloud > div { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.mini-label { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

@media (max-width: 1050px) {
  .topbar-inner { grid-template-columns: 1fr auto; }
  .top-status { display: none; }
  .nav-links { justify-self: end; }
  .executive-kpis { grid-template-columns: repeat(2, 1fr); }
  .executive-grid-main, .executive-grid-secondary, .watch-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 1320px); }
  .executive-shell { padding-top: 20px; }
  .topbar-inner { min-height: 60px; grid-template-columns: 1fr auto; gap: 10px; }
  .nav-links a { padding: 6px 8px; font-size: 10px; }
  .executive-hero, .page-heading { flex-direction: column; align-items: stretch; gap: 18px; }
  .hero-actions { min-width: 0; }
  h1 { font-size: 38px; }
  .executive-kpis { grid-template-columns: 1fr 1fr; }
  .kpi-card { min-height: 112px; padding: 14px; }
  .kpi-value { font-size: 28px; }
  .theme-grid, .executive-facts { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipeline-arrow { display: none; }
  .retrieval-content { grid-template-columns: 118px 1fr; }
  .donut-wrap, .donut { width: 108px; height: 108px; }
  .development-card { grid-template-columns: 42px 1fr; }
  .development-content { padding: 16px; }
  .development-topline, .development-footer { align-items: flex-start; flex-direction: column; }
  .entity-list { justify-content: flex-start; }
  .brief-callout { grid-template-columns: 1fr; gap: 5px; }
  .chart-labels span:nth-child(even) { display: none; }
}
@media (max-width: 480px) {
  .brand { font-size: 16px; }
  .nav-links a:first-child { display: none; }
  .executive-kpis { grid-template-columns: 1fr; }
  .window-pill { display: grid; }
  .retrieval-content { grid-template-columns: 1fr; justify-items: center; }
  .retrieval-stats { width: 100%; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .development-card { grid-template-columns: 1fr; }
  .development-index { display: none; }
  .watch-row { grid-template-columns: 28px 1fr; }
  .ops-bar-row { grid-template-columns: 1fr auto; }
  .ops-bar-track { grid-column: 1 / -1; }
}

/* Authentication */
.top-user {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
}
.logout-form { margin: 0; }
.logout-button {
  appearance: none;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}
.logout-button:hover { color: var(--text); }
.topbar-layout-button {
  appearance: none;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(206,255,79,.16);
  border-radius: 999px;
  background: rgba(206,255,79,.045);
  color: var(--text-soft);
  font: inherit;
  font-size: 10px;
  font-weight: 720;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.topbar-layout-icon { color: var(--accent); font-size: 12px; line-height: 1; }
.topbar-layout-button:hover { border-color: rgba(206,255,79,.32); background: rgba(206,255,79,.08); color: var(--text); }
.topbar-layout-button.is-active { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 28px;
}
.auth-shell {
  width: min(480px, 100%);
}
.auth-brand { padding: 18px 8px; }
.auth-brand-lockup { margin-bottom: 46px; }
.auth-brand h1 {
  margin-top: 10px;
  font-size: clamp(46px, 7vw, 76px);
}
.auth-card { padding: 26px; }
.auth-card-heading { margin-bottom: 22px; }
.auth-card-heading h2 { margin-top: 0; font-size: 23px; }
.auth-error {
  margin-bottom: 16px;
  padding: 11px 12px;
  border: 1px solid rgba(255,131,131,.22);
  border-radius: 10px;
  background: rgba(255,131,131,.07);
  color: #ffc4c4;
  font-size: 11px;
}
.auth-form { display: grid; gap: 15px; }
.auth-field { display: grid; gap: 7px; }
.auth-field > span {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .075em;
}
.auth-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: #0d1218;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-field input:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(206,255,79,.07);
}
.auth-submit { width: 100%; margin-top: 3px; }
@media (max-width: 1050px) {
  .topbar-inner { grid-template-columns: 1fr auto auto; }
  .top-status { display: flex; }
  .top-status > .live-dot,
  .top-status > span:not(.top-user) { display: none; }
  .top-user { display: none; }
}

@media (max-width: 760px) {
  .topbar-inner { grid-template-columns: 1fr auto auto; }
  .auth-page { padding: 18px; }
}

@media (max-width: 480px) {
  .topbar-inner { grid-template-columns: 1fr auto auto; }
  .logout-button { font-size: 9px; }
  .auth-page { padding: 12px; }
  .auth-card { padding: 20px; }
}

/* Scan progress */
.is-hidden { display: none !important; }
.scan-progress-card { margin-bottom: 16px; padding: 18px 20px; }
.scan-progress-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.scan-progress-heading h2 { margin-top: 4px; }
.scan-progress-heading > strong { color: var(--accent); font-size: 18px; line-height: 1; }
.scan-progress-bar {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 15px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #202832;
  accent-color: var(--accent);
}
.scan-progress-bar::-webkit-progress-bar { background: #202832; border-radius: 999px; }
.scan-progress-bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width .35s ease; }
.scan-progress-bar::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.scan-progress-note { margin-top: 9px; color: var(--muted); font-size: 10.5px; }
.button:disabled { cursor: default; opacity: .62; filter: none; }

/* Retrieved source list */
.source-results-panel { box-shadow: none; }
.source-results-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.source-result-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  background: rgba(255,255,255,.015);
}
.source-result-index { padding-top: 2px; color: #65717e; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.source-result-content { min-width: 0; }
.source-result-content > strong { display: block; margin-top: 7px; font-size: 12px; line-height: 1.45; }
.source-result-content > strong a { text-decoration: none; }
.source-result-content > strong a:hover { color: var(--accent); }
.source-result-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 9px; }
.domain-badge, .fetch-method {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(124,182,255,.18);
  background: rgba(124,182,255,.055);
  color: #b9d7fb;
  font-size: 9px;
  line-height: 1;
}
.fetch-method { border-color: var(--border-soft); background: rgba(255,255,255,.025); color: var(--muted); text-transform: uppercase; }
.source-publisher { margin-top: 5px; color: var(--muted); font-size: 9.5px; }
.feed-only-badge { border-color: rgba(190,255,52,.22); color: var(--accent); background: rgba(190,255,52,.055); }
.fetch-failed-badge { border-color: rgba(255,126,126,.18); color: #e9a1a1; background: rgba(255,126,126,.035); }
.source-feed-only-note { margin-top: 8px; color: #b8c2cc; font-size: 9.5px; line-height: 1.45; }
.source-feed-snippet { margin: 6px 0 0; color: var(--muted); font-size: 9.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 760px) {
  .source-results-list { grid-template-columns: 1fr; }
  .scan-progress-card { padding: 15px; }
}

/* Keyword news */
.keyword-news-block { display: flow-root; margin-bottom: 16px; }
.keyword-news-panel { box-shadow: none; }
.keyword-news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.keyword-news-item {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  background: rgba(255,255,255,.015);
}
.keyword-news-item h3 {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
}
.keyword-news-item h3 a { text-decoration: none; }
.keyword-news-item h3 a:hover { color: var(--accent); }
.keyword-news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}
.keyword-news-meta .domain-badge { flex: 0 0 auto; }

@media (max-width: 760px) {
  .keyword-news-grid { grid-template-columns: 1fr; }
}


/* Keyword time filters */
.keyword-time-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(255,255,255,.012);
}
.time-filter-button,
.history-pagination button {
  appearance: none;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  color: var(--muted);
  padding: 7px 9px;
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
  text-decoration: none;
}
.time-filter-button:hover,
.history-pagination button:hover:not(:disabled) { color: var(--text); border-color: rgba(206,255,79,.2); }
.time-filter-button.active { color: var(--accent); border-color: rgba(206,255,79,.28); background: rgba(206,255,79,.07); }
.is-hidden { display: none !important; }
.keyword-filter-empty { margin: 0; }


/* Report and analysis-input date / 3-hour filters reuse the keyword-news controls. */
.report-time-toolbar,
.analysis-time-toolbar { margin-bottom: 10px; }

/* Fetch error detail */
.fetch-error-list { display: grid; gap: 8px; }
.fetch-error-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
}
.fetch-error-item:first-child { border-top: 0; }
.compact-fetch-errors .fetch-error-item { grid-template-columns: 1fr; }
.fetch-error-content { min-width: 0; display: grid; gap: 6px; }
.fetch-error-content > strong { font-size: 11px; line-height: 1.4; }
.failed-url {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #9fc8f4;
  font-size: 9.5px;
  text-decoration: none;
}
.failed-url:hover { color: var(--accent); }
.fetch-error-message { color: #e7a4a4; font-size: 9.5px; line-height: 1.45; overflow-wrap: anywhere; }

.failed-run-heading { align-items: flex-start; gap: 14px; }
.failed-run-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.failed-run-picker { display: flex; align-items: center; gap: 7px; }
.failed-run-picker label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9.5px; white-space: nowrap; }
.failed-run-picker select {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #11171d;
  color: var(--text);
  padding: 7px 28px 7px 9px;
  font: inherit;
  font-size: 9.5px;
  outline: none;
}
.failed-run-picker select:focus { border-color: rgba(206,255,79,.28); }
.failed-run-button { padding: 7px 10px; min-height: 0; font-size: 9.5px; }

/* Run history search + pagination */
.history-tools { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.history-search {
  width: min(360px, 100%);
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: rgba(255,255,255,.025);
  color: var(--text);
  padding: 8px 10px;
  font: inherit;
  font-size: 10.5px;
  outline: none;
}
.history-search:focus { border-color: rgba(206,255,79,.28); }
.history-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding-top: 12px; }
.history-pagination span { min-width: 96px; text-align: center; color: var(--muted); font-size: 9.5px; }
.history-pagination button:disabled { opacity: .4; cursor: default; }

@media (max-width: 760px) {
  .keyword-time-toolbar { overflow-x: auto; flex-wrap: nowrap; }
  .time-filter-button { flex: 0 0 auto; }
  .history-tools { justify-content: stretch; }
  .history-search { width: 100%; }
  .failed-run-heading { align-items: stretch; }
  .failed-run-actions { justify-content: flex-start; }
}

/* Real-time scan terminal */
.scan-terminal {
  margin-top: 12px;
  max-height: 230px;
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: #080c10;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 9.5px;
  line-height: 1.55;
  scrollbar-width: thin;
}
.scan-terminal-line { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; color: #b7c2cf; }
.scan-terminal-line > span:first-child { color: #65717e; }
.scan-terminal-line.is-error > span:last-child { color: #f0a6a6; }
.scan-terminal-empty { color: #65717e; }

/* Keyword news date/search/pagination */
.keyword-time-toolbar { align-items: center; }
.keyword-date-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}
.keyword-date-control select {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #11171d;
  color: var(--text);
  padding: 7px 28px 7px 9px;
  font: inherit;
  font-size: 9.5px;
  outline: none;
}
.keyword-date-control select:focus { border-color: rgba(206,255,79,.28); }
.keyword-time-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.keyword-news-tools { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.keyword-news-tools .history-search { width: min(420px, 100%); }
.keyword-pagination { padding-top: 10px; }

@media (max-width: 760px) {
  .keyword-time-toolbar { overflow: visible; flex-wrap: wrap; }
  .keyword-time-buttons { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .keyword-news-tools { justify-content: stretch; }
  .keyword-news-tools .history-search { width: 100%; }
  .scan-terminal { max-height: 190px; }
}

/* Persistent scan log controls */
.scan-progress-actions { display: flex; align-items: center; gap: 12px; }
.scan-progress-actions > strong { color: var(--accent); font-size: 18px; line-height: 1; }
.scan-log-toggle {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #11171d;
  color: var(--muted);
  padding: 7px 10px;
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.scan-log-toggle:hover { color: var(--text); border-color: rgba(206,255,79,.25); }
.scan-progress-card.logs-collapsed .scan-terminal { display: none; }
@media (max-width: 560px) {
  .scan-progress-actions { align-items: flex-end; flex-direction: column; gap: 8px; }
}

/* Alternate coverage with closely matching headlines */
.similar-news-box {
  margin-top: 9px;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: rgba(255,255,255,.012);
}
.similar-news-box summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 10px;
  color: #aeb9c4;
  font-size: 10px;
  font-weight: 700;
  user-select: none;
}
.similar-news-box summary::-webkit-details-marker { display: none; }
.similar-news-box summary::before {
  content: "+";
  display: inline-block;
  width: 14px;
  color: var(--accent);
}
.similar-news-box[open] summary::before { content: "−"; }
.similar-news-links {
  display: grid;
  gap: 0;
  padding: 0 10px 8px;
  border-top: 1px solid var(--border-soft);
}
.similar-news-links a {
  display: grid;
  grid-template-columns: minmax(110px, 180px) 1fr;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,.035);
  text-decoration: none;
}
.similar-news-links a:first-child { border-top: 0; }
.similar-news-links span { color: #8fa2b6; font-size: 9.5px; }
.similar-news-links strong { color: #bfd8f5; font-size: 10px; line-height: 1.45; }
.similar-news-links a:hover strong { color: var(--accent); }
@media (max-width: 620px) {
  .similar-news-links a { grid-template-columns: 1fr; gap: 3px; }
}
.source-similar-news { margin-top: 8px; }
.source-similar-news summary { font-size: 9.5px; }
.analysis-status-published { border-color: rgba(190,255,52,.24); color: var(--accent); background: rgba(190,255,52,.06); }
.analysis-status-new { border-color: rgba(190,255,52,.38); color: var(--accent); background: rgba(190,255,52,.10); font-weight: 700; }
.analysis-status-watch { border-color: rgba(255,205,91,.22); color: #e7c878; background: rgba(255,205,91,.05); }
.analysis-status-not-new { border-color: rgba(124,182,255,.2); color: #b9d7fb; background: rgba(124,182,255,.05); }
.analysis-status-rejected { border-color: rgba(142,153,166,.2); color: #8e99a6; background: rgba(142,153,166,.04); }
.analysis-outcome-note { margin-top: 7px; color: #aeb9c5; font-size: 9.5px; line-height: 1.5; }

/* Analysis outcome filters */
.analysis-status-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}
.analysis-filter-button {
  appearance: none;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  color: var(--muted);
  padding: 7px 9px;
  font: inherit;
  font-size: 9.5px;
  cursor: pointer;
}
.analysis-filter-button:hover { color: var(--text); border-color: rgba(206,255,79,.2); }
.analysis-filter-button.active { color: var(--accent); border-color: rgba(206,255,79,.28); background: rgba(206,255,79,.07); }
.analysis-status-state { border-color: rgba(201,167,255,.22); color: #cfb7f4; background: rgba(201,167,255,.05); }

@media (max-width: 760px) {
  .analysis-status-toolbar { overflow-x: auto; flex-wrap: nowrap; }
  .analysis-filter-button { flex: 0 0 auto; }
}

/* Daily executive summary */
.daily-summary-heading { align-items: center; }
.daily-summary-date-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}
.daily-summary-date-control select {
  min-width: 132px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #11171d;
  color: var(--text);
  padding: 8px 28px 8px 10px;
  font: inherit;
  font-size: 10px;
  outline: none;
}
.daily-summary-date-control select:focus { border-color: rgba(206,255,79,.28); }
.daily-summary-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.daily-summary-item {
  position: relative;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
}
.daily-summary-item:first-child { padding-top: 2px; }
.daily-summary-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.daily-summary-bullet {
  width: 6px;
  height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(206,255,79,.07);
}
.daily-summary-content { min-width: 0; }
.daily-summary-content p { margin: 0; color: #e3e8ed; font-size: 13px; line-height: 1.58; }
.daily-summary-content p a { color: inherit; text-decoration: none; }
.daily-summary-content p a:hover { color: #f2f5f7; text-decoration: underline; text-decoration-color: rgba(206,255,79,.4); text-underline-offset: 3px; }
.daily-summary-found { color: var(--accent); font-weight: 760; font-variant-numeric: tabular-nums; }
.daily-summary-dash { margin: 0 7px; color: #65717e; }
.daily-summary-meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 6px; color: var(--muted); font-size: 9.5px; }
.daily-summary-meta > span:not(.badge) + span:not(.badge)::before { content: '·'; margin-right: 7px; color: #4d5965; }
.badge-state { border-color: rgba(176,145,255,.28); background: rgba(176,145,255,.08); color: #d8c9ff; }
.daily-summary-footer { display: flex; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border-soft); color: #66717e; font-size: 9.5px; line-height: 1.45; }
.daily-summary-footer span:first-child { color: var(--text-soft); white-space: nowrap; }
.daily-summary-empty { margin-top: 6px; }

@media (max-width: 760px) {
  .daily-summary-heading { align-items: flex-start; flex-direction: column; }
  .daily-summary-date-control { width: 100%; justify-content: space-between; }
  .daily-summary-date-control select { min-width: 0; width: 180px; max-width: 70%; }
  .daily-summary-footer { flex-direction: column; gap: 4px; }
}

/* v0.9.27 · full-day issue map + representative links */
.daily-issue-map-heading { align-items: center; }
.daily-issue-map-panel .theme-card p { line-height: 1.55; }
.theme-subtopics a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(255,255,255,.18); text-underline-offset: 2px; }
.theme-subtopics a:hover { color: var(--text); text-decoration-color: rgba(206,255,79,.45); }
.theme-subtopic-separator { color: #56616e; }
.daily-issue-empty { margin-top: 6px; }
@media (max-width: 760px) {
  .daily-issue-map-heading { align-items: flex-start; flex-direction: column; }
}

/* Dashboard section ordering */
/* Persisted dashboard visibility must override module-specific display rules. */
[data-dashboard-module][hidden] { display: none !important; }

/* Keep a stable vertical rhythm when dashboard modules are reordered. */
[data-dashboard-layout-root] { --dashboard-section-gap: 16px; }
[data-dashboard-layout-root] > [data-dashboard-module] {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
[data-dashboard-layout-root] > [data-dashboard-module] + [data-dashboard-module] {
  margin-top: var(--dashboard-section-gap) !important;
}
[data-dashboard-layout-root] > [data-dashboard-module] > :first-child { margin-top: 0 !important; }
.dashboard-layout-editor[hidden] { display: none !important; }
.dashboard-layout-editor {
  margin: -2px 0 24px;
  padding: 18px 20px;
  border-color: rgba(206,255,79,.16);
  background: linear-gradient(145deg, rgba(206,255,79,.045), rgba(17,22,29,.98) 42%);
  box-shadow: 0 16px 44px rgba(0,0,0,.18);
}
.dashboard-layout-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.dashboard-layout-editor-heading h2 { margin-top: 4px; font-size: 17px; }
.dashboard-layout-editor-heading p { margin: 6px 0 0; color: var(--muted); font-size: 10.5px; }
.dashboard-layout-editor-close {
  appearance: none;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  padding: 0 0 2px;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: rgba(255,255,255,.02);
  color: var(--muted);
  font: inherit;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.dashboard-layout-editor-close:hover { border-color: rgba(206,255,79,.2); color: var(--text); background: rgba(255,255,255,.04); }
.dashboard-layout-editor-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 17px;
}
.dashboard-layout-target { min-width: 280px; display: grid; gap: 7px; }
.dashboard-layout-target-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.dashboard-layout-select-wrap { position: relative; display: block; }
.dashboard-layout-select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.dashboard-layout-target select {
  appearance: none;
  width: 100%;
  min-height: 43px;
  padding: 0 42px 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  outline: none;
  background: linear-gradient(180deg, rgba(21,28,36,.98), rgba(14,19,25,.98));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  font: inherit;
  font-size: 11.5px;
  font-weight: 680;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.dashboard-layout-target select:hover { border-color: rgba(206,255,79,.24); }
.dashboard-layout-target select:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(206,255,79,.065); }
.dashboard-layout-target select option { background: #11171d; color: var(--text); }
.dashboard-layout-editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.dashboard-layout-preview { min-width: 88px; text-align: center; }
.dashboard-layout-editor-footer {
  min-height: 27px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--border-soft);
  color: #6f7a87;
  font-size: 9.5px;
}
.dashboard-layout-status { min-height: 14px; color: var(--muted); font-size: 9px; text-align: right; }
.dashboard-layout-status[data-state="saved"] { color: var(--ok); }
.dashboard-layout-status[data-state="error"] { color: var(--danger); }
[data-dashboard-layout-toggle].is-active { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.dashboard-layout-module { position: relative; }
.dashboard-layout-editing .dashboard-layout-module { outline: 1px dashed rgba(206,255,79,.32); outline-offset: 5px; border-radius: var(--radius); }
.dashboard-module-controls {
  position: absolute;
  z-index: 12;
  top: -12px;
  right: 12px;
  display: none;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(8,11,15,.96);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
.dashboard-layout-editing .dashboard-module-controls { display: flex; }
.dashboard-module-control {
  width: 28px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.dashboard-module-control:hover:not(:disabled) { color: var(--accent); background: var(--accent-soft); }
.dashboard-module-control:disabled { opacity: .28; cursor: default; }
.dashboard-report-module { position: relative; }

@media (max-width: 720px) {
  .dashboard-module-controls { right: 8px; }
}
.dashboard-layout-editing .dashboard-module-marked-hidden { opacity: .48; }
.dashboard-module-visibility { width: auto; min-width: 44px; padding: 0 8px; font-size: 10px; font-weight: 750; }
.auth-public-link { margin: -4px 0 20px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.025); display: grid; gap: 4px; }
.auth-public-link span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.auth-public-link a { color: var(--text-soft); text-decoration: none; font-size: 12px; }
.auth-public-link a:hover { color: var(--accent); }
.auth-public-link code { color: var(--accent); font-family: inherit; font-size: 11px; }
.public-dashboard-hero { align-items: center; }
.public-dashboard-hero .subtitle { margin-top: 8px; }
.public-dashboard-updated { display: grid; gap: 4px; text-align: right; }
.public-dashboard-updated span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.public-dashboard-updated strong { color: var(--text-soft); font-size: 12px; }

@media (max-width: 760px) {
  .dashboard-layout-editor { margin-top: 0; padding: 16px; }
  .dashboard-layout-editor-toolbar { align-items: stretch; flex-direction: column; gap: 12px; }
  .dashboard-layout-target { min-width: 0; width: 100%; }
  .dashboard-layout-editor-actions { width: 100%; }
  .dashboard-layout-preview, [data-dashboard-layout-toggle] { flex: 1 1 0; }
  .dashboard-layout-editor-footer { align-items: flex-start; flex-direction: column; gap: 5px; }
  .dashboard-layout-status { text-align: left; }
}
@media (max-width: 480px) {
  .topbar-layout-button { width: 30px; min-height: 30px; justify-content: center; padding: 0; }
  .topbar-layout-button > span:last-child { display: none; }
}

.daily-summary-similar-news {
  margin-top: 8px;
  max-width: 760px;
}
.daily-summary-similar-news summary {
  font-size: 9.5px;
}

/* Admin OpenAI settings */
.settings-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-status { margin-bottom: 22px; }
.settings-form { display: flex; flex-direction: column; align-items: flex-start; gap: 17px; }
.settings-field { display: flex; flex-direction: column; gap: 7px; width: 100%; font-size: 12px; font-weight: 700; color: var(--text-soft); }
.settings-field small { color: var(--muted); font-weight: 400; line-height: 1.55; font-size: 11px; }
.settings-input { display: block; width: 100%; box-sizing: border-box; min-height: 43px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(0,0,0,.22); color: var(--text); font: inherit; font-size: 13px; }
.settings-input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings-balance { padding: 14px 0 18px; }
.settings-billing-link { margin-top: 15px; }
.settings-alert { margin-bottom: 16px; padding: 11px 14px; border: 1px solid rgba(255,131,131,.4); border-radius: 11px; background: rgba(255,131,131,.09); color: #ffaaaa; font-size: 12px; }
.settings-status strong { overflow-wrap: anywhere; }
@media (max-width: 840px) { .settings-layout { grid-template-columns: minmax(0, 1fr); } }
