/* =================================================================
   主题切换面板 + 工作台首页 + 暗黑外观
   配合 assets/theme.js 与 assets/views/workbench.js
   ================================================================= */

/* ---------- 1. 主题选择面板 ---------- */
.thm-mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(3px); z-index: 12000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.thm-pop { width: 660px; max-width: 100%; max-height: 86vh; overflow: auto; background: var(--card); border-radius: var(--r-2xl); box-shadow: var(--shadow-2xl); border: 1px solid var(--line); }
.thm-hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; }
.thm-hd strong { font-size: 16px; color: var(--txt); }
.thm-x { width: 30px; height: 30px; border: none; background: transparent; color: var(--sub); border-radius: var(--r-md); font-size: 15px; }
.thm-x:hover { background: var(--gray-100); color: var(--txt); }
.thm-sec { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.thm-sec-t { font-size: 13px; font-weight: 700; color: var(--txt); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.thm-cnt { font-size: 11px; font-weight: 500; color: var(--sub); background: var(--gray-100); padding: 2px 8px; border-radius: var(--r-full); }
.thm-colors { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.thm-series { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; padding-left: 2px; }
.thm-series:first-of-type { margin-top: 2px; }
.thm-series-name { font-size: 12px; font-weight: 700; color: var(--sub); letter-spacing: .6px; }
.thm-series-cnt { font-size: 10px; font-weight: 500; color: var(--subtle); background: var(--gray-100); padding: 1px 8px; border-radius: var(--r-full); }
.thm-color { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 9px 4px; border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--bg-elevated); transition: all var(--t-fast); }
.thm-color:hover { border-color: var(--brand-300); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.thm-color.on { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 3px var(--brand-a20); }
.thm-color i { width: 26px; height: 26px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.thm-color span { font-size: 11px; color: var(--txt-2); white-space: nowrap; }
.thm-color.on span { color: var(--brand-700); font-weight: 600; }
.thm-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.thm-opt { padding: 8px 18px; border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--bg-elevated); color: var(--txt-2); font-size: 13px; transition: all var(--t-fast); }
.thm-opt:hover { border-color: var(--brand-300); }
.thm-opt.on { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.thm-ft { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--gray-50); }
.thm-tip { font-size: 12px; color: var(--sub); }
.thm-reset { padding: 6px 14px; border: 1px solid var(--line); background: var(--card); color: var(--txt-2); border-radius: var(--r-md); font-size: 12px; }
.thm-reset:hover { border-color: var(--danger-500); color: var(--danger-600); }
@media (max-width: 720px) { .thm-colors { grid-template-columns: repeat(4, 1fr); } }

/* ---------- 2. 工作台首页 ---------- */
.wb {
  display: flex; flex-direction: column; gap: 20px;
  padding: 6px 4px 28px;
  /* 与深色侧边栏衔接更柔和的灰蓝底，避免纯白卡片突兀 */
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-radius: var(--r-xl);
}
.wb-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; border-radius: var(--r-2xl); background: linear-gradient(120deg, var(--brand-700), var(--brand-500) 55%, var(--brand-400)); color: #fff; box-shadow: var(--shadow-md); flex-wrap: wrap; }
.wb-hi { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.wb-date { font-size: 13px; opacity: .85; margin-top: 6px; }
.wb-hero-r { display: flex; gap: 8px; flex-wrap: wrap; }
.wb-qa { padding: 8px 15px; border-radius: var(--r-lg); border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14); color: #fff; font-size: 13px; font-weight: 500; transition: all var(--t-fast); }
.wb-qa:hover { background: rgba(255,255,255,.26); transform: translateY(-1px); }
.wb-qa.primary { background: #fff; color: var(--brand-700); border-color: #fff; font-weight: 600; }
.wb-qa.primary:hover { background: var(--brand-50); }

.wb-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.wbm { display: flex; align-items: center; gap: 14px; padding: 16px 17px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); transition: all var(--t-fast); position: relative; overflow: hidden; box-shadow: var(--shadow-xs); }
.wbm:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--brand-300); }
.wbm::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mc); border-radius: 2px 0 0 2px; }
.wbm-ic { width: 46px; height: 46px; flex: 0 0 46px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-lg); font-size: 22px; background: var(--mc-bg); }
.wbm-b { min-width: 0; }
.wbm-l { font-size: 12px; color: var(--sub); font-weight: 500; }
.wbm-v { font-size: 24px; font-weight: 800; color: var(--txt); line-height: 1.2; font-variant-numeric: tabular-nums; }
.wbm-s { font-size: 11px; color: var(--subtle); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbm-blue   { --mc: #2f6bff; --mc-bg: rgba(47,107,255,.14); }
.wbm-cyan   { --mc: #06b6d4; --mc-bg: rgba(6,182,212,.14); }
.wbm-green  { --mc: #10b981; --mc-bg: rgba(16,185,129,.14); }
.wbm-purple { --mc: #8b5cf6; --mc-bg: rgba(139,92,246,.14); }
.wbm-red    { --mc: #ef4444; --mc-bg: rgba(239,68,68,.14); }
.wbm-orange { --mc: #f97316; --mc-bg: rgba(249,115,22,.14); }
.wbm-indigo { --mc: #6366f1; --mc-bg: rgba(99,102,241,.14); }
.wbm-amber  { --mc: #f59e0b; --mc-bg: rgba(245,158,11,.14); }
.wbm-gray   { --mc: #94a3b8; --mc-bg: rgba(148,163,184,.16); }

.wb-sec-t { font-size: 16px; font-weight: 800; color: var(--txt); padding-left: 12px; border-left: 4px solid var(--brand-500); line-height: 1.2; margin-top: 2px; letter-spacing: .3px; }
.wb-nav { display: flex; flex-direction: column; gap: 16px; }
.wbg { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 16px 18px 18px; box-shadow: var(--shadow-xs); }
.wbg-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.wbg-t { font-size: 14px; font-weight: 800; color: var(--txt); display: flex; align-items: center; gap: 8px; }
.wbg-t .g-ic { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); font-size: 15px; background: var(--brand-50); color: var(--brand-600); }
.wbg-c { font-size: 11px; font-weight: 600; color: var(--sub); background: var(--gray-100); padding: 2px 9px; border-radius: var(--r-full); }
.wbg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.wbt { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 18px 8px 14px; border-radius: var(--r-xl); border: 1px solid var(--line-soft); background: var(--bg-soft); color: var(--txt-2); text-decoration: none; transition: all var(--t-fast); }
.wbt:hover { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.wbt-ic { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-lg); font-size: 22px; background: var(--tile-bg, var(--gray-100)); transition: all var(--t-fast); }
.wbt:hover .wbt-ic { transform: scale(1.08); }
.wbt-l { font-size: 13px; font-weight: 600; text-align: center; line-height: 1.3; }
.wbt-fav { position: absolute; top: 6px; right: 8px; font-size: 13px; color: var(--gray-300); opacity: 0; transition: all var(--t-fast); }
.wbt:hover .wbt-fav { opacity: 1; }
.wbt-fav.on { opacity: 1; color: var(--warning-500); }
.wbt-fav:hover { transform: scale(1.25); }

.wb-todo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.wbp { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.wbp-h { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; font-size: 13.5px; font-weight: 700; color: var(--txt); border-bottom: 1px solid var(--line-soft); }
.wbp-h a { font-size: 12px; font-weight: 500; color: var(--link); }
.wbp-b { padding: 8px 10px 12px; max-height: 260px; overflow: auto; }
.wbl-row { display: flex; align-items: center; gap: 9px; padding: 8px 6px; border-radius: var(--r-md); font-size: 12.5px; }
.wbl-row:hover { background: var(--gray-50); }
.wbl-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--gray-400); }
.wbl-dot.hi { background: var(--danger-500); box-shadow: 0 0 6px var(--danger-500); }
.wbl-dot.mid { background: var(--warning-500); }
.wbl-dot.lo { background: var(--info-500); }
.wbl-code { flex: 0 0 auto; font-size: 11.5px; font-weight: 600; color: var(--brand-600); font-variant-numeric: tabular-nums; }
.wbl-main { flex: 1; min-width: 0; color: var(--txt-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wbl-main i { display: block; font-style: normal; font-size: 11px; color: var(--subtle); }
.wbl-bar { height: 5px; background: var(--gray-200); border-radius: 3px; margin-top: 5px; overflow: hidden; }
.wbl-bar i { display: block; height: 100%; background: var(--brand-500); border-radius: 3px; transition: width .6s ease; }
.wbl-bar i.red { background: var(--danger-500); }
.wbl-bar i.orange { background: var(--warning-500); }
.wbl-t { flex: 0 0 auto; font-size: 11.5px; color: var(--sub); font-variant-numeric: tabular-nums; }
.wb-empty { padding: 30px; text-align: center; color: var(--subtle); font-size: 13px; }
.wb-empty.sm { padding: 18px; font-size: 12px; }
@media (max-width: 1280px) { .wb-metrics { grid-template-columns: repeat(3, 1fr); } .wb-todo { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .wb-metrics { grid-template-columns: repeat(2, 1fr); } .wb-todo { grid-template-columns: 1fr; } }

/* ---------- 3. 顶栏主题按钮 ---------- */
.top-act.thm { color: var(--brand-600); }

/* ---------- 4. 外观模式通用规则 ---------- */
/* 深色外观（dark / midnight / forest / contrast）统一用 dark-theme class */
body.dark-theme { background: var(--bg); color: var(--txt); }
body.dark-theme .topbar,
body.dark-theme .card,
body.dark-theme .panel,
body.dark-theme .modal,
body.dark-theme .drawer,
body.dark-theme .tbl-wrap { background: var(--card); border-color: var(--line); color: var(--txt); }
body.dark-theme .content { background: var(--bg); }
body.dark-theme table th { background: var(--gray-100); color: var(--txt-2); border-color: var(--line); }
body.dark-theme table td { border-color: var(--line-soft); color: var(--txt-2); }
body.dark-theme tbody tr:hover td { background: var(--gray-100); }
body.dark-theme .inp, body.dark-theme .sel, body.dark-theme textarea, body.dark-theme select { background: var(--bg-elevated); border-color: var(--line-strong); color: var(--txt); }
body.dark-theme .inp::placeholder, body.dark-theme textarea::placeholder { color: var(--subtle); }
body.dark-theme .btn { background: var(--bg-elevated); border-color: var(--line-strong); color: var(--txt-2); }
body.dark-theme .btn:hover { background: var(--gray-100); }
body.dark-theme .btn-primary { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
body.dark-theme .gs-input { background: var(--bg-elevated); border-color: var(--line-strong); color: var(--txt); }
body.dark-theme .gs-panel { background: var(--card); border-color: var(--line); }
body.dark-theme .wbt { background: var(--bg-elevated); border-color: var(--line); }
body.dark-theme .wbt:hover { background: var(--brand-900); border-color: var(--brand-600); color: var(--brand-200); }
body.dark-theme .top-act, body.dark-theme .logout-btn, body.dark-theme .menu-toggle { color: var(--txt-2); }
body.dark-theme .crumb { color: var(--txt); }

/* 旧兼容：仍有部分组件可能依赖 dark-mode */
body.dark-mode { background: var(--bg); color: var(--txt); }

/* 浅色外观（light / warm / lavender）下修正部分写死深色的组件 */
body[data-appearance="light"],
body[data-appearance="warm"],
body[data-appearance="lavender"] { background: var(--bg); color: var(--txt); }
body[data-appearance="light"] .topbar,
body[data-appearance="warm"] .topbar,
body[data-appearance="lavender"] .topbar,
body[data-appearance="light"] .card,
body[data-appearance="warm"] .card,
body[data-appearance="lavender"] .card { background: var(--card); border-color: var(--line); color: var(--txt); }
body[data-appearance="light"] .content,
body[data-appearance="warm"] .content,
body[data-appearance="lavender"] .content { background: var(--bg); }
body[data-appearance="light"] .wb,
body[data-appearance="warm"] .wb,
body[data-appearance="lavender"] .wb { background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%); }
body[data-appearance="light"] .wbg,
body[data-appearance="warm"] .wbg,
body[data-appearance="lavender"] .wbg { background: var(--card); border-color: var(--line); }
body[data-appearance="light"] .wbt,
body[data-appearance="warm"] .wbt,
body[data-appearance="lavender"] .wbt { background: var(--bg-soft); border-color: var(--line-soft); color: var(--txt-2); }
body[data-appearance="light"] .wbt:hover,
body[data-appearance="warm"] .wbt:hover,
body[data-appearance="lavender"] .wbt:hover { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); }

/* ---------- 工作台现代紧凑布局 v3（类飞书/钉钉应用中心） ---------- */
.wb { gap: 14px; padding: 4px 2px 20px; }
.wb-hero { padding: 14px 20px; border-radius: var(--r-xl); }
.wb-hi { font-size: 18px; }
.wb-date { font-size: 12px; margin-top: 3px; }
.wb-qa { padding: 5px 11px; font-size: 12px; }

.wb-metrics { gap: 10px; }
.wbm { padding: 11px 12px; gap: 10px; }
.wbm-ic { width: 36px; height: 36px; font-size: 17px; }
.wbm-v { font-size: 20px; }

.wb-sec-t { font-size: 14px; margin-top: 0; margin-bottom: -4px; }

.wb-nav { gap: 12px; }
.wb-nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0; }
.wb-nav-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; }
.wb-nav-search input { flex: 1; min-width: 0; padding: 8px 12px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); color: var(--txt); font-size: 13px; transition: all var(--t-fast); }
.wb-nav-search input:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.wb-nav-count { font-size: 12px; color: var(--sub); white-space: nowrap; }

/* 快捷入口：小药丸 */
.wb-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.wbq { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: var(--r-full); background: var(--bg-soft); border: 1px solid var(--line-soft); color: var(--txt-2); font-size: 11.5px; font-weight: 600; text-decoration: none; transition: all var(--t-fast); }
.wbq:hover { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); transform: translateY(-1px); }
.wbq span { font-size: 13px; line-height: 1; }

/* 分类 Tab */
.wb-cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-cat { padding: 5px 11px; border-radius: var(--r-full); border: 1px solid var(--line-soft); background: var(--bg-soft); color: var(--txt-2); font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--t-fast); white-space: nowrap; }
.wb-cat:hover { border-color: var(--brand-300); color: var(--brand-700); }
.wb-cat.on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

/* 工具按钮 */
.wb-nav-tools { display: flex; gap: 6px; }
.wb-tool { padding: 5px 10px; border-radius: var(--r-md); border: 1px solid var(--line-soft); background: var(--card); color: var(--sub); font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--t-fast); }
.wb-tool:hover { border-color: var(--brand-300); color: var(--brand-700); }

/* 分组区域：不再是卡片，而是紧凑条带 */
.wb-app-list { display: flex; flex-direction: column; gap: 8px; }
.wb-sec { display: flex; flex-direction: column; gap: 8px; }
.wb-sec-h { display: flex; align-items: center; gap: 8px; padding: 4px 2px; cursor: pointer; user-select: none; border-bottom: 1px solid var(--line-soft); }
.wb-sec-h .g-ic { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); font-size: 12px; background: var(--brand-50); color: var(--brand-600); }
.wb-sec-tx { font-size: 12px; font-weight: 700; color: var(--txt); letter-spacing: .4px; }
.wb-sec-cnt { font-size: 10px; font-weight: 600; color: var(--sub); background: var(--gray-100); padding: 1px 6px; border-radius: var(--r-full); }
.wb-sec-arrow { font-size: 10px; color: var(--sub); margin-left: auto; transition: transform var(--t-fast); }
.wb-sec.collapsed .wb-sec-arrow { transform: rotate(-90deg); }
.wb-sec.collapsed .wb-app-grid { display: none; }

/* 高密度应用网格：小图标 + 紧凑文字 */
.wb-app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 5px; }
.wbt { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 5px; padding: 8px 3px 6px; border-radius: var(--r-lg); border: 1px solid transparent; background: transparent; color: var(--txt-2); text-decoration: none; transition: all var(--t-fast); }
.wbt:hover { background: var(--bg-soft); border-color: var(--line); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.wbt-ic { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); font-size: 17px; background: var(--tile-bg, var(--gray-100)); transition: all var(--t-fast); }
.wbt:hover .wbt-ic { transform: scale(1.08); }
.wbt-l { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.25; max-height: 2.5em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wbt-fav { position: absolute; top: 2px; right: 2px; font-size: 10px; color: var(--gray-300); opacity: 0; transition: all var(--t-fast); }
.wbt:hover .wbt-fav { opacity: 1; }
.wbt-fav.on { opacity: 1; color: var(--warning-500); }
.wbt-fav:hover { transform: scale(1.25); }

@media (max-width: 1200px) { .wb-app-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); } }
@media (max-width: 900px) { .wb-metrics { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .wb-metrics { grid-template-columns: repeat(2, 1fr); }
  .wb-app-grid { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); }
  .wb-nav-bar { flex-direction: column; align-items: stretch; }
  .wb-nav-search { min-width: 0; }
}

body.dark-theme .wb-nav-search input { background: var(--bg-elevated); border-color: var(--line); color: var(--txt); }
body.dark-theme .wb-nav-search input:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(99,102,241,.25); }
body.dark-theme .wbq { background: var(--bg-elevated); border-color: var(--line); color: var(--txt-2); }
body.dark-theme .wbq:hover { background: var(--brand-900); border-color: var(--brand-600); color: var(--brand-200); }
body.dark-theme .wb-cat { background: var(--bg-elevated); border-color: var(--line); color: var(--txt-2); }
body.dark-theme .wb-cat:hover { border-color: var(--brand-600); color: var(--brand-200); }
body.dark-theme .wb-cat.on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
body.dark-theme .wb-tool { background: var(--bg-elevated); border-color: var(--line); color: var(--sub); }
body.dark-theme .wb-tool:hover { border-color: var(--brand-600); color: var(--brand-200); }
body.dark-theme .wbt { background: transparent; border-color: transparent; color: var(--txt-2); }
body.dark-theme .wbt:hover { background: var(--bg-elevated); border-color: var(--line); }

/* ---------- 生产管理模板概览仪表盘 v4 ---------- */
.dash-wrap { padding: 10px 6px 24px; }
.dash-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.dash-title { font-size: 22px; font-weight: 800; color: var(--txt); letter-spacing: .5px; }
.dash-time { text-align: right; }
.dash-time .t1 { font-size: 20px; font-weight: 700; color: var(--txt); font-variant-numeric: tabular-nums; }
.dash-time .t2 { font-size: 12px; color: var(--sub); margin-top: 2px; }

.dash-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dash-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 14px 16px 16px; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; min-height: 260px; }
.dash-card.tall { grid-row: span 2; min-height: 540px; }
.dash-card.wide { grid-column: span 2; }
.dash-card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dash-card-t { font-size: 14px; font-weight: 800; color: var(--txt); display: flex; align-items: center; gap: 8px; }
.dash-card-t .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-500); }
.dash-card-t .dot.blue { background: #3b82f6; }
.dash-card-t .dot.cyan { background: #06b6d4; }
.dash-card-t .dot.purple { background: #8b5cf6; }
.dash-card-t .dot.orange { background: #f59e0b; }
.dash-card-t .dot.green { background: #10b981; }
.dash-card-t .dot.red { background: #ef4444; }
.dash-card-sub { font-size: 11px; color: var(--sub); font-weight: 500; }
.dash-chart { flex: 1; min-height: 0; position: relative; }
.dash-kpi { display: flex; align-items: center; justify-content: center; flex: 1; }
.dash-kpi-in { text-align: center; }
.dash-kpi-v { font-size: 56px; font-weight: 800; color: var(--brand-600); line-height: 1; font-variant-numeric: tabular-nums; }
.dash-kpi-l { font-size: 13px; color: var(--sub); margin-top: 8px; }

.dash-countdown { display: flex; align-items: center; justify-content: center; gap: 10px; flex: 1; }
.dash-cd-item { text-align: center; }
.dash-cd-box { min-width: 48px; padding: 10px 8px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-lg); font-size: 22px; font-weight: 800; color: var(--txt); font-variant-numeric: tabular-nums; }
.dash-cd-lbl { font-size: 11px; color: var(--sub); margin-top: 5px; }
.dash-cd-sep { font-size: 20px; font-weight: 700; color: var(--sub); }

.dash-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.dash-tab { padding: 7px 14px; border-radius: var(--r-full); border: 1px solid var(--line-soft); background: var(--bg-soft); color: var(--txt-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--t-fast); }
.dash-tab:hover { border-color: var(--brand-300); color: var(--brand-700); }
.dash-tab.on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

@media (max-width: 1400px) { .dash-grid { grid-template-columns: repeat(2, 1fr); } .dash-card.wide { grid-column: span 2; } }
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } .dash-card.wide { grid-column: span 1; } .dash-card.tall { grid-row: span 1; } }

body.dark-theme .dash-card { background: var(--bg-elevated); border-color: var(--line); }
body.dark-theme .dash-cd-box { background: var(--bg); border-color: var(--line); }
