/* 数智企业经营管理沙盘（专业版）样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f3f6fb;
  --card: #ffffff;
  --line: #e5eaf2;
  --text: #1e293b;
  --text2: #64748b;
  --green: #16a34a;
  --red: #dc2626;
  --navy: #0a1330;
  --navy2: #101c44;
  --cyan: #38e1ff;
  --gold: #ffc53d;
}
html, body { height: 100%; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--bg); }
.hidden { display: none !important; }

/* ============ 登录页 ============ */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0a1330 0%, #12245e 55%, #0b3a6e 100%); }
.login-card { width: 760px; display: grid; grid-template-columns: 1.2fr 1fr; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(2,8,30,.5); }
.login-logo { padding: 56px 44px; color: #fff; background: linear-gradient(160deg, #0e1c4e, #14306e); }
.logo-mark { display: inline-block; padding: 6px 14px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; font-weight: 700; letter-spacing: 4px; }
.logo-mark.sm { font-size: 14px; letter-spacing: 2px; }
.login-logo h1 { font-size: 26px; margin: 26px 0 10px; letter-spacing: 2px; }
.login-sub { font-size: 12.5px; color: #9db4e8; line-height: 1.8; }
.login-feats { margin-top: 30px; font-size: 13px; color: #c6d6ff; line-height: 2.1; }
.login-form { padding: 48px 40px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.login-field label { font-size: 12px; color: var(--text2); display: block; margin-bottom: 6px; }
.login-field input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--text); background: #f8fafc; }
.login-tip { font-size: 12px; color: var(--text2); text-align: center; margin-top: 6px; }

/* ============ 布局 ============ */
.app { display: grid; grid-template-columns: 232px 1fr; height: 100vh; }
.sidebar { background: linear-gradient(180deg, #0b1738, #0d1e4e); color: #cdd8f5; display: flex; flex-direction: column; padding: 18px 0; }
.side-logo { padding: 0 20px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-ver { font-size: 11px; color: #7f94cc; }
.side-nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.side-nav a { color: #b7c5ec; text-decoration: none; font-size: 14px; padding: 11px 14px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; transition: .15s; }
.side-nav a.active, .side-nav a:hover { background: rgba(56,110,255,.28); color: #fff; }
.side-nav a.hot.active { background: linear-gradient(90deg, #1d55e6, #2f7bff); }
.tri { font-style: normal; color: var(--gold); font-weight: 700; }
.side-foot { padding: 14px 20px 6; font-size: 12px; color: #8fa2d6; border-top: 1px solid rgba(255,255,255,.08); }
.side-foot .conn { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.live { background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.25); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .5; } }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 58px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0; }
.tb-title { font-size: 17px; font-weight: 700; }
.tb-right { display: flex; align-items: center; gap: 18px; font-size: 13px; color: var(--text2); }
.tb-clock { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.tb-user { background: #eef3ff; color: var(--primary-dark); padding: 5px 12px; border-radius: 999px; font-weight: 600; }
.content { flex: 1; overflow: auto; padding: 18px 22px; }

/* 通用 */
.btn { border: none; cursor: pointer; border-radius: 8px; font-size: 14px; padding: 10px 18px; font-weight: 600; transition: .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #fff; border: 1px solid var(--line); color: var(--text); }
.badge-tri { display: inline-flex; align-items: center; gap: 6px; background: #fff7e6; color: #b45309; border: 1px solid #ffe1a6; font-size: 12px; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.badge-tri b { color: #d97706; }
.clause { font-size: 12.5px; color: var(--text2); background: #f8faff; border: 1px dashed #c9d7f5; border-radius: 8px; padding: 8px 12px; line-height: 1.7; margin-bottom: 14px; }
.clause b { color: var(--primary-dark); }

/* ============ 大数据看板（深色大屏） ============ */
.board { background: radial-gradient(1200px 600px at 50% -10%, #12245e 0%, var(--navy) 60%), var(--navy); color: #dfeaff; border-radius: 14px; padding: 16px 18px 12px; min-height: 800px; display: flex; flex-direction: column; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(120,160,255,.18); }
.board-head h2 { font-size: 20px; letter-spacing: 3px; color: #fff; text-shadow: 0 0 18px rgba(56,150,255,.7); }
.board-head h2 small { font-size: 12px; color: #7fa3e8; letter-spacing: 1px; margin-left: 10px; font-weight: 400; }
.board-tools { display: flex; align-items: center; gap: 10px; }
.seg { display: flex; background: rgba(30,60,140,.4); border: 1px solid rgba(110,150,255,.3); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; border: none; color: #9db4e8; font-size: 12.5px; padding: 7px 12px; cursor: pointer; }
.seg button.on { background: #2f7bff; color: #fff; }
.btn-diy { background: linear-gradient(90deg, #f5a623, #ffc53d); color: #3a2a00; border: none; border-radius: 8px; padding: 8px 16px; font-weight: 700; cursor: pointer; font-size: 13px; }
.btn-diy.on { outline: 2px solid #fff; }
.board-clock { font-variant-numeric: tabular-nums; color: var(--cyan); font-size: 14px; font-weight: 700; }
.kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0; }
.kpi { background: linear-gradient(160deg, rgba(38,72,170,.5), rgba(20,40,100,.35)); border: 1px solid rgba(110,150,255,.25); border-radius: 10px; padding: 12px 16px; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(120,180,255,.12), transparent); transform: translateX(-100%); animation: sweep 3.5s infinite; }
@keyframes sweep { 60%,100% { transform: translateX(100%); } }
.kpi .k-label { font-size: 12px; color: #93b0ea; }
.kpi .k-val { font-size: 24px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi .k-val small { font-size: 12px; font-weight: 400; color: #9db4e8; }
.kpi .k-delta { font-size: 12px; margin-top: 2px; font-weight: 600; }
.up { color: #4ade80; } .down { color: #ff7b7b; }
.board-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; min-height: 0; }
.panel { background: rgba(16,30,80,.55); border: 1px solid rgba(110,150,255,.22); border-radius: 12px; padding: 12px 14px; overflow: auto; }
.panel h3 { font-size: 14.5px; color: #cfe0ff; letter-spacing: 2px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.panel h3::before { content: ''; width: 4px; height: 14px; background: linear-gradient(180deg, var(--cyan), #2f7bff); border-radius: 2px; }
.panel h3 .p-tag { margin-left: auto; font-size: 11px; color: #7fa3e8; font-weight: 400; letter-spacing: 0; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pitem { background: rgba(28,52,120,.45); border: 1px solid rgba(110,150,255,.18); border-radius: 8px; padding: 8px 10px 6px; }
.pitem .n { font-size: 11.5px; color: #9db4e8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pitem .v { font-size: 17px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; margin: 2px 0; }
.pitem .v small { font-size: 10px; color: #8aa8e0; font-weight: 400; }
.pitem .v .delta { font-size: 11px; font-weight: 700; margin-left: 6px; }
.spark { width: 100%; height: 26px; }
.spark polyline { fill: none; stroke: var(--cyan); stroke-width: 1.6; }
.spark .area { fill: rgba(56,225,255,.12); stroke: none; }
.ticker { margin-top: 12px; border-top: 1px solid rgba(120,160,255,.18); padding-top: 9px; font-size: 12.5px; color: #9db4e8; white-space: nowrap; overflow: hidden; }
.ticker b { color: var(--gold); }
.ticker span { margin-right: 34px; }

/* DIY 抽屉 */
.diy-drawer { position: fixed; top: 58px; right: -420px; width: 400px; height: calc(100% - 58px); background: #0d1c46; color: #dfeaff; border-left: 1px solid rgba(110,150,255,.3); box-shadow: -20px 0 50px rgba(2,8,30,.5); transition: right .25s; z-index: 50; display: flex; flex-direction: column; }
.diy-drawer.open { right: 0; }
.diy-head { padding: 16px 18px; border-bottom: 1px solid rgba(110,150,255,.2); display: flex; justify-content: space-between; align-items: center; }
.diy-head h4 { font-size: 16px; letter-spacing: 2px; }
.diy-close { background: none; border: none; color: #9db4e8; font-size: 20px; cursor: pointer; }
.diy-count { padding: 10px 18px; font-size: 13px; color: var(--gold); font-weight: 700; }
.diy-body { flex: 1; overflow: auto; padding: 0 18px 12px; }
.diy-group { margin-bottom: 12px; }
.diy-group h5 { font-size: 13px; color: #cfe0ff; margin: 8px 0; letter-spacing: 1px; }
.diy-items { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.diy-items label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #b7c5ec; background: rgba(28,52,120,.4); border-radius: 6px; padding: 6px 8px; cursor: pointer; white-space: nowrap; }
.diy-items input { accent-color: #2f7bff; }
.diy-foot { padding: 12px 18px; border-top: 1px solid rgba(110,150,255,.2); display: flex; gap: 10px; }
.diy-foot button { flex: 1; }
.diy-tip { padding: 0 18px 10px; font-size: 11.5px; color: #7fa3e8; line-height: 1.7; }

/* ============ AI 学习助手 ============ */
.ai-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 16px; height: 780px; min-height: 480px; }
.ai-chat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.ai-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); background: #f8faff; }
.ai-tabs button { flex: 1; border: none; background: none; padding: 12px 4px; font-size: 13.5px; color: var(--text2); cursor: pointer; font-weight: 600; border-bottom: 2px solid transparent; }
.ai-tabs button.on { color: var(--primary-dark); border-bottom-color: var(--primary); background: #fff; }
.chat-scroll { flex: 1; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 78%; line-height: 1.8; font-size: 13.8px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-radius: 12px 12px 2px 12px; padding: 10px 14px; }
.msg.bot { align-self: flex-start; background: #f4f7fe; border: 1px solid var(--line); border-radius: 12px 12px 12px 2px; padding: 10px 14px; }
.msg.bot .who { font-size: 11px; color: var(--primary); font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.typing i { display: inline-block; width: 6px; height: 6px; background: #94a3b8; border-radius: 50%; margin-right: 4px; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.chips { padding: 8px 18px; display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); }
.chips button { background: #eef3ff; color: var(--primary-dark); border: 1px solid #d6e2ff; font-size: 12.5px; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chips button:hover { background: #dfe9ff; }
.chat-input { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font-size: 14px; outline: none; }
.chat-input input:focus { border-color: var(--primary); }
.chat-input .btn { padding: 0 22px; }
.ai-side { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.lib-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.lib-card h4 { font-size: 14px; margin-bottom: 4px; }
.lib-total { font-size: 26px; font-weight: 800; color: var(--primary-dark); margin: 4px 0; }
.lib-total small { font-size: 12px; color: var(--text2); font-weight: 400; }
.lib-scen { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.lib-scen span { font-size: 12px; background: #f1f5fb; color: var(--text2); border-radius: 6px; padding: 4px 8px; }
.lib-scen span b { color: var(--primary); }
.lib-search { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 8px; outline: none; }
.lib-list { max-height: 300px; overflow: auto; font-size: 12.5px; color: var(--text); display: flex; flex-direction: column; gap: 2px; }
.lib-list div { padding: 6px 8px; border-radius: 6px; }
.lib-list div:hover { background: #f4f7fe; }
.lib-list .no { color: var(--text2); font-size: 12px; padding: 6px; }
.scen-counts { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.scen-counts h4 { font-size: 14px; margin-bottom: 10px; }
.bar-row { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 8px; }
.bar-row .bl { width: 84px; color: var(--text2); }
.bar-row .bar { flex: 1; height: 10px; background: #eef2f9; border-radius: 999px; overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, #2563eb, #38bdf8); border-radius: 999px; }
.bar-row .bn { width: 34px; text-align: right; font-weight: 700; color: var(--text); }

/* ============ 教师端实时监控 ============ */
.mon-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 16px; height: 780px; min-height: 480px; }
.mon-left { display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.team-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: .15s; }
.team-card.on { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.team-card .t-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.team-card .t-name { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.team-card .t-status { font-size: 11px; padding: 3px 8px; border-radius: 999px; font-weight: 600; }
.t-status.live { background: #ecfdf5; color: var(--green); }
.t-status.off { background: #f1f5f9; color: var(--text2); }
.t-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.t-metrics div { font-size: 12px; color: var(--text2); background: #f8fafc; border-radius: 6px; padding: 5px 8px; display: flex; justify-content: space-between; }
.t-metrics b { color: var(--text); font-variant-numeric: tabular-nums; }
.t-op { margin-top: 8px; font-size: 11.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-right { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.mon-headbar { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; display: flex; align-items: center; gap: 14px; }
.mon-headbar .live-tag { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-weight: 700; font-size: 13px; }
.mon-headbar .hint { font-size: 12px; color: var(--text2); margin-left: auto; }
.stmt-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; min-height: 0; }
.stmt { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: auto; padding: 12px 14px; }
.stmt h4 { font-size: 14px; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.stmt h4 .rt { margin-left: auto; font-size: 11px; color: var(--green); display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.stmt table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.stmt th { text-align: left; color: var(--text2); font-weight: 600; padding: 5px 6px; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.stmt td { padding: 5.5px 6px; border-bottom: 1px dashed #edf1f8; font-variant-numeric: tabular-nums; }
.stmt td.num { text-align: right; font-weight: 600; }
.stmt td.d { text-align: right; font-size: 11.5px; font-weight: 700; }
.event-feed { background: var(--navy); color: #b9ccf7; border-radius: 12px; padding: 10px 16px; height: 118px; overflow: auto; font-size: 12.5px; }
.event-feed h4 { color: #fff; font-size: 13px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.event-feed .ev { padding: 3px 0; display: flex; gap: 10px; }
.event-feed .tm { color: var(--cyan); font-variant-numeric: tabular-nums; }
.event-feed .tn { color: var(--gold); }

/* ============ 碳中和 ============ */
.carbon-wrap { display: flex; flex-direction: column; gap: 14px; }
.carb-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ccard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.ccard .c-label { font-size: 12.5px; color: var(--text2); }
.ccard .c-val { font-size: 26px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ccard .c-val small { font-size: 12px; font-weight: 400; color: var(--text2); }
.ccard.em .c-val { color: #b45309; } .ccard.ok .c-val { color: var(--green); } .ccard.quota .c-val { color: var(--primary-dark); }
.carb-main { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; }
.carb-panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.carb-panel h4 { font-size: 14.5px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.off-rate { margin-bottom: 10px; }
.off-rate .or-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.off-rate .or-head b { font-size: 16px; }
.progress { height: 14px; border-radius: 999px; background: #eef2f9; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f59e0b, #16a34a); transition: width .4s; }
.src-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; margin: 8px 0; }
.src-row .sl { width: 92px; color: var(--text2); }
.src-row .sb { flex: 1; height: 12px; background: #eef2f9; border-radius: 999px; overflow: hidden; }
.src-row .sb i { display: block; height: 100%; background: linear-gradient(90deg, #f97316, #fbbf24); }
.src-row .sv { width: 76px; text-align: right; font-weight: 700; }
.rule-banner { margin-top: 12px; background: linear-gradient(90deg, #fffbeb, #fef3c7); border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; font-size: 13px; line-height: 1.8; color: #92400e; }
.rule-banner.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.rule-banner b { font-weight: 800; }
.score-line { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; background: #f8fafc; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }
.score-badge { font-size: 20px; font-weight: 800; }
.score-badge.locked { color: #b45309; } .score-badge.unlocked { color: var(--green); }
.off-form { display: flex; flex-direction: column; gap: 10px; }
.off-item { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.off-item .oi-t { font-size: 13.5px; font-weight: 700; }
.off-item .oi-d { font-size: 11.5px; color: var(--text2); margin-top: 2px; }
.off-item input { width: 84px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: 13px; text-align: right; }
.knowledge { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kcard h5 { font-size: 13.5px; color: var(--primary-dark); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.kcard p { font-size: 12px; color: var(--text2); line-height: 1.75; }
.curve-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.curve-box h4 { font-size: 14.5px; margin-bottom: 8px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text2); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }

/* ============ 驾驶舱 / 说明页 ============ */
.ov-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.ov-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.ov-card .o-label { font-size: 12.5px; color: var(--text2); }
.ov-card .o-val { font-size: 24px; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; }
.about-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; }
.about-card h3 { font-size: 16px; margin-bottom: 14px; }
.about-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.about-row:last-child { border: none; }
.about-row .a-clause { color: #92400e; font-weight: 700; line-height: 1.8; }
.about-row .a-clause b { display: block; color: var(--primary-dark); margin-bottom: 4px; }
.about-row .a-mod { color: var(--text); line-height: 1.8; }
.about-row .a-mod b { color: var(--primary-dark); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c3cede; border-radius: 999px; }
.board ::-webkit-scrollbar-thumb, .diy-drawer ::-webkit-scrollbar-thumb, .event-feed::-webkit-scrollbar-thumb { background: rgba(120,160,255,.3); }

/* ============ 移动端响应式（手机浏览器自适应） ============ */
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; min-height: 100vh; display: flex; flex-direction: column; }
  .sidebar { width: 100%; padding: 0; flex-shrink: 0; }
  .side-logo { padding: 10px 14px; }
  .side-nav { flex-direction: row; overflow-x: auto; padding: 8px 10px; gap: 6px; -webkit-overflow-scrolling: touch; }
  .side-nav a { flex-shrink: 0; font-size: 12.5px; padding: 8px 11px; white-space: nowrap; }
  .side-foot { display: none; }
  .main { min-width: 0; }
  .topbar { height: auto; min-height: 50px; padding: 8px 12px; flex-wrap: wrap; gap: 6px; }
  .tb-title { font-size: 15px; }
  .tb-right { gap: 8px; font-size: 11.5px; flex-wrap: wrap; }
  .tb-user, .tb-period { display: none; }
  .content { padding: 10px; overflow: visible; }
  .clause { font-size: 11.5px; padding: 7px 9px; }

  .board { min-height: 0; padding: 12px; }
  .board-head { flex-wrap: wrap; gap: 8px; }
  .board-head h2 { font-size: 16px; letter-spacing: 1px; }
  .board-head h2 small { display: none; }
  .board-tools { width: 100%; flex-wrap: wrap; }
  .board-clock { font-size: 12px; }
  .seg { overflow-x: auto; max-width: 100%; }
  .seg button { padding: 6px 9px; font-size: 11.5px; white-space: nowrap; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi { padding: 9px 11px; }
  .kpi .k-val { font-size: 19px; }
  .board-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .panel { overflow: visible; }
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .ticker { white-space: normal; line-height: 1.7; }

  .diy-drawer { width: 92vw; top: 0; height: 100%; }
  .diy-items { grid-template-columns: 1fr 1fr; }

  .ai-wrap, .mon-wrap { grid-template-columns: 1fr; height: auto; }
  .ai-side { order: 2; }
  .ai-tabs { overflow-x: auto; }
  .ai-tabs button { flex-shrink: 0; min-width: 88px; font-size: 12px; padding: 10px 6px; }
  .chat-scroll { height: 380px; }
  .msg { max-width: 92%; font-size: 12.5px; }
  .chips { overflow-x: auto; flex-wrap: nowrap; }
  .chips button { white-space: nowrap; flex-shrink: 0; }
  .chat-input { padding: 10px; }
  .lib-list { max-height: 220px; }

  .mon-left { overflow: visible; }
  .stmt-grid { grid-template-columns: 1fr; height: auto; }
  .stmt { overflow-x: auto; }
  .stmt table { min-width: 420px; }
  .mon-headbar { flex-wrap: wrap; }
  .mon-headbar .hint { margin-left: 0; }

  .carb-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ccard { padding: 11px 12px; }
  .ccard .c-val { font-size: 20px; }
  .carb-main { grid-template-columns: 1fr; }
  .off-item { grid-template-columns: 1fr auto; gap: 6px; }
  .off-item input { width: 70px; }
  .knowledge { grid-template-columns: 1fr; }
  .curve-box svg { min-width: 420px; }

  .ov-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .ov-card { padding: 12px; }
  .ov-card .o-val { font-size: 19px; }
  .about-row { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 480px) {
  .pgrid { grid-template-columns: 1fr; }
  .kpi-strip { grid-template-columns: 1fr 1fr; }
  .kpi .k-val { font-size: 17px; }
  .seg button { font-size: 11px; padding: 5px 7px; }
  .btn-diy { padding: 7px 10px; font-size: 12px; }
  .tb-clock { font-size: 11px; }
  .side-nav a { font-size: 12px; padding: 7px 9px; }
  .carb-cards { grid-template-columns: 1fr 1fr; }
  .off-item { grid-template-columns: 1fr; }
  .off-item input { width: 100%; }
}
