/* ============================================================
   生活中枢 · 样式系统
   ============================================================ */

:root {
  /* 蓝色企业后台配色（参照 UI风格规范.md） */
  --bg: #f2f3f5;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #f2f3f5;
  --ink: #1d2129;
  --ink-2: #4e5969;
  --ink-3: #86909c;
  --line: #e5e6eb;
  --line-2: #f0f1f3;
  --accent: #2f5cf6;
  --accent-deep: #1e49d6;
  --accent-soft: #eaf0ff;
  --red: #f53f3f;
  --red-soft: #ffece8;
  --green: #0a8f3c;
  --green-soft: #e8ffea;
  --amber: #d46b08;
  --amber-soft: #fff3e8;
  --blue: #3d6df2;
  --blue-soft: #e8f0ff;
  --purple: #7b5cfa;
  --purple-soft: #f0ebff;
  --track: #ebeef5;
  --glow: rgba(47, 92, 246, .04);
  --shadow-sm: 0 1px 2px rgba(29, 33, 41, .04);
  --shadow: 0 4px 16px rgba(29, 33, 41, .08);
  --r: 8px;
  --r-sm: 4px;
  --side-bg: #ffffff;
  --side-ink: #4e5969;
  --side-ink-hi: #1d2129;
}

[data-theme="dark"] {
  --bg: #0f1219;
  --surface: #171a21;
  --surface-2: #1d2129;
  --surface-3: #232830;
  --ink: #e8eaed;
  --ink-2: #a9b0bb;
  --ink-3: #6b7280;
  --line: #2a3039;
  --line-2: #22272f;
  --accent: #4a7dff;
  --accent-deep: #6b95ff;
  --accent-soft: #1b2440;
  --red: #f76965;
  --red-soft: #33201f;
  --green: #3ec46d;
  --green-soft: #16281c;
  --amber: #e8a34a;
  --amber-soft: #2f2517;
  --blue: #5b8dff;
  --blue-soft: #1a2338;
  --purple: #9a86ff;
  --purple-soft: #221d38;
  --track: #262c35;
  --glow: rgba(74, 125, 255, .06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 4px 16px rgba(0, 0, 0, .45);
  --side-bg: #12151b;
  --side-ink: #a9b0bb;
  --side-ink-hi: #e8eaed;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body.modal-open { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
b, strong { font-weight: 600; }
em { font-style: normal; }

.num, .stat-val, .big-num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* ---------------- ICP 备案（固定右下角，2026-11-19 备案通过后挂） ---------------- */
.icp-beian {
  position: fixed; bottom: 8px; right: 14px; z-index: 500;
  font-size: 11px; line-height: 1.4; color: var(--ink-3);
  text-decoration: none; opacity: .65; pointer-events: auto;
}
.icp-beian:hover { opacity: 1; color: var(--ink-2); text-decoration: underline; }

/* ---------------- 布局 ---------------- */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: var(--side-bg);
  color: var(--side-ink);
  display: flex;
  flex-direction: column;
  padding: 20px 12px 14px;
  user-select: none;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 20px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-size: 17px; font-weight: 600;
  letter-spacing: 0;
  flex: 0 0 auto;
}
.brand-mark.brand-logo { background: transparent; object-fit: cover; }

.brand-tx { display: flex; flex-direction: column; line-height: 1.25; }
.brand-tx b { color: var(--side-ink-hi); font-size: 15px; letter-spacing: .02em; }
.brand-tx span { font-size: 9.5px; letter-spacing: .16em; color: #6f6b62; margin-top: 2px; }

.nav { flex: 1; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--side-ink);
  font-size: 13.5px;
  position: relative;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: rgba(255, 255, 255, .055); color: var(--side-ink-hi); }
.nav-item.active { background: rgba(255, 255, 255, .085); color: var(--side-ink-hi); }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 17px; border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.nav-ic { display: grid; place-items: center; opacity: .85; }
.nav-item.active .nav-ic { opacity: 1; color: var(--accent); }
.nav-tx { flex: 1; }
.nav-badge {
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px;
  background: rgba(194, 69, 45, .22);
  color: #e88a74;
  font-size: 11px; font-weight: 600;
  display: grid; place-items: center;
  font-variant-numeric: tabular-nums;
}

.side-foot { border-top: 1px solid rgba(255, 255, 255, .07); padding: 12px 8px 0; margin-top: 8px; }
.side-date { display: flex; align-items: baseline; gap: 8px; }
.side-date b { color: var(--side-ink-hi); font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.side-date span { font-size: 11px; color: #767268; }
.side-tools { display: flex; gap: 6px; margin-top: 9px; }
.side-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 0; border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .06);
  color: var(--side-ink); font-size: 11.5px; cursor: pointer;
  transition: background .14s, color .14s;
}
.side-btn:hover { background: rgba(255, 255, 255, .1); color: var(--side-ink-hi); }
.side-meta { margin-top: 9px; font-size: 10.5px; color: #605c54; letter-spacing: .01em; }

.main {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  background: radial-gradient(1100px 340px at 18% -120px, var(--glow), transparent 70%);
}
.view { padding: 26px 34px 70px; max-width: 1320px; margin: 0 auto; }
.page { animation: pageIn .22s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- 页头 ---------------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 20px; flex-wrap: wrap;
}
.page-head h1 { font-size: 25px; font-weight: 650; letter-spacing: -.015em; line-height: 1.2; }
.page-sub { font-size: 13px; color: var(--ink-3); margin-top: 5px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------- 通用组件 ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
}
.card-head h2, .card-head h3 { font-size: 14px; font-weight: 600; letter-spacing: .01em; display: flex; align-items: center; gap: 7px; }
.card-head h2 .ic, .card-head h3 .ic { color: var(--ink-3); }
.card-body { padding: 16px; }
.card-body.tight { padding: 10px 12px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--line-2); background: var(--surface-2); }

.grid { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-all { grid-column: 1 / -1; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: all .14s;
}
.btn:hover { border-color: var(--ink-3); color: var(--ink); background: var(--surface-2); }
.btn:active { transform: translateY(.5px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.danger { color: #fff; background: #b3372c; border-color: #b3372c; }
.btn.danger:hover { background: #c33c30; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.xs { height: 24px; padding: 0 8px; font-size: 11.5px; border-radius: 6px; gap: 4px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.icon-btn {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid transparent; background: transparent;
  color: var(--ink-3); cursor: pointer;
  display: inline-grid; place-items: center;
  transition: all .14s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn.sm { width: 24px; height: 24px; border-radius: 6px; }

.link { color: var(--accent); cursor: pointer; font-size: 12.5px; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 8px;
  border-radius: 11px;
  font-size: 11.5px; font-weight: 500;
  background: var(--surface-3); color: var(--ink-2);
  white-space: nowrap;
}
.pill.red { background: var(--accent-soft); color: var(--accent); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.line { background: transparent; border: 1px solid var(--line); color: var(--ink-3); }

.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.tiny { font-size: 11.5px; }
.accent { color: var(--accent); }
.green { color: var(--green); }
.amber { color: var(--amber); }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }

/* 进度条 */
.bar { height: 6px; border-radius: 4px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.bar.green > i { background: var(--green); }
.bar.blue > i { background: var(--blue); }
.bar.amber > i { background: var(--amber); }
.bar.lg { height: 9px; }

/* 统计块 */
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 15px;
  display: flex; flex-direction: column; gap: 5px;
  box-shadow: var(--shadow-sm);
}
.stat-top { display: flex; align-items: center; gap: 8px; }
.stat .chip {
  width: 27px; height: 27px; border-radius: 8px; flex: 0 0 27px;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-2);
  transition: transform .16s;
}
.stat:hover .chip { transform: scale(1.08); }
.stat.tone-accent .chip { background: var(--accent-soft); color: var(--accent); }
.stat.tone-green .chip { background: var(--green-soft); color: var(--green); }
.stat.tone-blue .chip { background: var(--blue-soft); color: var(--blue); }
.stat.tone-amber .chip { background: var(--amber-soft); color: var(--amber); }
.stat.tone-purple .chip { background: var(--purple-soft); color: var(--purple); }
.stat-label { font-size: 12px; color: var(--ink-3); }
.stat-top .ic { color: var(--ink-3); opacity: .7; }
.stat-val { font-size: 27px; font-weight: 650; line-height: 1.12; letter-spacing: -.02em; margin-top: 1px; }
.stat-val em { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.stat-foot { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }

/* 空状态 */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 42px 20px; color: var(--ink-3); text-align: center;
}
.empty .ic { opacity: .45; }
.empty-title { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.empty-desc { font-size: 12.5px; color: var(--ink-3); max-width: 340px; line-height: 1.65; }
.empty .btn { margin-top: 6px; }

.chart-empty { padding: 30px; text-align: center; color: var(--ink-3); font-size: 12.5px; }

/* 图表 */
.chart { width: 100%; }
.chart-svg { width: 100%; height: 120px; display: block; overflow: visible; }
.chart-svg .cb-col { cursor: pointer; }
.chart-svg .cb-col:hover rect { opacity: 1 !important; filter: brightness(1.06); }
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { display: block; }
.ring-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.ring-mid b { font-size: 22px; font-weight: 620; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ring-mid span { font-size: 10.5px; color: var(--ink-3); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 132px; padding-top: 12px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.bar-track {
  flex: 1; width: 100%; max-width: 34px; border-radius: 6px;
  background: var(--track); position: relative; display: flex; align-items: flex-end;
  overflow: hidden;
}
.bar-track > i { display: block; width: 100%; border-radius: 6px; background: var(--accent); opacity: .55; transition: height .5s; }
.bar-col.hi .bar-track > i { opacity: 1; }
.bar-col.zero .bar-track { background: transparent; border: 1.5px dashed var(--line); border-bottom: 0; }
.bar-col.zero .bar-track > i.stub { opacity: 0; }
.bar-track > b {
  position: absolute; top: 4px; left: 0; right: 0;
  text-align: center; font-size: 10px; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.bar-lb { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }

/* 列表行 */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-2);
  transition: background .12s;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.row-actions { display: flex; align-items: center; gap: 2px; opacity: 0; transition: opacity .12s; }
.row:hover .row-actions { opacity: 1; }

/* 复选框 */
.check {
  width: 18px; height: 18px; flex: 0 0 18px;
  border: 1.6px solid var(--line); border-radius: 50%;
  background: var(--surface); cursor: pointer;
  display: grid; place-items: center;
  transition: all .15s;
  padding: 0;
}
.check:hover { border-color: var(--accent); }
.check .ic { opacity: 0; color: #fff; transform: scale(.6); transition: all .15s; }
.check.on { background: var(--green); border-color: var(--green); }
.check.on .ic { opacity: 1; transform: none; }
.done .row-title { text-decoration: line-through; color: var(--ink-3); }

/* 分段控件 */
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-3); border-radius: 9px;
}
.seg button {
  border: 0; background: transparent; cursor: pointer;
  padding: 5px 12px; border-radius: 7px;
  font-size: 12.5px; color: var(--ink-2);
  transition: all .14s;
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 500; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 14px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.span2 { grid-column: span 2; }
.field-label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.field-label em { color: var(--accent); margin-left: 2px; }
.field-hint { font-size: 11px; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink);
  outline: none; transition: border-color .14s, background .14s;
  font-size: 13px;
}
.field textarea { resize: vertical; min-height: 64px; line-height: 1.65; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.switch input { display: none; }
.switch i {
  width: 36px; height: 20px; border-radius: 11px; background: var(--track);
  position: relative; transition: background .16s;
}
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .16s;
}
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { transform: translateX(16px); }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 20, 18, .42);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .16s ease-out;
  backdrop-filter: blur(2px);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 560px; max-width: 100%; max-height: 90vh;
  background: var(--surface); border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .4);
  display: flex; flex-direction: column;
  animation: modalIn .2s cubic-bezier(.2, .9, .3, 1);
  overflow: hidden;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal.sm { width: 420px; }
.modal.lg { width: 760px; }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line-2);
  position: relative;
}
.modal-head h3 { font-size: 15.5px; font-weight: 600; }
.modal-head p { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.modal-head .icon-btn { position: absolute; top: 12px; right: 12px; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 13px 18px; border-top: 1px solid var(--line-2);
  background: var(--surface-2);
}
.confirm-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }

/* Toast */
#toast-root {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 10px;
  background: #26261f; color: #f2f0ea;
  font-size: 13px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(8px);
  transition: all .24s cubic-bezier(.2, .9, .3, 1);
}
.toast.in { opacity: 1; transform: none; }
.toast-error { background: #8f2d22; }
[data-theme="dark"] .toast { background: #2e2e26; }

/* ---------------- 首页 ---------------- */
.hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; padding: 4px 2px 20px;
  flex-wrap: wrap;
}
.hero-greet { font-size: 12.5px; color: var(--ink-3); letter-spacing: .04em; margin-bottom: 6px; }
.hero h1 { font-size: 29px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.hero h1 span { color: var(--accent); }
.hero-sub { font-size: 13px; color: var(--ink-3); margin-top: 7px; }
.hero-right { display: flex; gap: 10px; align-items: center; }
.hero-date-card {
  text-align: right; line-height: 1.3;
}
.hero-date-card b { display: block; font-size: 30px; font-weight: 620; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero-date-card span { font-size: 12px; color: var(--ink-3); }

.sum-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sum-card {
  display: flex; flex-direction: column; gap: 9px;
  padding: 14px 15px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); cursor: pointer;
  transition: all .16s; position: relative; overflow: hidden;
  text-align: left;
}
.sum-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--ink-3); }
.sum-head { display: flex; align-items: center; gap: 7px; }
.sum-ic {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-2);
}
.sum-name { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.sum-main { display: flex; align-items: baseline; gap: 5px; }
.sum-main b { font-size: 23px; font-weight: 620; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sum-main span { font-size: 11.5px; color: var(--ink-3); }
.sum-note { font-size: 11.5px; color: var(--ink-3); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-card .bar { margin-top: -2px; }

.memo-box { display: flex; gap: 8px; }
.memo-box input {
  flex: 1; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  outline: none; font-size: 13px;
}
.memo-box input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.memo-list { display: flex; flex-direction: column; }
.memo-item {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 0; border-bottom: 1px dashed var(--line-2);
  font-size: 13px; line-height: 1.5;
}
.memo-item:last-child { border-bottom: 0; }
.memo-item p { flex: 1; word-break: break-word; }
.memo-item .del { opacity: 0; }
.memo-item:hover .del { opacity: 1; }

.today-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px;
  transition: background .12s;
}
.today-row:hover { background: var(--surface-2); }
.today-time {
  font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums;
  width: 42px; flex: 0 0 42px;
}
.prio-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }
.prio-1 { background: var(--accent); }
.prio-2 { background: var(--amber); }
.prio-3 { background: var(--line); }

/* ---------------- 今日计划 ---------------- */
.plan-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }

.tl { position: relative; padding: 6px 0; }
.tl-item { display: flex; gap: 12px; position: relative; }
.tl-time {
  width: 52px; flex: 0 0 52px; text-align: right;
  font-size: 12px; color: var(--ink-3);
  font-variant-numeric: tabular-nums; padding-top: 11px;
}
.tl-time b { display: block; color: var(--ink-2); font-weight: 500; }
.tl-rail { width: 14px; flex: 0 0 14px; position: relative; display: flex; justify-content: center; }
.tl-rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tl-item:first-child .tl-rail::before { top: 16px; }
.tl-item:last-child .tl-rail::before { bottom: calc(100% - 16px); }
.tl-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line);
  margin-top: 14px; position: relative; z-index: 1;
}
.tl-item.p1 .tl-dot { border-color: var(--accent); }
.tl-item.done .tl-dot { background: var(--green); border-color: var(--green); }
.tl-body { flex: 1; min-width: 0; padding: 6px 0 10px; }
.tl-card {
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  display: flex; align-items: flex-start; gap: 9px;
  transition: all .14s;
}
.tl-card:hover { border-color: var(--ink-3); }
.tl-card.p1 { border-left: 3px solid var(--accent); padding-left: 10px; }
.tl-card.done { background: var(--surface-2); border-style: dashed; border-left-width: 1px; }
.tl-title { font-size: 13.5px; line-height: 1.45; }
.tl-card.done .tl-title { text-decoration: line-through; color: var(--ink-3); }
.tl-note { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.5; white-space: pre-wrap; }
.tl-tags { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }

.inbox-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--line-2);
  font-size: 13px;
}
.inbox-item:last-child { border-bottom: 0; }
.inbox-item p { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item .acts { display: flex; gap: 2px; opacity: 0; }
.inbox-item:hover .acts { opacity: 1; }

/* ---------------- 看板 ---------------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-height: 120px; }
.kcol-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 9px; }
.kcol-head b { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.kcol-dot { width: 7px; height: 7px; border-radius: 50%; }
.kcol-dot.backlog { background: var(--ink-3); }
.kcol-dot.doing { background: var(--accent); }
.kcol-dot.done { background: var(--green); }
.kcol-head span { font-size: 11px; color: var(--ink-3); background: var(--surface-3); padding: 1px 7px; border-radius: 9px; }
.kcard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 11px; margin-bottom: 7px;
  cursor: pointer; transition: all .14s; box-shadow: var(--shadow-sm);
}
.kcard:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.kcard-title { font-size: 13px; line-height: 1.45; }
.kcard-meta { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.kcard.dragging { opacity: .4; }
.kcol.drag-over { border-color: var(--accent); background: var(--accent-soft); }

/* ---------------- 表格 ---------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 500; font-size: 11.5px;
  color: var(--ink-3); padding: 9px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  white-space: nowrap;
}
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--surface-2); }
.table .r { text-align: right; }

/* 内容列表：备注截断 + 行尾操作按钮 */
.ct-note { display: inline-block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.ct-ops { margin-left: auto; display: inline-flex; gap: 4px; opacity: .35; transition: opacity .15s; }
tr:hover .ct-ops { opacity: 1; }
.ct-settle { padding: 3px 8px; font-size: 12px; border-radius: 7px; cursor: pointer; }
.ct-settle.yes { color: var(--green); border-color: var(--green); }
.ct-author { padding: 3px 8px; font-size: 12px; border-radius: 7px; cursor: pointer; max-width: 130px; }

/* 财务管理 */
.fin-amt { font-variant-numeric: tabular-nums; }
.fin-shot { width: 44px; height: 32px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line-2); cursor: zoom-in; }

/* 表单里的图片字段（支付截图等） */
.img-field { width: 100%; }
.img-box {
  min-height: 84px; border: 1px dashed var(--line); border-radius: 10px;
  background: var(--surface-2); display: grid; place-items: center; padding: 8px;
}
.img-box img { max-width: 100%; max-height: 170px; border-radius: 8px; display: block; }
.img-box .img-ph { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }

/* 发文助手 */
.assist-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 14px; align-items: start; }
.cover-wrap { background: var(--surface-3); border-radius: 12px; padding: 10px; display: grid; place-items: center; }
.cover-canvas { width: 100%; height: auto; border-radius: 8px; display: block; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.title-list { display: flex; flex-direction: column; gap: 2px; }
.title-row {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 9px 8px; border-radius: 9px; border-bottom: 1px solid var(--line-2);
}
.title-row:last-child { border-bottom: 0; }
.title-row:hover { background: var(--surface-2); }
.title-no { font-size: 12px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.title-tx { font-size: 13.5px; line-height: 1.6; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.title-why { font-size: 11px; line-height: 1.5; color: var(--muted); }
.title-why b { font-weight: 600; color: var(--ink-2); }
.title-ops { display: inline-flex; gap: 6px; opacity: .55; transition: opacity .15s; }
.title-row:hover .title-ops { opacity: 1; }

/* 内容卡（读懂之后再出标题/封面） */
.digest { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 11px 13px; }
.digest-row { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.65; padding: 3px 0; }
.digest-row .k { flex: 0 0 52px; color: var(--muted); }
.digest-row .v { flex: 1; min-width: 0; color: var(--ink); }
.digest-pill { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); font-size: 11.5px; margin: 0 4px 4px 0; }

/* 视频真实画面，点一张当封面底 */
.frame-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.frame-thumb {
  position: relative; padding: 0; border: 2px solid transparent; border-radius: 7px;
  overflow: hidden; cursor: pointer; background: var(--surface-3); aspect-ratio: 3 / 4; line-height: 0;
}
.frame-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame-thumb.on { border-color: var(--accent); }
.frame-thumb:hover { border-color: var(--line); }
.frame-thumb.on:hover { border-color: var(--accent); }
.frame-thumb .ft { position: absolute; right: 2px; bottom: 2px; padding: 0 3px; border-radius: 3px; background: rgba(0,0,0,.62); color: #fff; font-size: 9.5px; line-height: 1.5; }

/* 风格锚点胶囊 */
.style-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.style-chip {
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2);
  font-size: 12px; color: var(--ink-2); cursor: pointer; transition: all .12s;
}
.style-chip:hover { border-color: var(--accent); color: var(--ink); }
.style-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.hist-row { display: grid; grid-template-columns: 60px minmax(0,1fr) auto auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.hist-row:last-child { border-bottom: 0; }
.hist-topic { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.cover-lib { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.cover-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; cursor: pointer; display: block; border: 1px solid var(--line-2); }
.cover-item-bar { display: flex; align-items: center; gap: 4px; margin-top: 5px; }
.file-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 240px;
  padding: 3px 6px 3px 8px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface-2); font-size: 12px; color: var(--ink-2);
}
.file-chip .file-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .icon-btn { opacity: .6; }
.file-chip:hover .icon-btn { opacity: 1; }
@media (max-width: 1080px) {
  .assist-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------- 内容列表 ---------------- */
.ct-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.ct-input {
  width: 170px; padding: 6px 11px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); outline: none; font-size: 12.5px;
}
.ct-input:focus { border-color: var(--accent); background: var(--surface); }
.ct-sel {
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); outline: none; font-size: 12.5px; color: inherit;
}
.ct-copy {
  display: inline-block; max-width: 280px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: bottom; font-size: 12.5px;
}
.ct-link {
  color: var(--accent); text-decoration: none;
  display: inline-block; max-width: 170px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: bottom; font-size: 12px;
}
.ct-link:hover { text-decoration: underline; }


/* ---------------- 自媒体 ---------------- */
.idea-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.idea-card {
  border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 13px; background: var(--surface); cursor: pointer;
  transition: all .15s; display: flex; flex-direction: column; gap: 6px;
}
.idea-card:hover { border-color: var(--ink-3); box-shadow: var(--shadow-sm); }
.idea-title { font-size: 13.5px; font-weight: 500; line-height: 1.45; }
.idea-angle { font-size: 12px; color: var(--ink-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.heat { display: inline-flex; gap: 2px; }
.heat i { width: 5px; height: 11px; border-radius: 2px; background: var(--track); }
.heat i.on { background: var(--accent); }

.script-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.script-body-text {
  white-space: pre-wrap; line-height: 1.9; font-size: 14px;
  color: var(--ink); min-height: 260px;
}
.script-editor textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); padding: 13px 15px;
  line-height: 1.85; font-size: 14px; resize: vertical; outline: none;
}
.script-editor textarea:focus { border-color: var(--accent); background: var(--surface); }
.hook-box {
  background: var(--accent-soft); border: 1px solid rgba(194, 69, 45, .18);
  border-radius: 10px; padding: 11px 13px;
}
.hook-box .lab { font-size: 11px; color: var(--accent); font-weight: 600; letter-spacing: .03em; }
.hook-box p { font-size: 13.5px; margin-top: 4px; line-height: 1.7; }

/* ---------------- 健身 ---------------- */
.routine-card { border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; background: var(--surface); }
.routine-card.today { border-color: var(--accent); background: var(--accent-soft); }
.ex-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; font-size: 12.5px; border-bottom: 1px dashed var(--line-2); }
.ex-row:last-child { border-bottom: 0; }
.ex-row .nm { flex: 1; color: var(--ink-2); }
.ex-row .qty { color: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* ---------------- 饮食 ---------------- */
.macro-bar { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: var(--track); }
.macro-bar i { display: block; height: 100%; }
.macro-p { background: #3d7a5c; }
.macro-c { background: #c8901f; }
.macro-f { background: #a85a3c; }
.meal-block { border-bottom: 1px solid var(--line-2); padding-bottom: 10px; margin-bottom: 10px; }
.meal-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.meal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.meal-head b { font-size: 13px; }
.meal-food { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12.5px; }
.meal-food .g { flex: 1; color: var(--ink-2); }
.meal-food .k { color: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.water-dots { display: flex; gap: 5px; flex-wrap: wrap; }
.water-dot {
  width: 22px; height: 26px; border-radius: 4px 4px 8px 8px;
  border: 1.4px solid var(--line); background: var(--surface-2);
  cursor: pointer; transition: all .14s; padding: 0;
}
.water-dot.on { background: var(--blue); border-color: var(--blue); }

/* ---------------- 项目卡（dev 用） ---------------- */
.client-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px;
  background: var(--surface); display: flex; flex-direction: column; gap: 8px;
}

/* ---------------- 备忘录 ---------------- */
.memo-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; padding: 12px 14px 16px;
}
.memo-card {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  padding: 12px 13px; display: flex; flex-direction: column; gap: 9px;
  transition: box-shadow .16s, transform .16s, border-color .16s;
}
.memo-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.memo-head { display: flex; align-items: center; gap: 8px; }
.memo-ic {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 26px;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-2);
}
.memo-ic.purple { background: var(--purple-soft); color: var(--purple); }
.memo-ic.blue { background: var(--blue-soft); color: var(--blue); }
.memo-ic.line { background: var(--surface-3); color: var(--ink-2); }
.memo-tt { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; }
.memo-tt b {
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.memo-ops { display: flex; gap: 1px; opacity: .4; transition: opacity .15s; }
.memo-card:hover .memo-ops { opacity: 1; }
.memo-lines { display: flex; flex-direction: column; gap: 5px; }
.memo-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.memo-k { flex: 0 0 30px; font-size: 11.5px; color: var(--ink-3); }
.memo-v {
  flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: pointer; border-radius: 5px; padding: 1px 3px;
}
.memo-v:hover { background: var(--surface-2); color: var(--accent); }
.memo-v.memo-dot { letter-spacing: 2px; color: var(--ink-3); }
.memo-link {
  flex: 1; min-width: 0; font-size: 12.5px; color: var(--blue); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.memo-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.memo-note {
  font-size: 11.5px; line-height: 1.55; color: var(--ink-2);
  background: var(--surface-2); border-radius: 8px; padding: 6px 9px;
  word-break: break-word;
}
.memo-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.memo-tip {
  display: flex; align-items: center; gap: 6px; margin-top: 12px;
  font-size: 11.5px; line-height: 1.6; color: var(--ink-3);
}

/* 互动率 Top 榜 */
.er-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.er-rank {
  flex: 0 0 46%; min-width: 0; font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2);
}
.er-bar { flex: 1; }
.er-row b { flex: 0 0 52px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--green); }
.avatar {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-2);
  font-size: 12.5px; font-weight: 600;
}
.avatar.lg { width: 38px; height: 38px; flex-basis: 38px; font-size: 14px; border-radius: 11px; }

/* ---------------- 设置 ---------------- */
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line-2);
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .lab b { font-size: 13px; font-weight: 500; display: block; }
.setting-row .lab span { font-size: 11.5px; color: var(--ink-3); }

/* ---------------- 补充：细节组件 ---------------- */
.draft-title {
  flex: 1; min-width: 0; border: 0; background: transparent;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  outline: none; padding: 2px 0; color: var(--ink);
  border-bottom: 1px solid transparent;
}
.draft-title:focus { border-bottom-color: var(--accent); }

.bug-line { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.bug-lab {
  flex: 0 0 34px; font-size: 11px; color: var(--ink-3);
  background: var(--surface-3); height: 19px; border-radius: 5px;
  display: grid; place-items: center; margin-top: 1px;
}
.bug-line.fix .bug-lab { background: var(--green-soft); color: var(--green); }

.qm-input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; background: var(--surface-2); resize: vertical;
  font-size: 14px; line-height: 1.7; outline: none;
}
.qm-input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.qm-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 7px; }

.stat-foot .bar { flex: 1; }

/* ---------------- 首启引导 ---------------- */
.first-run { margin-bottom:14px; }
.first-card {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left;
  padding: 12px 14px; border-radius: 11px; background: var(--surface-2);
  border: 1px solid var(--line-2); cursor: pointer; transition: border-color .15s, transform .15s;
}
.first-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.first-card b { font-size: 13px; color: var(--ink); font-weight: 600; }
.first-card > span:last-child { font-size: 11.5px; color: var(--ink-2); line-height: 1.55; opacity: .85; }
.first-ic {
  width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 2px;
}

/* ---------------- 本周进度 / 备份提醒 ---------------- */
.backup-tip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 9px 14px; border-radius: 10px;
  background: var(--amber-soft); color: var(--amber);
  font-size: 12.5px; line-height: 1.5;
}
.backup-tip > span { display: flex; align-items: center; gap: 6px; }
.backup-tip .link { color: var(--amber); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------------- AI 写作 ---------------- */
.ai-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 14px; align-items: start; }
.ai-list .card-body::-webkit-scrollbar { width: 6px; }
.ai-list .card-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.ai-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: 10px;
  padding: 9px 10px; margin-bottom: 2px; font-family: inherit;
}
.ai-item:hover { background: var(--surface-2); }
.ai-item.on { background: var(--accent-soft); border-color: transparent; }
.ai-item.on .ai-item-title { color: var(--accent); }
.ai-item-title {
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ai-item-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; }

.ai-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.chip-set { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-set .chip {
  font-size: 12px; padding: 4px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  font-family: inherit; transition: all .15s;
}
.chip-set .chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip-set .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg.sm button { padding: 3px 9px; font-size: 11.5px; }

.ai-text {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2); color: var(--ink); font-family: inherit;
  font-size: 13px; line-height: 1.8; resize: vertical; outline: none; transition: border-color .15s;
}
.ai-text:focus { border-color: var(--accent); background: var(--surface); }
.ai-text:read-only { color: var(--ink-2); }
.ai-body { min-height: 320px; font-size: 13.5px; }
.ai-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent); flex: 0 0 auto;
}

/* ---------------- AI 对话 / 记忆 ---------------- */
.ai-chat { max-height: 420px; overflow-y: auto; padding: 2px 2px 4px; }
.ai-chat::-webkit-scrollbar { width: 6px; }
.ai-chat::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.ai-msg { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 10px; }
.ai-msg.me { align-items: flex-end; }
.ai-msg-body {
  max-width: 86%; padding: 9px 12px; border-radius: 12px; background: var(--surface-2);
  border: 1px solid var(--line); font-size: 13px; line-height: 1.8; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
.ai-msg.me .ai-msg-body { background: var(--accent-soft); border-color: transparent; color: var(--ink); }
.ai-msg-ops { display: flex; gap: 6px; margin-top: 5px; opacity: .55; transition: opacity .15s; }
.ai-msg:hover .ai-msg-ops { opacity: 1; }

.mem-bar {
  border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px;
  background: var(--accent-soft); margin-bottom: 12px;
}
.mem-bar-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink); flex-wrap: wrap; }
.mem-item { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 12.5px; color: var(--ink); }
.mem-kind {
  flex: 0 0 auto; font-size: 10.5px; padding: 1px 6px; border-radius: 5px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.mem-text { flex: 1; min-width: 0; line-height: 1.6; word-break: break-word; }

.mem-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.mem-row:last-child { border-bottom: 0; }
.mem-row .mem-kind { margin-top: 2px; }
.mem-row .mem-text { font-size: 12.5px; }
.mem-scope { flex: 0 0 auto; font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: var(--surface-3); color: var(--ink-3); margin-top: 2px; }

/* 设置页里三块指纹的排布 */
.fp-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 0; border-bottom: 1px dashed var(--line);
}
.fp-row:last-child { border-bottom: 0; }
.fp-main { flex: 1; min-width: 0; word-break: break-word; }

/* 记忆在具体功能里的明示条：能点开看见到底注入了什么 */
.mem-hint {
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2);
  padding: 0 11px; margin-top: 8px;
}
.mem-hint > summary {
  cursor: pointer; list-style: none; font-size: 12px; color: var(--ink-2);
  padding: 8px 0; outline: none; line-height: 1.6;
}
.mem-hint > summary::-webkit-details-marker { display: none; }
.mem-hint > summary::before {
  content: '▸'; display: inline-block; margin-right: 6px; color: var(--ink-3);
  transition: transform .15s;
}
.mem-hint[open] > summary::before { transform: rotate(90deg); }
.mem-hint[open] > summary { border-bottom: 1px dashed var(--line); }
.mem-hint > summary b { color: var(--ink); font-weight: 600; }
.mem-pre {
  white-space: pre-wrap; word-break: break-word; font-size: 11.5px; line-height: 1.75;
  color: var(--ink-2); padding: 9px 0 11px; font-family: inherit;
}

/* ---------------- 员工考勤 ---------------- */
.att-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.att-lg { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); }
.att-lg.dim { opacity: .55; }
.att-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

.att-scroll { overflow-x: auto; }
.att-table { font-size: 12px; }
.att-table th, .att-table td { padding: 5px 3px; text-align: center; white-space: nowrap; }
.att-table th.att-d { font-weight: 400; line-height: 1.15; padding-top: 7px; padding-bottom: 7px; }
.att-table th.att-d b { display: block; font-size: 12px; color: var(--ink-2); }
.att-table th.att-d span { display: block; font-size: 10px; color: var(--ink-3); }
.att-name { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 86px; max-width: 120px;
  text-align: left !important; padding-left: 14px !important; }
.att-name b { display: block; }
.att-name .tiny { display: block; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.att-table tr:hover .att-name { background: var(--surface-2); }
.att-sum { min-width: 44px; }
.att-bad { color: var(--accent); }
thead .att-name { background: var(--surface-2); }

.att-cell {
  width: 40px; padding: 4px 0; font-size: 11px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2);
  color: var(--ink-3); cursor: pointer; transition: all .12s;
}
.att-cell:hover { border-color: var(--ink-3); }
.att-s-none { color: var(--ink-3); }
.att-s-green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.att-s-blue { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.att-s-amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.att-s-purple { background: var(--purple-soft); color: var(--purple); border-color: transparent; }
.att-s-red { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.att-s-gray { background: var(--surface-3); color: var(--ink-2); border-color: transparent; }

/* ---------------- 平台账号 ---------------- */
.acc-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.acc-tab {
  padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-family: inherit; font-size: 12.5px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all .15s;
}
.acc-tab b { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.acc-tab:hover { border-color: var(--ink-3); color: var(--ink); }
.acc-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.acc-tab.on b { color: rgba(255, 255, 255, .85); }
.acc-tab.dim { opacity: .6; }
.acc-table { font-size: 12.5px; }
.acc-table td { padding: 8px 10px; }
.pill.sm { font-size: 11px; padding: 2px 9px; }

/* ---------------- 登录窗口 ---------------- */
.app.is-locked { display: none; }

.auth {
  position: fixed; inset: 0; z-index: 400;
  display: grid; grid-template-columns: 1.06fr .94fr;
  background: var(--bg);
  animation: authIn .3s ease-out;
}
.auth.out { animation: authOut .32s ease-in forwards; }
@keyframes authIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes authOut { to { opacity: 0; transform: scale(1.012) } }

/* 左侧：三张轮播图 */
.auth-visual {
  position: relative; overflow: hidden;
  background: #0a1830; color: #f4f6fb;
  user-select: none;
}
.av-slide {
  position: absolute; inset: 0; margin: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity .9s ease;
}
.av-slide.on { opacity: 1; z-index: 1; }
.av-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(118deg, rgba(5,13,30,.78) 6%, rgba(5,13,30,.32) 46%, rgba(5,13,30,.04) 74%);
}
.av-text { position: absolute; left: 52px; top: 62px; z-index: 1; max-width: 400px; }
.av-text h2 {
  margin: 0; font-size: 32px; font-weight: 700; letter-spacing: .01em;
  color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .5);
}
.av-text p {
  margin: 14px 0 0; font-size: 13px; letter-spacing: .05em;
  color: rgba(255, 255, 255, .85); text-shadow: 0 1px 10px rgba(0, 0, 0, .55);
}
.av-slide.on .av-text { animation: avIn .8s .12s both; }
@keyframes avIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.av-dots {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 2;
}
.av-dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px;
  background: rgba(255, 255, 255, .42); cursor: pointer;
  transition: width .3s ease, background .3s ease;
}
.av-dots button:hover { background: rgba(255, 255, 255, .7); }
.av-dots button.on { width: 30px; background: #3b76ff; }

/* 右侧：深蓝登录面板，LOGO 挂右上角 */
.auth-panel {
  position: relative;
  display: grid; place-items: center; padding: 40px 32px;
  background:
    radial-gradient(1100px 560px at 82% -12%, rgba(59, 118, 255, .34), transparent 62%),
    radial-gradient(800px 480px at -12% 110%, rgba(59, 118, 255, .16), transparent 60%),
    linear-gradient(168deg, #0d2044 0%, #0a1830 55%, #081226 100%);
}
.av-top { position: absolute; top: 34px; right: 46px; display: flex; align-items: center; gap: 10px; z-index: 1; }
.av-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }
.av-name { display: flex; flex-direction: column; line-height: 1.2; }
.av-name b { font-size: 15px; letter-spacing: .03em; color: #fff; }
.av-name span { font-size: 9.5px; letter-spacing: .18em; color: rgba(255, 255, 255, .55); margin-top: 3px; }

.auth-card { width: 396px; max-width: 100%; }
.af-hello { margin: 0 0 20px; font-size: 24px; font-weight: 700; letter-spacing: .01em; color: #f2f5fc; }

.auth-tabs {
  display: flex; gap: 4px; padding: 4px;
  background: rgba(255, 255, 255, .08); border-radius: 11px; margin-bottom: 22px;
}
.auth-tabs button {
  flex: 1; padding: 8px 0; border: 0; border-radius: 8px;
  background: transparent; color: rgba(255, 255, 255, .58);
  font-size: 13px; cursor: pointer; transition: all .15s;
}
.auth-tabs button:hover { color: rgba(255, 255, 255, .85); }
.auth-tabs button.on {
  background: rgba(255, 255, 255, .15); color: #fff; font-weight: 500;
}

.auth-form { display: grid; gap: 13px; }
.auth-form[hidden] { display: none; }
.af-row label { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .55); margin-bottom: 6px; letter-spacing: .02em; }
.af-row input {
  width: 100%; padding: 11px 14px;
  border: 1px solid transparent; border-radius: 12px;
  background: #fff; color: #1c2333; font-size: 13.5px; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.af-row input::placeholder { color: #9aa3b5; }
.af-row input:focus {
  border-color: #3b76ff;
  box-shadow: 0 0 0 3px rgba(59, 118, 255, .38);
}
.af-pwd { position: relative; }
.af-pwd input { padding-right: 42px; }
.af-eye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: transparent; color: #8b93a7;
  display: grid; place-items: center; cursor: pointer;
}
.af-eye:hover { background: #eef1f7; color: #39415a; }

.af-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.af-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: rgba(255, 255, 255, .72); cursor: pointer; }
.af-check input { accent-color: #3b76ff; width: 14px; height: 14px; }
.af-mini { font-size: 11px; color: rgba(255, 255, 255, .45); }

.af-err {
  display: none; font-size: 12px; color: #ffb4ad;
  background: rgba(255, 82, 82, .16); border-radius: 8px; padding: 7px 10px;
  line-height: 1.5;
}
.af-err.on { display: block; }
.auth .af-submit {
  width: 100%; height: 42px; justify-content: center; font-size: 14px; letter-spacing: .04em;
  background: #2f6bff; border-color: #2f6bff; color: #fff;
  border-radius: 12px; box-shadow: 0 10px 24px -10px rgba(47, 107, 255, .65);
}
.auth .af-submit:hover { background: #4a7dff; border-color: #4a7dff; }
.auth .af-submit:disabled { opacity: .7; cursor: default; }
.af-note { font-size: 11.5px; color: rgba(255, 255, 255, .45); line-height: 1.7; text-align: center; }
.auth-foot {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 10.5px; color: rgba(255, 255, 255, .4);
}

.auth.shake .auth-card { animation: authShake .36s ease-in-out; }
@keyframes authShake {
  0%, 100% { transform: none; }
  18% { transform: translateX(-8px); }
  38% { transform: translateX(7px); }
  58% { transform: translateX(-5px); }
  78% { transform: translateX(3px); }
}

/* ---------------- 侧边栏用户 ---------------- */
.side-user {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; margin-bottom: 10px;
  border-radius: 9px; border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .05);
  color: var(--side-ink); cursor: pointer; text-align: left;
  transition: background .14s, border-color .14s;
}
.side-user:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .12); }
.su-av {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600;
}
.su-av.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.su-av.off { background: var(--surface-3); color: var(--ink-3); }
.su-tx { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.su-tx b { color: var(--side-ink-hi); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-tx span { font-size: 10px; color: #767268; margin-top: 2px; }
.su-more { margin-left: auto; font-size: 12px; color: #6f6b62; letter-spacing: 1px; }

.me-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 13px; margin-bottom: 4px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px;
}
.me-av {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 17px; font-weight: 600;
}
.me-card b { display: block; font-size: 14px; }
.me-card .tiny { display: block; margin-top: 2px; }

/* ---------------- 账户管理 ---------------- */
.tbl-scroll { overflow-x: auto; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: -.01em; }
.pill.gray { background: var(--surface-3); color: var(--ink-3); }

.st-table { font-size: 12.5px; }
.st-table th { white-space: nowrap; }
.st-table td { padding: 9px 12px; }
.st-no { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.st-person { display: flex; align-items: center; gap: 9px; }
.st-person b { display: block; font-size: 13px; line-height: 1.3; }
.st-person span.tiny { display: block; margin-top: 1px; }
.st-table tr.st-left td { opacity: .55; }
.st-table tr.st-left td:last-child { opacity: 1; }

.apply-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line-2);
}
.apply-row:last-of-type { border-bottom: 0; }
.apply-tx { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.apply-tx b { font-size: 13px; }

/* ---------------- 登录与权限 ---------------- */
.perm-row { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.perm-row:last-of-type { border-bottom: 0; }
.perm-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; flex-wrap: wrap; }
.perm-list { display: flex; flex-wrap: wrap; gap: 5px; }
.log-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 12.5px;
}
.log-row:last-child { border-bottom: 0; }
.log-name { flex: 0 0 auto; min-width: 58px; }
.log-note { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-at { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
code.mono { background: var(--surface-3); padding: 1px 5px; border-radius: 5px; font-size: 11px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .sum-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: 1fr; }
  .script-layout { grid-template-columns: 1fr; }
  .ai-layout { grid-template-columns: 1fr; }
  .memo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .sidebar { width: 64px; flex-basis: 64px; padding: 16px 8px 10px; }
  .brand-tx, .nav-tx, .nav-badge, .side-date span, .side-btn span, .side-meta { display: none; }
  .brand { padding: 0 0 16px; justify-content: center; }
  .nav-item { justify-content: center; padding: 10px 0; }
  .side-date { justify-content: center; }
  .view { padding: 18px 16px 60px; }
  .grid.cols-3, .kanban, .idea-grid { grid-template-columns: 1fr; }
  .memo-grid { grid-template-columns: 1fr; }

  .side-user { justify-content: center; padding: 6px 0; }
  .su-tx, .su-more { display: none; }

  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { padding: 20px; }
  .auth-card { width: 100%; max-width: 380px; padding: 22px 20px 18px; }
}

/* 平台账号表格里的主页链接 */
.acc-home { color: var(--blue); text-decoration: none; border-bottom: 1px dashed currentColor; }
.acc-home:hover { color: var(--blue-deep, var(--blue)); }

/* ---------------- 首页：日历 + 天气 ---------------- */
.wx-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: 14px; margin-bottom: 16px; align-items: stretch;
}
.cal-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-size: 13.5px; }
.cal-wk, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-wk span { font-size: 10px; color: var(--ink-3); padding: 2px 0; }
.cal-d { font-size: 11.5px; line-height: 23px; border-radius: 7px; color: var(--ink-2); }
.cal-d.today { background: var(--accent); color: #fff; font-weight: 600; }
.wx { display: grid; grid-template-columns: minmax(150px, 200px) minmax(0, 1fr); gap: 12px; height: 100%; }
.wx-now {
  background: linear-gradient(160deg, #5b5bd6 0%, #7d6df0 55%, #9c8cf5 100%);
  border-radius: 14px; color: #fff; padding: 13px 15px;
  display: flex; flex-direction: column;
}
.wx-city {
  border: 0; background: rgba(255, 255, 255, .18); color: #fff;
  border-radius: 99px; padding: 3px 10px; font-size: 11.5px;
  cursor: pointer; align-self: flex-start; transition: background .15s;
}
.wx-city:hover { background: rgba(255, 255, 255, .32); }
.wx-main { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.wx-emoji { font-size: 30px; line-height: 1; }
.wx-temp { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.wx-desc { font-size: 11px; opacity: .88; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; height: 100%; }
.wx-day {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 4px;
}
.wx-day span { font-size: 11px; color: var(--ink-3); }
.wx-day i { font-style: normal; font-size: 22px; line-height: 1; }
.wx-day b { font-size: 11.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.wx-loading { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 150px; height: 100%; font-size: 12px; color: var(--ink-3); flex-wrap: wrap; padding: 0 14px; text-align: center; }
@media (max-width: 900px) {
  .wx-row { grid-template-columns: 1fr; }
  .wx { grid-template-columns: 1fr; }
}
.wx-card { display: flex; flex-direction: column; }
.wx-card .card-body { flex: 1; display: flex; }
.wx-card .wx { flex: 1; }

/* ---------------- 首页双栏（计划 + 快速备忘） ---------------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } }

/* 手机/平板：按钮加高到好点的触控尺寸 */
@media (max-width: 900px) {
  .btn { min-height: 34px; }
  .btn.sm { min-height: 34px; }
}

/* ---------------- 绩效评定弹窗 ---------------- */
.perf-cat { margin-bottom: 12px; }
.perf-cat-name {
  font-size: 12.5px; font-weight: 620; color: var(--ink-2);
  padding: 7px 10px; border-radius: 8px;
  background: var(--surface-2); margin-bottom: 4px;
}
.perf-ind {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 7px 4px 7px 10px; border-bottom: 1px dashed var(--line-2);
}
.perf-ind:last-child { border-bottom: 0; }
.perf-ind-info { flex: 1; min-width: 0; }
.perf-ind-info b { font-size: 12.5px; font-weight: 560; display: block; }
.perf-ind-info span { display: block; margin-top: 2px; line-height: 1.5; }
.perf-ind-score { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.perf-ind-score input {
  width: 64px; padding: 5px 8px; text-align: right;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); outline: none; font-size: 13px;
}
.perf-ind-score input:focus { border-color: var(--accent); }

/* ---------------- 数据监控 ---------------- */.duo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .duo-grid { grid-template-columns: 1fr; } }
.mon-row {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 10px; align-items: center; padding: 7px 0;
}
.mon-row + .mon-row { border-top: 1px dashed var(--line-2); }
.mon-name { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-bar { min-width: 0; }
.mon-val { text-align: right; display: flex; flex-direction: column; line-height: 1.35; }
.mon-val b { font-size: 12.5px; }
.mon-val i { font-style: normal; }
.stat.tone-red .chip { background: var(--accent-soft); color: var(--accent); }

/* ============================================================
   蓝色企业后台 · 组件级覆盖层
   参照《UI风格规范.md》：白底浅灰 + 单一品牌蓝 + 8px 圆角
   只改视觉，不动任何布局结构与交互逻辑
   ============================================================ */

/* ---------- 1. 侧栏：白底 + 实心蓝选中块 ---------- */
.sidebar {
  background: var(--side-bg);
  border-right: 1px solid var(--line-2);
  padding: 18px 12px 12px;
}
.brand { padding: 0 8px 18px; }
.brand-mark {
  border-radius: 8px;
  box-shadow: 0 6px 14px -6px rgba(47, 92, 246, .55);
}
.brand-tx b { color: var(--ink); font-weight: 600; }
.brand-tx span { color: var(--ink-3); letter-spacing: .12em; }

.nav-item {
  height: 40px; padding: 0 12px; gap: 10px;
  border-radius: 6px; color: var(--ink-2); font-size: 13.5px;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 16px -8px rgba(47, 92, 246, .75);
}
.nav-item.active::before { display: none; }
.nav-ic { color: var(--ink-3); opacity: 1; }
.nav-item:hover .nav-ic { color: var(--ink-2); }
.nav-item.active .nav-ic { color: #fff; }
.nav-badge {
  border-radius: 9px; background: var(--accent-soft); color: var(--accent);
  font-weight: 600;
}
.nav-item.active .nav-badge { background: rgba(255, 255, 255, .26); color: #fff; }

.side-foot { border-top: 1px solid var(--line-2); }
.side-date b { color: var(--ink); font-size: 18px; font-weight: 650; }
.side-date span { color: var(--ink-3); }
.side-btn {
  border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2);
}
.side-btn:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }
.side-meta { color: var(--ink-3); }

.side-user {
  border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--ink-2);
}
.side-user:hover { background: var(--accent-soft); border-color: transparent; }
.su-av { border-radius: 6px; }
.su-tx b { color: var(--ink); font-weight: 600; }
.su-tx span { color: var(--ink-3); }
.su-more { color: var(--ink-3); }

/* ---------- 2. 主内容区 ---------- */
.main { background: var(--bg); }
.view { padding: 20px 24px 64px; }
.page-head { align-items: center; margin-bottom: 16px; }
.page-head h1 { font-size: 20px; font-weight: 600; letter-spacing: 0; }
.page-sub { font-size: 12.5px; margin-top: 3px; }
.hero { padding: 0 2px 16px; }
.hero h1 { font-size: 24px; font-weight: 650; }
.hero-greet, .hero-sub { font-size: 12.5px; }

/* ---------- 3. 卡片 ---------- */
.card {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(29, 33, 41, .04);
}
.card-head { padding: 15px 20px 13px; }
.card-head h2, .card-head h3 {
  font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--ink); gap: 6px;
}
.card-head h2::before, .card-head h3::before {
  content: ""; width: 3px; height: 12px; border-radius: 2px;
  background: var(--accent); flex: 0 0 3px;
}
.card-head h2 .ic, .card-head h3 .ic { display: none; }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 12px 16px; }
.card-foot { padding: 12px 20px; background: var(--surface-2); }

/* ---------- 4. 按钮 / 标签 ---------- */
.btn {
  height: 32px; padding: 0 15px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font-size: 13px; font-weight: 400;
}
.btn:hover { background: var(--surface-2); border-color: #c9cdd4; color: var(--ink); }
.btn.primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 2px 6px -2px rgba(47, 92, 246, .45);
}
.btn.primary:hover {
  background: var(--accent-deep); border-color: var(--accent-deep);
  color: #fff; filter: none;
}
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.danger:hover { background: #d9271f; border-color: #d9271f; }
.btn.sm { height: 28px; padding: 0 11px; border-radius: 4px; font-size: 12px; }
.btn.xs { height: 24px; padding: 0 8px; border-radius: 4px; font-size: 11.5px; }

.icon-btn { border-radius: 6px; color: var(--ink-3); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.sm { border-radius: 4px; }
.link { color: var(--accent); }
.link:hover { text-decoration: none; opacity: .82; }

.pill { border-radius: 4px; height: 22px; padding: 0 8px; font-size: 12px; font-weight: 500; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.line { background: transparent; border: 1px solid var(--line); color: var(--ink-3); }
.pill.sm { font-size: 11.5px; padding: 0 7px; height: 20px; }

/* ---------- 5. 表格 ---------- */
.table:not(.att-table):not(.st-table):not(.acc-table) th {
  background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 500;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.table:not(.att-table):not(.st-table):not(.acc-table) td {
  padding: 13px 14px; font-size: 13px; border-bottom: 1px solid var(--line-2);
}
.table tr:hover td { background: var(--surface-2); }
.table .r { text-align: right; }
.ct-ops { opacity: .45; }
.ct-settle { border-radius: 4px; }
.ct-author { border-radius: 4px; }

/* ---------- 6. 表单 ---------- */
.field-label { font-size: 13px; color: var(--ink-2); font-weight: 400; }
.field-label em { color: var(--red); }
.field input, .field select, .field textarea {
  border-radius: 4px; background: var(--surface-2); border-color: var(--line);
  padding: 8px 11px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  background: var(--surface); border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.memo-box input, .qm-input, .ai-text, .script-editor textarea {
  border-radius: 4px; background: var(--surface-2);
}
.memo-box input:focus, .qm-input:focus, .ai-text:focus, .script-editor textarea:focus {
  background: var(--surface); border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.ct-input, .ct-sel { border-radius: 4px; background: var(--surface-2); }
.ct-input:focus { border-color: var(--accent); }
.perf-ind-score input { border-radius: 4px; background: var(--surface-2); }

.switch input:checked + i { background: var(--accent); }
.check { border-radius: 3px; border-color: #c9cdd4; }
.check:hover { border-color: var(--accent); }
.check.on { background: var(--accent); border-color: var(--accent); }

.seg { border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); }
.seg button { border-radius: 5px; }
.seg button.on { background: var(--surface); color: var(--accent); font-weight: 500; }

/* ---------- 7. 弹窗 ---------- */
.modal-mask { background: rgba(29, 33, 41, .45); backdrop-filter: none; }
.modal {
  border-radius: 8px; border: 0;
  box-shadow: 0 12px 40px -8px rgba(29, 33, 41, .28);
}
.modal-head { padding: 18px 20px 14px; }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-head .icon-btn { top: 14px; right: 14px; }
.modal-body { padding: 20px; }
.modal-foot { background: var(--surface); padding: 12px 20px; }
.confirm-text { font-size: 13px; }

/* ---------- 8. Toast ---------- */
.toast {
  border-radius: 8px; background: #1d2129; color: #fff;
  box-shadow: 0 8px 24px rgba(29, 33, 41, .22);
}
.toast-error { background: var(--red); }
[data-theme="dark"] .toast { background: #2a3039; }

/* ---------- 9. 统计卡：六色渐变白字 ---------- */
.stat {
  border: 1px solid var(--line-2); border-radius: 8px; padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(29, 33, 41, .04);
}
.stat.tone-accent { background: linear-gradient(135deg, #4a7df7, #6fa1ff); border-color: transparent; }
.stat.tone-blue   { background: linear-gradient(135deg, #38b0f8, #6fcbfb); border-color: transparent; }
.stat.tone-green  { background: linear-gradient(135deg, #34c38f, #6adfb5); border-color: transparent; }
.stat.tone-amber  { background: linear-gradient(135deg, #ff9e3d, #ffbe7a); border-color: transparent; }
.stat.tone-purple { background: linear-gradient(135deg, #7c5cfc, #a08bff); border-color: transparent; }
.stat.tone-red    { background: linear-gradient(135deg, #ef5350, #ff7b6f); border-color: transparent; }
.stat[class*="tone-"] { color: #fff; }
.stat[class*="tone-"] .stat-label,
.stat[class*="tone-"] .stat-val em,
.stat[class*="tone-"] .stat-foot { color: rgba(255, 255, 255, .86); }
.stat[class*="tone-"] .stat-val { font-weight: 700; }
.stat[class*="tone-"] .chip {
  background: rgba(255, 255, 255, .24); color: #fff;
}
.stat[class*="tone-"] .stat-foot .bar { background: rgba(255, 255, 255, .3); }
.stat[class*="tone-"] .stat-foot .bar > i { background: #fff; }

/* ---------- 10. 首页摘要卡 ---------- */
.sum-card { border-radius: 8px; border-color: var(--line-2); box-shadow: 0 1px 2px rgba(29, 33, 41, .04); }
.sum-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 10px 24px -14px rgba(47, 92, 246, .55);
}
.sum-ic { border-radius: 6px; }
.sum-main b { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.sum-name { color: var(--ink-2); }

/* ---------- 11. 其它组件对齐 ---------- */
.bar { background: var(--track); }
.avatar { border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.avatar.lg { border-radius: 8px; }
.me-card { border-radius: 8px; background: var(--surface-2); }
.me-av { border-radius: 8px; }
.tl-card, .kcard, .kcol, .memo-card, .idea-card, .client-card, .routine-card, .first-card { border-radius: 8px; }
.tl-card.p1 { border-left-color: var(--accent); }
.tl-item.p1 .tl-dot { border-color: var(--accent); }
.hook-box { border-color: rgba(47, 92, 246, .18); }
.cover-wrap { border-radius: 8px; background: var(--surface-2); }
.file-chip { border-radius: 4px; background: var(--surface-2); }
.img-box { border-radius: 6px; background: var(--surface-2); }
.perf-cat-name { border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.att-cell { border-radius: 4px; }
.att-bad { color: var(--red); }
.acc-tab { border-radius: 6px; }
.acc-tab.on { background: var(--accent); border-color: var(--accent); }
.chip-set .chip { border-radius: 999px; }
.chip-set .chip.on { background: var(--accent); border-color: var(--accent); }
.ai-item.on { background: var(--accent-soft); }
.ai-badge { color: var(--accent); background: var(--accent-soft); border-radius: 6px; }
.bug-lab { border-radius: 4px; }
.kcol-head span { border-radius: 4px; }
.wx-now { background: linear-gradient(160deg, #3d6df2 0%, #5b8cff 55%, #7cabff 100%); border-radius: 8px; }
.wx-day { border-radius: 8px; background: var(--surface-2); }
.cal-d.today { background: var(--accent); }
.ct-toolbar { border-bottom-color: var(--line); }
.today-row, .title-row, .ai-item { border-radius: 6px; }
.first-ic { border-radius: 6px; }
.prio-1 { background: var(--accent); }

/* ---------- 12. 登录页：深色 → 浅色蓝 ---------- */
.auth-panel {
  background:
    radial-gradient(900px 480px at 88% -10%, rgba(47, 92, 246, .12), transparent 62%),
    linear-gradient(170deg, #f7f9ff 0%, #eef2ff 58%, #e7edff 100%);
}
.av-name b { color: var(--ink); }
.av-name span { color: var(--ink-3); }
.av-logo { box-shadow: 0 4px 12px rgba(47, 92, 246, .25); }
.auth-card {
  background: var(--surface); border-radius: 12px; padding: 30px 28px;
  box-shadow: 0 12px 40px -18px rgba(29, 33, 41, .22);
  border: 1px solid rgba(255, 255, 255, .8);
}
.af-hello { color: var(--ink); font-size: 22px; margin-bottom: 18px; }
.auth-tabs { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 3px; }
.auth-tabs button { border-radius: 6px; color: var(--ink-3); font-size: 13px; }
.auth-tabs button:hover { color: var(--ink-2); }
.auth-tabs button.on { background: var(--accent); color: #fff; box-shadow: 0 4px 12px -6px rgba(47, 92, 246, .8); }
.af-row label { color: var(--ink-2); font-size: 12.5px; }
.af-row input {
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px; padding: 10px 13px;
}
.af-row input::placeholder { color: var(--ink-3); }
.af-row input:focus {
  background: var(--surface); border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.af-eye { color: var(--ink-3); border-radius: 4px; }
.af-eye:hover { background: var(--surface-3); color: var(--ink-2); }
.af-check { color: var(--ink-2); }
.af-check input { accent-color: var(--accent); }
.af-mini { color: var(--ink-3); }
.auth .af-submit {
  background: var(--accent); border-color: var(--accent); border-radius: 4px;
  height: 42px; font-size: 14px; letter-spacing: .04em;
  box-shadow: 0 10px 22px -12px rgba(47, 92, 246, .85);
}
.auth .af-submit:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.af-err { color: var(--red); background: var(--red-soft); border-radius: 4px; }
.af-note { color: var(--ink-3); }
.auth-foot { border-top-color: var(--line-2); color: var(--ink-3); }
.av-dots button { background: rgba(255, 255, 255, .5); }
.av-dots button.on { background: #fff; }

/* ---------- 13. 深色主题下的微调 ---------- */
[data-theme="dark"] .sidebar { border-right-color: var(--line); }
[data-theme="dark"] .auth-panel {
  background:
    radial-gradient(900px 480px at 88% -10%, rgba(74, 125, 255, .18), transparent 62%),
    linear-gradient(170deg, #0f1219 0%, #12161f 60%, #141922 100%);
}
[data-theme="dark"] .auth-card { background: var(--surface); border-color: var(--line); }
[data-theme="dark"] .stat:not([class*="tone-"]) { background: var(--surface); }

/* 天气卡：空气质量小胶囊 + 城市行布局 */
.wx-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wx-aqi {
  flex: 0 0 auto; font-size: 11px; line-height: 1; padding: 4px 8px;
  border-radius: 999px; color: #fff; font-weight: 500;
}
.wx-aqi.a1 { background: rgba(52, 195, 143, .85); }
.wx-aqi.a2 { background: rgba(255, 178, 61, .85); }
.wx-aqi.a3 { background: rgba(245, 87, 62, .8); }
.wx-aqi.a4 { background: rgba(178, 45, 38, .85); }

/* 弹窗标题栏：标题与说明纵向堆叠，右侧给关闭钮留位，避免文字顶到 X 底下 */
.modal-head .modal-title { flex: 1; min-width: 0; padding-right: 30px; }
.modal-head .modal-title p { margin-top: 3px; }
