/* ==========================================================================
   朴扑骑手工具 · Obsidian Silk Atelier 设计系统（v201 精修版）
   与 cannian.cc 首页同源：深黑曜石基底 + 柔和冷银丝光主动作 + 克制青玉微光
   无冗余框中框嵌套 · PC 等高平衡 Bento 驾驶舱 · 手机端精工流式与贴底抽屉
   ========================================================================== */

:root {
  --bg: #05070A;
  --bg-elevated: #090D14;
  --surface: rgba(12, 16, 23, 0.80);
  --surface-solid: #0C1017;
  --surface-hover: rgba(16, 22, 32, 0.90);
  --raised: rgba(20, 28, 40, 0.82);
  --raised-solid: #131B26;
  --input-bg: rgba(7, 10, 15, 0.92);
  --border: rgba(255, 255, 255, 0.075);
  --border-subtle: rgba(255, 255, 255, 0.055);
  --border-hover: rgba(255, 255, 255, 0.145);
  --strong-border: rgba(255, 255, 255, 0.14);
  --text: #F2F5F9;
  --muted: #9BA5B4;
  --subtle: #6C7686;
  --accent: #7DE5D6;
  --accent-soft: #C7F5EE;
  --accent-dim: rgba(125, 229, 214, 0.095);
  --accent-border: rgba(125, 229, 214, 0.28);
  --number: #E8EFF8;
  --silver-grad: linear-gradient(180deg, #F3F7FB 0%, #D4DEE9 100%);
  --silver-grad-hover: linear-gradient(180deg, #FFFFFF 0%, #E1EAF3 100%);
  --silver-ink: #070A0F;
  --ok: #4ADE80;
  --ok-bg: rgba(74, 222, 128, 0.10);
  --ok-border: rgba(74, 222, 128, 0.30);
  --warn: #FBBF24;
  --danger: #F87171;
  --danger-bg: rgba(248, 113, 113, 0.095);
  --danger-border: rgba(248, 113, 113, 0.30);
  --radius-card: 22px;
  --radius-md: 13px;
  --radius-sm: 10px;
  --sidebar-w: 252px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

button, input, a {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  transition: transform 0.18s var(--ease), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, box-shadow 0.24s ease;
}

button:active:not(:disabled) {
  transform: scale(0.985);
}

button:disabled {
  cursor: not-allowed;
}

.num {
  font-variant-numeric: tabular-nums;
}

::-webkit-scrollbar { width: 5px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(125, 229, 214, 0.35); }

/* ======================== 环境黑曜石极光层 ======================== */
.obsidian-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(62% 46% at 86% 4%, rgba(125, 229, 214, 0.075) 0%, rgba(125, 229, 214, 0.015) 42%, transparent 74%),
    radial-gradient(50% 40% at 14% 10%, rgba(148, 184, 232, 0.06) 0%, transparent 70%),
    radial-gradient(68% 48% at 50% 100%, rgba(16, 28, 42, 0.20) 0%, transparent 65%),
    var(--bg);
}

/* ======================== 磨砂玻璃高定基面（克制单层描边） ======================== */
.panel-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    0 14px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}

.glass-surface {
  --mx: 50%;
  --my: 0%;
  overflow: hidden;
  transition: border-color 0.28s var(--ease), box-shadow 0.28s var(--ease), background-color 0.28s ease;
}

.glass-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(360px circle at var(--mx) var(--my), rgba(125, 229, 214, 0.065), transparent 62%);
  opacity: 0;
  transition: opacity 0.32s ease;
}

@media (hover: hover) and (pointer: fine) {
  .glass-surface:hover {
    border-color: var(--border-hover);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 18px 42px rgba(0, 0, 0, 0.44);
  }
  .glass-surface:hover::before {
    opacity: 1;
  }
}

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 5px;
}

.section-heading {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.card-header-inline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.work-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.summary-unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 9px rgba(74, 222, 128, 0.65);
  flex-shrink: 0;
}

.live-dot.busy {
  background: var(--accent);
  box-shadow: 0 0 9px rgba(125, 229, 214, 0.8);
  animation: pulseDot 1.1s infinite ease-in-out;
}

.live-dot.err {
  background: var(--danger);
  box-shadow: 0 0 9px rgba(248, 113, 113, 0.7);
}

.live-dot.muted {
  background: var(--subtle);
  box-shadow: none;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

/* ======================== 无硬边框柔和指标带（取代框中框嵌套） ======================== */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.026);
  padding: 12px 4px;
}

.metric-strip-item {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  position: relative;
}

.metric-strip-item + .metric-strip-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--border-subtle);
}

.ledger-metric-value {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* ======================== 应用外壳（移动端默认） ======================== */
.workspace-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.desktop-sidebar {
  display: none;
}

.workspace-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  flex: 1;
  min-width: 0;
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
}

/* ======================== 顶栏 Header ======================== */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
}

.header-copy {
  flex: 1;
  min-width: 0;
}

.header-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.header-title {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.sync-micro-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.7);
  flex-shrink: 0;
}

.sync-micro-dot.busy {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(125, 229, 214, 0.85);
  animation: pulseDot 1s infinite ease-in-out;
}

.sync-micro-dot.err {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.7);
}

.workspace-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(12, 16, 23, 0.78);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
}

.header-date-number {
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.workspace-badge-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.workspace-badge-text {
  font-size: 11px;
  color: var(--text);
  font-weight: 500;
}

.workspace-badge-week {
  font-size: 10px;
  color: var(--muted);
}

.scroll-content {
  padding: 2px 16px 16px;
}

/* ======================== Bento 网格（移动端流式单栏） ======================== */
.bento-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.bento-col-main,
.bento-col-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* 日历页双形态 Grid Areas：手机端 汇总 -> 月历 -> 辅助工具；桌面端 左月历 / 右上汇总 + 右下工具 */
.cal-area-summary { grid-area: summary; }
.cal-area-grid { grid-area: calendar; }
.cal-area-tools { grid-area: tools; }

.bento-cal {
  grid-template-areas:
    "summary"
    "calendar"
    "tools";
}

/* ======================== 通用冷银丝光按钮 & 输入控件 ======================== */
.primary-btn,
.calc-button,
.modal-btn-save,
.backup-btn,
.manual-salary-btn,
.edit-btn-primary {
  min-height: 44px;
  border-radius: var(--radius-md);
  background: var(--silver-grad);
  color: var(--silver-ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 6px 20px rgba(0, 0, 0, 0.34);
}

.primary-btn { width: 100%; }
.calc-button { flex: 1; }

.primary-btn:hover:not(:disabled),
.calc-button:hover:not(:disabled),
.modal-btn-save:hover:not(:disabled),
.backup-btn:hover:not(:disabled),
.manual-salary-btn:hover:not(:disabled),
.edit-btn-primary:hover:not(:disabled) {
  background: var(--silver-grad-hover);
  box-shadow:
    inset 0 1px 0 #FFFFFF,
    0 8px 24px rgba(125, 229, 214, 0.12),
    0 6px 20px rgba(0, 0, 0, 0.40);
}

.primary-btn:disabled { opacity: 0.52; }

.modal-btn-danger {
  background: linear-gradient(180deg, #FCA5A5 0%, #F87171 100%) !important;
  border-color: rgba(254, 202, 202, 0.65) !important;
  color: #160709 !important;
}

.clear-button,
.modal-btn-cancel,
.settings-dialog-close,
.edit-btn,
.cloud-sub-btn {
  min-height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.032);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
}

.clear-button:hover:not(:disabled),
.modal-btn-cancel:hover:not(:disabled),
.settings-dialog-close:hover:not(:disabled),
.edit-btn:hover:not(:disabled),
.cloud-sub-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-hover);
}

.settings-dialog-close { width: 100%; margin-top: 12px; }

.field-group { margin-bottom: 12px; }
.field-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }

.std-input {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  margin-bottom: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group .std-input { margin-bottom: 0; }
.std-input::placeholder { color: rgba(155, 165, 180, 0.45); }
.std-input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px rgba(125, 229, 214, 0.10);
}

.divider { height: 1px; background: var(--border-subtle); margin: 8px 0; }

/* ======================== 1. 收入计算 ======================== */
.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ledger-period {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ledger-month {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mode-pill,
.tier-rate-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.ledger-value-wrap {
  margin-bottom: 16px;
}

.ledger-value {
  font-size: clamp(34px, 7.5vw, 46px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-top: 4px;
  color: #F6F9FC;
}

.currency-prefix {
  font-size: 0.60em;
  font-weight: 500;
  margin-right: 4px;
  color: var(--muted);
}

.today-ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border-subtle);
}

.today-ledger-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.today-ledger-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-soft);
}

/* 干净无框两列阶梯状态带（零伪影、无冗余套框） */
.rule-clean-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 16px;
}

.rule-clean-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  position: relative;
}

.rule-clean-col + .rule-clean-col {
  padding-left: 14px;
  border-left: 1px solid var(--border-subtle);
}

.rule-clean-k {
  font-size: 11px;
  color: var(--subtle);
}

.ledger-rule-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.ledger-rule-title.accent-text {
  color: var(--accent-soft);
}

@media (max-width: 440px) {
  .rule-clean-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .rule-clean-col + .rule-clean-col {
    padding-left: 0;
    padding-top: 10px;
    border-left: 0;
    border-top: 1px solid var(--border-subtle);
  }
}

.progress-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.progress-meta-text { font-size: 12px; color: var(--muted); }
.progress-next-text { font-size: 12px; font-weight: 600; color: var(--number); }

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4FBDB0 0%, #7DE5D6 65%, #C7F5EE 100%);
  box-shadow: 0 0 12px rgba(125, 229, 214, 0.28);
  transition: width 0.45s var(--ease);
}

.time-progress-fill {
  background: linear-gradient(90deg, #64748B 0%, #CBD5E1 100%);
  box-shadow: none;
}

.card-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; color: var(--text); }

.input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 14px;
  min-height: 52px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-row:focus-within {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px rgba(125, 229, 214, 0.10);
}

.input-row input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
  padding: 10px 0;
}

.input-row input::placeholder { font-size: 14px; font-weight: 400; color: rgba(155, 165, 180, 0.42); }
.input-unit { font-size: 13px; color: var(--muted); font-weight: 500; }
.action-row { display: flex; gap: 10px; }
.clear-button { min-width: 74px; }

.calc-inline-note {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--subtle);
  line-height: 17px;
}

.error-card {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 16px;
  padding: 13px 16px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
}

.result-card {
  border-color: var(--accent-border);
}

.result-title { font-size: 16px; font-weight: 600; color: var(--text); }
.breakdown-title { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); margin: 10px 0 6px; }

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.breakdown-row:last-of-type { border-bottom: 0; }
.breakdown-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.breakdown-badge {
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--raised); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.breakdown-range { font-size: 13px; font-weight: 500; color: var(--text); }
.breakdown-calc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.breakdown-amount { font-size: 14px; font-weight: 600; color: var(--number); white-space: nowrap; }

.salary-highlight {
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(125, 229, 214, 0.07);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.salary-highlight-label { font-size: 12px; color: var(--accent-soft); font-weight: 500; }
.salary-highlight-text { font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }

/* 折叠面板 */
.accordion-card { padding: 4px 18px; }
.toggle-btn {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}
.toggle-btn-text { font-size: 14px; font-weight: 600; color: var(--text); }
.toggle-right { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.toggle-chevron { width: 16px; height: 16px; transition: transform 0.24s var(--ease); }
.toggle-chevron.open { transform: rotate(180deg); }

.tier-card {
  padding: 6px 0 14px;
  border-top: 1px solid var(--border-subtle);
}

.tier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 6px;
  border-radius: 10px;
}

.tier-row-border { border-bottom: 1px solid var(--border-subtle); }
.tier-row-active { background: var(--accent-dim); border: 1px solid var(--accent-border); }
.tier-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tier-badge {
  width: 23px; height: 23px; border-radius: 7px;
  background: var(--raised); color: var(--muted);
  font-size: 11px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tier-badge-active { background: var(--accent); color: var(--silver-ink); font-weight: 700; }
.tier-label { font-size: 13px; color: var(--text); }
.tier-label-active { color: var(--accent-soft); font-weight: 600; }
.tier-rate { font-size: 13px; font-weight: 600; color: var(--number); white-space: nowrap; }
.tier-rate-active { color: var(--accent); }

/* ======================== 2. 日历打卡 ======================== */
.calendar-summary-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
}

.calendar-summary-metric { flex: 1; min-width: 0; }
.calendar-salary-metric { flex: 1.3; min-width: 0; text-align: right; }

.calendar-summary-number {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  margin-top: 3px;
  letter-spacing: -0.02em;
}

.calendar-salary-number {
  font-size: 25px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 3px;
  color: var(--accent-soft);
  letter-spacing: -0.02em;
}

.calendar-attendance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--border-subtle);
}

.calendar-hint { font-size: 12px; color: var(--muted); }

.calendar-month-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.month-picker { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.month-picker.compact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 3px;
}

.month-arrow {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.month-arrow:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); border-color: var(--border-hover); }
.month-arrow:disabled { opacity: 0.28; }

.calendar-month-title {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.01em;
}

.month-title { font-size: 15px; font-weight: 600; padding: 0 10px; }

.today-btn {
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid var(--accent-border);
  background: var(--accent-dim);
  padding: 0 11px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.today-btn.active { opacity: 0.42; border-color: var(--border); background: transparent; color: var(--muted); }

.weekday-row, .calendar-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.weekday-row { margin-bottom: 6px; }
.weekday-text { text-align: center; font-size: 11px; font-weight: 600; color: var(--subtle); padding: 5px 0; }
.weekday-weekend { color: var(--muted); }

.calendar-cell {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 5px 1px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  background: rgba(255, 255, 255, 0.016);
}

.calendar-cell-empty { border-color: transparent; background: transparent; pointer-events: none; }
.calendar-cell:not(.calendar-cell-empty):hover { border-color: var(--border-hover); background: rgba(255, 255, 255, 0.06); }

.calendar-cell-work {
  background: linear-gradient(180deg, rgba(125, 229, 214, 0.13) 0%, rgba(125, 229, 214, 0.05) 100%);
  border-color: rgba(125, 229, 214, 0.25);
}

.calendar-cell-rest { background: rgba(255, 255, 255, 0.024); border-color: rgba(255, 255, 255, 0.06); }
.calendar-cell-today { border-color: var(--accent) !important; box-shadow: 0 0 0 1px rgba(125, 229, 214, 0.30); }

.calendar-day-text { font-size: 14px; font-weight: 500; line-height: 18px; color: var(--text); }
.calendar-day-today { color: var(--accent); font-weight: 700; }
.calendar-day-work { color: #FFFFFF; font-weight: 600; }
.calendar-day-rest { color: var(--subtle); }
.calendar-day-count { font-size: 10px; line-height: 14px; margin-top: 2px; color: var(--accent); font-weight: 600; }
.calendar-day-rest-lbl { font-size: 10px; line-height: 14px; margin-top: 2px; color: var(--subtle); }
.calendar-day-placeholder { font-size: 10px; line-height: 14px; margin-top: 2px; }

.cal-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--muted);
}

.cal-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.cal-dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.cal-dot.work { background: rgba(125, 229, 214, 0.55); border: 1px solid var(--accent); }
.cal-dot.rest { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); }
.cal-dot.today { background: transparent; border: 1.5px solid var(--accent); }
.cal-legend-tip { margin-left: auto; color: var(--subtle); }

.backup-hint { color: var(--muted); font-size: 12px; line-height: 19px; margin: 4px 0 12px; }
.backup-btn-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.backup-btn { width: 100%; }

.backup-btn-import {
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent-soft);
  box-shadow: none;
}

.backup-btn-import:hover:not(:disabled) {
  background: rgba(125, 229, 214, 0.17);
  box-shadow: none;
}

/* ======================== 3. 数据统计（全宽柱图 + 多列账本） ======================== */
.stat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.empty-card { padding: 44px 22px; text-align: center; }
.empty-icon { font-size: 32px; color: var(--accent); opacity: 0.7; margin-bottom: 10px; }
.empty-text { font-size: 16px; font-weight: 600; color: var(--text); }
.empty-hint { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 20px; }

.stat-hero-banner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.stat-hero-num {
  font-size: clamp(32px, 7.5vw, 44px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-top: 4px;
  color: #F6F9FC;
}

.chart-title { font-size: 15px; font-weight: 600; color: var(--text); margin: 0 0 14px; }

.chart-scroll-wrap {
  position: relative;
}

.chart-scroll {
  display: flex;
  overflow-x: auto;
  padding: 8px 4px 10px;
  gap: 12px;
  background-image: linear-gradient(to top, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 38px;
  scrollbar-width: none;
}

.chart-scroll::-webkit-scrollbar { display: none; }

.bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 52px;
  flex-shrink: 0;
}

.bar-wrapper {
  height: 170px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
}

.bar-value { font-size: 11px; margin-bottom: 6px; color: var(--muted); font-weight: 500; }

.bar-stick {
  width: 26px;
  border-radius: 7px 7px 2px 2px;
  min-height: 6px;
  background: linear-gradient(180deg, #9DF0E4 0%, #4FBDB0 100%);
  box-shadow: 0 0 14px rgba(125, 229, 214, 0.20);
  transition: transform 0.22s var(--ease);
}

.bar-group.peak .bar-stick {
  background: linear-gradient(180deg, #FFFFFF 0%, #7DE5D6 100%);
  box-shadow: 0 0 20px rgba(125, 229, 214, 0.38);
}

.bar-group.peak .bar-value { color: var(--accent); font-weight: 700; }
.bar-avg { font-size: 10px; color: var(--subtle); margin-top: 6px; }
.bar-label { font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 500; }

.stat-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 24px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  border-bottom: 1px solid var(--border-subtle);
}

.detail-row:last-child { border-bottom: 0; }

.month-record-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.month-record-number { color: var(--accent); font-size: 14px; font-weight: 600; }
.detail-right { text-align: right; }
.detail-orders { font-size: 15px; font-weight: 600; color: var(--text); }
.detail-avg { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ======================== 4. 支出计划 ======================== */
.cashflow-hero { margin-bottom: 14px; }

.work-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.cashflow-balance {
  font-size: clamp(30px, 7vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-top: 6px;
}

.cashflow-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-side-value {
  font-size: 18px;
  font-weight: 600;
  margin-top: 4px;
  color: var(--text);
  white-space: nowrap;
}

.repay-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.repay-label { color: var(--muted); font-size: 13px; }
.repay-value { font-size: 18px; font-weight: 600; }
.manual-tag { color: var(--accent); font-size: 11px; }

.manual-salary-box { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--border-subtle); }
.manual-salary-hint { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.manual-salary-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.manual-salary-input {
  flex: 1; min-width: 140px; min-height: 44px;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--input-bg); color: var(--text); padding: 10px 14px; font-size: 15px; outline: none;
}
.manual-salary-input:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px rgba(125, 229, 214, 0.10); }
.manual-salary-clear { color: var(--danger); font-size: 12px; font-weight: 600; padding: 6px 0; }
.manual-salary-error { color: var(--danger); font-size: 12px; margin-top: 8px; }

.repay-debt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; }
.debt-icon { width: 26px; height: 26px; border-radius: 6px; object-fit: contain; flex-shrink: 0; }
.debt-icon-sm { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; flex-shrink: 0; }
.debt-icon-fallback {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.debt-icon-fallback-sm {
  width: 20px; height: 20px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}

.expense-rule { color: var(--subtle); font-size: 11px; line-height: 16px; margin-top: 3px; }
.debt-plan-block { padding: 10px 0; }
.debt-plan-block.with-divider { border-bottom: 1px solid var(--border-subtle); }
.debt-plan-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.debt-remove-text { color: var(--danger); font-size: 12px; font-weight: 600; padding: 4px 0 4px 6px; margin-left: auto; }
.repay-seg-line.with-sub-divider { border-bottom: 1px dashed var(--border-subtle); }
.repay-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; }
.ep-months-btn {
  min-height: 38px; max-width: 190px; padding: 5px 10px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--raised); color: var(--accent-soft); font-size: 12px; text-align: left;
}
.edit-amount-row { display: flex; align-items: center; gap: 6px; }
.edit-amount-input {
  width: 96px; min-height: 38px; border-radius: 10px;
  border: 1px solid var(--strong-border); background: var(--input-bg);
  color: var(--text); padding: 7px 10px; text-align: right; font-size: 14px; outline: none;
}
.ep-remove-wrap { display: flex; justify-content: flex-end; }
.ep-remove-link { min-height: 30px; padding: 0 6px; color: var(--subtle); font-size: 12px; }
.ep-remove-link:hover { color: var(--danger); }
.add-ep-btn {
  width: 100%; min-height: 40px; border-radius: 11px;
  border: 1px dashed var(--strong-border); background: rgba(255, 255, 255, 0.02);
  color: var(--accent); font-size: 12px; font-weight: 600; margin-top: 6px;
}
.edit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.edit-btn { flex: 1 1 92px; }

/* ======================== 5. 骑手工作（单行命令栏 + 比例进度条 + 克制特写卡） ======================== */
.rider-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 6px 5px 13px;
  margin-bottom: 14px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.rider-command-bar.urgent {
  border-color: var(--danger-border);
  background: rgba(248, 113, 113, 0.07);
}

.rider-refresh-feedback {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.rider-command-bar.urgent .rider-refresh-feedback {
  color: var(--danger);
}

.rider-fb-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rider-top-ops {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.rider-small-btn {
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 0 12px;
  white-space: nowrap;
}

.rider-small-btn.primary {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: var(--accent);
}

.rider-small-btn.danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.rider-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.rider-card-title { font-size: 15px; font-weight: 600; margin: 0 0 8px; color: var(--text); }

.rider-date-tag {
  font-size: 11px; font-weight: 600;
  background: var(--raised); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px; color: var(--number);
}
.rider-date-tag.warn { color: var(--danger); border-color: var(--danger-border); background: var(--danger-bg); }

.rider-hero-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 14px; }
.rider-big-num-xl { font-size: 42px; line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; }
.rider-big-num-xl.warn { color: var(--danger); }

.rider-avail-badge { border: 1px solid; border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; }
.rider-avail-ok { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok); }
.rider-avail-bad { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }

/* 门店骑士分布 + 纤细比例条 */
.rider-store-list { display: flex; flex-direction: column; gap: 2px; }
.rider-store-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border-subtle);
}
.rider-store-item:last-child { border-bottom: 0; }
.rider-store-lbl { font-size: 13px; color: var(--muted); }
.rider-store-bar-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  overflow: hidden;
}
.rider-store-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: rgba(155, 165, 180, 0.45);
}
.rider-store-bar-fill.active {
  background: linear-gradient(90deg, #4FBDB0 0%, #7DE5D6 100%);
}
.rider-store-value { font-size: 14px; font-weight: 600; color: var(--text); text-align: right; }

/* 收敛克制的待分配特写卡（左大数 + 右三项实时指标） */
.rider-order-feature {
  position: relative;
  border-radius: var(--radius-card);
  padding: 20px;
  border: 1px solid var(--accent-border);
  background: #0A1117;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(125, 229, 214, 0.18), 0 16px 36px rgba(0, 0, 0, 0.38);
}

.panel-texture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0.48;
}

.rider-order-feature > *:not(.panel-texture) { position: relative; z-index: 1; }

.rider-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 16px;
  align-items: center;
}

.rider-feature-number {
  font-size: 48px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  margin-top: 8px;
}

.rider-feature-side-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid rgba(125, 229, 214, 0.18);
}

.rider-feature-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rider-feature-mini-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-soft);
}

.rider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 0 4px;
}

.rider-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 13px 6px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.028);
}

.rider-grid-num { font-size: 21px; line-height: 26px; font-weight: 600; color: var(--text); }
.rider-grid-label { font-size: 11px; line-height: 16px; color: var(--muted); margin-top: 3px; }

.rider-login-card { max-width: 480px; margin: 10px auto 0; padding: 24px; }
.rider-code-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.field-group .rider-code-row { margin-bottom: 0; }
.rider-code-row .std-input { flex: 1; margin-bottom: 0; }

.rider-code-btn {
  min-width: 108px; min-height: 44px; padding: 0 12px;
  border-radius: var(--radius-md); border: 1px solid var(--accent-border);
  background: var(--accent-dim); color: var(--accent);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}

.rider-code-btn:disabled { opacity: 0.48; }
.rider-login-msg { color: var(--accent-soft); font-size: 12px; line-height: 19px; margin: 4px 0 12px; }
.rider-err { color: var(--danger); font-size: 12px; line-height: 18px; margin: 8px 0 12px; }
.rider-hint { color: var(--subtle); font-size: 12px; line-height: 19px; margin-top: 10px; }

/* ======================== 6. 设置 ======================== */
.settings-intro { color: var(--muted); font-size: 13px; line-height: 20px; margin: 0 0 16px; }

.settings-profile-banner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

.settings-profile-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-avatar {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-profile-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 3px;
}

.settings-profile-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.settings-meta-item { display: flex; flex-direction: column; gap: 2px; }
.settings-meta-val { font-size: 14px; font-weight: 600; color: var(--text); }

.settings-feature {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 12px 30px rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.settings-feature-icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); flex-shrink: 0;
}

.settings-feature-icon svg {
  width: 20px; height: 20px; stroke: currentColor; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}

.settings-feature-copy { flex: 1; min-width: 0; }
.settings-feature-title { font-size: 16px; font-weight: 600; color: var(--text); }
.settings-feature-desc { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 18px; }
.settings-feature-err { font-size: 12px; color: var(--danger); margin-top: 5px; }

/* 弹窗内薪资模式与云同步精修排版 */
.mode-option {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.026);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px 15px;
  margin-bottom: 10px;
}

.mode-option.selected { background: rgba(125, 229, 214, 0.08); border-color: var(--accent); }
.mode-option-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.mode-option-title { font-size: 15px; font-weight: 600; }
.mode-radio {
  width: 20px; height: 20px; border-radius: 10px;
  border: 1.5px solid var(--strong-border);
  display: flex; align-items: center; justify-content: center;
}
.mode-radio.selected { border-color: var(--accent); }
.mode-radio-dot { width: 9px; height: 9px; border-radius: 5px; background: var(--accent); }
.mode-example {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border-subtle);
}
.mode-example-amt { font-size: 18px; font-weight: 600; color: var(--accent-soft); }
.settings-scope { border-top: 1px solid var(--border-subtle); padding-top: 12px; margin-top: 12px; }

.about-identity { display: flex; align-items: center; gap: 13px; margin: 10px 0 16px; }
.about-icon { width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--border); }
.about-feature { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border-subtle); }

.cloud-seg-wrap {
  display: flex; gap: 5px; padding: 4px; border-radius: 13px;
  background: rgba(5, 7, 10, 0.85); border: 1px solid var(--border); margin-bottom: 16px;
}
.cloud-seg-btn { flex: 1; min-height: 38px; border-radius: 9px; font-size: 13px; color: var(--muted); font-weight: 500; }
.cloud-seg-btn.active { background: var(--raised-solid); color: var(--accent); font-weight: 600; border: 1px solid var(--accent-border); }

.cloud-info-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }

.cloud-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.cloud-action-grid .cloud-sub-btn:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.cloud-footer-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.cloud-danger-btn {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

/* ======================== 移动端底部悬浮液态玻璃导航（带渐隐防透字暗角） ======================== */
.glass-tab-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  z-index: 60;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 10, 0) 0%, rgba(5, 7, 10, 0.78) 46%, rgba(5, 7, 10, 0.97) 100%);
}

.glass-tab-bar {
  pointer-events: auto;
  width: 100%;
  max-width: 540px;
  padding: 5px;
  border-radius: 30px;
  background: rgba(10, 14, 21, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 32px rgba(0, 0, 0, 0.65);
}

.glass-tab-area { position: relative; display: flex; align-items: stretch; }

.glass-lens {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 25px;
  background: linear-gradient(180deg, rgba(125, 229, 214, 0.22) 0%, rgba(125, 229, 214, 0.08) 100%);
  border: 1px solid rgba(125, 229, 214, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.28s var(--ease);
  pointer-events: none;
}

.glass-tab-item {
  position: relative; z-index: 1; flex: 1; min-width: 0; min-height: 50px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted);
}

.glass-tab-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.glass-tab-item.active { color: var(--accent); }
.glass-tab-label { font-size: 11px; font-weight: 500; }

/* ======================== 门禁认证剧场 ======================== */
.workspace-shell.auth-only { justify-content: center; }
.auth-center-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 18px; }
.boot-loader { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.boot-spinner { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.12); border-top-color: var(--accent); animation: spin 0.85s linear infinite; }
.boot-title { font-size: 14px; color: var(--text); font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-stage {
  width: 100%; max-width: 1020px; margin: 0 auto;
  padding: 26px 18px 40px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center;
}
.auth-showcase { display: none; }
.auth-mobile-brand { margin-bottom: 18px; }
.auth-mobile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.auth-back-home {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03);
  color: var(--muted); font-size: 12px; text-decoration: none;
}
.auth-back-home:hover { color: var(--text); border-color: var(--border-hover); background: rgba(255, 255, 255, 0.06); }

.auth-pill-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(12, 16, 23, 0.72);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--muted);
}

.auth-brand-en { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; color: var(--accent); margin-bottom: 2px; }
.auth-card { padding: 24px; }
.auth-card-head { margin-bottom: 18px; }
.auth-card-eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 6px; }
.auth-card-title { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.auth-card-sub { margin: 6px 0 0; font-size: 12px; line-height: 19px; color: var(--muted); }
.auth-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.auth-link-btn { font-size: 12px; color: var(--accent); font-weight: 500; }
.auth-link-btn:hover { text-decoration: underline; }

/* ======================== 管理员邀请码后台 ======================== */
.admin-shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(16px + env(safe-area-inset-top)) 16px 36px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-topbar-actions { display: flex; gap: 8px; }

.admin-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .admin-kpi-strip { gap: 8px; }
  .admin-kpi-card { padding: 12px 10px; }
  .admin-kpi-val { font-size: 22px; }
  .admin-kpi-title { font-size: 11px; white-space: nowrap; }
  .admin-kpi-sub { font-size: 10px; line-height: 14px; }
}

.admin-kpi-card { padding: 14px 18px; }
.admin-kpi-val { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0; }

.admin-bento-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.admin-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.admin-opt-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
@media (max-width: 520px) { .admin-opt-row { grid-template-columns: 1fr; } }

.admin-opt-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.admin-seg { display: flex; gap: 6px; }
.admin-seg button {
  flex: 1; min-height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--input-bg);
  color: var(--muted); font-size: 12px; font-weight: 500;
}
.admin-seg button.active { border-color: var(--accent-border); background: var(--accent-dim); color: var(--accent); font-weight: 600; }

.admin-chip-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 34px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.04);
  color: var(--text); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.admin-chip-btn.primary-outline { border-color: var(--accent-border); background: var(--accent-dim); color: var(--accent); }
.admin-chip-btn.danger { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger); }

.admin-empty-hint {
  padding: 26px 14px; text-align: center; font-size: 13px; color: var(--muted);
  border-radius: 13px; border: 1px dashed var(--border); background: rgba(255, 255, 255, 0.02);
}

.admin-invite-list { display: flex; flex-direction: column; }

.admin-invite-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-invite-item:last-child { border-bottom: 0; }

.admin-invite-item.fresh {
  padding: 12px 10px;
  border-radius: 12px;
  border: 1px solid var(--accent-border);
  background: rgba(125, 229, 214, 0.06);
  margin-bottom: 4px;
}

.admin-invite-main { flex: 1; min-width: 0; }
.admin-invite-code {
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  letter-spacing: 0.04em; color: var(--text); word-break: break-all;
}

.admin-invite-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.admin-time-nowrap { white-space: nowrap; }

.admin-note-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
}

.admin-invite-ops { display: flex; gap: 6px; flex-shrink: 0; }

.admin-users-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; }
.admin-user-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 2px; border-bottom: 1px solid var(--border-subtle);
}
.admin-user-row:last-child { border-bottom: 0; }

.admin-badge {
  display: inline-block; padding: 2px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 600;
  background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent);
}
.admin-badge.ok { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok); }
.admin-mobile-footer { margin-top: 16px; }

/* ======================== 移动端贴底 Bottom Sheet 弹窗 & Toast ======================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 8, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 24px 0 0;
  z-index: 90;
  overflow-y: auto;
  animation: fadeIn 0.16s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(22px); opacity: 0.7; } to { transform: translateY(0); opacity: 1; } }

.sheet-body {
  width: 100%;
  max-width: 520px;
  background: #0C111A;
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--strong-border);
  border-bottom: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 -18px 54px rgba(0, 0, 0, 0.75);
  padding-top: 10px;
  max-height: 88dvh;
  overflow-y: auto;
  animation: slideUp 0.22s var(--ease);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  margin: 0 auto 4px;
}

.modal-card { padding: 14px 20px calc(18px + env(safe-area-inset-bottom)); }
.modal-title { font-size: 18px; font-weight: 600; margin: 0 0 5px; letter-spacing: -0.01em; }
.modal-subtitle { font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .modal-btn-cancel,
.modal-actions .modal-btn-save { flex: 1; }

.modal-delete-btn { width: 100%; min-height: 42px; margin-top: 8px; color: var(--danger); font-size: 13px; font-weight: 600; }

.picker-toggle {
  width: 100%; min-height: 42px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--input-bg);
  color: var(--text); font-size: 13px; font-weight: 500; margin-bottom: 12px;
}
.picker-toggle.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent-soft); }
.picker-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; margin-bottom: 16px; }
.picker-chip { background: var(--raised); border: 1px solid var(--border); border-radius: 10px; padding: 5px 10px; font-size: 12px; color: var(--accent-soft); }

#geetest-box {
  min-height: 54px; display: flex; align-items: center; justify-content: center;
  background: #fff; border-radius: 14px; padding: 12px; margin-top: 10px;
}

#toast-root {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(94px + env(safe-area-inset-bottom));
  display: flex; justify-content: center; pointer-events: none; z-index: 120; padding: 0 16px;
}

.toast-box {
  max-width: 440px;
  background: rgba(14, 19, 28, 0.94);
  border: 1px solid var(--accent-border);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.58);
  animation: fadeIn 0.16s ease;
}

.toast-box.err { border-color: var(--danger-border); color: var(--danger); }

/* ==========================================================================
   桌面宽屏高定驾驶舱布局（>= 960px）
   ========================================================================== */
@media (min-width: 960px) {
  .workspace-shell:not(.auth-only):not(.admin-mode) {
    flex-direction: row;
  }

  .desktop-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w);
    padding: 22px 15px 18px;
    background: rgba(8, 11, 16, 0.86);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(26px) saturate(140%);
    -webkit-backdrop-filter: blur(26px) saturate(140%);
    z-index: 40;
  }

  .sidebar-brand {
    display: flex; align-items: center; gap: 11px;
    padding: 4px 8px 20px; border-bottom: 1px solid var(--border); margin-bottom: 16px;
  }
  .sidebar-logo { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); }
  .sidebar-brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
  .sidebar-brand-sub { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em; color: var(--accent); margin-top: 2px; }

  .sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
  .sidebar-nav-item {
    position: relative; width: 100%; min-height: 43px; padding: 0 12px;
    border-radius: 12px; display: flex; align-items: center; gap: 11px;
    color: var(--muted); border: 1px solid transparent; text-align: left;
  }
  .sidebar-nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
  .sidebar-nav-item.active {
    color: var(--text);
    background: linear-gradient(90deg, rgba(125, 229, 214, 0.13) 0%, rgba(125, 229, 214, 0.02) 100%);
    border-color: rgba(125, 229, 214, 0.24);
  }
  .sidebar-nav-item.active::before {
    content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--accent);
    box-shadow: 0 0 10px rgba(125, 229, 214, 0.65);
  }
  .sidebar-nav-icon { display: flex; align-items: center; justify-content: center; color: inherit; }
  .sidebar-nav-item.active .sidebar-nav-icon { color: var(--accent); }
  .sidebar-nav-icon svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .sidebar-nav-label { flex: 1; font-size: 13px; font-weight: 500; }
  .sidebar-nav-num { font-family: var(--font-mono); font-size: 10px; color: var(--subtle); }
  .sidebar-nav-item.active .sidebar-nav-num { color: var(--accent); }

  .sidebar-footer { display: flex; flex-direction: column; gap: 9px; padding-top: 14px; border-top: 1px solid var(--border); }
  .sidebar-admin-link {
    display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 11px;
    background: var(--accent-dim); border: 1px solid var(--accent-border);
    color: var(--accent); font-size: 12px; font-weight: 600; text-decoration: none;
  }
  .sidebar-admin-link:hover { background: rgba(125, 229, 214, 0.16); }

  .sidebar-account-card {
    width: 100%; text-align: left; padding: 11px 12px; border-radius: 13px;
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
  }
  .sidebar-account-card:hover { border-color: var(--border-hover); background: rgba(255, 255, 255, 0.055); }
  .sidebar-acc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .sidebar-acc-name { font-size: 13px; font-weight: 600; color: var(--text); }
  .sidebar-acc-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
  .sidebar-home-link { font-size: 12px; color: var(--subtle); text-decoration: none; padding: 4px 8px; border-radius: 8px; }
  .sidebar-home-link:hover { color: var(--text); }

  .glass-tab-wrap { display: none; }

  .workspace-content {
    margin-left: var(--sidebar-w);
    margin-right: 0;
    width: calc(100% - var(--sidebar-w));
    max-width: none;
    padding: 0 34px 44px;
  }

  .header-bar,
  .scroll-content {
    max-width: 1120px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
  }

  .header-bar { padding-top: 24px; padding-bottom: 18px; }
  .header-title { font-size: 27px; }

  /* 桌面宽屏精准平衡双栏网格 */
  .bento-calc { grid-template-columns: minmax(0, 1.24fr) minmax(340px, 0.96fr); gap: 18px; }
  .bento-cal {
    grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.90fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "calendar summary"
      "calendar tools";
    gap: 16px 18px;
  }
  .bento-repay { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
  .bento-rider { grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.96fr); gap: 18px; }
  .bento-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

  .sticky-desktop { position: sticky; top: 22px; }
  .stretch-cols { align-items: stretch; }
  .stretch-cols > .panel-card { display: flex; flex-direction: column; }

  /* 桌面统计页：12 月全铺满零裁切 + 3 列月度明细 */
  .stat-hero-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
  }

  .stat-kpis {
    min-width: 390px;
  }

  .chart-scroll {
    display: grid;
    grid-template-columns: repeat(var(--bar-cols, 12), minmax(0, 1fr));
    overflow-x: visible;
    gap: 8px;
  }

  .bar-group { width: auto; }
  .bar-stick { width: min(32px, 56%); }

  .stat-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 28px;
  }

  .stat-detail-grid .detail-row:nth-last-child(-n+3) {
    border-bottom: 0;
  }

  /* 桌面支出页横排现金流 */
  .work-board {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
    gap: 20px;
  }

  .calendar-cell { min-height: 68px; border-radius: 14px; }

  /* 桌面设置页概览横幅 */
  .settings-profile-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
  }

  .settings-profile-meta {
    border-top: 0;
    padding-top: 0;
    padding-left: 24px;
    border-left: 1px solid var(--border-subtle);
    min-width: 240px;
  }

  /* 认证剧场桌面双栏 */
  .auth-mobile-brand { display: none; }
  .auth-stage {
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
    gap: 48px; min-height: 100vh; padding: 40px 36px;
  }
  .auth-showcase { display: flex; flex-direction: column; gap: 26px; }
  .auth-showcase-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .auth-brand-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
  .auth-brand-icon { width: 58px; height: 58px; border-radius: 16px; }
  .auth-brand-title { margin: 0; font-size: 32px; font-weight: 600; letter-spacing: -0.025em; }
  .auth-brand-desc { margin: 0; font-size: 14px; line-height: 24px; color: var(--muted); max-width: 460px; }
  .auth-feature-grid { display: flex; flex-direction: column; gap: 11px; }
  .auth-feature-chip {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 14px 16px; border-radius: 16px;
    background: rgba(12, 16, 23, 0.62); border: 1px solid var(--border);
  }
  .auth-chip-num {
    font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent);
    padding: 4px 8px; border-radius: 8px; background: var(--accent-dim); border: 1px solid var(--accent-border); flex-shrink: 0;
  }
  .auth-chip-title { font-size: 14px; font-weight: 600; color: var(--text); }
  .auth-chip-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

  /* 管理员后台宽屏等高收进一屏 */
  .admin-shell { padding: 20px 28px 28px; }
  .admin-bento-grid { grid-template-columns: minmax(340px, 0.88fr) minmax(0, 1.12fr); }
  .admin-users-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-mobile-footer { display: none; }

  /* 桌面弹窗居中优雅弹出 */
  .modal-overlay { justify-content: center; padding: 28px; }
  .sheet-body { max-width: 490px; border-radius: 24px; border-bottom: 1px solid var(--strong-border); padding-top: 4px; }
  .sheet-handle { display: none; }
  .modal-card { padding: 22px 24px 24px; }

  #toast-root { bottom: 26px; left: var(--sidebar-w); }
}

@media (max-width: 420px) {
  .metric-strip-item { padding: 0 8px; }
  .ledger-metric-value { font-size: 16px; }
  .work-side-value { font-size: 16px; }
  .rider-feature-grid { grid-template-columns: minmax(0, 1fr) 118px; gap: 12px; }
  .rider-feature-number { font-size: 40px; }
}
