/* ============ 基础与主题（科技能源感：深绿 #0b120d + 绿 #7ee2a0 + 金 #ffd97a + 蓝 #7ab8ff） ============ */
:root {
  --bg: #0b120d; --bg2: #101f15; --bg3: #1c2c21; --line: #223527; --line2: #2f4a37;
  --green: #7ee2a0; --green2: #34d399; --gold: #ffd97a; --gold2: #c9a227; --blue: #7ab8ff;
  --ink: #dce8dc; --muted: #8fae97; --card: #131f16; --ok: #5fe3a0; --warn: #ffd97a; --err: #ff9a9a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: #e8f0e8; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* 门户 */
.portal-top { background: linear-gradient(180deg, #07130b, #0b120d); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #1c2c21; }
.portal-topbar { display: flex; align-items: center; gap: 28px; height: 64px; }
.portal-brand { display: flex; align-items: center; gap: 12px; }
.portal-brand .emblem { width: 38px; height: 38px; flex: 0 0 auto; }
.portal-brand-t b { display: block; font-size: 17px; color: #fff; }
.portal-brand-t span { font-size: 11px; color: #6a9074; }
.portal-nav { display: flex; gap: 24px; margin-left: 12px; }
.portal-nav a { color: #9db8a4; font-size: 14px; padding: 6px 2px; border-bottom: 2px solid transparent; }
.portal-nav a:hover { color: #fff; border-color: var(--gold); }
.portal-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.btn-gold { background: linear-gradient(135deg, #ffe7a0, var(--gold)); color: #1a1205; border: none; border-radius: 6px; padding: 9px 18px; font-weight: 600; font-size: 14px; }
.btn-gold.lg { padding: 13px 30px; font-size: 16px; }
.btn-outline { border: 1.5px solid rgba(126,226,160,.5); color: #dce8dc; border-radius: 6px; padding: 9px 18px; font-weight: 600; font-size: 14px; background: transparent; }
.btn-outline.lg { padding: 13px 30px; font-size: 16px; }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-ghost-light { border: 1px solid rgba(126,226,160,.35); color: #9db8a4; background: transparent; border-radius: 6px; padding: 8px 16px; font-size: 14px; }
.btn-ghost-light:hover { border-color: var(--green); color: #fff; }

.portal-hero { position: relative; min-height: 560px; display: flex; align-items: center; background: linear-gradient(135deg, #07130b 0%, #0e2316 55%, #173525 100%); color: #fff; overflow: hidden; }
.hero-overlay { position: absolute; inset: 0; background: radial-gradient(ellipse at 80% 20%, rgba(255,217,122,.14), transparent 50%), radial-gradient(ellipse at 20% 80%, rgba(126,226,160,.18), transparent 55%); }
.hero-in { position: relative; z-index: 2; padding: 64px 24px; }
.hero-kicker { display: inline-block; background: rgba(126,226,160,.12); border: 1px solid rgba(126,226,160,.4); color: var(--green); padding: 6px 16px; border-radius: 100px; font-size: 13px; letter-spacing: 1px; margin-bottom: 22px; }
.hero-in h1 { font-size: 42px; line-height: 1.3; color: #fff; letter-spacing: 1px; max-width: 820px; }
.hero-sub { font-size: 17px; color: #b9d8c2; max-width: 680px; margin: 20px 0 30px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hstat .v { font-size: 30px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.hstat .l { font-size: 13px; color: #8fae97; margin-top: 2px; }

.portal-sec { padding: 72px 0; background: #0b120d; }
.portal-sec.alt { background: #0e1c13; }
.sec-head { max-width: 720px; margin-bottom: 40px; }
.sec-kicker { color: var(--green); font-size: 13px; letter-spacing: 2px; font-weight: 600; margin-bottom: 8px; }
.sec-head h2 { font-size: 30px; color: #e8f0e8; }
.sec-head p { color: #8fae97; font-size: 15px; margin-top: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fcard { background: #101f15; border: 1px solid var(--line); border-radius: 10px; padding: 26px; transition: .18s; }
.fcard:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.35); border-color: #3a5a44; }
.fcard .fic { font-size: 30px; color: var(--green); }
.fcard h3 { font-size: 18px; margin: 12px 0 8px; }
.fcard p { color: #8fae97; font-size: 14px; margin: 0; }
.steps { display: flex; gap: 16px; flex-wrap: wrap; }
.step { flex: 1 1 160px; background: #101f15; border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.step .snum { font-size: 26px; font-weight: 700; color: var(--green); }
.step h4 { font-size: 16px; margin: 10px 0 6px; }
.step p { color: #8fae97; font-size: 13px; margin: 0; }
.portal-foot { background: #07130b; color: #6a9074; padding: 30px 0 24px; border-top: 1px solid #1c2c21; }
.foot-in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-brand { color: #e8f0e8; font-weight: 600; }
.foot-mid { flex: 1; font-size: 13px; }
.foot-links { display: flex; gap: 18px; }
.foot-links a { color: #9db8a4; font-size: 13px; }
.foot-links a:hover { color: var(--green); }
.foot-note { text-align: center; font-size: 12px; color: #4f6b57; margin-top: 16px; }

/* ============ 光储充驾驶舱（对标工业园区版大屏视觉） ============ */
.scr-page { width: 100vw; height: 100vh; overflow: hidden; background: radial-gradient(1200px 700px at 50% -10%, #0a2a4a 0%, #061226 45%, #030812 100%); position: relative; }
.scr-admin, .scr-exit { position: fixed; z-index: 999; font-size: 13px; color: rgba(217, 243, 255, 0.85); background: rgba(8, 26, 48, 0.45); border: 1px solid rgba(45, 214, 255, 0.3); border-radius: 14px; padding: 5px 12px; text-decoration: none; letter-spacing: 1px; backdrop-filter: blur(4px); transition: all .2s; }
.scr-admin { top: 14px; right: 18px; }
.scr-exit { top: 14px; left: 18px; }
.scr-admin:hover, .scr-exit:hover { color: #7ff3ff; border-color: rgba(45, 214, 255, 0.6); background: rgba(8, 26, 48, 0.65); }
.scr-watermark { position: fixed; right: 28px; bottom: 18px; font-size: 54px; font-weight: 800; letter-spacing: 12px; color: rgba(45,214,255,.08); pointer-events: none; z-index: 1; }
.scr-stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform: translate(-50%, -50%); transform-origin: center center; box-sizing: border-box; padding: 14px 18px; display: flex; flex-direction: column; color: #d9f3ff; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif; }
.scr-stage::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(45,214,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(45,214,255,.04) 1px, transparent 1px); background-size: 48px 48px; pointer-events: none; }
.scr-stage::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 160px; background: linear-gradient(180deg, rgba(46,215,255,.10), transparent); pointer-events: none; }

/* 顶部标题栏 */
.scr-hd { display: flex; align-items: center; height: 82px; position: relative; z-index: 2; flex: 0 0 auto; }
.scr-hd-left, .scr-hd-right { width: 380px; display: flex; align-items: center; }
.scr-hd-right { justify-content: flex-end; gap: 14px; }
.scr-hd-center { flex: 1; text-align: center; }
.scr-title { margin: 0; font-size: 38px; font-weight: 700; letter-spacing: 4px; background: linear-gradient(180deg, #ffffff, #7ff3ff 55%, #2ed7ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 24px rgba(46,215,255,.45); }
.scr-subtitle { font-size: 13px; letter-spacing: 8px; color: #4f7f9c; margin-top: 2px; }
.scr-weather { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #9fc6dd; background: rgba(8,26,48,.55); border: 1px solid rgba(45,214,255,.2); border-radius: 6px; padding: 7px 12px; }
.scr-wx-ic { color: #ffd45e; font-size: 18px; }
.scr-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.scr-clock-time { font-size: 28px; font-weight: 700; letter-spacing: 2px; color: #7ff3ff; font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgba(46,215,255,.5); }
.scr-clock-date { font-size: 12px; color: #7ea8c0; letter-spacing: 1px; }
.scr-refresh-tag { font-size: 12px; color: #00f0b4; border: 1px solid rgba(0,240,180,.35); border-radius: 10px; padding: 3px 10px; white-space: nowrap; }
.scr-refresh-tag::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #00f0b4; margin-right: 6px; box-shadow: 0 0 8px #00f0b4; animation: scr-blink 1.8s infinite; }
.scr-butler { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; background: rgba(8,26,48,.55); border: 1px solid rgba(45,214,255,.22); border-radius: 8px; padding: 6px 10px; white-space: nowrap; }
.scr-butler-ico { font-size: 15px; }
.scr-butler-txt { font-size: 12px; color: #9fc6dd; letter-spacing: 1px; }
.scr-butler-txt b { color: #7ff3ff; font-size: 14px; }
.scr-butler-txt b.warn { color: #ff7d7d; }

/* 主体三列 */
.scr-main { flex: 1; display: grid; grid-template-columns: 420px minmax(0, 1fr) 420px; gap: 14px; position: relative; z-index: 1; min-height: 0; }
.scr-col { display: flex; flex-direction: column; gap: 14px; min-height: 0; min-width: 0; }
.scr-col > *, .scr-main > .scr-col, .scr-kpirow > *, .scr-stats > * { min-width: 0; }

/* 面板卡片 */
.scr-panel { background: linear-gradient(180deg, rgba(9,26,48,.62), rgba(6,18,34,.62)); border: 1px solid rgba(45,214,255,.22); border-radius: 8px; padding: 12px 14px; position: relative; box-shadow: inset 0 0 24px rgba(46,215,255,.05), 0 0 18px rgba(0,0,0,.35); min-height: 0; }
.scr-panel::before, .scr-panel::after { content: ''; position: absolute; width: 16px; height: 16px; border-color: #2ed7ff; border-style: solid; border-width: 0; pointer-events: none; }
.scr-panel::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.scr-panel::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.scr-panel.grow { flex: 1; min-height: 0; }
.scr-pt { display: flex; align-items: center; font-size: 16px; font-weight: 600; color: #cfeaff; letter-spacing: 1px; margin-bottom: 10px; }
.scr-ttb { width: 4px; height: 16px; background: linear-gradient(180deg, #2ed7ff, #00f0b4); border-radius: 2px; margin-right: 9px; box-shadow: 0 0 8px rgba(46,215,255,.7); }
.scr-ttb.green { background: linear-gradient(180deg, #00f0b4, #2affc9); box-shadow: 0 0 8px rgba(0,240,180,.7); }
.scr-ttb.warn { background: linear-gradient(180deg, #ffb020, #ff7a5c); box-shadow: 0 0 8px rgba(255,176,32,.7); }
.scr-tt-en { margin-left: auto; font-size: 11px; color: #3f6f8c; letter-spacing: 2px; }
.scr-pbody { position: relative; }

/* 统计块 */
.scr-stats { display: grid; gap: 10px; }
.scr-stats.two { grid-template-columns: 1fr 1fr; }
.scr-stats.three { grid-template-columns: 1fr 1fr 1fr; }
.scr-stat { background: rgba(10,30,54,.5); border: 1px solid rgba(45,214,255,.14); border-radius: 6px; padding: 10px 12px; }
.scr-stat-label { font-size: 13px; color: #7ea8c0; }
.scr-stat-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: #7ff3ff; margin: 4px 0 2px; line-height: 1; }
.scr-stat-value.green { color: #8cffd8; }
.scr-stat-value .unit { font-size: 12px; font-weight: 400; color: #5f8ea8; margin-left: 5px; }
.scr-stat-sub { font-size: 12px; color: #5f8ea8; }

/* KPI 行 */
.scr-kpirow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.scr-kpi { display: flex; align-items: center; gap: 12px; background: rgba(10,30,54,.5); border: 1px solid rgba(45,214,255,.14); border-radius: 8px; padding: 12px; position: relative; overflow: hidden; cursor: pointer; }
.scr-kpi:hover { border-color: rgba(45,214,255,.5); }
.scr-kpi::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(46,215,255,.6), transparent); }
.scr-kpi-ic { width: 44px; height: 44px; border-radius: 50%; border: 1px solid; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; box-shadow: inset 0 0 12px currentColor; }
.scr-kpi-meta { min-width: 0; }
.scr-kpi-label { font-size: 13px; color: #7ea8c0; }
.scr-kpi-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.scr-kpi-value .unit { font-size: 12px; font-weight: 400; color: #5f8ea8; margin-left: 4px; }
.scr-kpi-sub { font-size: 12px; color: #5f8ea8; }

/* 能量流（桑基图） */
.flow-svg { width: 100%; margin-top: 6px; }
.flow-desktop-svg { width: 100%; display: block; }
.flow-node { fill: rgba(8,26,48,.7); stroke: #2ed7ff; stroke-width: 1.2; }
.flow-node-label { fill: #cfeaff; font-size: 13px; font-weight: 600; }
.flow-node-val { fill: #7ff3ff; font-size: 11px; font-variant-numeric: tabular-nums; }
.flow-node-sub { fill: #7ea8c0; font-size: 10px; }
.flow-ribbon { stroke: none; }
.flow-centerline { fill: none; stroke: rgba(46,215,255,.55); stroke-width: 1.2; stroke-dasharray: 8 6; animation: scr-dash 1.4s linear infinite; }
.flow-pdot { filter: drop-shadow(0 0 4px #7ff3ff); animation: scr-pulse 2s ease-in-out infinite; }
.flow-link-label { fill: #e8f0e8; font-size: 11px; font-weight: 600; text-anchor: middle; stroke: #061226; stroke-width: 3px; paint-order: stroke; }
.flow-link-label.dim { fill: #7ea8c0; }
/* 移动端：简化卡片式流向 */
.flow-mobile { display: none; }
.fm-title { font-size: 12px; color: #7ea8c0; margin-bottom: 2px; }
.fm-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid rgba(45,214,255,.12); }
.fm-row i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.fm-row.head i { border-radius: 3px; }
.fm-l { flex: 1; font-size: 13px; color: #9fc6dd; }
.fm-v { font-size: 13px; color: #d9f3ff; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 600px) {
  .flow-desktop-svg { display: none; }
  .flow-mobile { display: block; }
}

/* 图表容器 */
.scr-chart { width: 100%; margin-top: 6px; }
.scr-chart svg { width: 100%; height: auto; display: block; }
.scr-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: #7ea8c0; margin-top: 8px; }
.scr-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.scr-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed rgba(45,214,255,.14); font-size: 13px; }
.scr-row:last-child { border-bottom: none; }
.scr-row .k { color: #7ea8c0; } .scr-row .v { color: #d9f3ff; font-variant-numeric: tabular-nums; }
.scr-empty { text-align: center; color: #5f8ea8; padding: 24px 0; font-size: 13px; }
.scr-src { font-size: 10px; color: #3f6f8c; margin-top: 6px; letter-spacing: .5px; }

/* 设备健康进度条 */
.scr-health { display: flex; flex-direction: column; gap: 10px; }
.scr-hrow { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.scr-hrow .k { color: #7ea8c0; width: 76px; flex: 0 0 auto; }
.scr-hbar { flex: 1; height: 8px; background: rgba(46,215,255,.1); border-radius: 4px; overflow: hidden; }
.scr-hfill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #2ed7ff, #00f0b4); box-shadow: 0 0 8px rgba(0,240,180,.5); transition: width 1s ease; }
.scr-hval { color: #7ff3ff; font-variant-numeric: tabular-nums; width: 52px; text-align: right; flex: 0 0 auto; }

/* 告警列表 */
.scr-alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.scr-alert-item { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 8px 10px; border-radius: 5px; background: rgba(10,30,54,.5); border-left: 3px solid; cursor: pointer; }
.scr-alert-item:hover { background: rgba(46,215,255,.1); }
.scr-alert-item.danger { border-left-color: #ff5c72; background: rgba(70,16,26,.35); }
.scr-alert-item.warning { border-left-color: #ffb020; background: rgba(70,48,10,.28); }
.scr-alert-item.info { border-left-color: #2ed7ff; background: rgba(10,40,60,.3); }
.scr-alert-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.scr-alert-item.danger .scr-alert-dot { background: #ff5c72; box-shadow: 0 0 8px #ff5c72; animation: scr-blink 1.1s infinite; }
.scr-alert-item.warning .scr-alert-dot { background: #ffb020; box-shadow: 0 0 8px #ffb020; animation: scr-blink 2s infinite; }
.scr-alert-item.info .scr-alert-dot { background: #2ed7ff; box-shadow: 0 0 8px #2ed7ff; }
.scr-alert-txt { flex: 1; color: #cfe3f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-alert-time { color: #5f8ea8; font-size: 12px; font-variant-numeric: tabular-nums; }
.scr-alert-lvl { font-size: 11px; padding: 1px 7px; border-radius: 4px; flex-shrink: 0; }
.scr-alert-item.danger .scr-alert-lvl { background: rgba(255,92,114,.2); color: #ff8a9c; }
.scr-alert-item.warning .scr-alert-lvl { background: rgba(255,176,32,.2); color: #ffc25e; }
.scr-alert-item.info .scr-alert-lvl { background: rgba(46,215,255,.2); color: #7ff3ff; }

/* 告警滚动条 */
.scr-ticker { height: 30px; background: rgba(9,26,48,.7); border: 1px solid rgba(45,214,255,.18); border-radius: 6px; overflow: hidden; position: relative; flex: 0 0 auto; }
.scr-ticker-inner { display: flex; gap: 48px; white-space: nowrap; padding: 6px 0; animation: scr-marquee 24s linear infinite; width: max-content; }
.scr-ticker-inner .sti { font-size: 13px; }
.scr-ticker-inner .sti.danger { color: #ff8a9c; }
.scr-ticker-inner .sti.warning { color: #ffc25e; }
.scr-ticker-inner .sti.info { color: #7ff3ff; }

/* 底部横条 */
.scr-ft { height: 92px; display: flex; align-items: center; gap: 20px; background: linear-gradient(180deg, rgba(9,26,48,.62), rgba(6,18,34,.62)); border: 1px solid rgba(45,214,255,.22); border-radius: 8px; padding: 0 18px; position: relative; z-index: 1; margin-top: 14px; box-shadow: 0 0 18px rgba(0,0,0,.35); flex: 0 0 auto; }
.scr-ft-t { display: flex; align-items: center; font-size: 16px; font-weight: 600; color: #cfeaff; white-space: nowrap; }
.scr-ft-stats { display: flex; gap: 20px; }
.scr-ft-stat { display: flex; flex-direction: column; }
.scr-ft-label { font-size: 12px; color: #7ea8c0; }
.scr-ft-val { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.scr-ft-val.cyan { color: #7ff3ff; } .scr-ft-val.green { color: #8cffd8; }
.scr-ft-projs { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; }
.scr-fp-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.scr-fp-name { color: #9fc6dd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr-fp-pct { color: #00f0b4; font-variant-numeric: tabular-nums; }
.scr-fp-bar { height: 7px; background: rgba(46,215,255,.1); border-radius: 4px; overflow: hidden; }
.scr-fp-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #2ed7ff, #00f0b4); box-shadow: 0 0 8px rgba(0,240,180,.5); transition: width 1s ease; }

/* 动画 */
@keyframes scr-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes scr-dash { to { stroke-dashoffset: -28; } }
@keyframes scr-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes scr-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 移动端：放弃固定 1920 画布，改单列流式布局 */
@media (max-width: 900px) {
  .scr-page { overflow: auto; }
  .scr-stage { position: static; transform: none; width: 100%; height: auto; min-height: 100vh; padding: 12px; }
  .scr-hd { height: auto; flex-wrap: wrap; gap: 10px; padding-bottom: 6px; }
  .scr-hd-left, .scr-hd-right { width: auto; }
  .scr-hd-center { order: -1; width: 100%; }
  .scr-title { font-size: 24px; }
  .scr-weather, .scr-butler { display: none; }
  .scr-main { grid-template-columns: minmax(0, 1fr); }
  .scr-col { min-height: auto; }
  .scr-panel.grow { flex: none; }
  .scr-ft { height: auto; flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; }
  .scr-ft-stats { flex-wrap: wrap; gap: 12px 20px; }
  .scr-ft-projs { width: 100%; grid-template-columns: 1fr; }
  .scr-kpirow { grid-template-columns: repeat(2, 1fr); }
  .scr-stats.three { grid-template-columns: 1fr 1fr; }
}

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #07130b, #0e2316 60%, #173525); position: relative; padding: 40px 16px; }
.login-back { position: absolute; top: 22px; left: 26px; color: #9db8a4; font-size: 14px; }
.login-card { width: 400px; max-width: 100%; background: #101f15; border: 1px solid #223527; border-radius: 14px; padding: 36px 34px; }
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand .emblem { width: 52px; height: 52px; }
.login-brand h1 { font-size: 22px; margin-top: 12px; }
.login-brand .sub { color: #8fae97; font-size: 13px; margin-top: 4px; }
.login-card form label { display: block; font-size: 13px; color: #dce8dc; margin-bottom: 14px; font-weight: 500; }
.login-card form input { width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid #2f4a37; border-radius: 7px; font-size: 14px; background: #0b120d; color: #e8f0e8; }
.login-card form input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(126,226,160,.15); }
.btn-primary { width: 100%; background: linear-gradient(135deg, #ffe7a0, var(--gold)); border: none; border-radius: 7px; padding: 12px; font-size: 15px; font-weight: 600; color: #1a1205; margin-top: 4px; }
.err { color: var(--err); font-size: 13px; margin: 8px 0; }
.demo-hint { background: #1a2a1f; border: 1px solid #3a5a44; color: #b9d8c2; border-radius: 8px; padding: 10px 12px; font-size: 12px; margin-top: 16px; }
.login-links { text-align: center; margin-top: 16px; font-size: 13px; }
.login-links a { color: var(--green); } .login-links span { color: #4f6b57; margin: 0 8px; }
.login-foot { position: absolute; bottom: 18px; width: 100%; text-align: center; color: #4f6b57; font-size: 12px; }

/* 应用壳 */
#app { display: flex; min-height: 100vh; }
#sidebar { width: 232px; background: linear-gradient(180deg, #07130b, #0b120d); color: #9db8a4; flex: 0 0 auto; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; border-right: 1px solid #1c2c21; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid #1c2c21; }
.side-brand .emblem { width: 34px; height: 34px; flex: 0 0 auto; }
.side-brand .t { font-size: 14px; font-weight: 600; color: #fff; }
.side-brand .s { font-size: 11px; color: #6a9074; }
.side-close { display: none; background: none; border: none; color: #9db8a4; font-size: 22px; }
#menu { flex: 1; overflow-y: auto; padding: 12px 10px; }
#menu a { display: flex; align-items: center; gap: 10px; color: #9db8a4; padding: 10px 12px; border-radius: 7px; font-size: 14px; margin-bottom: 3px; }
#menu a .ic { width: 18px; text-align: center; opacity: .85; }
#menu a:hover { background: #14291c; color: #fff; }
#menu a.active { background: linear-gradient(90deg, #14291c, #1d3a28); color: #fff; border-left: 3px solid var(--green); }
.side-foot { padding: 14px 16px; font-size: 11px; color: #4f6b57; border-top: 1px solid #1c2c21; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; background: #0e1c13; border-bottom: 1px solid #1c2c21; padding: 0 22px; height: 56px; position: sticky; top: 0; z-index: 20; }
.menu-burger { display: none; background: none; border: none; font-size: 20px; color: #dce8dc; }
.crumb { font-weight: 600; color: #e8f0e8; font-size: 15px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.scr-entry { font-size: 13px; color: var(--green); border: 1px solid #3a5a44; border-radius: 5px; padding: 5px 12px; background: #101f15; }
.scr-entry:hover { background: #14291c; }
.role-tag { font-size: 12px; color: #9db8a4; background: #14291c; padding: 4px 10px; border-radius: 100px; }
.who { font-size: 13px; color: #8fae97; }
.btn-ghost { background: none; border: 1px solid #2f4a37; color: #dce8dc; border-radius: 6px; padding: 6px 14px; font-size: 13px; }
.btn-ghost:hover { border-color: var(--err); color: var(--err); }
.content { padding: 22px; flex: 1; }
.demo-banner { font-size: 12px; color: #c9a227; background: #1a2a1f; border: 1px solid #3a5a44; padding: 4px 10px; border-radius: 100px; }

.card { background: #101f15; border: 1px solid #223527; border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.card h3 { font-size: 15px; margin-bottom: 10px; }
.note { background: #14291c; border-left: 3px solid var(--blue); color: #9db8a4; padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: #101f15; border: 1px solid #223527; border-radius: 10px; padding: 18px; }
.kpi .v { font-size: 26px; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }
.kpi .v.green { color: var(--ok); } .kpi .v.warn { color: var(--warn); } .kpi .v.empty { color: #4f6b57; }
.kpi .l { font-size: 13px; color: #8fae97; margin-top: 4px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar select, .toolbar input, .form-row input, .form-row select { padding: 8px 10px; border: 1px solid #2f4a37; border-radius: 6px; font-size: 13px; background: #0b120d; color: #e8f0e8; }
.toolbar button, .btn-sm { background: #1d3a28; color: #dce8dc; border: 1px solid #2f4a37; border-radius: 6px; padding: 8px 16px; font-size: 13px; }
.toolbar button.ghost, .btn-sm.ghost { background: #14291c; color: #9db8a4; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: #8fae97; font-weight: 500; padding: 9px 10px; border-bottom: 2px solid #223527; white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid #1c2c21; color: #dce8dc; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: #14291c; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll-hint { display: none; font-size: 11px; color: #8fae97; margin-bottom: 6px; }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.badge.demo { background: #1a2a1f; color: #c9a227; border: 1px solid #3a5a44; }
.badge.ok { background: rgba(126,226,160,.15); color: #7ee2a0; } .badge.warn { background: rgba(255,217,122,.15); color: #ffd97a; }
.badge.err { background: rgba(255,154,154,.15); color: #ff9a9a; } .badge.b { background: rgba(122,184,255,.15); color: #7ab8ff; }
.badge.mut { background: #1a2a1f; color: #6a9074; }
.empty { text-align: center; color: #6a9074; padding: 30px 0; }
.empty .big { font-size: 34px; opacity: .4; } .empty .t { font-size: 14px; margin-top: 6px; } .empty .d { font-size: 12px; margin-top: 4px; }
.chart svg { width: 100%; height: auto; display: block; }
.form-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.form-row label { width: 90px; font-size: 13px; color: #8fae97; flex: 0 0 auto; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }

/* Agent 抽屉 */
#agent-fab { position: fixed; right: 22px; bottom: 22px; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #ffe7a0, var(--gold)); color: #1a1205; border: none; box-shadow: 0 8px 24px rgba(0,0,0,.5); z-index: 60; display: flex; align-items: center; justify-content: center; }
#agent-drawer { position: fixed; right: 22px; bottom: 84px; width: 400px; max-width: calc(100vw - 32px); height: 600px; max-height: calc(100vh - 120px); background: #101f15; border: 1px solid #2f4a37; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.5); display: flex; flex-direction: column; z-index: 60; overflow: hidden; }
.ad-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: linear-gradient(135deg, #07130b, #14291c); color: #fff; }
.ad-title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.ad-dot { width: 8px; height: 8px; border-radius: 50%; background: #37d67a; }
.ad-degrade { margin-left: auto; font-size: 10px; color: #ffd97a; background: rgba(255,217,122,.12); padding: 3px 8px; border-radius: 100px; }
.ad-close { background: none; border: none; color: #9db8a4; font-size: 20px; }
.ad-quick { display: flex; gap: 6px; padding: 10px 12px; flex-wrap: wrap; border-bottom: 1px solid #223527; }
.ad-quick button { background: #14291c; border: 1px solid #2f4a37; color: #9db8a4; border-radius: 100px; font-size: 12px; padding: 4px 11px; }
.ad-quick button:hover { border-color: var(--green); }
.ad-messages { flex: 1; overflow-y: auto; padding: 14px 14px; background: #0b120d; }
.ad-msg { margin-bottom: 12px; display: flex; }
.ad-msg.user { justify-content: flex-end; }
.ad-msg .bubble { max-width: 82%; padding: 9px 13px; border-radius: 12px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.ad-msg.user .bubble { background: #1d3a28; color: #e8f0e8; border-bottom-right-radius: 3px; }
.ad-msg.agent .bubble { background: #14291c; border: 1px solid #223527; color: #dce8dc; border-bottom-left-radius: 3px; }
.ad-msg .meta { font-size: 10px; color: #5c7a66; margin-top: 3px; }
.ad-msg .nav { margin-top: 6px; }
.ad-msg .nav a { font-size: 12px; color: var(--gold); border: 1px solid #3a5a44; border-radius: 5px; padding: 3px 10px; background: #1a2a1f; }
.ad-pending { margin-top: 8px; }
.ad-pending button { background: var(--gold); color: #1a1205; border: none; border-radius: 6px; padding: 6px 14px; font-size: 12px; margin-right: 8px; }
.ad-pending button.ghost { background: #14291c; color: #9db8a4; }
.ad-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #223527; }
.ad-input input { flex: 1; padding: 10px 12px; border: 1px solid #2f4a37; border-radius: 8px; font-size: 13px; background: #0b120d; color: #e8f0e8; }
.ad-input input:focus { outline: none; border-color: var(--green); }
.ad-input button { background: #1d3a28; color: #dce8dc; border: 1px solid #2f4a37; border-radius: 8px; padding: 0 18px; font-size: 13px; }
.ad-input button:disabled { opacity: .5; }

/* 响应式 */
@media (max-width: 1366px) {
  .scr-kpis { grid-template-columns: repeat(3, 1fr); }
  .scr-c4 { grid-column: span 6; } .scr-c3 { grid-column: span 4; } .scr-c8 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .portal-nav { display: none; }
  .hero-in h1 { font-size: 30px; }
  .grid-3 { grid-template-columns: 1fr; }
  #sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; transform: translateX(-100%); transition: .22s; width: 240px; }
  #sidebar.open { transform: translateX(0); }
  .side-close { display: block; margin-left: auto; }
  .menu-burger { display: block; }
  .top-right .who, .top-right .role-tag { display: none; }
  .scr-c3, .scr-c4, .scr-c6, .scr-c8 { grid-column: span 12; }
  .scr-kpis { grid-template-columns: repeat(2, 1fr); }
  .table-scroll { overflow-x: auto; } .table-scroll-hint { display: block; }
}
@media (max-width: 480px) {
  .content { padding: 12px; }
  .portal-brand-t b { font-size: 14px; } .portal-brand-t span { display: none; }
  .portal-actions .btn-ghost-light { display: none; }
  .hero-in { padding: 36px 16px; }
  .hero-in h1 { font-size: 25px; }
  .hero-sub { font-size: 15px; }
  .hero-stats { gap: 18px; } .hstat .v { font-size: 22px; }
  .portal-sec { padding: 44px 0; } .sec-head h2 { font-size: 24px; }
  .screen-top { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .scr-brand { font-size: 14px; }
  .screen-body { padding: 12px 12px 50px; }
  .scr-kpis { grid-template-columns: 1fr 1fr; gap: 10px; } .scr-kpi .v { font-size: 21px; }
  .topbar { padding: 0 12px; }
  #agent-drawer { width: calc(100vw - 24px); right: 12px; bottom: 74px; height: calc(100vh - 100px); }
  .two-col { grid-template-columns: 1fr; }
}

/* (原驾驶舱大屏增强样式已并入上方大屏视觉区块，此处移除旧 .scr-clock/.scr-ticker 冲突定义) */

