:root {
  --bg: #08111f;
  --bg-deep: #050b14;
  --sidebar: #07101c;
  --panel: #101b2d;
  --panel-2: #0c1727;
  --panel-soft: #122037;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #f5f8ff;
  --muted: #91a0b6;
  --muted-2: #64748b;
  --blue: #2878ff;
  --blue-2: #1858d9;
  --green: #2dd478;
  --orange: #ff9d32;
  --red: #ff5a68;
  --violet: #8567ff;
  --cyan: #25c7d9;
  --shadow: 0 16px 50px rgba(0, 0, 0, 0.26);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 76% -12%, rgba(40, 120, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #08111f 0%, #07101c 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 224px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: rgba(5, 12, 22, 0.96);
  backdrop-filter: blur(16px);
  transition: transform .25s ease;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 24px 20px 20px; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center;
  color: #7aa8ff; border-radius: 12px;
  background: linear-gradient(145deg, rgba(40,120,255,.2), rgba(133,103,255,.12));
  border: 1px solid rgba(81, 132, 255, .28);
}
.brand-mark svg { width: 28px; height: 28px; stroke-width: 2; }
.brand strong { display: block; font-size: 16px; letter-spacing: .02em; }
.brand span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.nav { display: grid; gap: 7px; padding: 14px 12px; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 12px 13px; border: 0; border-radius: 10px;
  background: transparent; color: #a6b3c7; cursor: pointer; text-align: left;
  transition: .2s ease;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.045); }
.nav-item.active {
  color: white;
  background: linear-gradient(135deg, #246eff, #1f55d9);
  box-shadow: 0 8px 26px rgba(31, 91, 230, .28);
}
.nav-item svg { width: 18px; height: 18px; }
.sidebar-bottom { margin-top: auto; padding: 14px 16px 18px; border-top: 1px solid var(--border); }
.mini-status { display: flex; align-items: center; gap: 10px; padding: 10px; }
.mini-status strong, .mini-status span { display: block; }
.mini-status strong { font-size: 13px; }
.mini-status span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.version { margin-top: 8px; color: var(--muted-2); font-size: 11px; text-align: center; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(45,212,120,.1); flex: 0 0 auto; }
.pulse-dot.offline { background: var(--red); box-shadow: 0 0 0 4px rgba(255,90,104,.1); }

.main-content { width: calc(100% - 224px); min-width: 0; margin-left: 224px; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; border-bottom: 1px solid var(--border);
  background: rgba(7, 15, 27, .88); backdrop-filter: blur(16px);
}
.topbar-status, .topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-status { color: var(--muted); font-size: 13px; }
.status-pill, .status-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 9px; border-radius: 7px; font-size: 12px; font-weight: 600;
}
.status-pill { color: #52df93; background: rgba(45,212,120,.12); border: 1px solid rgba(45,212,120,.2); }
.status-pill.error { color: #ff8490; background: rgba(255,90,104,.12); border-color: rgba(255,90,104,.22); }
.status-badge.success { color: #52df93; background: rgba(45,212,120,.12); }
.status-badge.warning { color: #ffbd68; background: rgba(255,157,50,.13); }
.status-badge.danger { color: #ff8490; background: rgba(255,90,104,.13); }
.status-badge.neutral { color: #9fb0c7; background: rgba(148,163,184,.1); }
.icon-button, .ghost-button, .primary-button, .text-button {
  border: 0; cursor: pointer; transition: .2s ease;
}
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: transparent; color: var(--muted); }
.icon-button:hover { color: #fff; background: rgba(255,255,255,.06); }
.menu-button { display: none; }
.ghost-button, .primary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 9px 15px; border-radius: 9px; font-size: 13px; font-weight: 600;
}
.ghost-button { color: #c4cede; background: rgba(255,255,255,.045); border: 1px solid var(--border); }
.ghost-button:hover { color: white; border-color: var(--border-strong); background: rgba(255,255,255,.075); }
.primary-button { color: white; background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 8px 22px rgba(40,120,255,.2); }
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.primary-button:disabled, .ghost-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.text-button { padding: 0; background: transparent; color: #6ea2ff; font-size: 13px; }
.text-button:hover { color: #9dbdff; }

.content-wrap { padding: 26px; }
.page-section { display: none; animation: fadeIn .2s ease; }
.page-section.active { display: block; }
@keyframes fadeIn { from { opacity: .6; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.page-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.metric-card {
  display: flex; align-items: center; gap: 14px; min-height: 118px; padding: 18px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(18, 32, 55, .95), rgba(12, 23, 39, .95));
  box-shadow: var(--shadow);
}
.metric-card > div:last-child { min-width: 0; }
.metric-card span, .metric-card small { display: block; }
.metric-card span { color: #bec9da; font-size: 13px; }
.metric-card strong { display: block; margin-top: 5px; font-size: 28px; line-height: 1; }
.metric-card small { margin-top: 8px; color: var(--muted); font-size: 11px; }
.metric-card .model-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.metric-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; flex: 0 0 auto; }
.metric-icon svg { width: 22px; height: 22px; }
.metric-blue { color: #8cb4ff; background: rgba(40,120,255,.18); }
.metric-violet { color: #b0a0ff; background: rgba(133,103,255,.18); }
.metric-green { color: #77e6a8; background: rgba(45,212,120,.16); }
.metric-orange { color: #ffc078; background: rgba(255,157,50,.17); }

.dashboard-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.top-grid { grid-template-columns: 1.05fr 1.15fr .95fr; }
.bottom-grid { grid-template-columns: 1.25fr .85fr; }
.panel {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(15, 27, 46, .96), rgba(10, 21, 36, .96));
  box-shadow: var(--shadow); overflow: hidden;
}
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 18px 14px; }
.panel-header h2 { margin: 0; font-size: 15px; font-weight: 700; }
.panel-header > span { color: var(--muted); font-size: 11px; }

.source-visual { display: grid; grid-template-columns: 158px 1fr; align-items: center; gap: 16px; padding: 8px 18px 20px; }
.donut {
  width: 150px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(var(--blue) 0 30%, var(--violet) 30% 50%, var(--green) 50% 65%, var(--orange) 65% 80%, var(--cyan) 80% 90%, #a362ff 90% 100%);
  position: relative;
}
.donut::before { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: #0d192a; box-shadow: inset 0 0 0 1px var(--border); }
.donut > div { position: relative; z-index: 1; text-align: center; }
.donut strong { display: block; font-size: 22px; }
.donut span { color: var(--muted); font-size: 11px; }
.source-legend { display: grid; gap: 9px; }
.legend-row { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 8px; font-size: 12px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-name { color: #d8e0ec; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-weight { color: var(--muted); }
.legend-count { min-width: 28px; text-align: right; color: white; font-weight: 600; }

.trend-chart { min-height: 212px; padding: 6px 16px 16px; }
.chart-wrap { width: 100%; height: 196px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: rgba(148,163,184,.12); stroke-width: 1; }
.chart-line { stroke: var(--blue); stroke-width: 2.5; fill: none; }
.chart-area { fill: url(#trendArea); stroke: none; }
.chart-dot { fill: var(--blue); stroke: #0e1b2d; stroke-width: 2; }
.chart-label { fill: #718199; font-size: 10px; }
.chart-value { fill: #b7c4d7; font-size: 10px; }
.chart-empty { min-height: 190px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }

.task-list { display: grid; gap: 2px; padding: 2px 16px 16px; }
.task-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid rgba(148,163,184,.08); }
.task-row:last-child { border-bottom: 0; }
.task-info strong { display: block; font-size: 12px; font-weight: 600; }
.task-info span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.task-result { display: flex; align-items: center; gap: 8px; }
.task-count { color: var(--muted); font-size: 11px; }

.article-list { padding: 0 16px 14px; }
.article-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid rgba(148,163,184,.08); }
.article-row:last-child { border-bottom: 0; }
.source-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: white; font-size: 12px; font-weight: 700; }
.source-wechat { background: linear-gradient(145deg, #39d77a, #1aaa58); }
.source-openai { background: linear-gradient(145deg, #f4f7fb, #aeb9c8); color: #07101c; }
.source-github { background: linear-gradient(145deg, #303b4d, #111827); }
.source-huggingface { background: linear-gradient(145deg, #ffd34d, #f39d23); color: #2d2100; }
.source-x { background: linear-gradient(145deg, #273142, #05080d); }
.source-reddit { background: linear-gradient(145deg, #ff7849, #e34217); }
.source-domestic { background: linear-gradient(145deg, #ff5a7a, #b91c4a); }
.article-main { min-width: 0; }
.article-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #eaf0f9; text-decoration: none; font-size: 12px; font-weight: 600; }
.article-title:hover { color: #8db4ff; }
.article-meta { display: flex; gap: 8px; margin-top: 5px; color: var(--muted); font-size: 10px; }
.heat-badge { min-width: 52px; padding: 4px 7px; border-radius: 6px; color: #ffbd68; background: rgba(255,157,50,.12); text-align: center; font-size: 10px; }

.report-preview-panel { min-height: 342px; }
.empty-state { min-height: 260px; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--muted); text-align: center; }
.empty-state svg { width: 42px; height: 42px; color: #4f6480; }
.empty-state p { margin: 0; font-size: 12px; }
.report-preview { padding: 4px 18px 18px; }
.report-preview h3 { margin: 0 0 8px; font-size: 17px; }
.report-preview .summary { margin: 0; color: #aab7c9; font-size: 12px; line-height: 1.65; }
.report-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.report-meta div { padding: 11px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.02); }
.report-meta span, .report-meta strong { display: block; }
.report-meta span { color: var(--muted); font-size: 10px; }
.report-meta strong { margin-top: 5px; font-size: 12px; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.rank-tabs { margin-left: auto; }
.hot-topic-card {
  margin: 14px 18px 0;
  padding: 12px 14px;
  border: 1px solid rgba(34, 211, 238, .24);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34,211,238,.10), rgba(59,130,246,.07));
  color: #cfe9ff;
  font-size: 13px;
}
.hot-topic-card strong { color: #fff; }
.hot-topic-card span { margin-left: 10px; color: var(--muted); font-size: 11px; }
.filter-tab { padding: 8px 11px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.filter-tab:hover { color: white; background: rgba(255,255,255,.04); }
.filter-tab.active { color: white; background: rgba(40,120,255,.13); border-color: rgba(40,120,255,.28); }
.search-box { width: 250px; display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,.025); }
.search-box svg { width: 16px; height: 16px; color: var(--muted); }
.search-box input { width: 100%; padding: 9px 0; border: 0; outline: 0; background: transparent; color: white; font-size: 12px; }
.search-box input::placeholder { color: #607087; }
.article-table { min-height: 300px; }
.table-head, .table-row { display: grid; grid-template-columns: 110px minmax(260px, 1fr) 150px 120px 90px; gap: 12px; align-items: center; padding: 12px 18px; }
.table-head { color: var(--muted); background: rgba(255,255,255,.025); font-size: 11px; }
.table-row { border-top: 1px solid rgba(148,163,184,.08); font-size: 12px; }
.table-row:hover { background: rgba(255,255,255,.018); }
.table-source { display: flex; align-items: center; gap: 8px; }
.table-source .source-avatar { width: 28px; height: 28px; border-radius: 8px; font-size: 10px; }
.table-title { min-width: 0; }
.table-title a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; font-weight: 600; }
.table-title a:hover { color: #8db4ff; }
.table-cell-muted { color: var(--muted); }
.score-bar { display: flex; align-items: center; gap: 8px; }
.score-track { width: 48px; height: 5px; overflow: hidden; border-radius: 99px; background: rgba(148,163,184,.12); }
.score-fill { height: 100%; border-radius: inherit; background: var(--blue); }

.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; }
.report-main { min-height: 650px; padding: 22px; }
.report-document h2 { margin: 0 0 8px; font-size: 22px; }
.report-document h3 { margin: 25px 0 10px; font-size: 15px; }
.report-document p, .report-document li { color: #bcc8d9; font-size: 13px; line-height: 1.75; }
.report-document ul, .report-document ol { margin: 8px 0 0; padding-left: 22px; }
.report-document .topic-callout { padding: 16px; border: 1px solid rgba(40,120,255,.28); border-radius: 12px; background: rgba(40,120,255,.08); }
.report-document .topic-callout strong { display: block; margin-bottom: 6px; font-size: 17px; }
.script-box { position: relative; padding: 17px; border: 1px solid var(--border); border-radius: 12px; background: rgba(3, 9, 17, .32); }
.script-box p { margin: 0; white-space: pre-wrap; }
.copy-button { position: absolute; top: 10px; right: 10px; }
.option-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.option-chip { padding: 7px 10px; border-radius: 8px; color: #cbd7e7; background: rgba(255,255,255,.045); border: 1px solid var(--border); font-size: 12px; }
.history-list { padding: 0 14px 14px; }
.history-item { width: 100%; display: block; padding: 12px; border: 1px solid transparent; border-bottom-color: rgba(148,163,184,.08); background: transparent; color: inherit; cursor: pointer; text-align: left; }
.history-item:hover, .history-item.active { border-radius: 10px; border-color: rgba(40,120,255,.25); background: rgba(40,120,255,.07); }
.history-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.history-item span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }

.task-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; }
.run-table { padding-bottom: 8px; }
.run-head, .run-row { display: grid; grid-template-columns: 120px 100px 80px 160px minmax(160px, 1fr); gap: 12px; align-items: center; padding: 12px 18px; }
.run-head { color: var(--muted); background: rgba(255,255,255,.025); font-size: 11px; }
.run-row { border-top: 1px solid rgba(148,163,184,.08); font-size: 12px; }
.run-error { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ff8d97; }
.schedule-list { padding: 4px 16px 16px; }
.schedule-item { padding: 13px; border: 1px solid var(--border); border-radius: 11px; margin-bottom: 10px; background: rgba(255,255,255,.02); }
.schedule-item strong { display: block; font-size: 13px; }
.schedule-item span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }

.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.setting-card { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgba(15,27,46,.96), rgba(10,21,36,.96)); box-shadow: var(--shadow); }
.setting-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.setting-title { display: flex; align-items: center; gap: 10px; }
.setting-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(40,120,255,.11); color: #7aa8ff; }
.setting-icon svg { width: 18px; height: 18px; }
.setting-card h3 { margin: 0; font-size: 13px; }
.setting-card p { margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.guide-content { padding: 0 18px 18px; }
.guide-content p { color: var(--muted); font-size: 12px; }
code { padding: 2px 6px; border-radius: 6px; color: #bcd2ff; background: rgba(40,120,255,.09); border: 1px solid rgba(40,120,255,.14); }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(1, 5, 11, .76); backdrop-filter: blur(8px); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(440px, 100%); padding: 26px; border: 1px solid var(--border-strong); border-radius: 18px; background: #101b2d; box-shadow: 0 28px 80px rgba(0,0,0,.46); }
.modal-close { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 24px; }
.modal-close:hover { color: white; background: rgba(255,255,255,.05); }
.modal-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: #8db4ff; background: rgba(40,120,255,.14); }
.modal h2 { margin: 18px 0 8px; font-size: 20px; }
.modal p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.modal label { display: block; margin-top: 18px; color: #cbd7e7; font-size: 12px; }
.modal input { width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid var(--border-strong); border-radius: 9px; outline: 0; color: white; background: #081321; }
.modal input:focus { border-color: rgba(40,120,255,.75); box-shadow: 0 0 0 3px rgba(40,120,255,.12); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 90; max-width: min(380px, calc(100vw - 44px)); padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: 10px; background: #132237; color: white; box-shadow: 0 16px 50px rgba(0,0,0,.34); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .22s ease; font-size: 12px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: rgba(255,90,104,.35); background: #2b1720; }
.loading-block { min-height: 180px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.spinner { width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.14); border-top-color: #72a2ff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1280px) {
  .top-grid { grid-template-columns: 1fr 1.2fr; }
  .task-panel { grid-column: 1 / -1; }
  .task-list { grid-template-columns: repeat(3, 1fr); }
  .task-row { border-bottom: 0; border: 1px solid var(--border); border-radius: 10px; padding: 11px; }
}
@media (max-width: 1050px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-grid, .report-layout, .task-layout { grid-template-columns: 1fr; }
  .report-history { order: -1; }
  .history-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .history-item { border: 1px solid var(--border); border-radius: 10px; }
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 50px rgba(0,0,0,.36); }
  .sidebar.open { transform: translateX(0); }
  .main-content { width: 100%; margin-left: 0; }
  .menu-button { display: grid; }
  .topbar { padding: 0 16px; }
  .topbar-status #systemClock { display: none; }
  .content-wrap { padding: 18px 14px 28px; }
  .top-grid { grid-template-columns: 1fr; }
  .task-list { grid-template-columns: 1fr 1fr; }
  .filter-row { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .table-head { display: none; }
  .table-row { grid-template-columns: 1fr auto; gap: 8px; padding: 14px; }
  .table-source { grid-column: 1; }
  .table-title { grid-column: 1 / -1; }
  .table-cell-muted:nth-of-type(3), .score-bar { display: none; }
  .run-head { display: none; }
  .run-row { grid-template-columns: 1fr auto; gap: 8px; padding: 14px 18px; }
  .run-row > :nth-child(4), .run-row > :nth-child(5) { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .topbar-actions .ghost-button { display: none; }
  .topbar-status { gap: 7px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading .primary-button { width: 100%; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 102px; }
  .source-visual { grid-template-columns: 1fr; justify-items: center; }
  .source-legend { width: 100%; }
  .task-list { grid-template-columns: 1fr; }
  .history-list { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .filter-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .filter-tab { white-space: nowrap; }
  .report-meta { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; }
}

/* v1.3 可视化安装与配置 */
button, input, textarea, select { font: inherit; }
textarea { resize: vertical; }
.settings-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-panel { overflow: visible; }
.settings-panel .panel-header { border-bottom: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.form-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; color: #cbd7e7; font-size: 12px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--border-strong); border-radius: 9px;
  outline: 0; color: white; background: #081321;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: rgba(40,120,255,.75); box-shadow: 0 0 0 3px rgba(40,120,255,.12);
}
.form-field small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.form-field small.configured { color: #52df93; }
.span-2 { grid-column: 1 / -1; }
.switch-field { display: flex; align-items: center; gap: 10px; min-height: 42px; color: #cbd7e7; font-size: 12px; }
.switch-field input { width: 18px; height: 18px; accent-color: var(--blue); }
.field-actions { display: flex; justify-content: flex-end; gap: 8px; }
.compact-button { min-height: 32px; padding: 6px 11px; font-size: 11px; }
.weight-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.weight-error { color: #ff8490 !important; }
.password-box { margin: 0 18px 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.password-box h3 { margin: 0; font-size: 13px; }
.password-box .form-grid { padding: 14px 0 0; }
.auth-backdrop { z-index: 120; }
.auth-backdrop .modal { max-height: calc(100vh - 36px); }
.setup-modal { width: min(760px, 100%); padding: 24px; }
.setup-heading { display: flex; align-items: flex-start; gap: 14px; }
.setup-heading h2 { margin: 2px 0 7px; }
.setup-scroll { max-height: min(64vh, 650px); overflow-y: auto; margin: 18px -6px 0 0; padding-right: 8px; }
.setup-group { padding: 17px 0; border-top: 1px solid var(--border); }
.setup-group:first-child { border-top: 0; padding-top: 0; }
.setup-group h3 { margin: 0 0 2px; font-size: 14px; }
.setup-group .form-grid { padding: 14px 0 0; }

@media (max-width: 1180px) {
  .settings-editor { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .form-grid, .weight-form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .setup-modal { padding: 20px; }
  .setup-heading { align-items: center; }
  .setup-heading .modal-icon { flex: 0 0 auto; }
  #logoutButton { display: none; }
}


/* v1.4 unified WeRSS workspace */
.heading-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.werss-status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.werss-panel { overflow: hidden; }
.werss-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(40,120,255,.035); }
.werss-toolbar p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.werss-frame-wrap { position: relative; min-height: 760px; background: #f5f7fb; }
.werss-frame-wrap iframe { display: block; width: 100%; height: 820px; border: 0; background: #fff; }
.werss-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; color: var(--muted); background: var(--panel-2); }
.werss-loading[hidden] { display: none; }
.danger-text { color: var(--danger) !important; }
.setup-note { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: rgba(40,120,255,.06); color: var(--muted); font-size: 13px; line-height: 1.6; }

@media (max-width: 900px) {
  .werss-status-grid { grid-template-columns: 1fr; }
  .werss-toolbar { align-items: flex-start; flex-direction: column; }
  .werss-frame-wrap { min-height: 680px; }
  .werss-frame-wrap iframe { height: 720px; }
}

/* v1.5 PPT Master animated deck workspace */
.ppt-layout {
  display: grid;
  grid-template-columns: minmax(360px, .82fr) minmax(0, 1.18fr);
  gap: 14px;
  margin-bottom: 14px;
}
.ppt-config-panel, .ppt-preview-panel { min-height: 620px; }
.ppt-form-grid { padding-bottom: 14px; }
.ppt-feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 18px;
}
.ppt-feature-strip span {
  padding: 7px 10px;
  border: 1px solid rgba(40,120,255,.2);
  border-radius: 999px;
  color: #b9cefa;
  background: rgba(40,120,255,.07);
  font-size: 11px;
}
.ppt-progress {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(40,120,255,.035);
}
.ppt-progress[hidden] { display: none; }
.ppt-progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148,163,184,.13);
}
.ppt-progress-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  transition: width .35s ease;
}
.ppt-progress p { margin: 9px 0 0; color: var(--muted); font-size: 11px; }
.ppt-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 430px;
  padding: 18px;
  align-content: start;
}
.ppt-preview-grid > .empty-state,
.ppt-preview-grid > .loading-block { grid-column: 1 / -1; min-height: 360px; }
.ppt-slide-thumb {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #050b14;
  box-shadow: 0 10px 26px rgba(0,0,0,.18);
}
.ppt-slide-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #08111f;
}
.ppt-slide-thumb figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-width: 28px;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  color: white;
  background: rgba(3,9,17,.78);
  backdrop-filter: blur(8px);
  text-align: center;
  font-size: 10px;
  font-weight: 700;
}
.ppt-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 0 18px 18px;
}
.ppt-result-actions[hidden] { display: none; }
.ppt-result-actions a { text-decoration: none; }
.ppt-job-list { padding: 0 16px 14px; }
.ppt-job-row {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(150px, .8fr) auto 64px auto;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-top: 1px solid rgba(148,163,184,.08);
  font-size: 12px;
}
.ppt-job-row:first-child { border-top: 0; }
.ppt-job-row > div { min-width: 0; }
.ppt-job-row strong {
  display: block;
  overflow: hidden;
  color: #eaf0f9;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.ppt-job-row div span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
.ppt-job-row > span:not(.status-badge) { color: var(--muted); }
.ppt-job-row .text-button { justify-self: end; text-decoration: none; }

@media (max-width: 1120px) {
  .ppt-layout { grid-template-columns: 1fr; }
  .ppt-config-panel, .ppt-preview-panel { min-height: auto; }
}
@media (max-width: 820px) {
  .ppt-preview-grid { grid-template-columns: 1fr; min-height: 320px; }
  .ppt-preview-grid > .empty-state,
  .ppt-preview-grid > .loading-block { min-height: 260px; }
  .ppt-job-row {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 14px 2px;
  }
  .ppt-job-row > :nth-child(2) { grid-column: 1; }
  .ppt-job-row > :nth-child(3) { grid-column: 2; grid-row: 1; }
  .ppt-job-row > :nth-child(4) { grid-column: 1; }
  .ppt-job-row > :nth-child(5) { grid-column: 2; }
}
@media (max-width: 520px) {
  .ppt-result-actions { flex-direction: column; }
  .ppt-result-actions > * { width: 100%; }
}
