/* ============================================================================
   娇娇工作室 · BRIDAL ATELIER — VERSION 01 (V2 视觉系统)
   视觉方向：高级新娘工作室 × 时尚杂志 × 精品酒店 × 极简 SaaS
   - 暖米白画布 · 高级纸张卡片 · 细发丝线
   - 标题优雅（Serif）· 正文清晰（Sans）· 数字突出（Serif 大字）
   - 陶土强调 + 少量金，克制使用
   app.js 内联样式依赖的变量名保持不变：
   bg  card  text  text-2  text-3  line  accent  accent-soft  accent-deep
   ok  ok-soft  warn  warn-soft  danger  danger-soft  font
   ========================================================================== */

:root {
  /* 基础面 —— 暖米白 */
  --bg:        #F5F1EA;
  --card:      #FCFAF6;
  --paper-2:   #EDE7DD;
  --text:      #29231F;
  --text-2:    #8A7D72;
  --text-3:    #B2A79B;
  --line:      #DED5CA;

  /* 书脊（深咖黑） */
  --ink:       #171412;
  --ink-soft:  #241E19;
  --cream:     #F2EDE4;

  /* 品牌强调 —— 陶土（规范色 #8C6253） */
  --accent:      #8C6253;
  --accent-soft: #F1E8E4;
  --accent-deep: #74503F;

  /* 辅助金 */
  --gold:        #B49A70;
  --gold-soft:   #F5EEDF;

  /* 语义色（低饱和） */
  --ok:          #6E8B74;  --ok-soft:     #EAF0EA;
  --warn:        #A0823F;  --warn-soft:   #F6EFDC;
  --danger:      #A76150;  --danger-soft: #F4E7E2;

  /* 形状 */
  --radius:    4px;
  --radius-lg: 6px;
  --shadow:    0 1px 2px rgba(41, 35, 31, .04);
  --shadow-lift: 0 2px 8px rgba(41, 35, 31, .06);

  /* 字体 —— 严格对齐设计稿
     · 衬线（标题 / 数字）：Noto Serif SC + Cormorant Garamond，字重偏细（400），
       中文衬线走系统自带宋体族，保证离线也有一致的旧刻体气质
     · 无衬线（正文 / 标签 / 表单）：Noto Sans SC + 系统黑体族
     · 数字：Cormorant Garamond / Playfair Display 优先，不可用时回退 Georgia
       —— 高对比度衬线，杂志排版感，字重恒为 400（禁用 600 / 700） */
  --serif-cn: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", "STZhongsong", Georgia, "Times New Roman", serif;
  --serif-en: "Cormorant Garamond", "Playfair Display", "Times New Roman", Georgia, serif;
  --serif-num: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --serif: var(--serif-en), var(--serif-cn);
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-cn-sans: var(--font);

  /* 数字排版规格 —— 杂志感衬线数字
     大数字 40px（36~44 区间）/ 普通数据 34px（30~36 区间）/ 辅助数字 13px（12~14 区间）
     行高与字距全站统一，避免逐处硬编码 */
  --num-lg: 40px;
  --num-md: 34px;
  --num-sm: 13px;
  --num-lh: 1.1;
  --num-ls: .01em;
  /* 货币符号与数字之间的自然间距（≈ 0.12em 光学留白） */
  --num-currency-gap: .12em;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .02em;   /* 全站统一字距基准，避免逐处硬编码漂移 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg);
  background-image: radial-gradient(1200px 560px at 10% -10%, #FBF7F0 0%, rgba(251, 247, 240, 0) 60%);
}

::selection { background: var(--accent); color: #FCFAF6; }

svg.ic { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

b, strong { font-weight: 500; }

/* ============================== 布局骨架 ============================== */

.app { display: flex; min-height: 100vh; }
.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* -------- 左侧品牌导航（深咖黑） -------- */
.side {
  width: 232px; flex: 0 0 232px;
  background-image: linear-gradient(180deg, #201A15 0%, var(--ink) 45%, #120E0B 100%);
  color: var(--cream);
  padding: 40px 26px 26px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  box-shadow: inset -1px 0 0 rgba(180, 154, 112, .16);
}

.brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.brand-logo {
  width: 58px; height: 58px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-en); font-size: 25px; font-weight: 400; font-style: italic;
  letter-spacing: 0; line-height: 1;
  color: var(--gold);
  border: 1px solid rgba(180, 154, 112, .45);
  border-radius: 50%;
  background: rgba(180, 154, 112, .05);
}
.brand-name {
  font-family: var(--serif-cn); font-size: 19px; font-weight: 400;
  letter-spacing: .12em; color: var(--cream); margin-top: 16px;
}
.brand-sub {
  font-family: var(--font); font-size: 8.5px; font-weight: 400;
  letter-spacing: .42em; text-transform: uppercase;
  color: rgba(242, 237, 228, .45); margin-top: 8px;
}

.side-label {
  font-family: var(--font); font-size: 9px; font-weight: 500;
  letter-spacing: .34em; text-transform: uppercase;
  color: rgba(242, 237, 228, .3);
  margin: 44px 0 6px; text-align: center;
}

.side .nav { display: flex; flex-direction: column; }
.side .nav-item {
  position: relative;
  display: flex; align-items: baseline; gap: 15px; width: 100%;
  padding: 16px 6px 16px 18px; text-align: left; cursor: pointer;
  background: none; border: none;
  color: rgba(242, 237, 228, .55);
  font-family: var(--font); font-size: 14.5px; font-weight: 400; letter-spacing: .2em;
  border-radius: 2px;
  transition: color .2s ease, background .2s ease;
}
.side .nav-item .ico {
  font-family: var(--serif-cn); font-size: 12px; font-weight: 400;
  letter-spacing: .1em; color: rgba(180, 154, 112, .6);
  transition: color .2s ease;
}
.side .nav-item::before { /* 细陶土指示线 */
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 2px; background: transparent;
  transition: background .2s ease;
}
.side .nav-item:hover { color: var(--cream); }
.side .nav-item.active {
  color: var(--cream); font-weight: 500;
  background: rgba(242, 237, 228, .045);
}
.side .nav-item.active::before { background: var(--accent); }
.side .nav-item.active .ico { color: var(--gold); }

.side-foot {
  margin-top: auto; padding-top: 20px;
  border-top: 1px solid rgba(242, 237, 228, .1);
  font-family: var(--font); font-size: 10.5px; letter-spacing: .1em; color: rgba(242, 237, 228, .36);
  line-height: 1.85; text-align: center;
}
.side-foot .sf-line { letter-spacing: .3em; text-transform: uppercase; font-size: 8.5px; color: rgba(242, 237, 228, .5); }
.side-foot .sf-line + .sf-line { margin-top: 2px; }
.side-foot .sf-sub { margin-top: 6px; font-size: 10px; }

/* -------- 主画布 -------- */
.main {
  flex: 1; min-width: 0; width: 100%;
  max-width: 1380px; margin: 0 auto;
  padding: 34px 40px 60px;
}

.page { display: none; }
.page.active { display: block; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page.active > * { animation: rise .5s cubic-bezier(.2, .75, .2, 1) both; }
.page.active > *:nth-child(1) { animation-delay: .02s; }
.page.active > *:nth-child(2) { animation-delay: .07s; }
.page.active > *:nth-child(3) { animation-delay: .12s; }
.page.active > *:nth-child(4) { animation-delay: .17s; }
.page.active > *:nth-child(5) { animation-delay: .22s; }
.page.active > *:nth-child(6) { animation-delay: .27s; }

/* ============================== 通用组件 ============================== */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 28px 26px;
}

.card-title {
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--serif-cn); font-size: 18px; font-weight: 400; letter-spacing: .08em;
  color: var(--text); margin-bottom: 18px;
}
.card-title .idx {
  font-family: var(--serif-num); font-size: 12px; font-weight: 400;
  letter-spacing: .06em; color: var(--gold);
}
.card-title .more {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font); font-size: 11.5px; font-weight: 400;
  letter-spacing: .1em; color: var(--text-2); cursor: pointer; white-space: nowrap;
  transition: color .18s ease;
}
.card-title .more::after {
  content: ""; width: 5px; height: 5px;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  transform: rotate(45deg); margin-left: 2px; flex-shrink: 0;
}
.card-title .more:hover { color: var(--accent-deep); }
.card-title .head-date {
  font-family: var(--serif-num); font-size: 12px; letter-spacing: .1em; color: var(--text-3);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; text-decoration: none;
  font-family: var(--font); font-size: 13px; font-weight: 500; letter-spacing: .12em;
  padding: 12px 22px; line-height: 1.1;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn-primary { background: var(--accent); color: #FCFAF6; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--card); color: var(--text); border-color: #C9BEB1; }
.btn-danger-ghost { background: transparent; color: var(--accent); border-color: #E4CDC5; }
.btn-danger-ghost:hover { background: var(--accent-soft); }
.btn-sm { padding: 9px 13px; font-size: 12.5px; letter-spacing: .04em; }
.btn-lg { padding: 14px 26px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 状态标签（低饱和统一体系） */
.tag {
  display: inline-block; white-space: nowrap;
  padding: 3px 9px; border-radius: 3px;
  font-size: 11px; font-weight: 500; letter-spacing: .08em; line-height: 1.6;
  border: 1px solid transparent;
}
.tag-ok      { background: var(--ok-soft);     color: var(--ok);     border-color: #D8E2D9; }
.tag-warn    { background: #F3EEE5;            color: var(--text-2); border-color: #E5DCCF; }
.tag-danger  { background: var(--danger-soft); color: var(--accent-deep); border-color: #E6CFC7; }
.tag-gray    { background: #F0ECE5;            color: var(--text-2); border-color: var(--line); }
.tag-accent  { background: var(--accent-soft); color: var(--accent-deep); border-color: #E6CFC7; }

/* ── 数字排版基类 ──
   高对比度衬线 + 等宽数位（tabular-nums，避免跳动）+ 细字重 400
   杂志感来源：衬线骨架 / 紧凑行高 1.1 / 极小正字距 0.01em */
.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-weight: 400;
  line-height: var(--num-lh);
  letter-spacing: var(--num-ls);
}
/* 货币符号：字号略收、颜色稍淡，与数字之间留出光学呼吸位 */
.curr {
  font-size: .82em;
  font-weight: 400;
  margin-right: var(--num-currency-gap);
  opacity: .82;
  font-variant-numeric: normal;
}
.empty {
  text-align: center; color: var(--text-3);
  font-size: 13px; letter-spacing: .12em; padding: 30px 0; line-height: 1.9;
}

/* 页头 */
.page-head { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-title {
  font-family: var(--serif-cn); font-size: 32px; font-weight: 400;
  letter-spacing: .04em; line-height: 1.1; color: var(--text); margin-top: 12px;
}
.page-sub { margin-top: 8px; font-family: var(--font); font-size: 12px; letter-spacing: .16em; color: var(--text-3); }
.hero-eyebrow {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--font); font-size: 10px; font-weight: 500; letter-spacing: .38em; text-transform: uppercase;
  color: var(--text-3);
}
.hero-eyebrow .rule { width: 30px; height: 1px; background: var(--gold); flex-shrink: 0; }

/* ============================== 首页 V2 ============================== */

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 18px;
  align-items: start;
}
.home-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.home-rail { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ---- 顶部欢迎区 + 主视觉 ---- */
.home-hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 46%);
  gap: 20px;
  align-items: stretch;
}
.hero-text { padding: 16px 4px 8px; align-self: center; }
.hero-date {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--font); font-size: 12.5px; font-weight: 400; letter-spacing: .26em; color: var(--text-2);
}
.hero-date .num { font-family: var(--serif-num); font-size: var(--num-sm); font-weight: 400; letter-spacing: .22em; }
.hero-week { font-family: var(--font); font-size: 10px; font-weight: 400; letter-spacing: .42em; color: var(--text-3); }
.home-hello {
  font-family: var(--serif-cn); font-weight: 400;
  font-size: clamp(34px, 3.6vw, 46px); line-height: 1.16; letter-spacing: .06em;
  color: var(--text); margin-top: 20px;
}
.hero-tagline {
  margin-top: 14px;
  font-family: var(--font); font-weight: 300; font-size: 13.5px; letter-spacing: .14em;
  color: var(--text-2);
}

.hero-visual {
  position: relative;
  min-height: 218px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.hero-img {
  position: absolute; inset: 0;
  width: 104%; height: 106%; object-fit: cover; object-position: 62% 18%;
}
.hero-visual::before { /* 左侧融入画布的暖色过渡 */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(245, 241, 234, .92) 0%, rgba(245, 241, 234, .35) 34%, rgba(245, 241, 234, 0) 62%);
}
.hero-script {
  position: absolute; z-index: 2; left: 26px; top: 30px;
  font-family: var(--serif-num); font-style: italic; font-size: 16px; font-weight: 400;
  line-height: 1.5; letter-spacing: .04em; color: #7A6C60;
}
.hero-user {
  position: absolute; z-index: 2; top: 14px; right: 14px;
  display: flex; align-items: center; gap: 9px;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: rgba(252, 250, 246, .82); backdrop-filter: blur(6px);
  border: 1px solid rgba(222, 213, 202, .8);
  font-family: var(--font); font-size: 11.5px; letter-spacing: .1em; color: var(--text);
}
.hero-user .hu-bell { display: flex; color: var(--text-2); }
.hero-user .hu-bell svg { width: 14px; height: 14px; }
.hu-ava {
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-cn); font-size: 12px; font-weight: 400; color: var(--accent-deep);
  background: var(--accent-soft); border: 1px solid #E6CFC7;
}
.hu-chev { display: flex; color: var(--text-3); }
.hu-chev svg { width: 13px; height: 13px; }

/* ---- 快捷操作 ---- */
.quick-row {
  /* minmax(0,1fr)：允许列收缩到小于内容宽，否则窄屏会被内容撑出横向滚动 */
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.qa {
  display: flex; align-items: center; gap: 15px; min-width: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px 22px; cursor: pointer; text-align: left;
  font-family: var(--font);
  box-shadow: var(--shadow);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.qa:hover { border-color: #C9BEB1; box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.qa-ico {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--accent); background: #FBF7F1;
  transition: border-color .2s ease;
}
.qa:hover .qa-ico { border-color: var(--accent); }
.qa-txt { flex: 1; min-width: 0; }
.qa-txt b { display: block; font-family: var(--font); font-size: 14.5px; font-weight: 500; letter-spacing: .14em; color: var(--text); }
.qa-txt i { display: block; font-style: normal; font-family: var(--font); font-weight: 300; font-size: 11px; letter-spacing: .1em; color: var(--text-3); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-arr {
  width: 7px; height: 7px; flex-shrink: 0;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  transform: rotate(45deg); color: var(--text-3);
  transition: color .2s ease, transform .2s ease;
}
.qa:hover .qa-arr { color: var(--accent); transform: rotate(45deg) translate(2px, -2px); }

.qa-primary { background: var(--accent); border-color: var(--accent); }
.qa-primary .qa-ico {
  background: rgba(252, 250, 246, .14); border-color: rgba(252, 250, 246, .4); color: #FCFAF6;
}
.qa-primary .qa-txt b { color: #FCFAF6; }
.qa-primary .qa-txt i { color: rgba(252, 250, 246, .72); }
.qa-primary .qa-arr { color: rgba(252, 250, 246, .8); }
.qa-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.qa-primary:hover .qa-ico { border-color: rgba(252, 250, 246, .7); }
.qa-primary:hover .qa-arr { color: #FCFAF6; }

/* ---- 今日工作 ---- */
.today-card { padding: 22px 30px 24px; }
.today-nums { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 6px; }
.tn-item { padding: 4px 0 4px 26px; border-left: 1px solid var(--line); }
.tn-item:first-child { padding-left: 0; border-left: none; }
.tn-val {
  font-family: var(--serif-num); font-size: clamp(36px, 3.1vw, 44px); font-weight: 400;
  line-height: var(--num-lh); letter-spacing: var(--num-ls); color: var(--text); white-space: nowrap;
}
.tn-val .unit { font-family: var(--font); font-size: 12px; font-weight: 400; letter-spacing: .1em; color: var(--text-3); margin-left: 5px; }
.tn-val.alert { color: var(--accent); }
.tn-lab { margin-top: 10px; font-family: var(--font); font-size: 12px; font-weight: 400; letter-spacing: .18em; color: var(--text-2); }
.tn-delta { margin-top: 7px; font-family: var(--font); font-size: 11px; letter-spacing: .08em; color: var(--text-3); }
.tn-delta .up { color: var(--ok); }
.tn-delta .down { color: var(--accent); }

/* ---- 今日排期（Timeline） ---- */
.sched-card { padding-bottom: 14px; }
.tl { margin-top: 4px; }
.tl-item {
  display: grid;
  grid-template-columns: 16px 74px 40px minmax(0, 1fr) auto;
  align-items: center; gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .18s ease;
}
.tl-item:last-child { border-bottom: none; }
.tl-item:hover { background: #FBF8F2; }
.tl-rail { position: relative; align-self: stretch; }
.tl-rail::before {
  content: ""; position: absolute; left: 7px; top: -14px; bottom: -14px;
  width: 1px; background: var(--line);
}
.tl-item:first-child .tl-rail::before { top: 50%; }
.tl-item:last-child .tl-rail::before { bottom: 50%; }
.tl-rail i {
  position: absolute; left: 7px; top: 50%;
  width: 7px; height: 7px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--card); border: 1.5px solid var(--text-3);
}
.tl-item.next .tl-rail i { border-color: var(--accent); background: var(--accent); }
.tl-item.done .tl-rail i { border-color: var(--ok); }
.tl-time { text-align: left; }
.tl-time b {
  display: block; font-family: var(--serif-num); font-size: var(--num-md); font-weight: 400;
  letter-spacing: var(--num-ls); color: var(--text); line-height: var(--num-lh);
}
.tl-time span { display: block; margin-top: 5px; font-family: var(--font); font-size: 11px; letter-spacing: .12em; color: var(--text-3); white-space: nowrap; }
.tl-ava {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-cn); font-size: 16px; font-weight: 400;
  color: var(--accent-deep); background: var(--accent-soft);
  border: 1px solid #E6CFC7;
}
.tl-namerow { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tl-name { font-family: var(--font); font-size: 14.5px; font-weight: 500; letter-spacing: .12em; color: var(--text); }
.tl-item:hover .tl-name { color: var(--accent-deep); }
.tl-src {
  font-family: var(--font); font-size: 10.5px; font-weight: 400; letter-spacing: .1em; color: var(--text-2);
  background: #F3EEE5; border: 1px solid #E7DFD2; border-radius: 3px;
  padding: 2px 7px; white-space: nowrap;
}
.tl-meta { margin-top: 6px; font-family: var(--font); font-size: 12px; letter-spacing: .08em; color: var(--text-2); }
.tl-meta b { font-family: var(--serif-num); font-size: 14px; font-weight: 400; color: var(--text); letter-spacing: var(--num-ls); }
.tl-right { text-align: right; }
.tl-statusrow { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.tl-dots { color: var(--text-3); letter-spacing: .1em; font-size: 14px; line-height: 1; padding-bottom: 4px; }
.tl-amounts { margin-top: 7px; font-family: var(--font); font-size: 11.5px; letter-spacing: .08em; color: var(--text-3); white-space: nowrap; }
.tl-amounts b { font-weight: 500; color: var(--text-2); }
.tl-amounts b.alert { color: var(--accent-deep); }

/* 状态胶囊（排期专用，低饱和） */
.pill {
  display: inline-block; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px;
  font-family: var(--font); font-size: 11px; font-weight: 400; letter-spacing: .1em; line-height: 1.7;
  border: 1px solid transparent;
}
.pill-ok    { background: var(--ok-soft); color: var(--ok); border-color: #D8E2D9; }
.pill-terra { background: var(--accent-soft); color: var(--accent-deep); border-color: #E6CFC7; }
.pill-beige { background: #F3EEE5; color: var(--text-2); border-color: #E5DCCF; }
.pill-gray  { background: #F0ECE5; color: var(--text-3); border-color: var(--line); }

/* ---- 右侧待处理 ---- */
.rail-remind .card-title { margin-bottom: 6px; }
.rail-count { font-family: var(--font); font-size: 11px; letter-spacing: .14em; color: var(--text-3); margin-bottom: 14px; }
.rr-item {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 13px 2px; border-top: 1px solid var(--line);
  cursor: pointer;
  transition: padding-left .2s ease;
}
.rr-item:hover { padding-left: 6px; }
.rr-ico {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--text-2); background: #FBF8F2;
}
.rr-ico svg { width: 15px; height: 15px; }
.rr-item.warn .rr-ico { color: var(--accent-deep); border-color: #E6CFC7; background: var(--accent-soft); }
.rr-title { font-family: var(--font); font-size: 13px; font-weight: 400; letter-spacing: .08em; color: var(--text); line-height: 1.55; }
.rr-sub { margin-top: 5px; font-family: var(--font); font-size: 11px; letter-spacing: .08em; color: var(--text-3); }
.rr-item.warn .rr-title { color: var(--accent-deep); }

/* ---- 品牌视觉卡 ---- */
.brand-card { padding: 0; overflow: hidden; }
.brand-img { position: relative; height: 210px; overflow: hidden; }
.brand-img img {
  position: absolute; inset: 0; width: 103%; height: 108%;
  object-fit: cover; object-position: 50% 32%;
}
.brand-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(41, 35, 31, .34) 0%, rgba(41, 35, 31, 0) 55%);
}
.brand-script {
  position: absolute; z-index: 1; left: 22px; top: 50%; transform: translateY(-50%);
  font-family: var(--serif-num); font-style: italic; font-size: 18px; font-weight: 400;
  line-height: 1.55; letter-spacing: .03em; color: #FBF6EE;
  text-shadow: 0 1px 10px rgba(41, 35, 31, .3);
}
.brand-cap {
  padding: 14px 0; text-align: center;
  font-family: var(--serif-cn); font-size: 13px; font-weight: 400; letter-spacing: .28em; color: var(--text-2);
  border-top: 1px solid var(--line);
}

/* ---- 本月经营 + 客户来源 ---- */
.month-row { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.month-grid { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 10px; }
.month-item { text-align: left; padding: 2px 0 2px 20px; border-left: 1px solid var(--line); }
.month-item:first-child { padding-left: 0; border-left: none; }
.month-item .m-val {
  font-family: var(--serif-num); font-size: var(--num-md); font-weight: 400;
  line-height: var(--num-lh); letter-spacing: var(--num-ls); color: var(--text); white-space: nowrap;
}
.month-item .m-val .unit { font-family: var(--font); font-size: 11.5px; color: var(--text-3); font-weight: 400; letter-spacing: .06em; margin-left: 3px; }
.month-item .m-lab { font-family: var(--font); font-size: 11.5px; letter-spacing: .14em; color: var(--text-2); margin-top: 8px; }

.donut-card { display: flex; flex-direction: column; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex: 1; }
.donut {
  position: relative; width: 108px; height: 108px; flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(var(--paper-2) 0 100%);
}
.donut-hole {
  position: absolute; inset: 16px; border-radius: 50%;
  background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut-hole b { font-family: var(--serif-num); font-size: var(--num-md); font-weight: 400; color: var(--text); line-height: var(--num-lh); letter-spacing: var(--num-ls); }
.donut-hole span { margin-top: 4px; font-family: var(--font); font-size: 9.5px; letter-spacing: .18em; color: var(--text-3); }
.donut-legend { flex: 1; min-width: 0; }
.dl-row {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font); font-size: 11.5px; letter-spacing: .06em; color: var(--text-2);
  padding: 3.5px 0;
}
.dl-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.dl-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-count { color: var(--text); font-weight: 500; white-space: nowrap; }
.dl-pct { width: 36px; text-align: right; color: var(--text-3); white-space: nowrap; }

/* 首页底部手写语 */
.home-script {
  margin-top: 22px; text-align: right;
  font-family: var(--serif-cn); font-style: italic; font-size: 13px; font-weight: 300;
  letter-spacing: .16em; color: var(--text-3);
  transform: rotate(-1.2deg);
}

/* ============================== 列表工具条 ============================== */

.list-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.list-toolbar.end { justify-content: flex-end; }

.search-box {
  flex: 1; min-width: 220px; height: 46px;
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 16px;
  transition: border-color .2s ease;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box .s-ico { display: flex; color: var(--text-3); }
.search-box .s-ico svg { width: 15px; height: 15px; }
.search-box input {
  flex: 1; border: none; outline: none; background: none;
  font-family: var(--font); font-size: 13.5px; letter-spacing: .08em; color: var(--text);
}
.search-box input::placeholder { color: var(--text-3); letter-spacing: .08em; }

.tabs-row {
  display: flex; gap: 26px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.tab {
  position: relative;
  border: none; background: none; cursor: pointer;
  padding: 10px 2px 12px;
  font-family: var(--font); font-size: 13px; font-weight: 400; letter-spacing: .16em;
  color: var(--text-2);
  transition: color .18s ease;
}.tab:hover { color: var(--text); }
.tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: transparent;
  transition: background .18s ease;
}
.tab.active { color: var(--text); font-weight: 500; }
.tab.active::after { background: var(--accent); }

.chip {
  padding: 9px 15px; border-radius: 3px; cursor: pointer;
  background: var(--card); color: var(--text-2);
  border: 1px solid var(--line);
  font-family: var(--font); font-size: 12px; font-weight: 400; letter-spacing: .12em;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.chip:hover { border-color: #C9BEB1; color: var(--text); }
.chip.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.select-chip {
  appearance: none; -webkit-appearance: none;
  height: 46px; padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238A7D72' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}

/* ============================== 订单列表 ============================== */

.order-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.5fr) 150px 110px 110px 110px auto;
  align-items: center; gap: 14px;
  background: var(--card);
  border: 1px solid var(--line); border-left: 2px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 17px 22px; margin-bottom: 8px; cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.order-row:hover { border-left-color: var(--accent); background: #FDFBF7; }
.order-row.cancelled { opacity: .55; }
.or-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.or-name { font-family: var(--font); font-size: 16px; font-weight: 500; letter-spacing: .1em; white-space: nowrap; }
.or-meta { font-family: var(--font); font-size: 11.5px; letter-spacing: .1em; color: var(--text-2); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.or-date { font-family: var(--serif-num); font-size: var(--num-sm); font-weight: 400; letter-spacing: .06em; color: var(--text-2); white-space: nowrap; }
.or-amt { font-family: var(--font); font-size: 11px; letter-spacing: .12em; color: var(--text-3); }
.or-amt b {
  display: block; font-family: var(--serif-num); font-size: 22px; font-weight: 400;
  color: var(--text); letter-spacing: var(--num-ls); line-height: var(--num-lh); margin-top: 3px; white-space: nowrap;
}
.or-amt b.alert { color: var(--accent-deep); }
.or-amt b.muted { color: var(--text-3); }
.or-tag { justify-self: end; }
.or-note {
  grid-column: 1 / -1;
  font-family: var(--font); font-size: 12px; letter-spacing: .08em; color: var(--text-3); line-height: 1.7;
  border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px;
}

/* ============================== 弹窗 / 表单 ============================== */

.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: flex-start; justify-content: center;
  padding: 5vh 16px; overflow-y: auto;
  background: rgba(23, 20, 18, .45);
  backdrop-filter: blur(3px) saturate(.92);
}
.modal-mask.show { display: flex; }

.modal {
  width: 100%; max-width: 580px; margin-bottom: 6vh;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px -30px rgba(23, 20, 18, .45);
  animation: pop .26s cubic-bezier(.2, .8, .25, 1) both;
}
.modal-sm { max-width: 440px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 30px 16px; border-bottom: 1px solid var(--line);
}
.modal-title { font-family: var(--serif-cn); font-size: 21px; font-weight: 400; letter-spacing: .08em; }
.modal-close {
  width: 32px; height: 32px; border-radius: 3px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: transparent; color: var(--text-2);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.modal-close svg { width: 14px; height: 14px; }
.modal-close:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.modal-body { padding: 22px 30px 30px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.form-item.full { grid-column: 1 / -1; }
.form-item label {
  font-family: var(--font); font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-2);
}
.form-item label .req { color: var(--accent); margin-left: 3px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; outline: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #FDFBF7; color: var(--text);
  padding: 12px 14px;
  font-family: var(--font); font-size: 14px; letter-spacing: .06em;
  transition: border-color .18s ease, background .18s ease;
}
.form-item input::placeholder, .form-item textarea::placeholder { color: var(--text-3); }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  border-color: var(--accent); background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(167, 97, 80, .08);
}
.form-item select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238A7D72' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.form-item textarea { resize: vertical; min-height: 74px; line-height: 1.7; }

.row-inline { display: flex; gap: 8px; align-items: stretch; }
.row-inline select { flex: 1; }
.row-inline .btn { flex-shrink: 0; }

.unit-input { position: relative; }
.unit-input input { padding-right: 34px; }
.unit-input .y {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-family: var(--serif-num); font-size: 15px; font-weight: 400; color: var(--text-3); pointer-events: none;
}

.calc-hint {
  grid-column: 1 / -1;
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 13px 18px; border-radius: 3px;
  background: var(--bg); color: var(--text-2);
  border: 1px solid var(--line); border-left: 2px solid var(--accent);
  font-family: var(--font); font-size: 12px; letter-spacing: .16em;
}
.calc-hint b { font-family: var(--serif-num); font-size: 26px; font-weight: 400; letter-spacing: var(--num-ls); line-height: var(--num-lh); color: var(--accent-deep); }

.dup-hint {
  display: none; margin-bottom: 16px;
  padding: 11px 14px; border-radius: 3px;
  background: var(--ok-soft); color: var(--ok); border-left: 2px solid var(--ok);
  font-family: var(--font); font-size: 12.5px; letter-spacing: .06em;
}
.dup-hint.show { display: flex; align-items: center; gap: 8px; }
.dup-hint svg { width: 14px; height: 14px; flex-shrink: 0; }

.modal-actions { display: flex; gap: 12px; margin-top: 26px; }
.modal-actions .btn { flex: 1; }

.success-box { text-align: center; padding: 22px 0 6px; }
.success-box .s-ico {
  width: 60px; height: 60px; margin: 0 auto 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ok);
  border: 1px solid #D8E2D9; background: var(--ok-soft);
}
.success-box .s-ico svg { width: 26px; height: 26px; stroke-width: 1.4; }
.success-box .s-title { font-family: var(--serif-cn); font-size: 23px; font-weight: 400; letter-spacing: .08em; }
.success-box .s-sub { margin-top: 12px; font-family: var(--font); font-size: 13px; letter-spacing: .08em; color: var(--text-2); line-height: 1.9; }

.od-row {
  display: flex; gap: 18px; padding: 13px 0;
  border-bottom: 1px solid var(--line); font-family: var(--font); font-size: 13px; letter-spacing: .08em;
}
.od-row:last-of-type { border-bottom: none; }
.od-row .k {
  width: 84px; flex-shrink: 0; color: var(--text-2);
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; padding-top: 3px;
}
.od-row .v { color: var(--text); font-weight: 400; word-break: break-all; line-height: 1.6; }
.od-row .v.num { font-family: var(--serif-num); font-size: var(--num-sm); font-weight: 400; letter-spacing: var(--num-ls); }
.od-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.od-actions .btn { flex: 1; min-width: 130px; }

/* 客户详情历史订单行 */
.sched-item {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 2px; border-bottom: 1px solid var(--line); cursor: pointer;
  transition: padding-left .2s ease;
}
.sched-item:last-child { border-bottom: none; }
.sched-item:hover { padding-left: 8px; }
.sched-item:hover .s-name { color: var(--accent-deep); }
.sched-time {
  font-family: var(--serif-num); font-size: 22px; font-weight: 400;
  letter-spacing: var(--num-ls); line-height: var(--num-lh); color: var(--accent-deep); width: auto; min-width: 86px; flex-shrink: 0;
}
.sched-info { flex: 1; min-width: 0; }
.sched-info .s-name { font-family: var(--font); font-size: 14px; font-weight: 500; letter-spacing: .1em; transition: color .2s ease; }
.sched-info .s-serv { font-family: var(--font); font-size: 11.5px; letter-spacing: .1em; color: var(--text-2); margin-top: 5px; }
.sched-right { text-align: right; flex-shrink: 0; }
.sched-amount { font-family: var(--serif-num); font-size: 20px; font-weight: 400; letter-spacing: var(--num-ls); line-height: var(--num-lh); }
.sched-right .tag { margin-top: 5px; }

/* ============================== 客户 ============================== */

.cust-list { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; box-shadow: var(--shadow); }
.cust-head, .cust-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.6fr) 110px 90px 130px 120px 30px;
  align-items: center; gap: 12px;
  padding: 15px 24px;
}
.cust-head {
  padding: 12px 24px;
  border-bottom: 1px solid var(--line); background: #F8F4EE;
  font-family: var(--font); font-size: 10.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-2);
}
.cust-row { border-bottom: 1px solid var(--line); cursor: pointer; transition: background .18s ease; }
.cust-row:last-child { border-bottom: none; }
.cust-row:hover { background: #FDFBF7; }
.cust-row:hover .cr-name { color: var(--accent-deep); }
.cr-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cr-name { font-family: var(--font); font-size: 15px; font-weight: 500; letter-spacing: .1em; transition: color .2s ease; white-space: nowrap; }
.cr-contact { font-family: var(--font); font-size: 11.5px; letter-spacing: .06em; color: var(--text-3); margin-top: 4px; }
.cr-src { font-family: var(--font); font-size: 12.5px; letter-spacing: .08em; color: var(--text-2); }
.cr-num { font-family: var(--serif-num); font-size: 18px; font-weight: 400; line-height: var(--num-lh); letter-spacing: var(--num-ls); color: var(--text); }
.cr-num .u { font-family: var(--font); font-size: 11px; color: var(--text-3); letter-spacing: .08em; margin-left: 2px; }
.cr-money { font-family: var(--serif-num); font-size: 18px; font-weight: 400; line-height: var(--num-lh); letter-spacing: var(--num-ls); color: var(--text); white-space: nowrap; }
.cr-last { font-family: var(--font); font-size: 12.5px; letter-spacing: .06em; color: var(--text-2); }
.cr-arrow {
  justify-self: end; width: 6px; height: 6px; margin-right: 4px;
  border-top: 1px solid currentColor; border-right: 1px solid currentColor;
  transform: rotate(45deg); color: var(--text-3);
}
.cr-stats-m { display: none; }

.avatar {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-cn); font-size: 16px; font-weight: 400;
  color: var(--accent-deep); background: var(--accent-soft);
  border: 1px solid #E6CFC7;
}
.cust-detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.cc-top { display: flex; align-items: center; gap: 14px; }
.cc-name { font-family: var(--font); font-size: 16px; font-weight: 500; letter-spacing: .1em; color: var(--text); }
.cc-contact { margin-top: 4px; font-family: var(--font); font-size: 11.5px; letter-spacing: .08em; color: var(--text-3); }
.back-link {
  border: none; background: none; cursor: pointer; padding: 4px 0;
  font-family: var(--font); font-size: 12px; letter-spacing: .14em; color: var(--text-2);
}
.back-link:hover { color: var(--accent-deep); }

.stat-grid { display: grid; gap: 12px; }
.stat-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
}
.stat-label {
  font-family: var(--font); font-size: 10.5px; font-weight: 500; letter-spacing: .2em;
  color: var(--text-2); text-transform: uppercase;
}
.stat-value {
  font-family: var(--serif-num); font-size: 36px; font-weight: 400;
  line-height: var(--num-lh); letter-spacing: var(--num-ls); color: var(--text); margin-top: 8px;
}
.stat-value .unit {
  font-family: var(--font); font-size: 12px; font-weight: 400;
  letter-spacing: .1em; color: var(--text-3); margin-left: 4px;
}
.stat-value.warn { color: var(--accent); }

/* ============================== 账务 ============================== */

.fin-block { padding: 6px 28px; }
.fin-group { display: grid; grid-template-columns: 86px 1fr 1fr 1fr; align-items: center; }
.fin-group + .fin-group { border-top: 1px solid var(--line); }
.fin-glab {
  font-family: var(--font); font-size: 11px; font-weight: 500; letter-spacing: .24em;
  color: var(--text-3); padding: 18px 0;
}
.fin-item { padding: 18px 0 18px 28px; border-left: 1px solid var(--line); }
.fin-lab { font-family: var(--font); font-size: 11px; font-weight: 500; letter-spacing: .18em; color: var(--text-2); }
.fin-val {
  font-family: var(--serif-num); font-size: 38px; font-weight: 400;
  line-height: var(--num-lh); letter-spacing: var(--num-ls); color: var(--text); margin-top: 8px; white-space: nowrap;
}
.fin-val.alert { color: var(--accent); }

.tx-item {
  display: flex; align-items: center; gap: 15px;
  padding: 14px 2px; border-bottom: 1px solid var(--line);
}
.tx-item:last-child { border-bottom: none; }
.tx-ico {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: 12px;
  border: 1px solid var(--line); color: var(--text-2); background: transparent;
}
.tx-ico.in  { color: var(--ok); border-color: #D8E2D9; background: var(--ok-soft); }
.tx-ico.out { color: var(--text-2); }
.tx-info { flex: 1; min-width: 0; }
.tx-desc { font-family: var(--font); font-size: 13.5px; letter-spacing: .08em; font-weight: 500; }
.tx-sub  { margin-top: 4px; font-family: var(--font); font-size: 11px; letter-spacing: .1em; color: var(--text-3); }
.tx-amount { flex-shrink: 0; font-family: var(--serif-num); font-size: 22px; font-weight: 400; letter-spacing: var(--num-ls); line-height: var(--num-lh); color: var(--text); }
.tx-amount.out { color: var(--text-2); }

/* ============================== Toast ============================== */

#toast {
  position: fixed; left: 50%; bottom: 78px; z-index: 300;
  transform: translateX(-50%) translateY(16px);
  max-width: 84vw; padding: 12px 24px; border-radius: 3px;
  background: rgba(23, 20, 18, .94); color: var(--cream);
  border: 1px solid rgba(180, 154, 112, .3);
  font-family: var(--font); font-size: 12.5px; letter-spacing: .12em; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .26s ease, transform .26s ease;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================== 移动端 ============================== */

.mobile-top {
  display: none; position: sticky; top: 0; z-index: 50;
  align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--ink); color: var(--cream);
  box-shadow: inset 0 -1px 0 rgba(180, 154, 112, .2);
}
.mobile-top .brand-logo { width: 34px; height: 34px; font-size: 16px; }
.mobile-top .brand-name { font-family: var(--serif-cn); font-size: 16px; font-weight: 400; margin-top: 0; }
.mobile-top .brand-sub { font-size: 8px; letter-spacing: .32em; margin-top: 2px; }
.mobile-top .brand-text { display: flex; flex-direction: column; }
/* 移动端没有侧栏，把「修改密码」放进顶部栏，否则手机上无法改密码 */
.mobile-top .side-btn {
  flex: none; margin-left: auto;
  padding: 7px 12px; font-size: 12px; letter-spacing: .1em;
  border-color: rgba(205, 184, 148, .45); color: #CDB894;
}
.mobile-top .side-btn:hover { color: var(--cream); border-color: rgba(205, 184, 148, .8); }

.bottom-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(252, 250, 246, .97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.bottom-nav .nav { display: flex; flex-direction: row; }
.bottom-nav .nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 4px; border: none; background: none; cursor: pointer;
  font-family: var(--font); font-size: 10.5px; font-weight: 400; letter-spacing: .14em; color: var(--text-2);
  border-radius: 3px; transition: color .2s ease;
}
.bottom-nav .nav-item .ico { font-family: var(--serif-num); font-size: 14px; }
/* 激活态：顶部指示线 + 淡底 + 强调色，三重提示，弱屏也能一眼看出当前页 */
.bottom-nav .nav-item { position: relative; }
.bottom-nav .nav-item::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%) scaleX(0);
  width: 26px; height: 2px; background: var(--accent); border-radius: 2px;
  transition: transform .22s ease;
}
.bottom-nav .nav-item.active { color: var(--accent-deep); background: var(--accent-soft); }
.bottom-nav .nav-item.active::before { transform: translateX(-50%) scaleX(1); }
.bottom-nav .nav-item.active .ico { color: var(--accent-deep); }
/* 安全区：为底部导航与iPhone Home 指示条留出空间，内容不会被遮挡 */
.main { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }

/* ==========================================================================
   响应式体系（Responsive Design System）
   Mobile   ≤ 767px        真正的移动布局：顶部品牌栏 + 底部 4 项导航
   Tablet   768 – 1199px   侧栏收窄成「图标 + 简短文字」，内容两列
   Desktop  ≥ 1200px       左侧固定导航 + 主内容，最大宽度 1320px
   Large    ≥ 1440px       留白更宽、字号微增、洞察区三列
   ========================================================================== */

/* ---------- 平板：收窄侧栏 ---------- */
@media (min-width: 768px) and (max-width: 1199px) {
  /* 注意：.side 基础样式是 flex: 0 0 232px，只改 width 不生效，必须同时改 flex-basis */
  .side { width: 96px; flex: 0 0 96px; padding: 24px 12px 20px; }
  .side .brand { padding: 20px 0 12px; }
  .side .brand-name, .side .brand-sub, .side .side-label, .side .side-foot { display: none; }
  .side .nav { padding: 6px 10px; }
  .side .nav-item { flex-direction: column; gap: 3px; padding: 11px 4px; }
  .side .nav-item .ico { font-size: 11px; }
  .side .nav-item .lbl { font-size: 12px; letter-spacing: .04em; }
  .side .side-auth { padding: 10px 8px; }
  .side .side-btn { font-size: 11px; padding: 9px 4px; letter-spacing: .02em; }

  .main { padding: 26px 22px 44px; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .home-rail .brand-card { display: none; }
  .month-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insight-row { grid-template-columns: minmax(0, 1fr); }
  .stat-row { grid-template-columns: minmax(0, 1fr); }

  /* 平板：列宽 + 内边距必须一起收紧，否则窄屏下总宽超出容器出现横向滚动 */
  .order-row {
    grid-template-columns: minmax(0, 1.2fr) 100px 84px 84px 84px auto;
    gap: 8px; padding: 15px 16px;
  }
  .order-row .or-head, .order-row .or-date, .order-row .or-amt, .order-row .or-tag { min-width: 0; }
  .order-row .or-note { grid-column: 1 / -1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .order-row .or-date { font-size: 12.5px; }
  .cust-row { grid-template-columns: 1.1fr .9fr .8fr .8fr .9fr 90px 22px; }
  .cal-grid { gap: 4px; }
  .cal-cell { min-height: 56px; }
  .qa-txt i { display: none; }
  .quick-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .insight-row .trend-card { min-height: 0; }
}

/* ---------- 手机：真正的移动布局 ---------- */
@media (max-width: 767px) {
  /* 性能：移动端取消分批延迟入场动画，避免低端机掉帧（规范第十九条） */
  .page.active > * { animation: fadein .18s ease both; }
  .page.active > *:nth-child(n) { animation-delay: 0s; }
  @keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

  /* 结构：隐藏侧栏，显示顶部品牌栏与底部导航 */
  .side { display: none; }
  .mobile-top {
    display: flex; position: sticky; top: 0; z-index: 60;
    align-items: center; gap: 12px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
    background: var(--ink); color: var(--cream);
    border-bottom: 1px solid rgba(242, 237, 228, .12);
  }
  .mobile-top .brand-logo { width: 38px; height: 38px; font-size: 15px; }
  .mobile-top .brand-name { color: var(--cream); font-size: 15px; }
  .mobile-top .brand-sub { color: rgba(242, 237, 228, .5); font-size: 10px; letter-spacing: .22em; }
  .mobile-top .brand-text { flex: 1; min-width: 0; }
  .more-btn {
    display: flex; align-items: center; gap: 7px; min-height: 44px;
    padding: 0 14px; border: 1px solid rgba(242, 237, 228, .28); border-radius: 10px;
    background: transparent; color: var(--cream); font-family: var(--font); font-size: 13px;
    letter-spacing: .1em; cursor: pointer;
  }
  .mb-dots { display: flex; flex-direction: column; gap: 3px; }
  .mb-dots i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

  .bottom-nav { display: block; }
  .main { padding: 18px 16px 104px; }
  .page-head { margin-bottom: 18px; }
  .page-title { font-size: 30px; }

  /* 卡片：少圆角、少阴影，保持编辑感 */
  .card { padding: 18px 16px 20px; border-radius: 12px; box-shadow: none; }

  /* 首页重排：品牌问候 → 今日数据 → 快捷操作 → 今日排期 → 未来7天 → 待处理 → 本月 */
  .home-grid { display: flex; flex-direction: column; gap: 14px; }
  .home-main, .home-rail { display: contents; }
  .home-hero { order: 1; display: block; padding: 4px 2px 2px; }
  .hero-text { padding: 0; }
  .hero-visual { display: none; }
  .hero-date { font-size: 12px; }
  .home-hello { font-size: 28px; margin-top: 10px; }
  .hero-tagline { font-size: 13px; }
  .today-card { order: 2; }
  .quick-row { order: 3; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .qa-primary { grid-column: auto; min-height: 60px; padding: 16px 18px; }
  .qa:nth-child(3) { display: none; }   /* 手机只留「新建订单 / 今日排期」两个核心入口 */
  .qa { min-height: 56px; }
  .qa-ico { width: 36px; height: 36px; }
  .qa-arr { display: none; }
  .sched-card { order: 4; }
  .up-card { order: 5; }
  .rail-remind { order: 6; }
  .rail-aging { order: 7; }
  .month-row { order: 8; grid-template-columns: minmax(0, 1fr); display: flex; flex-direction: column; gap: 14px; }
  .brand-card { order: 9; }
  .insight-row { order: 10; grid-template-columns: minmax(0, 1fr); }
  .home-script { display: none; }

  /* 今日工作：2×2，不做过大卡片 */
  .today-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .tn-item:nth-child(3) { padding-left: 0; border-left: none; }
  .tn-val { font-size: 32px; }
  .tn-lab { font-size: 12px; }

  /* 今日排期：竖向时间轴，整行可点（≥44px）
     两行布局：竖线+时间+姓名/项目 ／ 状态标签 + 收款金额（同一行，左右分列） */
  .tl-item {
    grid-template-columns: 12px 54px minmax(0, 1fr);
    grid-template-areas:
      "rail time  body"
      "rail right right";
    gap: 8px 10px; padding: 14px 0; min-height: 44px;
  }
  .tl-rail { grid-area: rail; }
  .tl-time { grid-area: time; align-self: start; }
  .tl-time b { font-size: 21px; }
  .tl-time span { display: none; }
  .tl-body { grid-area: body; }
  .tl-ava { display: none; }
  .tl-namerow { flex-wrap: wrap; gap: 4px 8px; }
  .tl-meta { margin-top: 4px; }
  .tl-right {
    grid-area: right; display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-top: 2px; padding-top: 9px; border-top: 1px solid var(--line);
  }
  .tl-statusrow { justify-content: flex-start; flex: 0 0 auto; }
  .tl-dots { display: none; }
  .tl-amounts { font-size: 12px; color: var(--text-2); text-align: right; }
  .tl-amounts b { font-family: var(--serif-num); font-size: 15px; color: var(--text); font-weight: 400; }

  /* 未来 7 天：手机用紧凑日期网格（3 列） */
  .up-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .up-cell { padding: 10px 6px; border-radius: 10px; min-height: 44px; text-align: center; }
  .up-cell .up-d { font-size: 12px; }
  .up-cell .up-w { font-size: 11px; color: var(--text-3); }
  .up-cell .up-n { font-size: 15px; }
  .up-cell .up-t { display: none; }
  /* 有单 → 「N 单」；空闲 → 「空闲」（不重复显示数字） */
  .up-cell.busy::after { content: none; }
  .up-cell.busy .up-n { font-size: 14px; color: var(--accent-deep); }
  .up-cell.busy .up-n::after { content: " 单"; font-size: 11px; letter-spacing: .04em; }
  .up-cell:not(.busy) .up-n { display: none; }
  .up-cell:not(.busy)::after { content: "空闲"; display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }
  .up-cell .up-tag { display: none; }

  /* 月度与来源 */
  .month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .month-item:nth-child(odd) { padding-left: 0; border-left: none; }
  .month-item:nth-child(even) { padding-left: 14px; }
  .donut-wrap { justify-content: flex-start; }

  /* 列表 / 卡片化 */
  .order-row { display: flex; flex-wrap: wrap; align-items: center; row-gap: 10px; padding: 16px 16px; min-height: 44px; }
  .order-row .or-head { flex: 1 1 55%; min-width: 0; }
  .order-row .or-tag { margin-left: auto; align-self: flex-start; }
  .order-row .or-date { flex: 1 1 100%; order: 3; }
  .order-row .or-amt { flex: 0 0 auto; order: 4; margin-right: 22px; }
  .order-row .or-note { flex: 1 1 100%; order: 5; margin-top: 0; }

  .cust-head { display: none; }
  .cust-list { border: none; background: none; box-shadow: none; }
  .cust-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "id arrow" "stats stats";
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    margin-bottom: 8px; padding: 16px 16px; min-height: 44px;
  }
  .cr-id { grid-area: id; }
  .cr-src, .cr-num, .cr-money, .cr-last { display: none; }
  .cust-row .cr-stats-m { grid-area: stats; display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-family: var(--font); font-size: 12px; color: var(--text-2); }
  .cust-row .cr-stats-m b { font-family: var(--serif-num); font-size: 18px; color: var(--text); font-weight: 400; line-height: var(--num-lh); letter-spacing: var(--num-ls); }
  .cr-arrow { grid-area: arrow; }

  .fin-block { padding: 4px 16px; }
  .fin-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin-glab { grid-column: 1 / -1; padding-bottom: 4px; }
  .fin-item { padding: 14px 0 14px 14px; }
  .fin-val { font-size: 30px; }
  .tx-amount { font-size: 19px; }
  .sched-right .tag { display: none; }

  /* 工具条与筛选：整行、≥44px */
  .list-toolbar { flex-wrap: wrap; gap: 10px; }
  .list-toolbar .btn-lg { width: 100%; order: -1; min-height: 48px; }
  .list-toolbar .select-chip { flex: 1; min-width: 0; min-height: 44px; }
  .search-box { height: 46px; min-width: 0; flex: 1 1 100%; }
  .tabs-row { gap: 16px; overflow-x: auto; }
  .preset-row { gap: 8px; }
  .preset { min-height: 44px; padding: 0 15px; }

  /* 表单与弹窗 */
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .modal-head { padding: 18px 18px 14px; }
  .modal-body { padding: 18px 18px 24px; }
  .modal-title { font-size: 19px; }
  input, select, textarea { min-height: 44px; }

  /* 排期页：月历 */
  .cal-bar { gap: 8px; }
  .cal-label { font-size: 19px; min-width: 128px; text-align: center; }
  .cal-cell { min-height: 48px; border-radius: 8px; }
  .cal-cell b { font-size: 17px; }
  .cal-cell .cal-n { font-size: 10px; }
  .day-item { min-height: 44px; }

  /* 统计页 */
  .stat-row { grid-template-columns: minmax(0, 1fr); }
  .stat-note { font-size: 11.5px; line-height: 1.7; color: var(--text-3); }
}

/* ---------- 小屏 iPhone 级 ---------- */
@media (max-width: 400px) {
  .main { padding: 16px 13px 100px; }
  .card { padding: 16px 13px 18px; }
  .home-hello { font-size: 25px; }
  .tn-val { font-size: 28px; }
  .up-strip { gap: 6px; }
  .qa-primary { min-height: 56px; }
}

/* ---------- 桌面：主内容最大宽度，避免无限拉伸 ---------- */
@media (min-width: 1200px) {
  .main { padding: 34px 40px 60px; }
  .main > .page { max-width: 1320px; margin: 0 auto; }
  .home-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}

/* ---------- 超大屏（≥1800）：把两侧留白用起来，但仍有上限 ---------- */
@media (min-width: 1800px) {
  .main { padding: 44px 72px 80px; }
  .main > .page { max-width: 1560px; }
  .home-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
  .cal-cell { min-height: 96px; }
  .cal-cell b { font-size: 21px; }
  .tc-svg { height: 168px; }
  .tl-time b { font-size: 27px; }
  .order-row { grid-template-columns: minmax(0, 1.6fr) 170px 120px 120px 120px auto; gap: 16px; }
  .up-cell { padding: 18px 12px; }
}

/* ---------- 大屏：留白更宽、洞察区三列 ---------- */
@media (min-width: 1440px) {
  .main { padding: 40px 56px 72px; }
  .main > .page { max-width: 1400px; }
  .home-grid { grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tc-svg { height: 148px; }
  .up-cell { padding: 16px 10px; }
  .cal-cell { min-height: 84px; }
  .cal-cell b { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}


/* ===== 登录鉴权 ===== */
.login-mask {
  position: fixed; inset: 0; background: var(--bg);
  z-index: 500; display: none; align-items: center; justify-content: center; padding: 20px;
}
.login-mask.show { display: flex; }
.login-card {
  width: 340px; max-width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 34px 30px 30px; display: flex; flex-direction: column; gap: 14px;
}
.login-brand { height: 54px; width: auto; align-self: center; }
.login-title {
  margin: 2px 0 0; text-align: center; font-size: 22px; font-weight: 500;
  letter-spacing: 0.35em; text-indent: 0.35em; color: var(--ink);
}
.login-sub {
  text-align: center; font-size: 11px; letter-spacing: 0.28em; text-indent: 0.28em;
  color: var(--text-3); margin-bottom: 8px;
}
.login-err { min-height: 18px; font-size: 12px; color: #A32D2D; }
.login-submit { width: 100%; padding: 12px 0; font-size: 15px; }
.side-auth { display: flex; gap: 8px; padding: 10px 16px 0; }
.side-btn {
  flex: 1; font-size: 12px; padding: 8px 0;
  border: 1px solid var(--line); background: transparent; color: var(--text-2);
  border-radius: 8px; cursor: pointer; font-family: inherit;
}
.side-btn:hover { color: var(--text); border-color: var(--text-3); }

/* ==========================================================================
   排期冲突提示 / 未来 7 天 / 待收账龄 / 备份区
   ========================================================================== */
.dup-hint.conflict-hint {
  background: var(--accent-soft); color: var(--accent-deep);
  border-left-color: var(--accent-deep);
}
.dup-hint.conflict-hint.show { display: flex; align-items: flex-start; gap: 8px; line-height: 1.85; }
.dup-hint.conflict-hint svg { margin-top: 2px; }

.up-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.up-cell {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 6px 9px; text-align: center; background: var(--card);
  cursor: pointer; transition: background .18s ease, border-color .18s ease;
}
.up-cell:hover { border-color: var(--accent); }
.up-cell.busy { border-color: #E6CFC7; background: var(--accent-soft); }
.up-cell .up-d { font-family: var(--serif-num); font-size: 12px; color: var(--text-2); letter-spacing: var(--num-ls); }
.up-cell .up-w { font-family: var(--font); font-size: 10.5px; color: var(--text-3); letter-spacing: .1em; margin-top: 2px; }
.up-cell .up-n { font-family: var(--serif-num); font-size: 19px; color: var(--text-3); margin-top: 5px; letter-spacing: var(--num-ls); line-height: 1.2; }
.up-cell.busy .up-n { color: var(--accent-deep); }
.up-cell .up-t { font-family: var(--font); font-size: 10.5px; color: var(--text-3); margin-top: 2px; letter-spacing: .04em; }

.aging-row { display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.aging-item { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.aging-item .a-lab { font-family: var(--font); font-size: 12px; letter-spacing: .08em; color: var(--text-2); }
.aging-item .a-val { font-family: var(--serif-num); font-size: 15px; color: var(--text); letter-spacing: var(--num-ls); }
.aging-item .a-cnt { font-family: var(--font); font-size: 11px; color: var(--text-3); margin-left: 7px; letter-spacing: .05em; }
.aging-item.over .a-lab, .aging-item.over .a-val { color: var(--accent-deep); }

.bak-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bak-list { display: flex; flex-direction: column; }
.bak-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
  font-family: var(--font); font-size: 12px; color: var(--text-2); letter-spacing: .05em;
}
.bak-item:last-child { border-bottom: none; }
.bak-item .b-meta { font-family: var(--serif-num); font-size: 11.5px; color: var(--text-3); }

@media (max-width: 980px) {
  .up-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .up-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ==================== V4：经营洞察 + 筛选 chips ==================== */

.insight-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }

.trend-chart { padding: 4px 2px 0; }
.tc-svg { width: 100%; height: 122px; display: block; }
.tc-bar { fill: var(--paper-2); }
.tc-bar.hot { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; }
.tc-line { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; opacity: .75; }
.tc-dot { fill: var(--card); stroke: var(--accent-deep); stroke-width: 1.8; }
.tc-lbl { font-size: 9px; fill: var(--text-3); }
.trend-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.tf-item { font-size: 11.5px; color: var(--text-3); letter-spacing: .04em; }
.tf-item b { display: block; margin-top: 3px; font-size: 15px; color: var(--text); font-weight: 600; letter-spacing: 0; }

.svc-rank { display: flex; flex-direction: column; gap: 9px; }
.svc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: baseline; }
.svc-name { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-val { font-size: 11.5px; color: var(--text-3); }
.svc-bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--paper-2); overflow: hidden; }
.svc-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent-deep), var(--gold)); }
.svc-src-title { margin: 16px 0 9px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--text-3); letter-spacing: .08em; }
.svc-rank.c3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.svc-src { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-2); }
.svc-src b { font-weight: 600; color: var(--text); }

.preset-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 12px; flex-wrap: wrap; }
.preset {
  border: 1px solid var(--line); background: var(--card); color: var(--text-2);
  border-radius: 999px; padding: 7px 15px; font-size: 12.5px; cursor: pointer;
  font-family: var(--font); letter-spacing: .05em; transition: all .18s ease;
}
.preset:hover { border-color: var(--accent); color: var(--accent-deep); }
.preset.active { background: var(--accent-deep); border-color: var(--accent-deep); color: #FDFBF7; }
.preset-count { margin-left: auto; font-size: 12px; color: var(--text-3); }

.hidden-filter { display: none !important; }

@media (max-width: 1180px) {
  .insight-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .preset { padding: 6px 12px; font-size: 12px; }
  .svc-rank.c3 { grid-template-columns: minmax(0, 1fr); }
}


/* ==========================================================================
   V5 新增组件：更多抽屉 / 月历 / 统计页 / 手机时间轴
   ========================================================================== */

/* ---------- 更多抽屉（手机） ---------- */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(23, 20, 18, .42);
  opacity: 0; pointer-events: none; transition: opacity .24s ease; z-index: 90;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(80vw, 320px);
  background: var(--card); border-left: 1px solid var(--line);
  transform: translateX(102%); transition: transform .26s cubic-bezier(.22, .8, .3, 1);
  z-index: 95; display: flex; flex-direction: column; padding: 18px 18px 24px;
}
.drawer.show { transform: translateX(0); }
.dw-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.dw-brand { display: flex; align-items: center; gap: 12px; }
.dw-brand .brand-logo { width: 40px; height: 40px; font-size: 15px; }
.dw-name { font-size: 16px; color: var(--ink); }
.dw-sub { font-size: 10px; letter-spacing: .22em; color: var(--text-3); margin-top: 3px; }
.dw-nav { display: flex; flex-direction: column; padding-top: 8px; }
.dw-item {
  display: flex; align-items: center; gap: 14px; min-height: 52px;
  padding: 0 6px; background: none; border: none; border-bottom: 1px solid var(--line);
  color: var(--text); font-family: var(--font); font-size: 15px; letter-spacing: .1em;
  text-align: left; cursor: pointer;
}
.dw-item .ico { font-family: var(--serif-num); font-size: 12px; color: var(--text-3); min-width: 20px; }
.dw-item:active { background: var(--paper-2); }
.dw-danger { color: var(--accent-deep); border-bottom: none; margin-top: auto; }
.dw-foot { margin-top: 18px; font-size: 10.5px; letter-spacing: .16em; color: var(--text-3); }
.drawer .modal-close { min-width: 44px; min-height: 44px; }

/* ---------- 排期：月历 ---------- */
.cal-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cal-label { flex: 1; text-align: center; font-size: 22px; color: var(--ink); }
.cal-nav {
  width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--text-2); font-size: 20px; line-height: 1; cursor: pointer;
}
.cal-nav:hover { border-color: var(--accent); color: var(--accent-deep); }
.cal-card { padding: 18px 16px 16px; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.cal-week span { text-align: center; font-size: 11px; letter-spacing: .12em; color: var(--text-3); }
.cal-week .wk-end { color: var(--accent); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-cell {
  min-height: 64px; padding: 8px 4px 6px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; font-family: var(--font); transition: border-color .16s, background .16s;
}
.cal-cell:hover { border-color: var(--accent); }
.cal-cell.out { opacity: .38; }
.cal-cell.today { border-color: var(--gold); }
.cal-cell.sel { background: var(--ink); border-color: var(--ink); }
.cal-cell.sel .cal-d, .cal-cell.sel .cal-n { color: var(--cream); }
.cal-cell.busy { background: var(--accent-soft); border-color: rgba(140, 98, 83, .32); }
.cal-cell.sel.busy { background: var(--ink); }
.cal-d { font-family: var(--serif-num); font-size: 18px; color: var(--text); line-height: 1.1; }
.cal-n { font-size: 10px; color: var(--accent-deep); letter-spacing: .04em; }
.cal-cell:not(.busy) .cal-n { color: var(--text-3); }
.cal-legend { display: flex; align-items: center; gap: 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--text-3); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--line); display: inline-block; }
.lg-dot.busy { background: var(--accent-soft); border-color: var(--accent); }
.cal-tip { margin-left: auto; }

/* 当日安排条目 */
.day-item {
  display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  min-height: 44px; padding: 14px 2px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.day-item:last-child { border-bottom: none; }
.day-item:hover { background: var(--paper-2); }
.day-time { font-family: var(--serif-num); font-size: 20px; color: var(--ink); }
.day-name { font-size: 14px; color: var(--text); }
.day-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.day-right { text-align: right; }
.day-amt { font-family: var(--serif-num); font-size: 18px; color: var(--text); }
.day-left { font-size: 11.5px; color: var(--accent-deep); margin-top: 3px; }

/* ---------- 统计页 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.stat-note { font-size: 12px; line-height: 1.8; color: var(--text-3); }
.stats-page .trend-card { margin-bottom: 0; }

/* ---------- 触摸友好：手机端所有可点元素 ≥44px ---------- */
@media (max-width: 767px) {
  .btn, .btn-sm, .btn-lg { min-height: 44px; }
  .preset, .tab { min-height: 44px; display: inline-flex; align-items: center; }
  .bottom-nav .nav-item { min-height: 52px; }
  .bottom-nav .nav-item .lbl { font-size: 11px; }
  .qa { min-height: 56px; }
  .up-cell { min-height: 44px; }
  .order-row, .cust-row, .tl-item, .day-item, .cal-cell { min-height: 44px; }
  .modal-close { min-width: 44px; min-height: 44px; }
  .side-btn { min-height: 44px; }
  .dw-item { min-height: 52px; }
  .more-btn { min-height: 44px; }
  input[type="date"], input[type="time"] { min-height: 44px; }
}

/* ---------- 触摸手势与滑动提示（规范§13 日期支持左右滑动） ---------- */
.up-strip, .cal-grid { touch-action: pan-y; }   /* 纵向照常滚动，横向手势用于翻页 */
.swipe-hint {
  display: none; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .06em; color: var(--text-3);
}
@media (hover: none) and (pointer: coarse) {
  .swipe-hint { display: inline-flex; }
  .up-strip.is-paging, .cal-grid.is-paging { opacity: .55; transition: opacity .15s; }
}

/* ---------- 手机：隐藏桌面专属 ---------- */
@media (max-width: 767px) {
  .insight-row .trend-foot { gap: 10px 16px; }
  .tf-item b { font-size: 14px; }
}
