/* 铭澄AI办公室 · 冻结演示快照 · 样式 */

:root {
  --bg: #0a0e15;
  --bg-soft: #0e1420;
  --panel: #121a28;
  --panel-2: #16202f;
  --line: #22314a;
  --line-soft: #1a2637;
  --text: #e6edf7;
  --muted: #8794a8;
  --muted-2: #64748b;
  --jade: #34d399;
  --jade-dim: #1c6b50;
  --amber: #f5a524;
  --gold: #d9b45b;
  --red: #ef5f6b;
  --radius: 12px;
  --radius-sm: 8px;
}

/* 浩哥 2026-09-30 加：暖纸亮色主题（与活看板主题切换器对齐） */
:root.theme-light {
  --bg: #EDE6D6;        /* 暖纸底 */
  --bg-soft: #F5EFE0;   /* 面板底 */
  --panel: #F5EFE0;
  --panel-2: #FAF5E8;
  --line: rgba(95, 80, 40, .18);
  --line-soft: rgba(95, 80, 40, .10);
  --text: #2A2418;       /* 主文字 暖深棕 */
  --muted: #5A4F2E;      /* 副文字 */
  --muted-2: #8C7B4A;    /* 弱文字 */
  --jade: #2F8C6A;       /* 翡翠色 - 亮色下要深些 */
  --jade-dim: #1C5F4A;
  --amber: #C28A2A;
  --gold: #A87E2C;
  --red: #C2455A;
}
:root.theme-light body { background: var(--bg); color: var(--text); }

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(1100px 500px at 12% -8%, #142334 0%, transparent 62%),
    radial-gradient(900px 420px at 92% 0%, #1a1a2e 0%, transparent 58%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", -apple-system, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--jade); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 冻结说明栏 ---------- */
.frozen-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px clamp(14px, 3vw, 32px);
  background: linear-gradient(90deg, rgba(245, 165, 36, .16), rgba(245, 165, 36, .05));
  border-bottom: 1px solid rgba(245, 165, 36, .38);
  font-size: 13px;
  color: #f0d9a8;
}

.fb-tag {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--amber);
  color: #241a06;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .04em;
}

.fb-text { min-width: 0; }
.fb-text strong { color: #ffdf9e; }

/* ---------- 页头 ---------- */
.site-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: clamp(16px, 3vw, 28px) clamp(14px, 3vw, 32px) 4px;
  max-width: 1480px;
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }

.bagua-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(160deg, #1b2c3f, #101a27);
  border: 1px solid var(--line);
  color: var(--jade);
  font-size: 26px;
  line-height: 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}

.brand-text { min-width: 0; }
.brand-text h1 { margin: 0; font-size: clamp(19px, 2.4vw, 26px); letter-spacing: .01em; }
.brand-text p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.head-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 6px 22px;
  min-width: 0;
  flex: 1 1 340px;
  max-width: 560px;
}

.hm-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.hm-k { flex: none; color: var(--muted-2); font-size: 12px; }
.hm-v { min-width: 0; font-size: 12.5px; overflow-wrap: anywhere; text-align: right; }

/* ---------- 布局 ---------- */
.wrap {
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(14px, 2.4vw, 24px) clamp(14px, 3vw, 32px) 40px;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 20px);
}

.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(14px, 2vw, 20px);
  min-width: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}

.panel-h {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-sub {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted-2);
  letter-spacing: 0;
}

/* ---------- 顶部指标 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: clamp(10px, 1.4vw, 16px);
}

.stat {
  background: linear-gradient(180deg, var(--panel-2), #101825);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--jade);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  min-width: 0;
}

.stat.is-gold { border-left-color: var(--gold); }
.stat.is-amber { border-left-color: var(--amber); }

.stat-k { color: var(--muted-2); font-size: 12px; margin-bottom: 4px; white-space: nowrap; }
.stat-v { font-size: clamp(20px, 2.4vw, 27px); font-weight: 700; letter-spacing: -.01em; }
.stat-v small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat-d { color: var(--muted); font-size: 11.5px; margin-top: 3px; }

/* ---------- 执行体 ---------- */
.devices { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }

.device {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  min-width: 0;
}

.dev-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dev-name { font-size: 16px; font-weight: 700; }
.dev-tri { color: var(--gold); font-size: 18px; line-height: 1; }
.dev-model { color: var(--muted); font-size: 12px; }

.pill {
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.pill.ok { color: #0f2b20; background: var(--jade); border-color: var(--jade); font-weight: 700; }
.pill.warn { color: #2b1d04; background: var(--amber); border-color: var(--amber); font-weight: 700; }

.dev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px 14px; }
.kv { min-width: 0; }
.kv-k { color: var(--muted-2); font-size: 11.5px; }
.kv-v { font-size: 13px; overflow-wrap: anywhere; }

.bar { height: 6px; border-radius: 999px; background: #0c1320; overflow: hidden; margin-top: 5px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--jade-dim), var(--jade)); }
.bar.is-amber > i { background: linear-gradient(90deg, #7a4d05, var(--amber)); }

/* ---------- 八宫 ---------- */
.bagua-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); gap: 12px; }

.gong {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  min-width: 0;
}

.gong.is-zheng { border-top-color: var(--jade); }
.gong.is-jian { border-top-color: var(--gold); }
.gong.is-xu { border-top-color: #3d4a5e; opacity: .82; }

.gong-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gong-tri { font-size: 19px; line-height: 1; color: var(--gold); }
.gong-name { font-weight: 700; font-size: 14.5px; }
.gong-role { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.gong-meta { margin-top: 9px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.gong-row { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.gong-row .k { color: var(--muted-2); flex: none; }
.gong-row .v { text-align: right; overflow-wrap: anywhere; min-width: 0; }

.status-chip { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.status-chip.is-zheng { color: var(--jade); border-color: var(--jade-dim); }
.status-chip.is-jian { color: var(--gold); border-color: #6b5527; }
.status-chip.is-xu { color: var(--muted-2); }

/* ---------- 六爻 ---------- */
.yao-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }

.yao-block { min-width: 0; }
.yao-label { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }

.yao-bar { display: flex; gap: 6px; }

.yao-seg { flex: 1 1 0; min-width: 0; text-align: center; }
.yao-seg .track {
  height: 10px;
  border-radius: 3px;
  background: #0c1320;
  border: 1px solid var(--line-soft);
}
.yao-seg.on .track { background: linear-gradient(90deg, var(--jade-dim), var(--jade)); border-color: var(--jade-dim); }
.yao-seg.fault .track { background: repeating-linear-gradient(45deg, #7a4d05 0 5px, var(--amber) 5px 10px); border-color: var(--amber); }
.yao-seg .cap { font-size: 11px; color: var(--muted-2); margin-top: 5px; white-space: nowrap; }
.yao-seg.fault .cap { color: var(--amber); font-weight: 700; }

.yao-legend { margin-top: 10px; font-size: 12px; color: var(--muted); }
.yao-legend b { color: var(--amber); }

.fault-bars { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.fault-row { display: grid; grid-template-columns: 74px 1fr 34px; gap: 10px; align-items: center; min-width: 0; }
.fault-name { font-size: 12px; color: var(--muted); }
.fault-count { font-size: 12px; text-align: right; color: var(--muted); }
.fault-count.hot { color: var(--amber); font-weight: 700; }
.fault-track { height: 8px; border-radius: 999px; background: #0c1320; overflow: hidden; }
.fault-track > i { display: block; height: 100%; background: #33415a; }
.fault-track > i.hot { background: linear-gradient(90deg, #7a4d05, var(--amber)); }

/* ---------- 任务流水 ---------- */
.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.ledger { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 12.5px; }
.ledger th, .ledger td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.ledger th { color: var(--muted-2); font-weight: 600; font-size: 11.5px; position: sticky; top: 0; background: var(--panel); }
.ledger td.title { white-space: normal; min-width: 150px; overflow-wrap: anywhere; }
.ledger tbody tr:hover { background: rgba(52, 211, 153, .045); }
.ledger .mono { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 12px; color: var(--muted); }
.ledger .tao-col { text-align: right; }

.tag { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.done { color: var(--jade); border-color: var(--jade-dim); }
.tag.review { color: var(--gold); border-color: #6b5527; }

.tao-inline { display: inline-flex; gap: 3px; justify-content: flex-end; vertical-align: middle; }
.tao-inline i { width: 12px; height: 8px; border-radius: 2px; background: #1d2a3d; display: block; }
.tao-inline i.on { background: var(--jade-dim); }
.tao-inline i.fault { background: var(--amber); }

/* ---------- 两列 ---------- */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: clamp(14px, 2vw, 20px); min-width: 0; }

.cost-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cost-table th, .cost-table td { padding: 7px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; }
.cost-table th { color: var(--muted-2); font-weight: 600; font-size: 11.5px; }
.cost-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.cost-total {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 12px;
  background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
}
.cost-total .big { font-size: 25px; font-weight: 700; }
.cost-total .note { color: var(--muted); font-size: 12px; }

.ch-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 11px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); min-width: 0; }
.ch-name { font-size: 12.5px; overflow-wrap: anywhere; }

.feed { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.bc { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: baseline; padding: 6px 4px; border-bottom: 1px dashed var(--line-soft); min-width: 0; }
.bc-t { color: var(--muted-2); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.bc-x { font-size: 12.5px; overflow-wrap: anywhere; min-width: 0; }
.bc-r { font-size: 11.5px; color: var(--jade); white-space: nowrap; }

.foot { color: var(--muted-2); font-size: 12px; text-align: center; padding-top: 6px; }
.foot p { margin: 0; }

/* ---------- 平板 768 ---------- */
@media (max-width: 980px) {
  .head-meta { max-width: none; }
  .bagua-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .feed { max-height: none; }
}

/* ---------- 手机 390 ---------- */
@media (max-width: 560px) {
  body { font-size: 13.5px; }
  .frozen-banner { font-size: 12.5px; padding: 9px 14px; }
  .fb-tag { font-size: 11px; }
  .bagua-mark { width: 44px; height: 44px; font-size: 22px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); }
  .devices, .bagua-grid, .two-col, .yao-wrap { grid-template-columns: 1fr; }
  .panel { padding: 13px; }
  .hm-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .hm-v { text-align: left; }
  .fault-row { grid-template-columns: 62px 1fr 30px; }
}

@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
}

/* 浩哥 2026-09-30 加：主题切换器样式（与活看板 .thsw 对齐） */
.thsw .hm-v { display: inline-flex; gap: 4px; }
.thbtn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  transition: all .25s ease;
}
.thbtn:hover { color: var(--text); border-color: var(--jade); }
.thbtn.active { background: var(--jade); color: #0a0e15; border-color: var(--jade); }
:root.theme-light .thbtn.active { color: #FAF5E8; }
