/* ============ 基础与主题（政务感：藏青 #0a1f3d + 金 #c9a96a） ============ */
:root {
  --navy: #0a1f3d; --navy2: #12325e; --navy3: #0d2a4f;
  --gold: #c9a96a; --gold2: #e8c87a; --gold3: #ffd97a;
  --ink: #22314a; --muted: #6b7f99; --line: #dfe6ef;
  --bg: #f4f7fb; --card: #fff; --ok: #1e8e5a; --warn: #c88a00; --err: #b3372e; --info: #5b7ba6;
}
* { 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(--navy2); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--navy); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============ 门户 ============ */
.portal-top { background: linear-gradient(180deg, #071830, var(--navy)); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 12px rgba(7,24,48,.25); }
.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; letter-spacing: .5px; color: #fff; }
.portal-brand-t span { font-size: 11px; color: #9fb8d8; }
.portal-nav { display: flex; gap: 24px; margin-left: 12px; }
.portal-nav a { color: #cfe0f2; 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, var(--gold2), 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-gold:hover { filter: brightness(1.06); }
.btn-outline { border: 1.5px solid rgba(255,255,255,.55); color: #fff; 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(--gold); color: var(--gold3); }
.btn-ghost-light { border: 1px solid rgba(255,255,255,.35); color: #dbe8f5; background: transparent; border-radius: 6px; padding: 8px 16px; font-size: 14px; }
.btn-ghost-light:hover { border-color: var(--gold); color: #fff; }

.portal-hero { position: relative; min-height: 560px; display: flex; align-items: center; background: linear-gradient(135deg, #0a1f3d 0%, #12325e 55%, #1c4a80 100%); color: #fff; overflow: hidden; }
.hero-overlay { position: absolute; inset: 0; background: radial-gradient(ellipse at 80% 20%, rgba(201,169,106,.18), transparent 50%), radial-gradient(ellipse at 20% 80%, rgba(91,123,166,.25), transparent 55%); }
.hero-in { position: relative; z-index: 2; padding: 64px 24px; }
.hero-kicker { display: inline-block; background: rgba(201,169,106,.14); border: 1px solid rgba(201,169,106,.4); color: var(--gold3); padding: 6px 16px; border-radius: 100px; font-size: 13px; letter-spacing: 1px; margin-bottom: 22px; }
.hero-in h1 { font-size: 46px; line-height: 1.25; color: #fff; letter-spacing: 1px; max-width: 760px; }
.hero-sub { font-size: 17px; color: #cfe0f2; 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(--gold3); font-variant-numeric: tabular-nums; }
.hstat .l { font-size: 13px; color: #9fb8d8; margin-top: 2px; }

.portal-sec { padding: 72px 0; background: #fff; }
.portal-sec.alt { background: #f2f6fb; }
.sec-head { max-width: 720px; margin-bottom: 40px; }
.sec-kicker { color: var(--gold); font-size: 13px; letter-spacing: 2px; font-weight: 600; margin-bottom: 8px; }
.sec-head h2 { font-size: 30px; }
.sec-head p { color: var(--muted); font-size: 15px; margin-top: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 26px; transition: .18s; }
.alt .fcard { background: #fff; }
.fcard:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(10,31,61,.10); border-color: #d8c89f; }
.fcard .fic { font-size: 30px; color: var(--gold); }
.fcard h3 { font-size: 18px; margin: 12px 0 8px; }
.fcard p { color: var(--muted); font-size: 14px; margin: 0; }
.steps { display: flex; gap: 16px; flex-wrap: wrap; }
.step { flex: 1 1 160px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.step .snum { font-size: 26px; font-weight: 700; color: var(--gold); }
.step h4 { font-size: 16px; margin: 10px 0 6px; }
.step p { color: var(--muted); font-size: 13px; margin: 0; }
.note-demo { color: var(--warn) !important; font-size: 13px !important; }
.portal-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pc { background: linear-gradient(160deg, #fff, #f7f9fc); border: 1px solid var(--line); border-radius: 10px; padding: 26px; text-align: center; }
.pc .pv { font-size: 32px; font-weight: 700; color: var(--navy2); font-variant-numeric: tabular-nums; }
.pc .pl { font-size: 13px; color: var(--muted); margin-top: 4px; }

.portal-foot { background: #071830; color: #9fb8d8; padding: 30px 0 24px; }
.foot-in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-brand { color: #fff; font-weight: 600; }
.foot-mid { flex: 1; font-size: 13px; }
.foot-links { display: flex; gap: 18px; }
.foot-links a { color: #cfe0f2; font-size: 13px; }
.foot-links a:hover { color: var(--gold3); }
.foot-note { text-align: center; font-size: 12px; color: #5b7ba6; margin-top: 16px; }

/* ============ 演示驾驶舱 /screen ============ */
#screen { background: #0b1830; min-height: 100vh; color: #dce6f2; }
.screen-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; background: #081224; border-bottom: 1px solid #16304f; position: sticky; top: 0; z-index: 30; }
.scr-brand { font-weight: 600; font-size: 16px; color: #fff; display: flex; align-items: center; gap: 10px; }
.scr-live { width: 9px; height: 9px; border-radius: 50%; background: #37d67a; box-shadow: 0 0 8px #37d67a; display: inline-block; }
.scr-right { display: flex; gap: 14px; align-items: center; }
.scr-stat-time { font-size: 12px; color: #8aa4c4; }
.scr-link { color: #cfe0f2; font-size: 13px; border: 1px solid #24456a; border-radius: 5px; padding: 5px 12px; }
.scr-link:hover { border-color: var(--gold); color: var(--gold3); }
.screen-watermark { position: fixed; right: 24px; bottom: 24px; font-size: 60px; font-weight: 800; color: rgba(201,169,106,.08); pointer-events: none; z-index: 1; }
.screen-body { padding: 22px 28px 60px; position: relative; z-index: 2; }
.scr-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 16px; }
.scr-kpi { background: linear-gradient(160deg, #102743, #0c1c33); border: 1px solid #1c3a5e; border-radius: 10px; padding: 16px 18px; cursor: pointer; transition: .15s; }
.scr-kpi:hover { border-color: var(--gold); }
.scr-kpi .v { font-size: 26px; font-weight: 700; color: var(--gold3); font-variant-numeric: tabular-nums; }
.scr-kpi .v.green { color: #37d67a; } .scr-kpi .v.warn { color: #ffd97a; } .scr-kpi .v.red { color: #ff8f8f; }
.scr-kpi .u { font-size: 11px; color: #8aa4c4; margin-left: 3px; }
.scr-kpi .l { font-size: 12px; color: #8aa4c4; margin-top: 3px; }
.scr-kpi .d { font-size: 11px; color: #56749a; margin-top: 2px; }
.scr-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.scr-panel { background: #0f2038; border: 1px solid #1c3a5e; border-radius: 10px; padding: 16px 18px; }
.scr-panel h3 { color: #dce6f2; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.scr-panel h3 .unit { font-size: 11px; color: #8aa4c4; font-weight: 400; }
.scr-panel .src { font-size: 10px; color: #56749a; margin-top: 6px; }
.scr-c3 { grid-column: span 3; } .scr-c4 { grid-column: span 4; } .scr-c6 { grid-column: span 6; } .scr-c8 { grid-column: span 8; } .scr-c12 { grid-column: span 12; }
/* 防 grid/flex 子项因内容 min-content 撑破布局（移动端横向溢出根因）：表格已在 .table-scroll 内滚动 */
.scr-grid > *, .scr-kpis > *, .two-col > * { min-width: 0; }
.scr-chart { width: 100%; height: 200px; margin-top: 8px; }
.scr-chart.tall { height: 260px; }
.scr-facet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.scr-facet { min-width: 0; background: rgba(7, 20, 37, .38); border: 1px solid #1c3a5e; border-radius: 8px; padding: 8px; }
.scr-facet h4 { margin: 0 0 2px; color: #dce6f2; font-size: 12px; font-weight: 600; }
.scr-facet h4 span { color: #8aa4c4; font-size: 10px; font-weight: 400; margin-left: 6px; }
.scr-facet svg { display: block; width: 100%; height: 210px; }
.scr-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: #8aa4c4; 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 #1c3350; font-size: 13px; }
.scr-row:last-child { border-bottom: none; }
.scr-row .k { color: #9fb8d8; } .scr-row .v { color: #e8f0f8; font-variant-numeric: tabular-nums; }
.scr-empty { text-align: center; color: #56749a; padding: 30px 0; font-size: 13px; }
.scr-tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 4px; margin-right: 6px; }
.scr-tag.red { background: rgba(179,55,46,.25); color: #ff9b95; } .scr-tag.yellow { background: rgba(200,138,0,.25); color: #ffd97a; } .scr-tag.green { background: rgba(30,142,90,.25); color: #5fe3a0; }
.scr-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; }
.scr-table th { color: #8aa4c4; font-weight: 500; text-align: left; padding: 6px 8px; border-bottom: 1px solid #1c3a5e; }
.scr-table td { padding: 6px 8px; border-bottom: 1px solid #16304f; color: #dce6f2; }
.scr-table tr.clickable { cursor: pointer; } .scr-table tr.clickable:hover td { background: #132a45; }

/* ============ 登录 ============ */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0a1f3d, #12325e 60%, #1c4a80); position: relative; padding: 40px 16px; }
.login-back { position: absolute; top: 22px; left: 26px; color: #cfe0f2; font-size: 14px; }
.login-back:hover { color: var(--gold3); }
.login-card { width: 400px; max-width: 100%; background: #fff; border-radius: 14px; padding: 36px 34px; box-shadow: 0 20px 60px rgba(7,24,48,.4); }
.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: var(--muted); font-size: 13px; margin-top: 4px; }
.login-card form label { display: block; font-size: 13px; color: var(--ink); margin-bottom: 14px; font-weight: 500; }
.login-card form input { width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid #cfd9e6; border-radius: 7px; font-size: 14px; }
.login-card form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,169,106,.18); }
.btn-primary { width: 100%; background: linear-gradient(135deg, var(--gold2), 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: #fdf6e7; border: 1px solid #f0e2b6; color: #8a6a1a; 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(--navy2); } .login-links span { color: #c6d2e0; margin: 0 8px; }
.login-foot { position: absolute; bottom: 18px; width: 100%; text-align: center; color: #7c95b5; font-size: 12px; }

/* ============ 应用壳 ============ */
#app { display: flex; min-height: 100vh; }
#sidebar { width: 232px; background: linear-gradient(180deg, #0a1f3d, #0d2a4f); color: #cfe0f2; flex: 0 0 auto; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid #1c3a5e; }
.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: #7c95b5; }
.side-close { display: none; background: none; border: none; color: #cfe0f2; font-size: 22px; }
#menu { flex: 1; overflow-y: auto; padding: 12px 10px; }
#menu a { display: flex; align-items: center; gap: 10px; color: #b7cbe2; 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: #12325e; color: #fff; }
#menu a.active { background: linear-gradient(90deg, #12325e, #17406f); color: #fff; border-left: 3px solid var(--gold); }
.side-foot { padding: 14px 16px; font-size: 11px; color: #5b7ba6; border-top: 1px solid #1c3a5e; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; background: #fff; border-bottom: 1px solid var(--line); padding: 0 22px; height: 56px; position: sticky; top: 0; z-index: 20; }
.menu-burger { display: none; background: none; border: none; font-size: 20px; color: var(--navy); }
.crumb { font-weight: 600; color: var(--navy); font-size: 15px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.scr-entry { font-size: 13px; color: var(--navy2); border: 1px solid #d8c89f; border-radius: 5px; padding: 5px 12px; background: #fdf6e7; }
.scr-entry:hover { background: #f5ead0; }
.role-tag { font-size: 12px; color: var(--navy2); background: #eaf1fa; padding: 4px 10px; border-radius: 100px; }
.who { font-size: 13px; color: var(--muted); }
.btn-ghost { background: none; border: 1px solid #cfd9e6; color: var(--ink); 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: #8a6a1a; background: #fdf6e7; border: 1px solid #f0e2b6; padding: 4px 10px; border-radius: 100px; }

/* 通用组件 */
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.card h3 { font-size: 15px; margin-bottom: 10px; }
.note { background: #eef4fb; border-left: 3px solid var(--info); color: #3d5574; 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: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.kpi .v { font-size: 26px; font-weight: 700; color: var(--navy2); font-variant-numeric: tabular-nums; }
.kpi .v.green { color: var(--ok); } .kpi .v.warn { color: var(--warn); } .kpi .v.empty { color: #b9c6d6; }
.kpi .l { font-size: 13px; color: var(--muted); 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 #cfd9e6; border-radius: 6px; font-size: 13px; }
.toolbar button, .btn-sm { background: var(--navy2); color: #fff; border: none; border-radius: 6px; padding: 8px 16px; font-size: 13px; }
.toolbar button.ghost, .btn-sm.ghost { background: #eef4fb; color: var(--navy2); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 500; padding: 9px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid #eef2f7; color: var(--ink); }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: #f4f8fc; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll-hint { display: none; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.badge.demo { background: #fdf6e7; color: #8a6a1a; border: 1px solid #f0e2b6; }
.badge.ok { background: #e6f5ec; color: #1e8e5a; } .badge.warn { background: #fdf3e0; color: #c88a00; }
.badge.err { background: #fbe9e7; color: #b3372e; } .badge.b { background: #e8f0fb; color: #2f5a9e; }
.badge.mut { background: #f0f3f7; color: #7c8aa0; } .badge.a { background: #e6f5ec; color: #1e8e5a; } .badge.c { background: #f0f3f7; color: #7c8aa0; }
.empty { text-align: center; color: #9aa8bc; 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: var(--muted); 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, var(--gold2), var(--gold)); color: #1a1205; border: none; box-shadow: 0 8px 24px rgba(10,31,61,.3); z-index: 60; display: flex; align-items: center; justify-content: center; }
#agent-fab:hover { transform: scale(1.06); }
#agent-drawer { position: fixed; right: 22px; bottom: 84px; width: 400px; max-width: calc(100vw - 32px); height: 600px; max-height: calc(100vh - 120px); background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(7,24,48,.35); 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, #0a1f3d, #12325e); 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: #cfe0f2; font-size: 20px; }
.ad-quick { display: flex; gap: 6px; padding: 10px 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.ad-quick button { background: #eef4fb; border: 1px solid #dbe6f2; color: var(--navy2); border-radius: 100px; font-size: 12px; padding: 4px 11px; }
.ad-quick button:hover { border-color: var(--gold); background: #fdf6e7; }
.ad-messages { flex: 1; overflow-y: auto; padding: 14px 14px; background: #f6f9fc; }
.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: var(--navy2); color: #fff; border-bottom-right-radius: 3px; }
.ad-msg.agent .bubble { background: #fff; border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 3px; }
.ad-msg .meta { font-size: 10px; color: #9aa8bc; margin-top: 3px; }
.ad-msg .nav { margin-top: 6px; }
.ad-msg .nav a { font-size: 12px; color: var(--gold); border: 1px solid #e8c87a; border-radius: 5px; padding: 3px 10px; background: #fdf6e7; }
.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: #eef4fb; color: var(--navy2); }
.ad-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.ad-input input { flex: 1; padding: 10px 12px; border: 1px solid #cfd9e6; border-radius: 8px; font-size: 13px; }
.ad-input input:focus { outline: none; border-color: var(--gold); }
.ad-input button { background: var(--navy2); color: #fff; border: none; border-radius: 8px; padding: 0 18px; font-size: 13px; }
.ad-input button:disabled { opacity: .5; cursor: default; }

/* ============ 响应式（桌面双分辨率 + 移动 390px） ============ */
@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) {
  .scr-facet-grid { grid-template-columns: 1fr; }
  .portal-nav { display: none; }
  .portal-topbar { gap: 12px; }
  .hero-in h1 { font-size: 32px; }
  .grid-3 { grid-template-columns: 1fr; }
  .portal-cards { grid-template-columns: repeat(2, 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-topbar { height: 56px; }
  .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: 27px; }
  .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; }
  .portal-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .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; }
}

/* ============ 三维孪生（isometric 场景） ============ */
.twin-topline { display: flex; gap: 10px; margin-bottom: 12px; }
.twin-loading { text-align: center; color: #56749a; padding: 40px 0; }
.twin-card { background: #0c1c33; border-color: #1c3a5e; }
.twin-wrap { position: relative; }
.twin-status { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 8px; }
.tchip { font-size: 12px; color: #9fb8d8; border: 1px solid #24456a; border-radius: 12px; padding: 3px 10px; background: #102743; }
.tchip.ok { color: #5fe3a0; border-color: rgba(55,214,122,.4); }
.tchip.off { color: #8aa4c4; border-color: #24456a; }
.tchip.warn { color: #ffd97a; border-color: rgba(255,217,122,.4); }
.tchip.demo { color: #c9a96a; border-color: rgba(201,169,106,.5); }
.twin-toolbar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.twin-toolbar button { background: #102743; border: 1px solid #24456a; color: #cfe0f2; border-radius: 6px; padding: 5px 10px; cursor: pointer; font-size: 13px; }
.twin-toolbar button:hover { border-color: #c9a96a; color: #f0d9a0; }
.twin-cam-label { font-size: 12px; color: #8aa4c4; }
.twin-hint { font-size: 11px; color: #56749a; margin-left: 6px; }
.twin-main { display: flex; gap: 14px; align-items: stretch; }
.twin-main canvas { flex: 1 1 auto; min-width: 0; max-width: 100%; height: auto; border: 1px solid #1c3a5e; border-radius: 10px; background: #060d1a; cursor: grab; display: block; }
.twin-main canvas:active { cursor: grabbing; }
.twin-side { flex: 0 0 220px; background: #0f2038; border: 1px solid #1c3a5e; border-radius: 10px; padding: 14px; }
.twin-side-title { font-size: 13px; font-weight: 600; color: #dce6f2; margin-bottom: 10px; }
.twin-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: #9fb8d8; margin-bottom: 12px; }
.twin-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.twin-detail { font-size: 12px; color: #8aa4c4; border-top: 1px dashed #1c3350; padding-top: 10px; }
.td-name { font-weight: 600; color: #e8f0f8; font-size: 13px; margin-bottom: 6px; }
.td-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.td-row { padding: 3px 0; color: #9fb8d8; }
.td-row b { color: #e8f0f8; font-weight: 600; }
.twin-note { font-size: 11px; color: #56749a; margin-top: 10px; }
@media (max-width: 760px) {
  .twin-main { flex-direction: column; }
  .twin-side { flex: 0 0 auto; }
}
