/* =========================================================
   茶序排班 · 视觉系统
   ========================================================= */

:root {
  --bg: #f4eee5;
  --bg-deep: #eee5d9;
  --surface: #fffdf9;
  --surface-2: #faf5ed;
  --surface-3: #f5ede2;
  --ink: #2b211b;
  --ink-2: #4b3c32;
  --muted: #85766a;
  --muted-2: #a6988b;
  --line: #e9ded0;
  --line-strong: #ddcfbe;
  --brand: #271b15;
  --brand-2: #35251c;
  --accent: #dc7a45;
  --accent-deep: #c46131;
  --accent-soft: #f9e6d8;
  --matcha: #6f8f69;
  --matcha-soft: #eaf0e5;
  --gold: #b88b4f;
  --gold-soft: #f5ebda;
  --danger: #bd5048;
  --danger-soft: #f9e7e4;
  --blue: #617b96;
  --blue-soft: #e9eff4;
  --plum: #8d6478;
  --plum-soft: #f2e9ee;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(62, 43, 30, .04), 0 6px 18px rgba(62, 43, 30, .035);
  --shadow-md: 0 2px 4px rgba(62, 43, 30, .04), 0 18px 46px rgba(62, 43, 30, .08);
  --shadow-lg: 0 30px 80px rgba(33, 22, 15, .2);
  --font: "Avenir Next", "SF Pro SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: "DIN Alternate", "Avenir Next Condensed", "Bahnschrift", var(--font);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(900px 500px at 88% -10%, rgba(220, 122, 69, .07), transparent 70%),
    radial-gradient(760px 460px at 5% 100%, rgba(111, 143, 105, .06), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #f0c7a9; color: var(--brand); }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.icon svg { width: 100%; height: 100%; stroke-width: 1.8; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* =========================================================
   应用骨架
   ========================================================= */

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: 252px;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 18px;
  color: #f4eadd;
  background:
    radial-gradient(500px 320px at -20% 8%, rgba(220, 122, 69, .18), transparent 65%),
    radial-gradient(440px 380px at 120% 78%, rgba(111, 143, 105, .13), transparent 62%),
    linear-gradient(160deg, #2b1d16 0%, #211611 55%, #241a14 100%);
  overflow: hidden;
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
.sidebar > * { position: relative; z-index: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 22px;
}
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 14px;
  color: #f5d9b6;
  background: linear-gradient(145deg, rgba(220, 122, 69, .28), rgba(220, 122, 69, .08));
  border: 1px solid rgba(245, 217, 182, .22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.brand-mark svg { width: 27px; height: 27px; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-copy strong { font-size: 20px; letter-spacing: .14em; font-weight: 700; color: #fff8ed; }
.brand-copy span { font-size: 9px; letter-spacing: .16em; color: rgba(244, 234, 221, .48); }

.store-card {
  border-radius: 16px;
  padding: 13px 13px;
  background: rgba(255, 250, 241, .055);
  border: 1px solid rgba(255, 250, 241, .09);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.store-avatar {
  width: 34px; height: 34px;
  border-radius: 11px;
  display: grid; place-items: center;
  color: #f7d7b2;
  background: rgba(220, 122, 69, .17);
  border: 1px solid rgba(220, 122, 69, .18);
  flex: 0 0 auto;
}
.store-avatar .icon { width: 17px; height: 17px; }
.store-info { min-width: 0; }
.store-info strong { display: block; font-size: 13px; font-weight: 600; color: #f8eee0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-info span { display: block; font-size: 10px; color: rgba(244, 234, 221, .45); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label {
  padding: 0 12px;
  margin: 7px 0 7px;
  font-size: 9px;
  letter-spacing: .2em;
  color: rgba(244, 234, 221, .32);
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(244, 234, 221, .62);
  font-size: 13.5px;
  text-align: left;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item .icon { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { color: #fff5e7; background: rgba(255, 250, 241, .055); }
.nav-item:active { transform: scale(.985); }
.nav-item.active {
  color: #fff7eb;
  background: linear-gradient(90deg, rgba(220, 122, 69, .23), rgba(220, 122, 69, .07));
  box-shadow: inset 0 0 0 1px rgba(232, 159, 111, .12);
}
.nav-item.active .icon { color: #f1ad7c; opacity: 1; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 18px;
  border-radius: 0 3px 3px 0;
  background: #e78b53;
  transform: translateY(-50%);
}
.nav-badge {
  margin-left: auto;
  min-width: 19px; height: 19px;
  padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 20px;
  background: rgba(220, 122, 69, .22);
  color: #ffc49d;
  font: 600 10px var(--font-num);
}

.sidebar-bottom { margin-top: auto; padding-top: 16px; }
.sidebar-tip {
  position: relative;
  padding: 14px 14px 13px;
  margin: 0 3px 15px;
  border-radius: 15px;
  background: rgba(255, 250, 241, .04);
  border: 1px solid rgba(255, 250, 241, .07);
  overflow: hidden;
}
.sidebar-tip::after {
  content: "";
  position: absolute;
  width: 70px; height: 70px;
  right: -22px; top: -26px;
  border-radius: 50%;
  background: rgba(220, 122, 69, .12);
}
.sidebar-tip .tip-spark { color: #e9a16e; font-size: 12px; }
.sidebar-tip p { margin-top: 5px; font-size: 11px; line-height: 1.75; color: rgba(244, 234, 221, .48); letter-spacing: .02em; }
.manager-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border-radius: 13px;
  transition: background .18s ease;
}
.manager-card:hover { background: rgba(255, 250, 241, .05); }
.manager-card .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.1); }
.manager-meta { min-width: 0; flex: 1; }
.manager-meta strong { display: block; font-size: 12px; font-weight: 600; color: #f7eddf; }
.manager-meta span { display: block; font-size: 10px; color: rgba(244, 234, 221, .4); }
.manager-card .icon { width: 15px; height: 15px; color: rgba(244, 234, 221, .35); }

.sidebar-scrim { display: none; }

.main { margin-left: 252px; min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 86px;
  padding: 14px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(244, 238, 229, .86);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(221, 207, 190, .5);
}
.topbar-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.page-heading { min-width: 0; }
.eyebrow {
  margin-bottom: 1px;
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--muted-2);
  text-transform: uppercase;
}
.page-heading h1 { font-size: 23px; line-height: 1.25; letter-spacing: -.02em; font-weight: 700; white-space: nowrap; }

.topbar-actions { display: flex; align-items: center; gap: 13px; }
.month-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgba(255, 253, 249, .86);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}
.month-arrow {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 9px;
  color: var(--muted);
  background: transparent;
  transition: background .16s, color .16s;
}
.month-arrow:hover { background: var(--surface-3); color: var(--ink); }
.month-arrow .icon { width: 15px; height: 15px; }
.month-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  min-width: 108px;
  justify-content: center;
  font: 600 12.5px var(--font-num);
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
}
.month-pill .icon { width: 14px; height: 14px; color: var(--accent); }
.month-pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.save-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
}
.save-state i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--matcha);
  box-shadow: 0 0 0 3px rgba(111, 143, 105, .12);
}
.save-state.saving i { background: var(--gold); animation: pulse 1s infinite; }

.content {
  max-width: 1580px;
  margin: 0 auto;
  padding: 27px 34px 64px;
  outline: 0;
}
.page { animation: page-in .36s cubic-bezier(.22, .8, .36, 1); }
@keyframes page-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn .icon { width: 15px; height: 15px; }
.btn-primary {
  color: #fffaf1;
  background: linear-gradient(145deg, #dc7a45, #ca6333);
  border-color: #c15d2f;
  box-shadow: 0 5px 13px rgba(196, 97, 49, .2), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { background: linear-gradient(145deg, #e48550, #c45e2d); box-shadow: 0 7px 18px rgba(196, 97, 49, .25); }
.btn-secondary {
  color: var(--ink-2);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: #fff; border-color: var(--line-strong); }
.btn-ghost { color: var(--muted); background: transparent; border-color: transparent; }
.btn-ghost:hover { color: var(--ink); background: rgba(43, 33, 27, .045); }
.btn-soft { color: var(--accent-deep); background: var(--accent-soft); border-color: #f2d5c1; }
.btn-soft:hover { background: #f7ddca; }
.btn-danger { color: #fff; background: var(--danger); border-color: #ae463e; }
.btn-danger:hover { background: #b34840; }
.btn-sm { min-height: 31px; padding: 0 11px; border-radius: 9px; font-size: 11.5px; gap: 5px; }
.btn-sm .icon { width: 13px; height: 13px; }
.btn-lg { min-height: 44px; padding: 0 20px; border-radius: 13px; font-size: 13.5px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-icon {
  width: 34px; height: 34px;
  padding: 0; border-radius: 10px;
  color: var(--muted); background: transparent; border-color: transparent;
}
.btn-icon:hover { color: var(--ink); background: var(--surface-3); }
.btn-icon .icon { width: 16px; height: 16px; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-2);
  background: var(--surface);
  transition: background .16s, border-color .16s;
}
.icon-btn:hover { background: #fff; border-color: var(--line-strong); }
.icon-btn .icon { width: 17px; height: 17px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 21px 22px; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}
.card-title { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.card-sub { margin-top: 3px; font-size: 11px; color: var(--muted-2); line-height: 1.5; }
.card-link {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 0;
  border: 0; background: transparent;
  color: var(--muted); font-size: 11.5px;
  white-space: nowrap;
}
.card-link:hover { color: var(--accent-deep); }
.card-link .icon { width: 13px; height: 13px; }

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-note { font-size: 11.5px; color: var(--muted-2); }

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
}
.segmented button {
  min-height: 29px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  transition: background .16s, color .16s;
}
.segmented button:hover { color: var(--ink); }
.segmented button.active { background: var(--brand); color: #fff8ed; box-shadow: 0 2px 7px rgba(39, 27, 21, .14); }

.filter-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 13px 15px;
  border-radius: 15px;
  background: rgba(255, 253, 249, .7);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.filter-chip {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}
.filter-chip:hover { background: var(--surface-3); color: var(--ink-2); }
.filter-chip.active { background: var(--surface); border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-sm); }
.filter-chip span { color: var(--muted-2); margin-left: 3px; font-family: var(--font-num); }
.search-box {
  position: relative;
  margin-left: auto;
  width: 190px;
}
.search-box .icon {
  position: absolute;
  left: 11px; top: 50%;
  width: 14px; height: 14px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 31px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 11.5px;
  outline: 0;
  transition: border-color .16s, box-shadow .16s;
}
.search-box input:focus { border-color: #d2a27e; box-shadow: 0 0 0 3px rgba(220, 122, 69, .1); }
.search-box input::placeholder { color: var(--muted-2); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.badge .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.badge.accent { color: var(--accent-deep); background: var(--accent-soft); }
.badge.matcha { color: #54734f; background: var(--matcha-soft); }
.badge.gold { color: #8d682f; background: var(--gold-soft); }
.badge.danger { color: #a5443c; background: var(--danger-soft); }
.badge.blue { color: #4f6f8e; background: var(--blue-soft); }
.badge.plum { color: #795267; background: var(--plum-soft); }
.badge.neutral { color: var(--muted); background: var(--surface-3); }

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}

.avatar {
  width: 32px; height: 32px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff9ef;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  background: var(--muted);
  user-select: none;
}
.avatar.sm { width: 26px; height: 26px; font-size: 9.5px; }
.avatar.lg { width: 42px; height: 42px; font-size: 14px; border-radius: 14px; }
.avatar.xl { width: 56px; height: 56px; font-size: 18px; border-radius: 17px; }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .avatar { margin-left: -7px; border: 2px solid var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-more {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  margin-left: -7px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--surface-3);
  color: var(--muted);
  font: 600 8.5px var(--font-num);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 50px 20px;
  text-align: center;
  color: var(--muted-2);
}
.empty-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted-2);
  margin-bottom: 4px;
}
.empty-icon .icon { width: 23px; height: 23px; }
.empty-state strong { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.empty-state p { font-size: 11.5px; line-height: 1.7; max-width: 280px; }
.empty-state .btn { margin-top: 7px; }

.progress-track {
  height: 5px;
  border-radius: 20px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--matcha);
  transition: width .45s ease;
}
.progress-fill.warn { background: var(--gold); }
.progress-fill.danger { background: var(--danger); }

.divider { height: 1px; background: var(--line); }
.muted { color: var(--muted); }
.faint { color: var(--muted-2); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* =========================================================
   工作台
   ========================================================= */

.dash-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  padding: 26px 28px 25px;
  margin-bottom: 18px;
  border-radius: var(--radius-xl);
  color: #f8eddd;
  background:
    radial-gradient(500px 260px at 88% 5%, rgba(220, 122, 69, .25), transparent 65%),
    radial-gradient(400px 250px at 60% 120%, rgba(111, 143, 105, .17), transparent 70%),
    linear-gradient(125deg, #2b1d16 0%, #35251c 58%, #2a1d16 100%);
  box-shadow: 0 18px 40px rgba(58, 37, 24, .13);
}
.dash-hero::after {
  content: "";
  position: absolute;
  right: -40px; bottom: -92px;
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(248, 237, 221, .09);
  box-shadow: 0 0 0 36px rgba(248, 237, 221, .025), 0 0 0 72px rgba(248, 237, 221, .018);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: #e9b489;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-kicker::before { content: ""; width: 17px; height: 1px; background: #d99767; }
.hero-copy h2 { font-size: clamp(24px, 2.6vw, 33px); font-weight: 700; letter-spacing: -.025em; line-height: 1.25; }
.hero-copy h2 em { font-style: normal; color: #edb385; }
.hero-sub { margin-top: 8px; font-size: 12px; color: rgba(248, 237, 221, .55); }
.hero-sub strong { color: rgba(255, 246, 233, .9); font-weight: 600; }
.hero-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.hero-actions .btn-secondary {
  color: #f6ead9;
  background: rgba(255, 250, 241, .08);
  border-color: rgba(255, 250, 241, .14);
  box-shadow: none;
  backdrop-filter: blur(8px);
}
.hero-actions .btn-secondary:hover { background: rgba(255, 250, 241, .14); border-color: rgba(255, 250, 241, .2); }
.hero-actions .btn-primary { box-shadow: 0 7px 18px rgba(0,0,0,.18); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.kpi-label { font-size: 11px; color: var(--muted); }
.kpi-icon {
  width: 31px; height: 31px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--accent-deep);
  background: var(--accent-soft);
}
.kpi-icon.matcha { color: #54734f; background: var(--matcha-soft); }
.kpi-icon.gold { color: #8d682f; background: var(--gold-soft); }
.kpi-icon.blue { color: #4f6f8e; background: var(--blue-soft); }
.kpi-icon .icon { width: 16px; height: 16px; }
.kpi-value { display: flex; align-items: baseline; gap: 4px; font: 700 28px/1 var(--font-num); letter-spacing: -.03em; color: var(--ink); }
.kpi-value small { font-size: 11px; font-weight: 500; color: var(--muted-2); letter-spacing: 0; }
.kpi-foot { margin-top: 8px; display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted-2); }
.kpi-foot .up { color: #54734f; }
.kpi-foot .warn { color: #9b712e; }
.kpi-foot .down { color: var(--danger); }
.kpi-mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 19px; margin-top: 10px; }
.kpi-mini-bars i { flex: 1; border-radius: 2px 2px 1px 1px; background: var(--surface-3); min-height: 4px; }
.kpi-mini-bars i.hot { background: #e2a174; }

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(290px, .9fr);
  gap: 16px;
}
.dash-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.week-chart { padding: 2px 0 0; }
.week-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  height: 168px;
  align-items: end;
  padding: 0 4px;
}
.day-bar { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 7px; }
.day-bar .bars-wrap { height: 124px; width: 100%; max-width: 42px; display: flex; align-items: flex-end; }
.bar-stack {
  width: 100%;
  min-height: 3px;
  border-radius: 6px 6px 3px 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
  background: var(--surface-3);
  transition: height .5s cubic-bezier(.2,.8,.3,1);
}
.bar-seg { width: 100%; min-height: 0; }
.bar-seg.regular { background: #c9b29d; }
.bar-seg.ot { background: var(--accent); }
.day-bar.today .bar-seg.regular { background: #a78a71; }
.day-bar.today .bar-stack { box-shadow: 0 0 0 2px rgba(220,122,69,.16); }
.day-bar .bar-day { font-size: 10px; color: var(--muted-2); line-height: 1.2; text-align: center; }
.day-bar .bar-day strong { display: block; font: 600 10px var(--font-num); color: var(--muted); }
.day-bar.today .bar-day strong { color: var(--accent-deep); }
.day-bar .bar-val { font: 600 10px var(--font-num); color: var(--ink-2); }
.chart-legend { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 10px; color: var(--muted-2); }
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.legend-item i { width: 7px; height: 7px; border-radius: 2px; background: #c9b29d; }
.legend-item.ot i { background: var(--accent); }
.legend-spacer { margin-left: auto; }

.today-list { display: flex; flex-direction: column; gap: 9px; }
.today-shift {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid transparent;
  transition: border-color .16s, background .16s;
}
.today-shift:hover { background: #faf4ea; border-color: var(--line); }
.today-shift .shift-bar { width: 3px; align-self: stretch; border-radius: 4px; flex: 0 0 auto; }
.today-shift .shift-info { flex: 1; min-width: 0; }
.shift-name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shift-name-row strong { font-size: 12px; font-weight: 600; }
.shift-name-row span { font: 600 10px var(--font-num); color: var(--muted); }
.shift-time { margin-top: 2px; font: 500 10px var(--font-num); color: var(--muted-2); }
.shift-people { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.shift-people .avatar-stack .avatar { border-color: var(--surface-2); }
.shift-people .people-count { font-size: 9.5px; color: var(--muted-2); margin-left: 2px; }
.today-empty { padding: 25px 10px; text-align: center; color: var(--muted-2); font-size: 11.5px; }

.todo-list { display: flex; flex-direction: column; }
.todo-item {
  display: flex;
  gap: 11px;
  padding: 13px 2px;
  border-bottom: 1px dashed var(--line);
}
.todo-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.todo-item:first-child { padding-top: 2px; }
.todo-icon {
  width: 28px; height: 28px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--gold-soft);
  color: #9b712e;
}
.todo-icon.danger { background: var(--danger-soft); color: #a5443c; }
.todo-icon.matcha { background: var(--matcha-soft); color: #54734f; }
.todo-icon .icon { width: 14px; height: 14px; }
.todo-copy { min-width: 0; flex: 1; }
.todo-copy strong { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-2); line-height: 1.45; }
.todo-copy p { margin-top: 2px; font-size: 10.5px; color: var(--muted-2); line-height: 1.55; }
.todo-action {
  border: 0; background: transparent;
  color: var(--accent-deep); font-size: 10px; font-weight: 600;
  padding: 3px 0; white-space: nowrap;
}
.todo-action:hover { text-decoration: underline; }

.week-staff { display: flex; flex-direction: column; gap: 13px; }
.week-staff-row { display: grid; grid-template-columns: 28px minmax(90px, 1fr) 78px 44px; align-items: center; gap: 10px; }
.ws-name { min-width: 0; }
.ws-name strong { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-name span { display: block; font-size: 9.5px; color: var(--muted-2); }
.week-staff-row .progress-track { width: 100%; }
.week-staff-row .ws-hours { text-align: right; font: 600 10.5px var(--font-num); color: var(--muted); }
.week-staff-row.over .ws-hours { color: var(--danger); }

.mini-agenda {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.mini-day {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 11px 12px;
  background: var(--surface-2);
  min-width: 0;
  cursor: pointer;
  transition: background .16s, border-color .16s, transform .16s;
}
.mini-day:hover { background: var(--surface); border-color: var(--line-strong); transform: translateY(-1px); }
.mini-day-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.mini-day-head strong { font: 600 13px var(--font-num); }
.mini-day-head span { font-size: 9.5px; color: var(--muted-2); }
.mini-day.today .mini-day-head strong { color: var(--accent-deep); }
.mini-day-body { display: flex; align-items: center; gap: 5px; margin-top: 8px; min-height: 26px; }
.mini-day-meta { font-size: 9.5px; color: var(--muted-2); margin-top: 5px; }

/* =========================================================
   排班表
   ========================================================= */

.schedule-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.summary-stat { display: flex; align-items: baseline; gap: 5px; }
.summary-stat strong { font: 700 19px var(--font-num); letter-spacing: -.02em; }
.summary-stat span { font-size: 10.5px; color: var(--muted-2); }
.summary-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

.calendar-shell {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.calendar-weekdays div {
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--muted-2);
  text-align: center;
}
.calendar-weekdays div.weekend { color: #a67c56; }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.day-cell {
  position: relative;
  min-height: 119px;
  padding: 8px 8px 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}
.day-cell:nth-child(7n) { border-right: 0; }
.day-cell:nth-last-child(-n+7) { border-bottom: 0; }
.day-cell:hover { background: #fffaf3; box-shadow: inset 0 0 0 1px rgba(220, 122, 69, .16); }
.day-cell.dim { background: #fbf7f1; cursor: default; }
.day-cell.dim:hover { background: #fbf7f1; box-shadow: none; }
.day-cell.weekend:not(.dim) { background: #fdf9f3; }
.day-cell.today { background: #fff8ef; box-shadow: inset 0 0 0 1px rgba(220, 122, 69, .3); }
.day-cell.locked { background-image: repeating-linear-gradient(-45deg, transparent 0 7px, rgba(133, 118, 106, .025) 7px 8px); }
.day-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 22px; }
.day-num {
  width: 23px; height: 23px;
  display: inline-grid; place-items: center;
  border-radius: 7px;
  font: 600 12px var(--font-num);
  color: var(--ink-2);
}
.day-cell.dim .day-num { color: #c6b7a7; }
.day-cell.today .day-num { color: #fff9f0; background: var(--accent); box-shadow: 0 3px 8px rgba(196, 97, 49, .25); }
.day-cell.weekend:not(.dim) .day-num { color: #966a43; }
.day-cell.today.weekend .day-num { color: #fff9f0; }
.day-total { font: 600 9px var(--font-num); color: var(--muted-2); white-space: nowrap; }
.day-total.warn { color: var(--danger); }
.day-shifts { display: flex; flex-direction: column; gap: 3px; margin-top: 5px; }
.shift-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid transparent;
  font-size: 9px;
  color: var(--muted);
  overflow: hidden;
  min-width: 0;
}
.shift-pill:hover { background: var(--surface-3); }
.shift-pill .shift-dot { width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto; }
.shift-pill .sp-code { font-weight: 600; color: var(--ink-2); flex: 0 0 auto; }
.shift-pill .sp-time { font-family: var(--font-num); font-size: 8px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.shift-pill .sp-people { font: 600 8.5px var(--font-num); color: var(--muted); flex: 0 0 auto; }
.shift-pill.short { background: var(--danger-soft); border-color: #f2d3cf; }
.shift-pill.short .sp-people { color: var(--danger); }
.shift-pill.empty { border: 1px dashed var(--line); background: transparent; }
.shift-pill.empty .sp-code { color: var(--muted-2); font-weight: 500; }
.shift-pill.rest { background: var(--surface-2); border-color: var(--line); }
.shift-pill.rest .sp-time { color: var(--muted-2); }
.week-shift.rest { background: var(--surface-2); border-style: dashed; }
.week-shift.rest .week-shift-time { color: var(--muted-2); }
.day-more { margin-top: 2px; padding-left: 9px; font-size: 8.5px; color: var(--muted-2); }
.day-ot {
  position: absolute;
  right: 7px; bottom: 6px;
  display: inline-flex; align-items: center; gap: 2px;
  font: 600 8px var(--font-num);
  color: #b46f42;
  background: #fbf0e6;
  border-radius: 4px;
  padding: 1px 4px;
}
.day-add {
  position: absolute;
  right: 6px; top: 6px;
  width: 20px; height: 20px;
  display: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
}
.day-cell:hover .day-add { display: grid; }
.day-add:hover { color: var(--accent-deep); border-color: #e5b99a; }
.day-add .icon { width: 11px; height: 11px; }
.day-cell.dim .day-add { display: none; }
.day-lock {
  position: absolute; right: 7px; top: 8px;
  color: var(--muted-2);
}
.day-lock .icon { width: 11px; height: 11px; }

.week-view {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.week-col { min-width: 0; border-right: 1px solid var(--line); }
.week-col:last-child { border-right: 0; }
.week-col-head {
  padding: 12px 10px 10px;
  text-align: center;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.week-col-head .wd { font-size: 9.5px; color: var(--muted-2); letter-spacing: .06em; }
.week-col-head .wd-date { margin-top: 3px; font: 700 17px var(--font-num); color: var(--ink-2); }
.week-col-head .wd-sub { margin-top: 3px; font-size: 9px; color: var(--muted-2); }
.week-col.today .week-col-head { background: #fff6ec; }
.week-col.today .wd-date { color: var(--accent-deep); }
.week-col-body { padding: 8px 7px 12px; display: flex; flex-direction: column; gap: 6px; min-height: 390px; }
.week-shift {
  padding: 8px 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.week-shift:hover { background: #fff; border-color: var(--line-strong); }
.week-shift-head { display: flex; align-items: center; gap: 5px; }
.week-shift-head .shift-dot { width: 5px; height: 5px; border-radius: 50%; }
.week-shift-head strong { font-size: 9.5px; font-weight: 600; }
.week-shift-head span { margin-left: auto; font: 600 8.5px var(--font-num); color: var(--muted); }
.week-shift-time { margin-top: 2px; font: 500 8.5px var(--font-num); color: var(--muted-2); }
.week-shift-people { display: flex; align-items: center; gap: 3px; margin-top: 5px; flex-wrap: wrap; }
.week-person {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 4px 1px 2px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 8px; color: var(--muted);
  max-width: 100%;
}
.week-person .avatar { width: 14px; height: 14px; font-size: 6px; }
.week-shift-add {
  display: flex; align-items: center; justify-content: center; gap: 3px;
  height: 26px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
  font-size: 8.5px;
}
.week-shift-add:hover { color: var(--accent-deep); border-color: #ddb395; background: #fffaf3; }
.week-shift-add .icon { width: 10px; height: 10px; }
.week-shift.short { border-color: #efd1cd; background: #fdf3f1; }
.week-col-foot { padding: 0 8px 10px; }
.week-col-foot .btn { width: 100%; }
.week-empty { padding: 14px 6px; text-align: center; font-size: 8.5px; color: var(--muted-2); }

/* =========================================================
   员工
   ========================================================= */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 17px;
}
.strip-item { padding: 14px 18px; background: var(--surface); }
.strip-item span { display: block; font-size: 10px; color: var(--muted-2); }
.strip-item strong { display: block; margin-top: 4px; font: 700 20px var(--font-num); letter-spacing: -.02em; }
.strip-item strong small { font-size: 10px; font-weight: 500; color: var(--muted-2); margin-left: 2px; }

.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.data-table th {
  padding: 11px 15px;
  text-align: left;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .07em;
  color: var(--muted-2);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-2);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .14s; }
.data-table tbody tr:hover { background: #fefaf4; }
.data-table tr.inactive { opacity: .58; }
.staff-cell { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.staff-cell .staff-meta { min-width: 0; }
.staff-cell strong { display: block; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.staff-cell span { display: block; font-size: 9.5px; color: var(--muted-2); white-space: nowrap; }
.position-tags { display: flex; flex-wrap: wrap; gap: 3px; max-width: 170px; }
.hours-cell strong { font: 600 12px var(--font-num); color: var(--ink-2); }
.hours-cell span { font-size: 9.5px; color: var(--muted-2); margin-left: 2px; }
.ot-cell { font: 600 11px var(--font-num); color: var(--accent-deep); }
.ot-cell.zero { color: var(--muted-2); font-weight: 500; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.table-actions .btn-icon { width: 28px; height: 28px; border-radius: 8px; }
.mini-progress { width: 76px; }
.mini-progress .progress-track { height: 4px; }
.mini-progress span { display: block; margin-top: 3px; font: 500 8.5px var(--font-num); color: var(--muted-2); text-align: right; }

.employee-cards { display: none; }

/* =========================================================
   班次设置
   ========================================================= */

.shift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 14px;
}
.shift-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .16s, box-shadow .16s;
}
.shift-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.shift-card.inactive { opacity: .58; }
.shift-card-top { display: flex; align-items: flex-start; gap: 10px; }
.shift-swatch {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  font: 700 12px var(--font-num);
  color: #fff;
  flex: 0 0 auto;
}
.shift-card-title { min-width: 0; flex: 1; }
.shift-card-title h3 { font-size: 14px; font-weight: 700; }
.shift-card-title p { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.shift-card .table-actions { position: absolute; right: 12px; top: 12px; opacity: .5; transition: opacity .15s; }
.shift-card:hover .table-actions { opacity: 1; }
.shift-time-big { margin: 15px 0 13px; font: 700 24px var(--font-num); letter-spacing: -.02em; color: var(--ink); }
.shift-time-big span { color: var(--muted-2); font-size: 14px; margin: 0 4px; font-weight: 400; }
.shift-time-big small { font-size: 10px; color: var(--muted-2); margin-left: 5px; font-weight: 500; letter-spacing: 0; }
.shift-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shift-meta-grid div { padding: 8px 10px; border-radius: 9px; background: var(--surface-2); }
.shift-meta-grid span { display: block; font-size: 8.5px; color: var(--muted-2); }
.shift-meta-grid strong { display: block; margin-top: 2px; font: 600 11px var(--font-num); color: var(--ink-2); }
.shift-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); font-size: 9.5px; color: var(--muted-2); }

/* =========================================================
   月度结算
   ========================================================= */

.settlement-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 19px;
  border-radius: 16px;
  background: linear-gradient(100deg, #fbf4e8, #fffaf2);
  border: 1px solid #eadcc8;
  margin-bottom: 16px;
}
.settlement-banner.locked { background: linear-gradient(100deg, #edf3e9, #f8fbf6); border-color: #d8e3d3; }
.settlement-banner .banner-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  color: #916b31;
  background: #f3e7d2;
}
.settlement-banner.locked .banner-icon { color: #54734f; background: #e4eee0; }
.settlement-banner .banner-icon .icon { width: 19px; height: 19px; }
.banner-copy { min-width: 0; flex: 1; }
.banner-copy strong { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.banner-copy p { margin-top: 2px; font-size: 10.5px; color: var(--muted-2); line-height: 1.6; }
.banner-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.settle-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.settle-kpi {
  padding: 17px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.settle-kpi span { font-size: 10px; color: var(--muted-2); }
.settle-kpi strong { display: block; margin-top: 6px; font: 700 25px var(--font-num); letter-spacing: -.03em; }
.settle-kpi strong small { font-size: 10px; font-weight: 500; color: var(--muted-2); margin-left: 3px; }
.settle-kpi p { margin-top: 4px; font-size: 9.5px; color: var(--muted-2); }

.settle-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
.ot-chart { display: flex; flex-direction: column; gap: 12px; }
.ot-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) 44px; gap: 9px; align-items: center; }
.ot-row .ot-name { font-size: 10.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ot-row .ot-bar-track { height: 7px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.ot-row .ot-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e2a174, #dc7a45); }
.ot-row .ot-val { text-align: right; font: 600 10px var(--font-num); color: var(--accent-deep); }
.formula-note {
  display: flex;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  font-size: 9.5px;
  line-height: 1.7;
  color: var(--muted-2);
}
.formula-note .icon { width: 13px; height: 13px; color: var(--gold); flex: 0 0 auto; margin-top: 1px; }

/* =========================================================
   设置
   ========================================================= */

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr); gap: 16px; align-items: start; }
.settings-section + .settings-section { margin-top: 16px; }
.settings-card { padding: 22px 22px; }
.settings-head { margin-bottom: 17px; }
.settings-head h2 { font-size: 15px; font-weight: 700; }
.settings-head p { margin-top: 3px; font-size: 10.5px; color: var(--muted-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.field > label .req, .field-label .req { color: var(--accent); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  outline: 0;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.field textarea { height: auto; min-height: 70px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--line-strong); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #d2a27e; box-shadow: 0 0 0 3px rgba(220, 122, 69, .1); background: #fff; }
.field input::placeholder, .field textarea::placeholder { color: #bbaa9b; }
.field .hint { font-size: 9.5px; color: var(--muted-2); line-height: 1.5; }
.field .input-with-suffix { position: relative; }
.field .input-with-suffix input { padding-right: 38px; }
.field .input-suffix {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: var(--muted-2); pointer-events: none;
}
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 19px; padding-top: 17px; border-top: 1px dashed var(--line); }

.data-action {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
}
.data-action:last-child { border-bottom: 0; padding-bottom: 0; }
.data-action-icon {
  width: 33px; height: 33px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  flex: 0 0 auto;
}
.data-action-icon .icon { width: 15px; height: 15px; }
.data-action-copy { flex: 1; min-width: 0; }
.data-action-copy strong { display: block; font-size: 11.5px; font-weight: 600; }
.data-action-copy p { margin-top: 1px; font-size: 9.5px; color: var(--muted-2); line-height: 1.55; }
.data-action .btn { flex: 0 0 auto; }

.info-box {
  display: flex;
  gap: 9px;
  padding: 12px 13px;
  border-radius: 11px;
  background: var(--blue-soft);
  color: #506a82;
  font-size: 10px;
  line-height: 1.7;
}
.info-box .icon { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 1px; }
.info-box.warm { background: var(--gold-soft); color: #85632e; }
.info-box.danger { background: var(--danger-soft); color: #93443c; }

.help-steps { display: grid; gap: 13px; }
.help-step { display: flex; gap: 11px; }
.help-num {
  width: 25px; height: 25px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #f8e7d2;
  font: 600 10px var(--font-num);
}
.help-step strong { display: block; font-size: 11.5px; font-weight: 600; }
.help-step p { margin-top: 2px; font-size: 10px; line-height: 1.7; color: var(--muted-2); }

/* =========================================================
   弹窗 / 抽屉
   ========================================================= */

.modal-overlay, .drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  background: rgba(35, 24, 17, .43);
  backdrop-filter: blur(3px);
  animation: overlay-in .2s ease;
}
.modal-overlay { z-index: 200; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
body.modal-open { overflow: hidden; }
html:has(body.modal-open) { overflow: hidden; }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(600px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  animation: modal-in .28s cubic-bezier(.2,.8,.3,1);
}
.modal.wide { width: min(780px, 100%); }
.modal.narrow { width: min(440px, 100%); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px 0;
}
.modal-title h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.modal-title p { margin-top: 3px; font-size: 10.5px; color: var(--muted-2); line-height: 1.5; }
.modal-close {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  flex: 0 0 auto;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
}
.modal-close:hover { background: var(--surface-3); color: var(--ink); }
.modal-close .icon { width: 17px; height: 17px; }
.modal-body { padding: 18px 24px 6px; overflow-y: auto; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 24px 20px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}
.modal-foot .foot-left { display: flex; align-items: center; gap: 8px; }
.modal-foot .foot-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.drawer-overlay { justify-content: flex-end; }
.drawer {
  width: min(470px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-shadow: -20px 0 60px rgba(32, 20, 13, .2);
  animation: drawer-in .3s cubic-bezier(.2,.8,.3,1);
}
@keyframes drawer-in { from { transform: translateX(30px); opacity: .5; } to { transform: translateX(0); opacity: 1; } }
.drawer-head { padding: 23px 23px 16px; border-bottom: 1px solid var(--line); }
.drawer-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.drawer-kicker { font-size: 9.5px; letter-spacing: .12em; color: var(--accent-deep); text-transform: uppercase; }
.drawer-head h2 { margin-top: 4px; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.drawer-head p { margin-top: 4px; font-size: 10.5px; color: var(--muted-2); }
.drawer-close {
  width: 31px; height: 31px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
}
.drawer-close:hover { background: var(--surface-3); color: var(--ink); }
.drawer-close .icon { width: 16px; height: 16px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 17px 23px 22px; }
.drawer-foot { padding: 13px 23px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 9px; background: var(--surface); }

.drawer-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 15px 0 4px;
}
.drawer-summary div { background: var(--surface-2); padding: 9px 11px; }
.drawer-summary span { display: block; font-size: 8.5px; color: var(--muted-2); }
.drawer-summary strong { display: block; margin-top: 2px; font: 600 13px var(--font-num); color: var(--ink-2); }

.shift-group { margin-top: 17px; }
.shift-group-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.shift-group-head .shift-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.shift-group-head strong { font-size: 11.5px; font-weight: 600; }
.shift-group-head .sg-time { font: 500 9.5px var(--font-num); color: var(--muted-2); }
.shift-group-head .sg-count { margin-left: auto; font: 600 9.5px var(--font-num); color: var(--muted-2); }
.shift-group-head .sg-count.short { color: var(--danger); }
.shift-group-head .sg-add {
  display: inline-grid; place-items: center;
  width: 23px; height: 23px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
}
.shift-group-head .sg-add:hover { color: var(--accent-deep); border-color: #ddb395; }
.shift-group-head .sg-add .icon { width: 12px; height: 12px; }
.assignment-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 5px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.assignment-row:hover { border-color: #dfc3aa; background: #fffaf4; }
.assignment-main { flex: 1; min-width: 0; }
.assignment-name-line { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.assignment-name-line strong { font-size: 11.5px; font-weight: 600; }
.assignment-time { margin-top: 1px; font: 500 9.5px var(--font-num); color: var(--muted-2); }
.assignment-time .ot-chip {
  display: inline-block;
  margin-left: 5px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 8px;
  font-weight: 600;
}
.assignment-row .edit-hint { color: var(--muted-2); opacity: 0; transition: opacity .15s; }
.assignment-row:hover .edit-hint { opacity: 1; }
.assignment-row .edit-hint .icon { width: 13px; height: 13px; }
.group-empty {
  padding: 8px 9px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  font-size: 9.5px;
  color: var(--muted-2);
  text-align: center;
}
.drawer-locked {
  display: flex; gap: 8px;
  margin: 12px 0 0;
  padding: 10px 11px;
  border-radius: 9px;
  background: var(--matcha-soft);
  color: #54734f;
  font-size: 9.5px;
  line-height: 1.6;
}
.drawer-locked .icon { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 1px; }

/* 表单专项 */
.type-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.type-option { position: relative; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-option label {
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.type-option label strong { font-size: 11px; font-weight: 600; }
.type-option label span { font-size: 8.5px; color: var(--muted-2); }
.type-option input:checked + label { border-color: #d9a57f; background: #fff8f1; box-shadow: 0 0 0 2px rgba(220, 122, 69, .08); }

.check-list { display: flex; flex-wrap: wrap; gap: 6px; }
.check-pill { position: relative; }
.check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.check-pill label {
  display: inline-flex; align-items: center;
  height: 30px; padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10.5px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.check-pill input:checked + label { border-color: #d9a57f; background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }

.color-options { display: grid; grid-template-columns: repeat(6, 26px); gap: 7px; }
.color-option { position: relative; }
.color-option input { position: absolute; opacity: 0; pointer-events: none; }
.color-option label {
  display: block;
  width: 26px; height: 26px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
  transition: transform .15s, box-shadow .15s;
}
.color-option label:hover { transform: scale(1.08); }
.color-option input:checked + label { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }

.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 9px 0;
}
.switch-copy strong { display: block; font-size: 11px; font-weight: 600; }
.switch-copy p { margin-top: 1px; font-size: 9.5px; color: var(--muted-2); }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch span {
  position: absolute; inset: 0;
  border-radius: 20px;
  background: #ddd1c4;
  transition: background .2s;
}
.switch span::after {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s;
}
.switch input:checked + span { background: var(--matcha); }
.switch input:checked + span::after { transform: translateX(16px); }

.form-section-title {
  display: flex; align-items: center; gap: 7px;
  margin: 5px 0 11px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .07em;
  color: var(--muted-2);
  text-transform: uppercase;
}
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }

.time-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  overflow: hidden;
  height: 38px;
}
.time-control .tc-btn {
  width: 30px; height: 100%;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border: 0;
  background: var(--surface-2);
  color: var(--muted);
  font: 600 14px var(--font-num);
}
.time-control .tc-btn:hover { background: var(--surface-3); color: var(--accent-deep); }
.time-control input {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  text-align: center;
  font: 600 12px var(--font-num);
  background: transparent;
  padding: 0;
}
.time-control input:focus { box-shadow: none; background: #fff; }

.calc-box {
  padding: 12px 13px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.calc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10.5px; padding: 2px 0; }
.calc-row span { color: var(--muted-2); }
.calc-row strong { font: 600 11.5px var(--font-num); color: var(--ink-2); }
.calc-row.highlight { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.calc-row.highlight strong { font-size: 15px; color: var(--accent-deep); }
.calc-row .danger-text { color: var(--danger); }
.calc-note { margin-top: 5px; font-size: 9px; color: var(--muted-2); line-height: 1.55; }

.confirm-body { text-align: center; padding: 7px 6px 0; }
.confirm-icon {
  width: 47px; height: 47px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--gold-soft);
  color: #9b712e;
}
.confirm-icon .icon { width: 22px; height: 22px; }
.confirm-icon.danger { background: var(--danger-soft); color: var(--danger); }
.confirm-body strong { display: block; font-size: 14px; font-weight: 700; }
.confirm-body p { margin: 7px auto 0; max-width: 320px; font-size: 11px; line-height: 1.75; color: var(--muted-2); }
.confirm-list { margin: 13px 0 0; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.confirm-list li { display: flex; gap: 7px; font-size: 10.5px; color: var(--muted); padding: 6px 9px; border-radius: 8px; background: var(--surface-2); }
.confirm-list li .icon { width: 13px; height: 13px; color: var(--gold); flex: 0 0 auto; margin-top: 1px; }

/* =========================================================
   Toast / 其他
   ========================================================= */

.toast-root {
  position: fixed;
  z-index: 300;
  right: 22px; bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 230px;
  max-width: 340px;
  padding: 11px 13px;
  border-radius: 11px;
  background: #2b211b;
  color: #f8ede0;
  box-shadow: 0 12px 30px rgba(32, 20, 13, .25);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 11px;
  line-height: 1.55;
  pointer-events: auto;
  animation: toast-in .3s cubic-bezier(.2,.8,.3,1);
}
.toast .toast-icon {
  width: 18px; height: 18px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(220, 122, 69, .2);
  color: #f0a271;
  margin-top: 1px;
}
.toast .toast-icon .icon { width: 11px; height: 11px; }
.toast.success .toast-icon { background: rgba(111, 143, 105, .22); color: #a8c69f; }
.toast.error .toast-icon { background: rgba(189, 80, 72, .22); color: #e69b95; }
.toast.out { animation: toast-out .25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(5px); } }

.lock-indicator {
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 7px;
  border-radius: 6px;
  background: var(--matcha-soft);
  color: #54734f;
  font-size: 9px;
  font-weight: 600;
}
.lock-indicator .icon { width: 11px; height: 11px; }

.alert-line {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--gold-soft);
  color: #85632e;
  font-size: 9.5px;
  line-height: 1.6;
}
.alert-line .icon { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 1px; }
.alert-line.danger { background: var(--danger-soft); color: #93443c; }

.loading-dots { display: inline-flex; gap: 3px; align-items: center; }
.loading-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: pulse 1s infinite; }
.loading-dots i:nth-child(2) { animation-delay: .15s; }
.loading-dots i:nth-child(3) { animation-delay: .3s; }

/* =========================================================
   响应式
   ========================================================= */

@media (max-width: 1240px) {
  .dash-hero { align-items: flex-start; flex-direction: column; gap: 18px; }
  .dash-hero .hero-actions { width: 100%; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, .82fr); }
  .settle-grid { grid-template-columns: minmax(0, 1fr) 280px; }
}

@media (max-width: 1060px) {
  .topbar { padding: 12px 24px; }
  .content { padding: 22px 24px 56px; }
  .save-state { display: none; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-stack { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .dash-bottom { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settle-grid { grid-template-columns: 1fr; }
  .settle-grid .ot-chart-card { order: -1; }
  .settle-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: transform .28s cubic-bezier(.2,.8,.3,1); z-index: 80; box-shadow: 20px 0 60px rgba(32,20,13,.2); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-scrim {
    display: block;
    position: fixed; inset: 0; z-index: 70;
    background: rgba(35, 24, 17, .38);
    backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
  }
  body.sidebar-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { min-height: 76px; }
  .topbar-cta span:last-child { display: none; }
  .topbar-cta { width: 38px; padding: 0; }
  .topbar-cta .icon { width: 17px; height: 17px; }
  .calendar-grid .day-cell { min-height: 106px; }
}

@media (min-width: 981px) {
  .menu-btn { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 13px; }
  .topbar { padding: 10px 15px; gap: 10px; }
  .content { padding: 17px 15px 80px; }
  .page-heading h1 { font-size: 19px; }
  .eyebrow { font-size: 8.5px; }
  .month-switcher { padding: 3px; }
  .month-pill { min-width: 76px; font-size: 11px; padding: 0 2px; }
  .month-pill .icon { display: none; }
  .month-arrow { width: 26px; height: 26px; }
  .page-toolbar { gap: 10px; }
  .dash-hero { padding: 21px 20px; border-radius: 20px; }
  .hero-copy h2 { font-size: 24px; }
  .hero-sub { font-size: 11px; }
  .hero-actions .btn { flex: 1; }
  .kpi-grid { gap: 9px; }
  .kpi-card { padding: 14px; border-radius: 14px; }
  .kpi-label { font-size: 9.5px; }
  .kpi-icon { width: 27px; height: 27px; border-radius: 8px; }
  .kpi-icon .icon { width: 14px; height: 14px; }
  .kpi-value { font-size: 23px; }
  .kpi-foot { font-size: 9px; }
  .dash-stack { grid-template-columns: 1fr; }
  .card-pad { padding: 17px 16px; }
  .card-head { margin-bottom: 14px; }
  .week-bars { height: 145px; gap: 4px; }
  .day-bar .bars-wrap { height: 102px; }
  .week-staff-row { grid-template-columns: 26px minmax(72px, 1fr) 64px 38px; gap: 7px; }
  .mini-agenda { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .mini-day { padding: 8px; }
  .calendar-weekdays div { padding: 8px 2px; font-size: 8.5px; }
  .day-cell { min-height: 88px; padding: 5px 4px; }
  .day-num { width: 20px; height: 20px; font-size: 10.5px; border-radius: 6px; }
  .day-total { display: none; }
  .day-shifts { gap: 2px; margin-top: 3px; }
  .shift-pill { height: 16px; padding: 0 3px; gap: 3px; font-size: 7.5px; border-radius: 4px; }
  .shift-pill .sp-time, .shift-pill .sp-code { display: none; }
  .shift-pill.empty .sp-code { display: inline; font-size: 7.5px; color: var(--muted-2); }
  .shift-pill.rest .sp-code { display: inline; font-size: 7.5px; color: var(--muted-2); }
  .shift-pill .sp-people { display: inline; margin-left: auto; font-size: 8px; color: var(--muted); }
  .shift-pill .shift-dot { width: 5px; height: 5px; }
  .shift-pill::after { display: none; }
  .day-more { display: none; }
  .day-ot { right: 4px; bottom: 3px; font-size: 7px; padding: 0 3px; }
  .day-add { display: none !important; }
  .day-lock { display: none; }
  .week-view { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 16px; }
  .week-col { flex: 0 0 150px; scroll-snap-align: start; }
  .week-col-body { min-height: 330px; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .strip-item { padding: 11px 14px; }
  .strip-item strong { font-size: 17px; }
  .filter-bar { padding: 10px; gap: 5px; }
  .search-box { width: 100%; margin-left: 0; margin-top: 4px; }
  .filter-chip { padding: 0 9px; }
  .employee-table { display: none; }
  .employee-cards { display: flex; flex-direction: column; gap: 10px; }
  .emp-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }
  .emp-card-head { display: flex; align-items: center; gap: 10px; }
  .emp-card-head .staff-meta { flex: 1; min-width: 0; }
  .emp-card-head .staff-meta strong { display: block; font-size: 13px; }
  .emp-card-head .staff-meta span { display: block; font-size: 9.5px; color: var(--muted-2); }
  .emp-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 11px; background: var(--line); border-radius: 9px; overflow: hidden; }
  .emp-card-stats div { padding: 8px 9px; background: var(--surface-2); }
  .emp-card-stats span { display: block; font-size: 8.5px; color: var(--muted-2); }
  .emp-card-stats strong { display: block; margin-top: 2px; font: 600 11.5px var(--font-num); }
  .emp-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
  .shift-grid { grid-template-columns: 1fr; }
  .settle-kpis { gap: 9px; }
  .settle-kpi { padding: 13px; border-radius: 13px; }
  .settle-kpi strong { font-size: 21px; }
  .settlement-banner { align-items: flex-start; padding: 14px; }
  .banner-actions { width: 100%; }
  .banner-actions .btn { flex: 1; }
  .data-table { min-width: 720px; }
  .settings-card { padding: 18px 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal { max-height: calc(100vh - 20px); border-radius: 20px 20px 14px 14px; }
  .modal-head { padding: 18px 17px 0; }
  .modal-body { padding: 15px 17px 5px; }
  .modal-foot { padding: 12px 17px 16px; }
  .modal-title h2 { font-size: 16px; }
  .drawer { width: 100%; }
  .drawer-head { padding: 18px 17px 13px; }
  .drawer-body { padding: 14px 17px 18px; }
  .drawer-foot { padding: 11px 17px 16px; }
  .type-options { gap: 6px; }
  .toast-root { left: 14px; right: 14px; bottom: 14px; }
  .toast { max-width: none; width: 100%; min-width: 0; }
}

@media (max-width: 440px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 21px; }
  .kpi-mini-bars { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .month-pill { min-width: 67px; }
  .topbar-actions { gap: 6px; }
  .page-heading h1 { font-size: 17px; }
  .calendar-grid .day-cell { min-height: 76px; }
  .day-cell { padding: 4px 3px; }
  .day-num { width: 18px; height: 18px; font-size: 9.5px; }
  .shift-pill { height: 14px; }
  .day-shifts { margin-top: 2px; }
  .week-col { flex-basis: 138px; }
  .dash-hero { padding: 19px 17px; }
  .hero-copy h2 { font-size: 22px; }
  .card-title { font-size: 13.5px; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .foot-left, .modal-foot .foot-right { width: 100%; }
  .modal-foot .foot-right { margin-left: 0; }
  .modal-foot .btn { flex: 1; }
}

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
