@tailwind base;
@tailwind components;
@tailwind utilities;

/* ══ 三省六部总控台 · CSS 变量 ══ */
:root {
  --bg: #07090f;
  --panel: #0f1219;
  --panel2: #141824;
  --line: #1c2236;
  --text: #dde4f8;
  --muted: #5a6b92;
  --ok: #2ecc8a;
  --warn: #f5c842;
  --danger: #ff5270;
  --acc: #6a9eff;
  --acc2: #a07aff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", Inter, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
}
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e2538; border-radius: 4px; }

/* ══ 布局 ══ */
.wrap { max-width: 1400px; margin: 0 auto; padding: 16px; }

/* ══ HEADER ══ */
.hdr { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.logo { font-size: 20px; font-weight: 800; background: linear-gradient(135deg, #6a9eff, #a07aff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sub-text { font-size: 11px; color: var(--muted); }
.hdr-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 11px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); }
.chip.ok { border-color: #2ecc8a44; color: var(--ok); }
.chip.warn { border-color: #f5c84244; color: var(--warn); }
.chip.err { border-color: #ff527044; color: var(--danger); }
.btn-refresh { font-size: 11px; padding: 4px 10px; border: 1px solid var(--acc); border-radius: 6px; background: transparent; color: var(--acc); cursor: pointer; }
.btn-refresh:hover { background: #0a1228; }

/* ══ TABS ══ */
.tabs { display: flex; gap: 2px; margin-bottom: 18px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { font-size: 13px; padding: 8px 16px; border-radius: 8px 8px 0 0; cursor: pointer; color: var(--muted); border: 1px solid transparent; border-bottom: none; white-space: nowrap; position: relative; bottom: -1px; transition: all .15s; user-select: none; }
.tab:hover { color: var(--text); background: var(--panel); }
.tab.active { color: var(--text); background: var(--panel); border-color: var(--line); font-weight: 600; }
.tbadge { font-size: 10px; padding: 1px 5px; border-radius: 999px; background: #1a2040; color: var(--acc); margin-left: 4px; }

/* ══ 旨意看板卡片 ══ */
.edict-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.edict-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; cursor: pointer; transition: border-color .15s, transform .1s, box-shadow .15s; }
.edict-card:hover { border-color: var(--acc); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(106,158,255,.1); }
.edict-card.archived { opacity: .55; border-style: dashed; }
.edict-card.archived:hover { opacity: .85; }

.ec-pipe { display: flex; align-items: center; gap: 0; margin-bottom: 14px; overflow-x: auto; padding-bottom: 2px; }
.ep-node { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 8px; border-radius: 6px; flex-shrink: 0; min-width: 52px; }
.ep-node.done { background: #0a2018; }
.ep-node.active { background: #0f1a38; border: 1px solid var(--acc); }
.ep-node.pending { opacity: .3; }
.ep-icon { font-size: 14px; }
.ep-name { font-size: 9px; color: var(--muted); white-space: nowrap; }
.ep-node.done .ep-name { color: var(--ok); }
.ep-node.active .ep-name { color: var(--acc); font-weight: 700; }
.ep-arrow { font-size: 10px; color: #1c2236; padding: 0 1px; flex-shrink: 0; }

.ec-id { font-size: 10px; color: var(--acc); font-weight: 700; letter-spacing: .04em; margin-bottom: 5px; }
.ec-title { font-size: 15px; font-weight: 700; line-height: 1.4; margin-bottom: 10px; color: var(--text); }
.ec-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.tag { font-size: 10px; padding: 2px 7px; border-radius: 4px; border: 1px solid; display: inline-block; white-space: nowrap; }

/* state colors */
.st-Inbox { border-color: #3a4a7a44; color: #7a9aff; background: #0a1028; }
.st-Taizi { border-color: #e8a04044; color: #e8a040; background: #281a08; }
.st-Zhongshu { border-color: #a07aff44; color: #a07aff; background: #110a28; }
.st-Menxia { border-color: #ff9a6a44; color: #ff9a6a; background: #280f0a; }
.st-Assigned, .st-Doing { border-color: #6a9eff44; color: #6a9eff; background: #0a1428; }
.st-Review { border-color: #f5c84244; color: #f5c842; background: #201a08; }
.st-Done { border-color: #2ecc8a44; color: var(--ok); background: #0a2018; }
.st-Blocked { border-color: #ff527044; color: var(--danger); background: #200a10; }
.st-Cancelled { border-color: #88888844; color: #888; background: #1a1a1a; }
.st-Next { border-color: #4a9adf44; color: #4a9adf; background: #0a1424; }
.st-Pending { border-color: #3a4a7a44; color: #7a9aff; background: #0a1028; }

/* dept colors */
.dt-中书省 { border-color: #a07aff44; color: #a07aff; background: #1a0f38; }
.dt-门下省 { border-color: #6a9eff44; color: #6a9eff; background: #0f1a38; }
.dt-尚书省 { border-color: #6aef9a44; color: #6aef9a; background: #0a2018; }
.dt-礼部 { border-color: #f5c84244; color: #f5c842; background: #201a08; }
.dt-户部 { border-color: #ff9a6a44; color: #ff9a6a; background: #28100a; }
.dt-兵部 { border-color: #ff527044; color: #ff5270; background: #280a10; }
.dt-刑部 { border-color: #cc444444; color: #cc4444; background: #280808; }
.dt-工部 { border-color: #44aaff44; color: #44aaff; background: #081828; }

.ec-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; flex-wrap: wrap; gap: 6px; }
.hb { font-size: 10px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); }
.hb.active { border-color: #2ecc8a44; color: var(--ok); }
.hb.warn { border-color: #f5c84244; color: var(--warn); }
.hb.stalled { border-color: #ff527044; color: var(--danger); animation: pulse 1.5s infinite; }
.hb.unknown { color: var(--muted); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ══ TASK DETAIL MODAL ══ */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100; backdrop-filter: blur(3px); overflow-y: auto; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; width: 100%; max-width: 760px; padding: 28px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.modal-close { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; font-size: 18px; color: var(--muted); background: none; border: none; }
.modal-close:hover { background: var(--panel2); color: var(--text); }
.modal-id { font-size: 11px; color: var(--acc); font-weight: 700; letter-spacing: .04em; margin-bottom: 6px; }
.modal-title { font-size: 22px; font-weight: 800; line-height: 1.3; margin-bottom: 18px; }

.m-pipe { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 16px; background: var(--panel2); border-radius: 12px; margin-bottom: 20px; }
.mp-stage { display: flex; align-items: center; flex-shrink: 0; }
.mp-node { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 10px; min-width: 80px; position: relative; }
.mp-node.done { background: #0a2018; border: 1px solid #2ecc8a44; }
.mp-node.active { background: #0f1838; border: 2px solid var(--acc); box-shadow: 0 0 14px rgba(106,158,255,.2); }
.mp-node.pending { opacity: .25; border: 1px dashed var(--line); }
.mp-icon { font-size: 22px; }
.mp-dept { font-size: 12px; font-weight: 700; margin-top: 2px; }
.mp-node.done .mp-dept { color: var(--ok); }
.mp-node.active .mp-dept { color: var(--acc); }
.mp-node.pending .mp-dept { color: var(--muted); }
.mp-action { font-size: 10px; color: var(--muted); margin-top: 1px; }
.mp-node.active .mp-action { color: #6a9eff88; }
.mp-done-tick { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; background: var(--ok); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; color: #000; font-weight: 700; }
.mp-arrow { color: #1c2236; font-size: 18px; padding: 0 6px; margin-top: -10px; }

.cur-stage { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #0a1228; border: 1px solid var(--acc); border-radius: 10px; margin-bottom: 18px; }
.cs-icon { font-size: 24px; }
.cs-info .cs-dept { font-size: 16px; font-weight: 700; color: var(--acc); }
.cs-info .cs-action { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cs-hb { margin-left: auto; }

.m-section { margin-bottom: 18px; }
.m-sec-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.fl-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.fl-timeline::before { content: ''; position: absolute; left: 60px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.fl-item { display: flex; gap: 0; position: relative; padding: 8px 0; }
.fl-time { min-width: 60px; font-size: 10px; color: var(--muted); text-align: right; padding-right: 14px; flex-shrink: 0; padding-top: 3px; }
.fl-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; position: relative; z-index: 1; }
.fl-content { padding-left: 12px; flex: 1; }
.fl-who { font-size: 12px; margin-bottom: 2px; }
.fl-who .from { font-weight: 700; }
.fl-who .to { font-weight: 700; }
.fl-rem { font-size: 11px; color: var(--muted); line-height: 1.5; }

.m-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.m-row { background: var(--panel2); border-radius: 8px; padding: 10px 12px; }
.mr-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.mr-val { font-size: 13px; font-weight: 600; word-break: break-all; }

/* ══ 省部调度 ══ */
.duty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 12px; }
.duty-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .15s; }
.duty-card:hover { border-color: #2e3d6a; }
.duty-card.active-card { border-color: var(--acc); }
.duty-card.blocked-card { border-color: #ff527055; }
.dc-hdr { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--panel2); border-bottom: 1px solid var(--line); }
.dc-emoji { font-size: 22px; }
.dc-info { flex: 1; }
.dc-name { font-size: 14px; font-weight: 800; }
.dc-role { font-size: 10px; color: var(--muted); }
.dc-status { display: flex; align-items: center; gap: 5px; font-size: 11px; }
.dc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dc-dot.active { background: var(--ok); }
.dc-dot.busy { background: var(--warn); animation: pulse 1.5s infinite; }
.dc-dot.blocked { background: var(--danger); animation: pulse 1s infinite; }
.dc-dot.idle { background: #2a3a5a; }
.dc-body { padding: 14px 16px; }
.dc-idle { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; padding: 6px 0; }
.dc-task { display: flex; flex-direction: column; gap: 6px; cursor: pointer; padding: 6px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 6px; }
.dc-task:hover { border-color: var(--acc); }
.dc-task-id { font-size: 10px; color: var(--acc); font-weight: 700; letter-spacing: .04em; }
.dc-task-title { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3; }
.dc-task-now { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.dc-task-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.dc-footer { padding: 8px 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; background: var(--panel2); }
.dc-model { font-size: 10px; color: var(--muted); }
.dc-la { font-size: 10px; color: var(--muted); margin-left: auto; }

/* ══ Agent Status Panel ══ */
.as-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; }
.as-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.as-title { font-size: 13px; font-weight: 700; }
.as-gw { font-size: 11px; padding: 3px 10px; border-radius: 999px; margin-left: auto; }
.as-gw.ok { background: #0a2018; border: 1px solid #2ecc8a44; color: var(--ok); }
.as-gw.err { background: #200a10; border: 1px solid #ff527044; color: var(--danger); }
.as-gw.warn { background: #201a08; border: 1px solid #f5c84244; color: var(--warn); }
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.as-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.as-card:hover { border-color: var(--acc); background: #0a1228; }
.as-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; }
.as-dot.running { background: #2ecc8a; box-shadow: 0 0 6px #2ecc8a88; animation: pulse 1.5s infinite; }
.as-dot.idle { background: #4a5568; }
.as-dot.offline { background: #ff5270; animation: pulse 1.2s infinite; }
.as-dot.unconfigured { background: #6b7280; }
.as-wake-btn { font-size: 10px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--acc); color: var(--acc); background: transparent; cursor: pointer; margin-top: 6px; transition: background .15s; }
.as-wake-btn:hover { background: var(--acc); color: #fff; }
.as-summary { font-size: 11px; color: var(--muted); display: flex; gap: 12px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }

/* ══ Task Actions ══ */
.task-actions { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.btn-action { font-size: 12px; padding: 7px 16px; border-radius: 8px; border: none; cursor: pointer; font-weight: 700; transition: all .15s; }
.btn-stop { background: #ff527022; color: #ff5270; border: 1px solid #ff527044; }
.btn-stop:hover { background: #ff527044; }
.btn-cancel-action { background: #88888822; color: #888; border: 1px solid #88888844; }
.btn-cancel-action:hover { background: #88888844; }
.btn-resume { background: #2ecc8a22; color: #2ecc8a; border: 1px solid #2ecc8a44; }
.btn-resume:hover { background: #2ecc8a44; }

/* ══ Scheduler Panel ══ */
.sched-section { margin-bottom: 18px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.sched-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sched-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--acc); }
.sched-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.sched-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.sched-kpi .k { font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.sched-kpi .v { font-size: 13px; font-weight: 700; }
.sched-btn { font-size: 11px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: all .15s; }
.sched-btn:hover { border-color: var(--acc); color: var(--text); }

/* ══ Todo List ══ */
.todo-section { margin-bottom: 18px; }
.todo-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.todo-progress { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.todo-bar { width: 120px; height: 6px; background: #0e1320; border-radius: 3px; overflow: hidden; }
.todo-bar-fill { height: 100%; border-radius: 3px; background: var(--ok); transition: width .3s; }
.todo-list { display: flex; flex-direction: column; gap: 4px; }
.todo-item { display: flex; flex-direction: column; background: var(--panel2); border-radius: 8px; font-size: 12px; transition: opacity .15s; }
.todo-item.done { opacity: .55; }
.todo-item .t-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; }
.todo-item .t-icon { font-size: 14px; flex-shrink: 0; }
.todo-item .t-title { flex: 1; color: var(--text); }
.todo-item.done .t-title { text-decoration: line-through; color: var(--muted); }
.todo-item .t-status { font-size: 10px; padding: 2px 6px; border-radius: 4px; }
.todo-item .t-status.s-done { color: var(--ok); background: #0a2018; border: 1px solid #2ecc8a44; }
.todo-item .t-status.s-progress { color: var(--acc); background: #0a1228; border: 1px solid #6a9eff44; }
.todo-item .t-status.s-notstarted { color: var(--muted); background: var(--panel); border: 1px solid var(--line); }

.ec-todo-bar { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); margin-top: 6px; }
.ec-todo-track { flex: 1; max-width: 80px; height: 4px; background: #0e1320; border-radius: 2px; overflow: hidden; }
.ec-todo-fill { height: 100%; background: var(--ok); border-radius: 2px; }

.ec-actions { display: flex; gap: 4px; margin-top: 8px; }
.ec-actions .mini-act { font-size: 10px; padding: 3px 8px; border-radius: 5px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); transition: all .12s; }
.ec-actions .mini-act:hover { border-color: var(--acc); color: var(--text); }
.ec-actions .mini-act.danger:hover { border-color: #ff5270; color: #ff5270; }

/* ══ Archive Bar ══ */
.archive-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.ab-label { font-size: 12px; color: var(--muted); margin-right: 4px; }
.ab-btn { font-size: 11px; padding: 4px 12px; border-radius: 6px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); transition: all .15s; font-weight: 600; }
.ab-btn:hover { border-color: var(--acc); color: var(--text); }
.ab-btn.active { border-color: var(--acc); color: var(--acc); background: #0f1a38; }
.ab-count { font-size: 10px; color: var(--muted); margin-left: auto; }
.ab-scan { font-size: 11px; padding: 4px 12px; border-radius: 6px; border: 1px solid #6a9eff44; background: transparent; cursor: pointer; color: var(--acc); font-weight: 600; transition: all .15s; }
.ab-scan:hover { background: #0a1228; border-color: var(--acc); }
.ab-scan-status { font-size: 10px; color: var(--muted); }

/* ══ Live Activity ══ */
.la-section { margin-bottom: 18px; }
.la-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.la-title { font-size: 11px; font-weight: 700; color: var(--acc); letter-spacing: .06em; }
.la-log { max-height: 320px; overflow-y: auto; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.la-entry { display: flex; gap: 8px; align-items: flex-start; padding: 5px 8px; border-radius: 6px; line-height: 1.5; word-break: break-all; }
.la-entry:hover { background: rgba(106,158,255,.04); }
.la-empty { text-align: center; color: var(--muted); padding: 20px; font-size: 12px; }

/* ══ Model Config ══ */
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 18px; }
.mc-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.mc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mc-emoji { font-size: 22px; }
.mc-name { font-size: 15px; font-weight: 700; }
.mc-role { font-size: 11px; color: var(--muted); }
.mc-cur { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.mc-cur b { color: var(--text); }
.msel { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; color: var(--text); padding: 7px 10px; font-size: 12px; outline: none; cursor: pointer; }
.msel:focus { border-color: var(--acc); }
.mc-btns { display: flex; gap: 6px; margin-top: 8px; }
.btn { font-size: 12px; padding: 6px 14px; border-radius: 7px; border: none; cursor: pointer; font-weight: 600; }
.btn-p { background: var(--acc); color: #000; }
.btn-p:hover { filter: brightness(1.15); }
.btn-p:disabled { background: #2a3a6a; color: var(--muted); cursor: not-allowed; }
.btn-g { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn-g:hover { border-color: #2e3d6a; color: var(--text); }
.cl-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.cl-title { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px; }
.cl-row { display: flex; gap: 10px; font-size: 11px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.cl-row:last-child { border-bottom: none; }

/* ══ Skills Config ══ */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sk-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sk-hdr { display: flex; align-items: center; gap: 9px; padding: 11px 14px; background: var(--panel2); border-bottom: 1px solid var(--line); }
.sk-list { padding: 10px; }
.sk-item { display: flex; gap: 8px; padding: 8px 10px; border-radius: 7px; font-size: 12px; margin-bottom: 3px; cursor: pointer; border: 1px solid transparent; transition: all .12s; }
.sk-item:hover { background: var(--panel2); border-color: var(--line); }

/* ══ Sessions ══ */
.sess-filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.sess-filter { font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; transition: all .12s; }
.sess-filter:hover { border-color: var(--acc); color: var(--text); }
.sess-filter.active { border-color: var(--acc); color: var(--acc); background: #0a1228; }
.sess-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.sess-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; transition: border-color .12s; cursor: pointer; }
.sess-card:hover { border-color: #2e3d6a; }

/* ══ Officials ══ */
.off-activity { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #0a1228; border: 1px solid #1a2a4a; border-radius: 10px; margin-bottom: 14px; font-size: 12px; flex-wrap: wrap; }
.off-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi-v { font-size: 24px; font-weight: 800; margin-bottom: 3px; }
.kpi-l { font-size: 11px; color: var(--muted); }
.off-layout { display: grid; grid-template-columns: 260px 1fr; gap: 14px; }
@media (max-width: 700px) { .off-layout { grid-template-columns: 1fr; } .off-kpi { grid-template-columns: repeat(2, 1fr); } }
.off-ranklist { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.orl-hdr { padding: 10px 14px; background: var(--panel2); border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.orl-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line); transition: background .1s; }
.orl-item:last-child { border-bottom: none; }
.orl-item:hover { background: var(--panel2); }
.orl-item.selected { background: #0a1228; border-left: 3px solid var(--acc); }
.off-detail { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; min-height: 400px; }

/* ══ Memorials ══ */
.mem-list { display: flex; flex-direction: column; gap: 8px; }
.mem-card { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: border-color .12s; }
.mem-card:hover { border-color: var(--acc); }

/* ══ Templates ══ */
.tpl-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tpl-cat { font-size: 12px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; transition: all .12s; }
.tpl-cat:hover { border-color: var(--acc); color: var(--text); }
.tpl-cat.active { border-color: var(--acc); color: var(--acc); background: #0a1228; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.tpl-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; transition: border-color .12s; cursor: pointer; display: flex; flex-direction: column; }
.tpl-card:hover { border-color: var(--acc); }

/* ══ Morning Brief ══ */
.mb-hdr { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.mb-title { font-size: 20px; font-weight: 800; background: linear-gradient(135deg, #f5c842, #ff9a4a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.mb-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.mb-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.mb-cat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mb-cat-hdr { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.mb-news-list { padding: 10px; }
.mb-card { display: flex; gap: 12px; padding: 10px 8px; border-radius: 10px; margin-bottom: 6px; cursor: pointer; transition: background .12s; border-bottom: 1px solid var(--line); }
.mb-card:last-child { border-bottom: none; }
.mb-card:hover { background: var(--panel2); }

/* ══ Court Ceremony ══ */
.ceremony-bg { position: fixed; inset: 0; z-index: 9999; background: #07090f; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; animation: crmFadeIn .6s ease forwards; cursor: pointer; }
.ceremony-bg.out { animation: crmFadeOut .5s ease forwards; }
.crm-glow { position: absolute; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, rgba(106,158,255,.08), transparent 70%); animation: crmPulse 3s ease-in-out infinite; }
.crm-line1 { font-family: 'Noto Serif SC', serif; font-size: 52px; font-weight: 900; color: #dde4f8; letter-spacing: .15em; opacity: 0; transform: translateY(20px); }
.crm-line2 { font-family: 'Noto Serif SC', serif; font-size: 22px; font-weight: 700; color: var(--acc); letter-spacing: .2em; margin-top: 12px; opacity: 0; transform: translateY(15px); }
.crm-line3 { font-size: 14px; color: var(--muted); margin-top: 24px; opacity: 0; letter-spacing: .05em; }
.crm-date { font-size: 12px; color: #2a3555; margin-top: 40px; opacity: 0; letter-spacing: .08em; }
.crm-skip { font-size: 11px; color: #2a3555; margin-top: 18px; opacity: 0; animation: crmChar .4s 2.5s forwards; }
.crm-line1.in { animation: crmSlideUp .6s .3s ease forwards; }
.crm-line2.in { animation: crmSlideUp .5s 1.1s ease forwards; }
.crm-line3.in { animation: crmSlideUp .5s 1.6s ease forwards; }
.crm-date.in { animation: crmChar .4s 2s ease forwards; }
@keyframes crmFadeIn { to { opacity: 1; } }
@keyframes crmFadeOut { to { opacity: 0; pointer-events: none; } }
@keyframes crmSlideUp { to { opacity: 1; transform: translateY(0); } }
@keyframes crmChar { to { opacity: 1; } }
@keyframes crmPulse { 0%,100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.1); opacity: .8; } }

/* ══ Confirm Dialog ══ */
.confirm-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 200; backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; }
.confirm-box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; max-width: 420px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.confirm-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.confirm-msg { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }
.confirm-input { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; color: var(--text); padding: 8px 10px; font-size: 12px; outline: none; margin-bottom: 14px; }
.confirm-input:focus { border-color: var(--acc); }
.confirm-btns { display: flex; gap: 8px; justify-content: flex-end; }

/* ══ Toast ══ */
.toaster { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 300; pointer-events: none; }
.toast { font-size: 13px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); box-shadow: 0 4px 20px rgba(0,0,0,.4); animation: tin .2s; max-width: 320px; pointer-events: auto; }
.toast.ok { border-color: #2ecc8a55; background: #0a1a10; }
.toast.err { border-color: #ff527055; background: #200a10; }
@keyframes tin { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ══ Subscription Config ══ */
.sub-config { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 18px; }
.sub-section { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sub-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sub-sec-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.sub-input { background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; color: var(--text); padding: 7px 10px; font-size: 12px; outline: none; min-width: 0; }
.sub-input:focus { border-color: var(--acc); }

/* ══ Skills: missing sub-classes ══ */
.si-name { font-weight: 600; min-width: 100px; }
.si-desc { color: var(--muted); flex: 1; line-height: 1.4; }
.si-arrow { color: var(--muted); font-size: 14px; opacity: .3; transition: opacity .12s; }
.sk-item:hover .si-arrow { opacity: 1; }
.sk-emoji { font-size: 18px; }
.sk-name { font-size: 14px; font-weight: 700; }
.sk-cnt { font-size: 11px; color: var(--muted); margin-left: auto; }
.sk-empty { font-size: 12px; color: var(--muted); padding: 12px; text-align: center; opacity: .6; }
.sk-add { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; font-size: 12px; color: var(--acc); cursor: pointer; border-top: 1px solid var(--line); transition: background .12s; }
.sk-add:hover { background: var(--panel2); }

/* skill detail modal */
.sk-modal-body { max-height: 70vh; overflow-y: auto; }
.sk-md { font-size: 13px; line-height: 1.7; color: var(--text); }
.sk-md h1, .sk-md h2, .sk-md h3 { margin: 16px 0 8px; color: var(--text); }
.sk-md h1 { font-size: 18px; }
.sk-md h2 { font-size: 15px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.sk-md h3 { font-size: 13px; }
.sk-md p { margin: 6px 0; }
.sk-md ul, .sk-md ol { padding-left: 20px; margin: 6px 0; }
.sk-md li { margin: 3px 0; }
.sk-md code { font-size: 11px; background: var(--panel2); padding: 2px 6px; border-radius: 4px; font-family: monospace; }
.sk-md pre { background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow-x: auto; margin: 8px 0; }
.sk-md pre code { background: none; padding: 0; }
.sk-md table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 8px 0; }
.sk-md th, .sk-md td { padding: 6px 10px; border: 1px solid var(--line); text-align: left; }
.sk-md th { background: var(--panel2); }
.sk-md hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
.sk-path { font-size: 10px; color: var(--muted); padding: 8px 0; word-break: break-all; border-top: 1px solid var(--line); margin-top: 12px; }

/* ══ Sessions: missing sub-classes ══ */
.sc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sc-emoji { font-size: 20px; }
.sc-agent { font-size: 13px; font-weight: 700; }
.sc-org { font-size: 11px; color: var(--muted); }
.sc-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.sc-now { font-size: 11px; color: var(--muted); line-height: 1.5; margin-bottom: 6px; }
.sc-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sc-id { font-size: 10px; color: var(--acc); font-weight: 600; }
.sc-time { font-size: 10px; color: var(--muted); margin-left: auto; }

/* ══ Model Config: missing sub-classes ══ */
.mc-st { font-size: 11px; margin-top: 6px; padding: 4px 8px; border-radius: 5px; display: none; }
.mc-st.ok { display: block; background: #0a2018; color: var(--ok); border: 1px solid #2ecc8a44; }
.mc-st.err { display: block; background: #200a10; color: var(--danger); border: 1px solid #ff527044; }
.mc-st.pending { display: block; background: #0a1228; color: var(--acc); border: 1px solid #6a9eff44; }
.cl-t { color: var(--muted); min-width: 115px; }
.cl-a { color: var(--acc); min-width: 80px; }
.cl-c { color: var(--muted); }
.cl-c b { color: var(--text); }
.cl-list { display: flex; flex-direction: column; }

/* ══ Memorial: missing sub-classes ══ */
.mem-icon { font-size: 28px; flex-shrink: 0; margin-top: 2px; }
.mem-info { flex: 1; min-width: 0; }
.mem-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.mem-sub { font-size: 11px; color: var(--muted); line-height: 1.5; }
.mem-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.mem-tag { font-size: 10px; padding: 2px 8px; border-radius: 4px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.mem-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.mem-date { font-size: 10px; color: var(--muted); }
.mem-cost { font-size: 10px; color: var(--acc); }
.mem-empty { text-align: center; padding: 40px; color: var(--muted); font-size: 13px; }

/* memorial detail timeline */
.md-timeline { position: relative; padding-left: 24px; margin: 16px 0; }
.md-timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.md-tl-item { position: relative; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.md-tl-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.md-tl-dot { position: absolute; left: -20px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); border: 2px solid var(--bg); }
.md-tl-dot.green { background: var(--ok); }
.md-tl-dot.yellow { background: var(--warn); }
.md-tl-dot.red { background: var(--danger); }
.md-tl-from { font-size: 11px; font-weight: 700; color: var(--acc); }
.md-tl-to { font-size: 11px; color: var(--muted); }
.md-tl-remark { font-size: 12px; margin-top: 3px; line-height: 1.5; }
.md-tl-time { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ══ Template: missing sub-classes ══ */
.tpl-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tpl-icon { font-size: 24px; }
.tpl-name { font-size: 14px; font-weight: 700; }
.tpl-pop { font-size: 10px; color: var(--muted); margin-left: auto; }
.tpl-desc { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; flex: 1; }
.tpl-footer { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tpl-dept { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: var(--panel2); color: var(--acc); }
.tpl-est { font-size: 10px; color: var(--muted); margin-left: auto; }
.tpl-go { font-size: 11px; padding: 5px 14px; border-radius: 6px; background: var(--acc); color: #fff; border: none; cursor: pointer; font-weight: 600; margin-left: 8px; transition: opacity .12s; }
.tpl-go:hover { opacity: .85; }
.tpl-form { margin-top: 18px; }
.tpl-field { margin-bottom: 14px; }
.tpl-label { font-size: 12px; font-weight: 600; display: block; margin-bottom: 6px; }
.tpl-input { width: 100%; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 13px; outline: none; }

/* ══ Morning Brief: missing sub-classes ══ */
.mb-img { width: 72px; height: 52px; border-radius: 7px; object-fit: cover; flex-shrink: 0; background: var(--panel2); display: flex; align-items: center; justify-content: center; font-size: 22px; overflow: hidden; }
.mb-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.mb-info { flex: 1; min-width: 0; }
.mb-headline { font-size: 13px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mb-summary { font-size: 11px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mb-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.mb-source { font-size: 10px; color: var(--acc); }
.mb-time { font-size: 10px; color: var(--muted); }
.mb-cat-icon { font-size: 20px; }
.mb-cat-name { font-size: 14px; font-weight: 800; }
.mb-cat-cnt { font-size: 11px; color: var(--muted); margin-left: auto; }
.mb-empty { text-align: center; padding: 30px; color: var(--muted); font-size: 13px; }
.mb-loading { display: flex; align-items: center; justify-content: center; padding: 60px; color: var(--muted); font-size: 14px; gap: 10px; }

/* ══ Live Activity: missing sub-classes ══ */
.la-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 4px; animation: pulse 1.5s infinite; }
.la-dot.idle { background: var(--muted); animation: none; }
.la-agent { font-size: 11px; color: var(--muted); }
.la-icon { flex-shrink: 0; font-size: 13px; margin-top: 1px; }
.la-body { flex: 1; min-width: 0; }
.la-time { font-size: 10px; color: var(--muted); flex-shrink: 0; min-width: 44px; text-align: right; }
.la-assistant { color: var(--text); }
.la-thinking { color: #a07aff; font-style: italic; opacity: .75; }
.la-tool { color: #44aaff; }
.la-tool-result { color: var(--muted); font-size: 11px; }
.la-tool-result.ok { color: var(--ok); }
.la-tool-result.err { color: var(--danger); }
.la-user { color: var(--warn); }
.la-tool-name { font-weight: 700; margin-right: 4px; }
.la-trunc { color: var(--muted); font-size: 10px; opacity: .6; }
.la-flow-wrap { display: flex; flex-direction: column; gap: 6px; }
.la-groups { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.la-group { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.la-group-hd { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.la-group-hd .name { font-weight: 700; color: var(--text); }
.la-group-bd { display: flex; flex-direction: column; gap: 4px; padding: 6px; }

/* ══ Scheduler: missing sub-classes ══ */
.sched-status { font-size: 10px; color: var(--muted); }
.sched-line { font-size: 11px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.sched-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sched-btn.warn:hover { border-color: #f5c842; color: #f5c842; }
.sched-btn.danger:hover { border-color: #ff5270; color: #ff5270; }

/* ══ Task Actions: missing btn-cancel ══ */
.btn-cancel { background: #88888822; color: #888; border: 1px solid #88888844; }
.btn-cancel:hover { background: #88888844; }
.btn-action:disabled { opacity: .4; cursor: not-allowed; }

/* ══ Todo: missing sub-classes ══ */
.todo-detail { display: none; padding: 4px 10px 10px 36px; font-size: 11px; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-break: break-word; border-top: 1px solid var(--line); margin: 0 6px; opacity: .85; }
.todo-item.expanded .todo-detail { display: block; }
.todo-item .t-expand { color: var(--muted); font-size: 10px; transition: transform .2s; flex-shrink: 0; }
.todo-item.expanded .t-expand { transform: rotate(90deg); }
.todo-item .t-id { color: var(--muted); font-size: 10px; min-width: 20px; }
.todo-item.has-detail .t-row { cursor: pointer; }

/* ══ Officials: missing sub-classes ══ */
.act-label { color: var(--muted); flex-shrink: 0; }
.act-dot { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: #0f1a38; border: 1px solid #1e2e50; margin: 2px; }
.act-dot.alive { border-color: #2ecc8a44; background: #0a2018; color: var(--ok); }
.act-dot.warn { border-color: #f5c84244; background: #201a08; color: var(--warn); }
.act-dot.idle { color: var(--muted); }
.orl-medal { font-size: 16px; min-width: 20px; text-align: center; }
.orl-emoji { font-size: 18px; }
.orl-name { flex: 1; }
.orl-role { font-size: 12px; font-weight: 700; }
.orl-org { font-size: 10px; color: var(--muted); }
.orl-score { font-size: 11px; font-weight: 700; color: var(--acc); }
.orl-hbdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.orl-hbdot.active { background: var(--ok); }
.orl-hbdot.warn { background: var(--warn); }
.orl-hbdot.stalled { background: var(--danger); animation: pulse 1.2s infinite; }
.orl-hbdot.idle { background: #2a3a5a; }
.od-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 13px; min-height: 200px; }
.od-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.od-emoji { font-size: 40px; }
.od-name { font-size: 22px; font-weight: 800; }
.od-role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.od-rank-badge { font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid #f5c84244; color: #f5c842; background: #201a08; margin-top: 4px; display: inline-block; }
.od-hb { margin-left: auto; text-align: right; }
.od-section { margin-bottom: 18px; }
.od-sec-title { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 10px; }
.od-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ods { background: var(--panel2); border-radius: 8px; padding: 10px; text-align: center; }
.ods-v { font-size: 20px; font-weight: 800; }
.ods-l { font-size: 10px; color: var(--muted); margin-top: 2px; }
.tbar { margin-bottom: 7px; }
.tbar-hdr { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 3px; }
.tbar-label { color: var(--muted); }
.tbar-val { font-weight: 600; }
.tbar-track { height: 6px; background: #0e1320; border-radius: 3px; overflow: hidden; }
.tbar-fill { height: 100%; border-radius: 3px; }
.od-cost-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cost-chip { font-size: 12px; padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); }
.cost-chip b { font-size: 15px; }
.cost-chip.hi { border-color: #ff527044; }
.cost-chip.md { border-color: #f5c84244; }
.cost-chip.lo { border-color: #2ecc8a44; }
.od-edict-list { display: flex; flex-direction: column; gap: 5px; }
.oe-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--panel2); border-radius: 7px; font-size: 12px; cursor: pointer; }
.oe-item:hover { background: #141c30; }
.oe-id { font-size: 10px; color: var(--acc); font-weight: 700; min-width: 110px; }
.oe-title { flex: 1; color: var(--text); }
.oe-state { font-size: 10px; }
.kpi-v.gold { color: #f5c842; }
.kpi-v.green { color: var(--ok); }
.kpi-v.blue { color: var(--acc); }
.kpi-v.warn { color: var(--warn); }

/* ══ Subscription: missing sub-classes ══ */
.sub-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.sub-cat { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; transition: all .15s; user-select: none; }
.sub-cat:hover { border-color: var(--acc); }
.sub-cat.active { border-color: var(--ok); background: #0a2018; }
.sub-cat .sc-check { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 10px; transition: all .15s; }
.sub-cat.active .sc-check { background: var(--ok); border-color: var(--ok); color: #000; }
.sub-cat .sc-label { font-size: 12px; font-weight: 600; }
.sub-cat .sc-count { font-size: 10px; color: var(--muted); }
.sub-kw-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sub-kw { display: flex; align-items: center; gap: 4px; padding: 4px 8px 4px 10px; border-radius: 999px; background: #0f1a38; border: 1px solid #1e2e50; font-size: 11px; color: var(--acc); }
.sub-kw .kw-del { cursor: pointer; opacity: .5; font-size: 13px; padding: 0 2px; }
.sub-kw .kw-del:hover { opacity: 1; color: var(--danger); }
.sub-feed-list { display: flex; flex-direction: column; gap: 4px; }
.sub-feed { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--panel2); border-radius: 7px; font-size: 12px; }
.sub-feed .sf-name { font-weight: 600; min-width: 80px; color: var(--acc); }
.sub-feed .sf-url { flex: 1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-feed .sf-cat { font-size: 10px; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line); }
.sub-feed .sf-del { cursor: pointer; color: var(--muted); font-size: 14px; }
.sub-feed .sf-del:hover { color: var(--danger); }

/* ══ Agent Status: missing sub-classes ══ */
.as-card .as-emoji { font-size: 22px; margin-bottom: 3px; }
.as-card .as-label { font-size: 12px; font-weight: 700; }
.as-card .as-role { font-size: 10px; color: var(--muted); }
.as-card .as-status { font-size: 10px; margin-top: 4px; }
.as-card .as-time { font-size: 9px; color: var(--muted); margin-top: 2px; }
.as-wake-btn:disabled { opacity: .4; cursor: not-allowed; }
.as-refresh { font-size: 11px; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); background: transparent; cursor: pointer; transition: background .15s; }
.as-refresh:hover { background: var(--panel2); color: var(--text); }
.as-wake-all { font-size: 11px; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--warn); color: var(--warn); background: transparent; cursor: pointer; transition: background .15s; margin-left: 6px; }
.as-wake-all:hover { background: var(--warn); color: #fff; }
.as-summary span { display: flex; align-items: center; gap: 4px; }

/* ══ Archive Bar: missing sub-classes ══ */
.archive-bar .ab-archive-all { font-size: 11px; padding: 4px 12px; border-radius: 6px; border: 1px solid #2ecc8a44; background: transparent; cursor: pointer; color: var(--ok); font-weight: 600; transition: all .15s; }
.archive-bar .ab-archive-all:hover { background: #0a2018; border-color: var(--ok); }
.archive-bar .ab-scan-detail { font-size: 11px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); font-weight: 600; transition: all .15s; }
.archive-bar .ab-scan-detail:hover { border-color: var(--acc); color: var(--text); }
.archive-bar .ab-scan-detail.active { border-color: var(--acc); color: var(--acc); background: #0f1a38; }
.archive-bar .ab-scan-copy { font-size: 11px; padding: 4px 10px; border-radius: 6px; border: 1px solid #2ecc8a44; background: transparent; cursor: pointer; color: var(--ok); font-weight: 600; transition: all .15s; }
.archive-bar .ab-scan-copy:hover { background: #0a2018; border-color: var(--ok); }

/* scan detail panel */
.global-scan-detail { display: none; margin-top: -4px; margin-bottom: 12px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.global-scan-detail.open { display: block; }
.global-scan-detail .gs-empty { font-size: 11px; color: var(--muted); }
.global-scan-detail .gs-list { display: flex; flex-direction: column; gap: 6px; }
.global-scan-detail .gs-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 11px; }
.global-scan-detail .gs-tag { font-size: 10px; border-radius: 10px; padding: 2px 8px; font-weight: 700; border: 1px solid var(--line); color: var(--muted); }
.global-scan-detail .gs-tag.retry { color: var(--acc); border-color: #6a9eff55; }
.global-scan-detail .gs-tag.escalate { color: #f5c842; border-color: #f5c84255; }
.global-scan-detail .gs-tag.rollback { color: #ff5270; border-color: #ff527055; }
.global-scan-detail .gs-task { font-weight: 700; color: var(--text); }
.global-scan-detail .gs-meta { color: var(--muted); }
.global-scan-detail .gs-hint { margin-top: 8px; font-size: 10px; color: var(--muted); }

/* ══ Confirm: missing sub-classes ══ */
.confirm-reason { width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; color: var(--text); padding: 8px 10px; font-size: 12px; outline: none; margin-bottom: 14px; resize: vertical; min-height: 60px; }
.confirm-reason:focus { border-color: var(--acc); }

/* ══ General ══ */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13px; }
.sec-title { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 12px; }
code { font-size: 11px; background: var(--panel2); padding: 2px 6px; border-radius: 4px; font-family: monospace; }

/* ══ 朝堂议政动画 ══ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes pulse { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@keyframes bounceIn { 0% { transform: scale(0); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* M3: checkpoint pulse */
@keyframes pulse-border { 0%, 100% { border-color: rgba(245, 158, 11, 0.4); } 50% { border-color: rgba(245, 158, 11, 0.9); } }

/* M3: Button styles */
.btn-primary {
  padding: 8px 18px; border-radius: 8px; border: none; font-size: 13px; font-weight: 600;
  background: linear-gradient(135deg, var(--acc), #c9a227); color: #1a1a2e; cursor: pointer;
  transition: all 0.15s;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }
.btn-ghost {
  padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--fg); border: 1px solid var(--line); cursor: pointer;
  transition: all 0.15s;
}
.btn-ghost:hover { background: var(--panel2); }
.btn-small {
  padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
  background: transparent; color: var(--fg); border: 1px solid var(--line); cursor: pointer;
  transition: all 0.15s; text-decoration: none; display: inline-block;
}
.btn-small:hover { background: var(--panel2); }
.tab-btn {
  padding: 8px 16px; font-size: 13px; font-weight: 600; border: none;
  background: none; cursor: pointer; transition: all 0.15s;
  border-bottom: 2px solid transparent;
}
.tab-btn:hover { background: var(--panel2); }
.tag-done { background: #22c55e22; color: #22c55e; border: 1px solid #22c55e44; padding: 1px 6px; border-radius: 4px; font-size: 10px; }
.tag-exec { background: var(--acc)22; color: var(--acc); border: 1px solid var(--acc)44; padding: 1px 6px; border-radius: 4px; font-size: 10px; }
.tag-waiting { background: #f59e0b22; color: #f59e0b; border: 1px solid #f59e0b44; padding: 1px 6px; border-radius: 4px; font-size: 10px; }
