/* ============================================================
   成长日记 · 设计系统 v2
   主色: #2FBF9B 青绿  警示: #FF8A65 珊瑚橙  深色: #121417
   风格: 清新、温暖、精致（柔和渐变 + 焦糖色点缀 + 双层次阴影）
   ============================================================ */

:root {
  --primary: #7C9C8E;         /* 雾绿 · 柔和灰绿 */
  --primary-600: #668572;
  --primary-700: #526D5E;
  --primary-grad: linear-gradient(135deg, #93B6A5, #6E9889);
  --primary-soft: rgba(124, 156, 142, .16);
  --primary-softer: rgba(124, 156, 142, .09);
  --warning: #C99A7B;          /* 陶土 · 低饱和暖棕 */
  --warning-600: #B9855F;
  --warning-grad: linear-gradient(135deg, #D6A98C, #BC8760);
  --warning-soft: rgba(201, 154, 123, .16);
  --blue: #8CA3BB;
  --blue-soft: rgba(140, 163, 187, .16);
  --yellow: #C7A96A;
  --yellow-soft: rgba(199, 169, 106, .18);
  --violet: #A79BC0;
  --violet-soft: rgba(167, 155, 192, .18);
  --rose: #C49AA5;
  --rose-soft: rgba(196, 154, 165, .16);

  --bg: #F7F6F2;               /* 暖调米白 */
  --bg-2: #EFEEE8;
  --card: #FFFFFF;
  --card-2: #FCFBF8;
  --card-edge: rgba(60, 60, 50, .06);
  --text: #33393B;
  --text-2: #7D838A;
  --text-3: #A6ACB2;
  --line: #E8E6DF;
  --shadow: 0 1px 2px rgba(40,40,30,.04), 0 4px 14px rgba(40,40,30,.04);
  --shadow-s: 0 1px 2px rgba(40,40,30,.05), 0 2px 8px rgba(40,40,30,.03);
  --shadow-2: 0 8px 30px rgba(40,40,30,.10);

  --radius: 18px;
  --radius-sm: 13px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

html[data-theme="dark"] {
  --bg: #141618;
  --bg-2: #181B1D;
  --card: #1D2023;
  --card-2: #23262A;
  --card-edge: rgba(255,255,255,.06);
  --text: #E6E8E6;
  --text-2: #A8AEB2;
  --text-3: #71787E;
  --line: #292C2F;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.35);
  --shadow-s: 0 1px 2px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3);
  --shadow-2: 0 10px 34px rgba(0,0,0,.55);
  --primary-grad: linear-gradient(135deg, #8FB4A4, #6E9889);
  --warning-grad: linear-gradient(135deg, #D9A98A, #BC8760);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  background-image: radial-gradient(1200px 500px at 50% -10%, var(--primary-softer), transparent 60%);
  background-attachment: fixed;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100%;
  position: relative;
  background: var(--bg);
  box-shadow: 0 0 60px rgba(30,60,50,.06);
}

/* ---------- 顶部栏 ---------- */
#topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 10px;
}
#topbar .brand { display: flex; align-items: center; gap: 10px; }
#topbar .brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--primary-grad); color: #fff;
  display: grid; place-items: center; font-size: 19px;
  box-shadow: 0 4px 12px rgba(110, 152, 137,.35);
}
#topbar .title { font-size: 17px; font-weight: 800; letter-spacing: .3px; line-height: 1.1; }
#topbar .sub { font-size: 12px; color: var(--text-2); font-weight: 500; margin-top: 1px; }
#topbar .actions { display: flex; gap: 6px; }
.topbar-btn {
  height: 38px; min-width: 38px; padding: 0 10px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card);
  color: var(--text); display: grid; place-items: center;
  font-size: 16px; cursor: pointer; box-shadow: var(--shadow-s);
  transition: .15s;
}
.topbar-btn:active { transform: scale(.94); }

/* ---------- 主内容 ---------- */
#main { padding: 14px 16px 96px; overflow-x: hidden; }
.screen { display: none; }
.screen.active { display: block; animation: fadein .28s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 子屏幕（全屏覆盖） */
#subscreen {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
  background-image: radial-gradient(900px 400px at 50% -8%, var(--primary-softer), transparent 55%);
  max-width: 520px; margin: 0 auto;
  display: none; overflow-y: auto;
  padding: 0 16px 96px;
}
#subscreen.active { display: block; animation: slidein .26s cubic-bezier(.2,.8,.2,1); }
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

.sub-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; margin: 0 -16px; padding-left: 8px; padding-right: 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.sub-header h2 { font-size: 18px; font-weight: 800; margin: 0; flex: 1; letter-spacing: .3px; }
.back-btn {
  width: 40px; height: 40px; border-radius: 13px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 18px; cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow-s);
}
.back-btn:active { transform: scale(.92); }

/* ---------- 底部导航 ---------- */
#bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: center;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  padding-bottom: var(--safe-b);
}
#bottomnav .nav-wrap { max-width: 520px; width: 100%; display: flex; justify-content: space-around; height: var(--nav-h); }
.nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; border: none; background: none;
  color: var(--text-3); font-size: 11px; cursor: pointer; font-weight: 600;
  position: relative; transition: .2s;
}
.nav-btn .ico { font-size: 22px; line-height: 1; transition: transform .2s; filter: grayscale(.3); }
.nav-btn.active { color: var(--primary); }
.nav-btn.active .ico { transform: translateY(-1px); filter: none; }
.nav-btn.active::after {
  content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 3px; border-radius: 3px; background: var(--primary);
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .12s;
}
.card-title {
  font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title .hint { font-size: 12px; color: var(--text-3); font-weight: 500; }
.card-title .badge {
  font-size: 12px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); padding: 2px 9px; border-radius: 20px;
}

/* 首页头部问候 */
.hero {
  background: var(--primary-grad); color: #fff; border-radius: var(--radius);
  padding: 18px 16px; margin-bottom: 14px; position: relative; overflow: hidden;
  box-shadow: 0 10px 24px rgba(110, 152, 137,.28);
}
.hero::after {
  content: ""; position: absolute; right: -30px; top: -40px; width: 150px; height: 150px;
  background: rgba(255,255,255,.16); border-radius: 50%;
}
.hero .h-quote-mark {
  position: absolute; right: 16px; bottom: 4px; font-size: 72px; line-height: 1;
  color: rgba(255,255,255,.22); font-family: Georgia, serif;
}
.hero .h-label { font-size: 12px; font-weight: 700; opacity: .9; letter-spacing: .5px; }
.hero .h-quote { font-size: 17px; font-weight: 700; line-height: 1.6; margin-top: 6px; position: relative; z-index: 1; }
.hero .h-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.hero .h-date {
  font-size: 12px; font-weight: 600; background: rgba(255,255,255,.2);
  padding: 5px 12px; border-radius: 20px;
}
.hero .h-star {
  border: none; background: rgba(255,255,255,.2); color: #fff; width: 34px; height: 34px;
  border-radius: 50%; font-size: 16px; cursor: pointer; display: grid; place-items: center;
  transition: .15s;
}
.hero .h-star.fav { color: var(--yellow); background: rgba(255,255,255,.32); }
.hero .h-star:active { transform: scale(.9); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700;
  padding: 12px 16px; cursor: pointer; transition: .15s; font-family: inherit;
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--primary-grad); color: #fff; box-shadow: 0 6px 16px rgba(110, 152, 137,.3); }
.btn-primary:active { box-shadow: 0 3px 8px rgba(110, 152, 137,.3); }
.btn-warn { background: var(--warning-grad); color: #fff; box-shadow: 0 6px 16px rgba(185, 133, 95,.28); }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.btn-soft { background: var(--primary-soft); color: var(--primary-700); }
.btn-danger-soft { background: var(--warning-soft); color: var(--warning-600); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 11px; }
.btn-round { width: 52px; height: 52px; padding: 0; border-radius: 50%; font-size: 24px; }
.btn:disabled { opacity: .5; }

/* ---------- 快捷操作网格 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--card-edge);
  border-radius: 16px; padding: 12px 4px; cursor: pointer; box-shadow: var(--shadow-s);
  transition: transform .15s, box-shadow .15s;
}
.quick-item .qic {
  width: 42px; height: 42px; border-radius: 14px; background: var(--primary-soft);
  display: grid; place-items: center; font-size: 20px;
}
.quick-item span { font-size: 12px; color: var(--text-2); font-weight: 600; }
.quick-item:active { transform: scale(.94); }

/* ---------- 状态卡网格 ---------- */
.status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.status-card {
  background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius-sm);
  padding: 14px; cursor: pointer; box-shadow: var(--shadow-s);
  transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden;
}
.status-card:active { transform: scale(.97); }
.status-card .s-ico {
  width: 40px; height: 40px; border-radius: 13px; background: var(--primary-softer);
  display: grid; place-items: center; font-size: 20px; margin-bottom: 10px;
}
.status-card .s-name { font-size: 12px; color: var(--text-2); font-weight: 600; }
.status-card .s-val { font-size: 14px; font-weight: 700; margin-top: 3px; color: var(--text); }
.status-card.warn .s-val { color: var(--warning-600); }
.status-card.done .s-val { color: var(--primary-600); }
.status-card.done .s-ico { background: var(--primary-soft); }
.status-card.warn .s-ico { background: var(--warning-soft); }
.status-card::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--line); border-radius: 4px;
}
.status-card.done::after { background: var(--primary-grad); }
.status-card.warn::after { background: var(--warning-grad); }

/* ---------- 负荷条 / 进度条 ---------- */
.bar-track { height: 14px; border-radius: 9px; background: var(--line); overflow: hidden; position: relative; }
.bar-track::after {
  content: ""; position: absolute; inset: 0; border-radius: 9px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.12) 0 6px, transparent 6px 12px);
  opacity: .5; pointer-events: none;
}
.bar-fill { height: 100%; border-radius: 9px; background: var(--primary-grad); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.bar-fill.warn { background: var(--warning-grad); }
.bar-track.thin { height: 9px; }
.bar-track.thin::after { background: none; }
.bar-label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.bar-label b { color: var(--text); font-size: 13px; }

/* ---------- 表单 ---------- */
.label { font-size: 12px; color: var(--text-2); font-weight: 700; margin: 12px 0 6px; display: block; letter-spacing: .2px; }
.input, textarea.input, select.input {
  width: 100%; padding: 12px 13px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--card); color: var(--text);
  font-size: 15px; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.input { resize: vertical; min-height: 70px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip {
  padding: 8px 14px; border-radius: 22px; background: var(--card);
  border: 1.5px solid var(--line); color: var(--text-2); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: .15s; user-select: none;
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 10px rgba(110, 152, 137,.28); }

.seg { display: flex; background: var(--line); border-radius: 13px; padding: 4px; gap: 4px; }
.seg button {
  flex: 1; border: none; background: transparent; padding: 9px; border-radius: 10px;
  font-size: 13px; font-weight: 700; color: var(--text-2); cursor: pointer; transition: .15s;
}
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow-s); }

/* ---------- 开关 ---------- */
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--line); border-radius: 28px; transition: .2s; cursor: pointer; }
.switch .slider:before {
  content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 2px 5px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* ---------- 列表项 ---------- */
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-size: 15px; font-weight: 600; }
.list-item .li-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.list-item.done .li-title { text-decoration: line-through; color: var(--text-3); }

.check {
  width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--line);
  display: grid; place-items: center; cursor: pointer; color: transparent; flex: none;
  font-size: 14px; transition: .18s;
}
.check.on { background: var(--primary-grad); border-color: var(--primary); color: #fff; box-shadow: 0 3px 8px rgba(110, 152, 137,.3); }

.icon-btn {
  width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); color: var(--text-2); cursor: pointer; font-size: 15px;
  display: grid; place-items: center; flex: none; transition: .15s; box-shadow: var(--shadow-s);
}
.icon-btn:active { transform: scale(.9); }
.icon-btn.danger:hover { color: var(--warning-600); border-color: var(--warning); }

.tag {
  display: inline-block; padding: 3px 9px; border-radius: 9px; font-size: 11px;
  background: var(--primary-soft); color: var(--primary-600); margin-right: 4px; font-weight: 700;
}
.tag.warn-tag { background: var(--warning-soft); color: var(--warning-600); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: var(--text-3); padding: 36px 16px; font-size: 14px; }
.empty .big {
  width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--card-edge); box-shadow: var(--shadow-s);
  display: grid; place-items: center; font-size: 30px; line-height: 1;
}

/* ---------- 模态 ---------- */
#modal {
  position: fixed; inset: 0; z-index: 80; display: none;
  align-items: flex-end; justify-content: center;
  background: rgba(10,15,20,.45); backdrop-filter: blur(2px);
}
#modal.active { display: flex; }
.sheet {
  background: var(--card); width: 100%; max-width: 520px; border-radius: 24px 24px 0 0;
  padding: 22px 18px calc(20px + var(--safe-b)); max-height: 90vh; overflow-y: auto;
  animation: sheetup .28s ease; box-shadow: 0 -10px 40px rgba(0,0,0,.2);
}
@keyframes sheetup { from { transform: translateY(48px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.sheet .sheet-sub { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }
.modal-close { float: right; }

/* 居中模态 */
.dialog {
  position: fixed; inset: 0; z-index: 90; display: none;
  align-items: center; justify-content: center; background: rgba(10,15,20,.5);
  padding: 24px; backdrop-filter: blur(2px);
}
.dialog.active { display: flex; }
.dialog .box {
  background: var(--card); border-radius: 20px; max-width: 340px; width: 100%;
  padding: 22px; text-align: center; box-shadow: var(--shadow-2);
}
.dialog .box h3 { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.dialog .box p { color: var(--text-2); font-size: 14px; margin: 0 0 16px; line-height: 1.6; }
.dialog .box .row { display: flex; gap: 10px; }

/* ---------- 图表 ---------- */
.chart-bars { display: flex; align-items: flex-end; gap: 7px; height: 124px; padding-top: 8px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.chart-col .bar { width: 100%; border-radius: 7px 7px 0 0; background: var(--primary-grad); min-height: 4px; transition: height .3s; }
.chart-col .bar.warn { background: var(--warning-grad); }
.chart-col .bar.blue { background: linear-gradient(180deg, #A6B9CC, #7E96AD); }
.chart-col .lbl { font-size: 11px; color: var(--text-3); }
.chart-col .val { font-size: 11px; color: var(--text-2); font-weight: 700; }

/* 热力图 */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 6px; background: var(--line);
  display: grid; place-items: center; font-size: 12px; color: var(--text-2); cursor: pointer;
  position: relative; transition: transform .1s;
}
.cal-cell:active { transform: scale(.92); }
.cal-cell.l0 { background: var(--line); color: var(--text-3); }
.cal-cell.l1 { background: rgba(124,156,142,.3); color: #4b665c; }
.cal-cell.l2 { background: rgba(124,156,142,.55); color: #40544c; }
.cal-cell.l3 { background: var(--primary); color: #fff; }
.cal-cell.l4 { background: var(--primary-700); color: #fff; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--warning); }
.cal-head { font-size: 11px; color: var(--text-3); text-align: center; font-weight: 600; }

/* 挑战格子 */
.ch-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.ch-cell {
  aspect-ratio: 1; border-radius: 7px; background: var(--line);
  display: grid; place-items: center; font-size: 12px; cursor: pointer; color: var(--text-3);
  transition: transform .1s;
}
.ch-cell:active { transform: scale(.9); }
.ch-cell.on { background: var(--primary-grad); color: #fff; }

/* 分段 / 筛选 */
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.filter-row .chip { flex: none; }

/* 番茄钟 */
.pomo-ring { display: grid; place-items: center; }
#pomo-time { font-size: 68px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 2px; color: var(--text); }
.pomo-phase { font-size: 14px; color: var(--text-2); font-weight: 700; margin-top: 6px; }
.pomo-round { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.pomo-controls { display: flex; gap: 12px; justify-content: center; margin-top: 26px; }
.pomo-controls .btn { min-width: 104px; }
.pomo-stats { display: flex; gap: 10px; margin-top: 26px; }
.pomo-stats .stat {
  flex: 1; background: var(--card); border: 1px solid var(--card-edge); border-radius: 16px;
  padding: 16px; text-align: center; box-shadow: var(--shadow-s);
}
.pomo-stats .stat .n { font-size: 24px; font-weight: 800; color: var(--primary); }
.pomo-stats .stat .t { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* 格言（旧版保留，主页已用 hero） */
.quote-banner {
  background: linear-gradient(135deg, var(--primary-soft), var(--warning-soft));
  border-radius: var(--radius); padding: 18px 16px; margin-bottom: 14px; position: relative;
}
.quote-banner .q { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.6; }
.quote-banner .qa { font-size: 12px; color: var(--text-2); margin-top: 8px; }
.quote-banner .qstar { position: absolute; top: 12px; right: 12px; font-size: 20px; cursor: pointer; border: none; background: none; }
.quote-banner .qstar.fav { color: var(--yellow); }

/* 汇总块 */
.sum-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sum-box {
  text-align: center; background: var(--card); border-radius: var(--radius-sm);
  padding: 14px 6px; border: 1px solid var(--card-edge); box-shadow: var(--shadow-s);
}
.sum-box .n { font-size: 20px; font-weight: 800; }
.sum-box .t { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.sum-box.green .n { color: var(--primary-600); }
.sum-box.orange .n { color: var(--warning-600); }
.sum-box.blue .n { color: var(--blue); }

.section-h {
  font-size: 13px; font-weight: 800; color: var(--text-2);
  margin: 20px 0 10px; letter-spacing: .3px; display: flex; align-items: center; gap: 8px;
}
.section-h::before { content: ""; width: 4px; height: 16px; background: var(--primary-grad); border-radius: 4px; }

.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* 数据中心模块入口 */
.mod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mod-card {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--card-edge); border-radius: var(--radius-sm); padding: 15px;
  cursor: pointer; box-shadow: var(--shadow-s); transition: transform .15s, box-shadow .15s;
}
.mod-card:active { transform: scale(.97); }
.mod-card .m-ico {
  width: 42px; height: 42px; border-radius: 13px; background: var(--primary-soft);
  display: grid; place-items: center; font-size: 21px; flex: none;
}
.mod-card .m-name { font-size: 14px; font-weight: 700; }
.mod-card .m-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.mod-card .m-arrow { color: var(--text-3); font-size: 16px; }

/* 原子工具 */
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.text2 { color: var(--text-2); } .text3 { color: var(--text-3); } .sm { font-size: 12px; }
.bold { font-weight: 700; } .center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; }
.warn-text { color: var(--warning-600); }

::-webkit-scrollbar { width: 0; height: 0; }

.toast {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-b) + 18px); left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: color-mix(in srgb, var(--text) 92%, #000); color: #fff;
  padding: 11px 20px; border-radius: 24px; z-index: 200; font-size: 14px; opacity: 0;
  transition: .25s; pointer-events: none; box-shadow: var(--shadow-2);
  max-width: 86vw; text-align: center; font-weight: 600;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.module-close { color: var(--text-3); }

@media (hover: hover) {
  .status-card:hover, .mod-card:hover, .quick-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
}

@media (min-width: 560px) {
  #main, #subscreen { padding-left: 20px; padding-right: 20px; }
}
