/* ============ 设计变量 ============ */
:root {
  --brand: #1b5fd0;
  --brand-600: #1548a6;
  --brand-400: #4c8bee;
  --brand-50: #eef4fe;
  --accent: #6f5bf0;
  --accent-50: #f1efff;
  --danger: #d0514a;
  --danger-50: #fdeeed;
  --info: #2f8fbe;
  --info-50: #ebf5fb;
  --success: #178a72;
  --success-50: #e9f6f2;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --line: #e8edf5;
  --line-2: #dfe6f0;
  --text: #0f172a;
  --text-2: #56637a;
  --text-3: #94a1b5;
  --ink: #0b1424;
  --ink-2: #101d33;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 22px 60px rgba(9, 19, 38, 0.18);
  --r: 12px;
  --r-sm: 9px;
  --r-xs: 7px;
  --sidebar-w: 228px;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-thumb {
  background: #d5dce5;
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #c1cad6;
  background-clip: content-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* ============ 登录页 ============ */
.login-wrap {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #070d18;
  overflow: hidden;
  color: #e8eefb;
}

.login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-bg .lg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(120, 160, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 255, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 62% at 50% 40%, #000 22%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 62% at 50% 40%, #000 22%, transparent 78%);
}

.login-bg .lg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.lg-glow.a {
  width: 620px;
  height: 620px;
  left: -160px;
  top: -200px;
  background: radial-gradient(circle, #1b5fd0, transparent 68%);
}

.lg-glow.b {
  width: 560px;
  height: 560px;
  right: -140px;
  bottom: -220px;
  background: radial-gradient(circle, #6f5bf0, transparent 70%);
}

.login-bg .lg-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 58%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120, 170, 255, 0.22), transparent);
}

.login-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(140, 175, 255, 0.16);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 40px 90px rgba(2, 8, 20, 0.55);
  overflow: hidden;
}

.login-brandpane {
  position: relative;
  padding: 44px 42px 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: radial-gradient(600px 400px at 10% 6%, rgba(27, 95, 208, 0.34), transparent 62%),
    linear-gradient(165deg, rgba(16, 29, 51, 0.92), rgba(8, 15, 28, 0.97));
  border-right: 1px solid rgba(140, 175, 255, 0.12);
}

.lb-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lb-logo {
  height: 30px;
  width: auto;
  display: block;
}

.lb-sep {
  width: 1px;
  height: 28px;
  background: rgba(140, 175, 255, 0.22);
  flex: none;
}

.lb-brandtext b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #e9f1ff;
  letter-spacing: 0.2px;
}

.lb-brandtext span {
  font-size: 9.5px;
  letter-spacing: 1.5px;
  color: rgba(170, 196, 231, 0.5);
}

.lb-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.lb-mid h1 {
  font-size: 28px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #f2f7ff;
}

.lb-mid p {
  font-size: 13px;
  line-height: 1.95;
  color: rgba(206, 222, 246, 0.72);
  max-width: 380px;
}

.lb-metrics {
  display: flex;
  gap: 28px;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(140, 175, 255, 0.14);
}

.lb-metrics b {
  display: block;
  font-size: 19px;
  font-weight: 650;
  color: #dbe9ff;
  letter-spacing: 0.2px;
}

.lb-metrics span {
  font-size: 11.5px;
  color: rgba(180, 203, 235, 0.6);
}

.lb-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: rgba(170, 196, 231, 0.55);
}

.lb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4c8bee;
  box-shadow: 0 0 0 4px rgba(76, 139, 238, 0.16);
}

.login-pane {
  padding: 44px 40px 26px;
  background: #fff;
  display: flex;
  flex-direction: column;
  color: var(--text);
}

.login-mobile-brand {
  display: none;
}

.login-pane h2 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.login-pane .sub {
  color: var(--text-3);
  font-size: 13px;
  margin: 6px 0 22px;
}

.login-pane-foot {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.3px;
}

.login-tabs {
  display: flex;
  gap: 4px;
  background: #f2f5fa;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.login-tabs button {
  flex: 1;
  padding: 9px 0;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
  transition: all 0.16s;
}

.login-tabs button.on {
  background: #fff;
  color: var(--brand);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* 账号密码登录 */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lf-label {
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 500;
}

.lf-field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.lf-field input:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(76, 139, 238, 0.16);
}

.lf-field input::placeholder {
  color: var(--text-3);
}

.lf-pwd {
  position: relative;
  display: block;
}

.lf-pwd input {
  padding-right: 62px;
}

.lf-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 9px;
  font-size: 12px;
  color: var(--brand);
  border-radius: 7px;
  background: transparent;
}

.lf-eye:hover {
  background: var(--brand-50);
}

.lf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -2px;
}

.lf-remember {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
}

.lf-remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.lf-link {
  font-size: 12.5px;
  color: var(--brand);
  background: transparent;
  padding: 2px 0;
}

.lf-link:hover {
  text-decoration: underline;
}

.lf-hint {
  text-align: center;
  line-height: 1.8;
  margin-top: 2px;
}

.demo-search {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  font-size: 13px;
  background: var(--surface);
}

.demo-search:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(76, 139, 238, 0.14);
}

/* 员工登录入口（设置页） */
.entry-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.le-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.le-k {
  width: 56px;
  flex: 0 0 56px;
  font-size: 12.5px;
  color: var(--text-3);
}

.le-v {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12.5px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.le-row .input {
  flex: 1;
  min-width: 220px;
}

.wx-btn {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2a74e0, #1b5fd0);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 8px 20px rgba(27, 95, 208, 0.26);
  transition: transform 0.14s, box-shadow 0.14s;
}

.wx-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(27, 95, 208, 0.3);
}

.wx-btn:active {
  transform: translateY(0);
}

.wx-btn.ghost {
  background: #fff;
  color: var(--brand);
  border: 1px solid #d8e4f7;
  box-shadow: none;
}

.wx-btn.ghost:hover {
  background: #f7faff;
}

.login-hint {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}

.login-hint b {
  color: var(--text-2);
  font-weight: 600;
}

.demo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 336px;
  overflow-y: auto;
  padding-right: 4px;
}

.demo-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: all 0.14s;
  text-align: left;
  width: 100%;
}

.demo-user:hover {
  border-color: var(--brand-400);
  background: var(--brand-50);
}

.demo-user .av {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--brand-50);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 600;
  flex: none;
}

.demo-user .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.demo-user .nm {
  font-size: 13px;
  font-weight: 600;
}

.demo-user .ds {
  font-size: 11.5px;
  color: var(--text-3);
}

.role-chip {
  font-size: 10.5px;
  color: var(--text-2);
  background: #f1f5fa;
  border-radius: 99px;
  padding: 2px 8px;
  white-space: nowrap;
  flex: none;
}

.role-chip.orange {
  color: #a2611a;
  background: #fdf1e3;
}

.login-err {
  color: var(--danger);
  background: var(--danger-50);
  border-radius: var(--r-sm);
  padding: 10px 13px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ============ 应用布局 ============ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: linear-gradient(180deg, #0b1626 0%, #0a1220 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  border-right: 1px solid rgba(140, 175, 255, 0.08);
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 220px;
  background: radial-gradient(420px 220px at 18% 0%, rgba(27, 95, 208, 0.34), transparent 70%);
  pointer-events: none;
}

.sidebar .brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
  z-index: 1;
}

.sidebar .brand-logo {
  height: 26px;
  width: auto;
  display: block;
}

.sidebar .brand-sub {
  font-size: 10.5px;
  letter-spacing: 1.3px;
  color: rgba(190, 210, 240, 0.42);
}

.nav {
  padding: 12px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  flex: 1;
  position: relative;
  z-index: 1;
}

.nav-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.28);
  padding: 14px 10px 7px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  color: rgba(214, 226, 245, 0.72);
  font-size: 13.5px;
  transition: all 0.15s;
  position: relative;
}

.nav-item:hover {
  background: rgba(140, 175, 255, 0.08);
  color: #fff;
}

.nav-item.on {
  background: linear-gradient(90deg, rgba(27, 95, 208, 0.34), rgba(27, 95, 208, 0.1));
  color: #fff;
  font-weight: 600;
}

.nav-item.on::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 0 3px 3px 0;
  background: #4c8bee;
  box-shadow: 0 0 12px rgba(76, 139, 238, 0.7);
}

.nav-item svg {
  flex: none;
  opacity: 0.9;
}

.nav-item .tag {
  margin-left: auto;
  font-size: 10.5px;
  background: var(--accent);
  color: #3a2205;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 6px;
  line-height: 1.5;
}

.sidebar-foot {
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.user-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  transition: background 0.15s;
  text-align: left;
}

.user-mini:hover {
  background: rgba(255, 255, 255, 0.07);
}

.user-mini .av {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(76, 139, 238, 0.18);
  color: #a9c9f7;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 700;
  flex: none;
}

.user-mini .nm {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

.user-mini .info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-mini .ds {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-title {
  min-width: 0;
}

.topbar h2 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.topbar .crumb {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: -1px;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.content {
  padding: 20px 24px 48px;
  flex: 1;
  max-width: 1560px;
  width: 100%;
}

/* ============ 通用组件 ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.card-head h3 {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.card-head .desc {
  font-size: 12.5px;
  color: var(--text-3);
}

.card-head .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 18px;
}

.card-body.tight {
  padding: 0;
}

.grid {
  display: grid;
  gap: 16px;
}

.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.g3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.g4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.g23 {
  grid-template-columns: 1.55fr 1fr;
}
.g32 {
  grid-template-columns: 1fr 1.55fr;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 17px 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.stat .lbl {
  font-size: 12.5px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat .val {
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.4px;
  margin-top: 9px;
  line-height: 1.15;
}

.stat .val small {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  margin-left: 3px;
}

.stat .foot {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat .icon {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-50);
  color: var(--brand);
}

.stat.accent .icon {
  background: var(--accent-50);
  color: var(--accent);
}
.stat.info .icon {
  background: var(--info-50);
  color: var(--info);
}
.stat.danger .icon {
  background: var(--danger-50);
  color: var(--danger);
}

.delta {
  font-size: 12px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
}
.delta.up {
  color: var(--danger);
  background: var(--danger-50);
}
.delta.down {
  color: var(--brand);
  background: var(--brand-50);
}
.delta.flat {
  color: var(--text-3);
  background: #f2f5f8;
}

/* 按钮 */
.btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--text-2);
  transition: all 0.14s;
  white-space: nowrap;
}

.btn:hover {
  border-color: #cfd8e3;
  color: var(--text);
  background: #fbfcfd;
}

.btn.primary {
  background: linear-gradient(180deg, #157066, var(--brand));
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(15, 92, 82, 0.22);
}

.btn.primary:hover {
  background: linear-gradient(180deg, #178175, var(--brand-600));
}

.btn.ghost-brand {
  color: var(--brand);
  border-color: #c6e0da;
  background: var(--brand-50);
}

.btn.ghost-brand:hover {
  background: #dcefea;
}

.btn.danger {
  color: var(--danger);
  border-color: #eccdc9;
  background: var(--danger-50);
}

.btn.danger:hover {
  background: #f8dfdc;
}

.btn.sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
  border-radius: 7px;
}

.btn.icon-only {
  width: 34px;
  padding: 0;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 输入 */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 500;
}

.field label .req {
  color: var(--danger);
  margin-left: 2px;
}

.input,
.select,
textarea.input {
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 0 11px;
  background: #fff;
  font-size: 13.5px;
  transition: border-color 0.14s, box-shadow 0.14s;
  width: 100%;
  outline: none;
}

textarea.input {
  height: auto;
  padding: 9px 11px;
  resize: vertical;
  min-height: 70px;
  line-height: 1.6;
}

.input:focus,
.select:focus,
textarea.input:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(47, 133, 119, 0.12);
}

.input::placeholder {
  color: #b0bccb;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2394a0b0' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 30px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box .input {
  padding-left: 32px;
  width: 220px;
}

.search-box svg {
  position: absolute;
  left: 11px;
  color: var(--text-3);
  pointer-events: none;
}

.month-picker {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: #fff;
  height: 34px;
  padding: 0 4px;
}

.month-picker button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--text-2);
}

.month-picker button:hover {
  background: #f2f5f8;
  color: var(--text);
}

.month-picker .val {
  font-size: 13px;
  font-weight: 600;
  padding: 0 8px;
  min-width: 86px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* 标签页 */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}

.tabs button {
  padding: 13px 14px;
  font-size: 13.5px;
  color: var(--text-2);
  position: relative;
  font-weight: 500;
  transition: color 0.14s;
}

.tabs button:hover {
  color: var(--text);
}

.tabs button.on {
  color: var(--brand);
  font-weight: 600;
}

.tabs button.on::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--brand);
}

.seg {
  display: inline-flex;
  background: #f2f5f8;
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}

.seg button {
  padding: 5px 12px;
  font-size: 12.5px;
  border-radius: 7px;
  color: var(--text-2);
  font-weight: 500;
  transition: all 0.14s;
}

.seg button.on {
  background: #fff;
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* 表格 */
.table-wrap {
  overflow-x: auto;
}

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.tbl th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.3px;
  background: var(--surface-2);
  padding: 10px 14px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1;
}

table.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.tbl tbody tr:last-child td {
  border-bottom: none;
}

table.tbl tbody tr:hover {
  background: #fbfcfd;
}

table.tbl td.r,
table.tbl th.r {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.tbl .strong {
  font-weight: 600;
}

table.tbl .sub {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 1px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--text-2);
}

/* 徽标 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge.green {
  background: var(--brand-50);
  color: var(--brand);
}
.badge.orange {
  background: var(--accent-50);
  color: #b3701f;
}
.badge.red {
  background: var(--danger-50);
  color: var(--danger);
}
.badge.blue {
  background: var(--info-50);
  color: #2a7290;
}
.badge.gray {
  background: #f0f3f7;
  color: var(--text-2);
}

.badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* 进度条 */
.hbar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hbar .track {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: #f0f3f7;
  overflow: hidden;
  min-width: 40px;
}

.hbar .fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #4c8bee, #1b5fd0);
  transition: width 0.5s ease;
}

.hbar .fill.accent {
  background: linear-gradient(90deg, #a99bf5, #6f5bf0);
}

.hbar .pct {
  font-size: 12px;
  color: var(--text-2);
  width: 46px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex: none;
}

/* 柱状图 */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 176px;
  padding-top: 8px;
}

.bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.bar-stack {
  width: 100%;
  max-width: 46px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  position: relative;
}

.bar-seg {
  width: 100%;
  border-radius: 4px;
  transition: height 0.55s cubic-bezier(0.2, 0.8, 0.3, 1);
  min-height: 0;
}

.bar-seg.meal {
  background: linear-gradient(180deg, #4c8bee, #2a74e0);
}

.bar-seg.supply {
  background: linear-gradient(180deg, #a99bf5, #7c5cf0);
}

.bar-x {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
}

.bar-col .tip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #16202f;
  color: #fff;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s;
  z-index: 2;
}

.bar-stack:hover .tip {
  opacity: 1;
}

.legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-2);
}

.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}

/* 环形图 */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
}

.donut {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  position: relative;
  flex: none;
}

.donut::after {
  content: '';
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: #fff;
}

.donut .center {
  position: absolute;
  inset: 26px;
  display: grid;
  place-items: center;
  z-index: 2;
  text-align: center;
  line-height: 1.25;
}

.donut .center .t1 {
  font-size: 19px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.donut .center .t2 {
  font-size: 10.5px;
  color: var(--text-3);
}

.donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.donut-legend .row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.donut-legend .row i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: none;
}

.donut-legend .row .nm {
  color: var(--text-2);
  flex: 1;
}

.donut-legend .row .vv {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* 空态 */
.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.empty .ico {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: #f2f5f8;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  color: #b8c3d1;
}

/* 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(13, 22, 35, 0.44);
  backdrop-filter: blur(2px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade 0.16s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}

.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: pop 0.18s ease;
}

.modal.wide {
  max-width: 760px;
}

.modal-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.modal-head h3 {
  font-size: 15.5px;
  font-weight: 600;
}

.modal-head .desc {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.modal-head .x {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  flex: none;
}

.modal-head .x:hover {
  background: #f2f5f8;
  color: var(--text);
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  background: var(--surface-2);
  border-radius: 0 0 16px 16px;
}

.modal-foot .left {
  margin-right: auto;
  font-size: 12.5px;
  color: var(--text-3);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

/* 提示 */
.toast-root {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: #16202f;
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 9px;
  box-shadow: var(--shadow);
  animation: pop 0.18s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 460px;
}

.toast.ok {
  background: #10574e;
}
.toast.err {
  background: #a8463c;
}

/* 明细列表 */
.meta-list {
  display: flex;
  flex-direction: column;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.meta-row:last-child {
  border-bottom: none;
}

.meta-row .k {
  color: var(--text-3);
  width: 88px;
  flex: none;
  font-size: 12.5px;
}

.meta-row .v {
  flex: 1;
  color: var(--text);
  font-weight: 500;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 6px;
}

.tl-item {
  display: flex;
  gap: 13px;
  position: relative;
  padding-bottom: 16px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: var(--line-2);
}

.tl-item:last-child::before {
  display: none;
}

.tl-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--brand-400);
  margin-top: 3px;
  flex: none;
  z-index: 1;
}

.tl-item.scrap .tl-dot {
  border-color: var(--danger);
}
.tl-item.transfer .tl-dot {
  border-color: var(--accent);
}

.tl-body {
  flex: 1;
  min-width: 0;
}

.tl-title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-desc {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 3px;
  line-height: 1.7;
}

.tl-date {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 4px;
}

/* 滚动列表 */
.scroll-y {
  overflow-y: auto;
}

.hint-box {
  background: #f6f9fe;
  border: 1px solid #e3ecfa;
  color: #43567a;
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 12.5px;
  line-height: 1.8;
}

.hint-box b {
  color: #1f3355;
}

.hint-box.blue {
  background: #f3f9fc;
  border-color: #d3e8f1;
  color: #2a6b86;
}

.hint-box.blue b {
  color: #1d5670;
}

.formula {
  font-size: 12px;
  color: var(--text-3);
  background: #f8fafc;
  border-radius: 7px;
  padding: 7px 10px;
  border: 1px dashed var(--line-2);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-page {
  display: grid;
  place-items: center;
  min-height: 60vh;
  color: var(--text-3);
  font-size: 13px;
  gap: 12px;
}

.loading-page .spinner {
  border-color: #dfe6ee;
  border-top-color: var(--brand);
  width: 22px;
  height: 22px;
}

/* ============ 响应式 ============ */
@media (max-width: 1240px) {
  .g4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .g23,
  .g32 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-w: 200px;
  }
  .content {
    padding: 18px 18px 40px;
  }
  .g3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    position: static;
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }
  .sidebar .brand {
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    flex: none;
    padding: 12px 16px;
  }
  .sidebar .brand .t2 {
    display: none;
  }
  .nav {
    flex-direction: row;
    padding: 8px 10px;
    gap: 4px;
    flex: 1;
  }
  .nav-label {
    display: none;
  }
  .nav-item.on::before {
    display: none;
  }
  .sidebar-foot {
    border-top: none;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
  }
  .user-mini .info {
    display: none;
  }
  .main {
    margin-left: 0;
  }
  .g4,
  .g3,
  .g2 {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 0 16px;
    height: 56px;
  }
  .login-shell {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
  .login-brandpane {
    display: none;
  }
  .login-pane {
    padding: 30px 26px 22px;
  }
  .login-mobile-brand {
    display: block;
    margin-bottom: 20px;
  }
  .login-mobile-brand img {
    height: 30px;
    width: auto;
  }
  .search-box .input {
    width: 150px;
  }
}

/* ============ 手机端优化 ============ */
@media (max-width: 560px) {
  .content {
    padding: 14px 12px 48px;
  }
  .topbar {
    height: 52px;
  }
  /* 导航改为底部标签栏，拇指可达 */
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 60;
    background: #0b1626;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sidebar .brand {
    display: none;
  }
  .sidebar-foot {
    display: none;
  }
  .nav {
    padding: 4px 6px;
    gap: 0;
  }
  .nav-item {
    flex: 1;
    flex-direction: column;
    gap: 2px;
    padding: 7px 2px;
    font-size: 10.5px;
    border-radius: 10px;
    justify-content: center;
  }
  .nav-item svg,
  .nav-item .ico {
    width: 19px;
    height: 19px;
  }
  .main {
    margin-left: 0;
    padding-bottom: 64px;
  }
  /* 表格横向滚动 */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table.tbl {
    min-width: 560px;
  }
  /* 弹窗占满全屏 */
  .modal {
    width: 94vw !important;
    max-width: none;
    max-height: 86vh;
    overflow-y: auto;
  }
  /* 表单控件触摸友好 */
  .input,
  .select,
  textarea.input {
    font-size: 16px; /* 防 iOS 聚焦自动放大 */
  }
  .btn {
    min-height: 40px;
  }
  .stat {
    padding: 14px;
  }
  /* 月份切换与头部工具行折行 */
  .month-picker {
    flex-shrink: 0;
  }
  .month-picker button {
    min-width: 36px;
    min-height: 36px;
  }
}

/* ============ 品牌资源 ============ */
.mark {
  overflow: hidden;
  padding: 0 !important;
}

.mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.sidebar .brand-logo,
.login-brandpane .lb-logo,
.login-mobile-brand img {
  image-rendering: -webkit-optimize-contrast;
}

/* ============ 页内标签栏 ============ */
.tab-line {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.tab-line button {
  position: relative;
  border: 0;
  background: none;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  border-radius: 8px 8px 0 0;
}
.tab-line button:hover {
  background: var(--surface-2);
}
.tab-line button.on {
  color: var(--brand);
  font-weight: 500;
}
.tab-line button.on::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.tab-line .cnt {
  display: inline-block;
  margin-left: 5px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 10.5px;
  text-align: center;
}
.tab-line button.on .cnt {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ============ 审批时间线 ============ */
.timeline {
  position: relative;
  padding-left: 4px;
}
.tl-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
}
.tl-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.tl-dot {
  flex: none;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: #fff;
  margin-top: 1px;
}
.tl-item.ok .tl-dot {
  background: var(--brand);
  border-color: var(--brand);
}
.tl-item.bad .tl-dot {
  background: #b4574c;
  border-color: #b4574c;
}
.tl-item.wait .tl-dot {
  background: #fff;
  border: 2px dashed #d9a05e;
}
.tl-body {
  flex: 1;
  min-width: 0;
}
.tl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.tl-name {
  color: var(--text-2);
  font-size: 12.5px;
}
.tl-state {
  margin-left: auto;
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-2);
}
.tl-state.ok {
  background: rgba(15, 92, 82, 0.1);
  color: var(--brand);
}
.tl-state.bad {
  background: rgba(180, 87, 76, 0.12);
  color: #b4574c;
}
.tl-state.wait {
  background: rgba(228, 145, 59, 0.14);
  color: #a86a24;
}
.tl-cmt {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: 7px;
  padding: 6px 9px;
}
.tl-time {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-3);
}

/* ============ 通知中心 ============ */
.notice-wrap {
  position: relative;
}
.notice-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9534f;
  border: 1.5px solid var(--surface);
}
.notice-dot.hide {
  display: none;
}
.notice-panel {
  position: absolute;
  right: 0;
  top: 38px;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16, 32, 28, 0.14);
  z-index: 80;
  overflow: hidden;
}
.notice-panel.hide {
  display: none;
}
.np-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.np-body {
  max-height: 380px;
  overflow-y: auto;
}
.np-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.np-item:hover {
  background: var(--surface-2);
}
.np-item.unread {
  background: rgba(228, 145, 59, 0.06);
}
.np-item.unread .np-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9534f;
  margin-right: 6px;
  vertical-align: middle;
}
.np-title {
  font-size: 12.8px;
  font-weight: 500;
  color: var(--text);
}
.np-text {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
  margin-top: 3px;
}
.np-time {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}
.np-foot {
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface-2);
}

/* ============ 分析页控件 ============ */
.ctl-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.seg button {
  border: 0;
  background: none;
  padding: 6px 13px;
  font-size: 12.5px;
  color: var(--text-2);
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
}
.seg button.on {
  background: var(--surface);
  color: var(--brand);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(16, 32, 28, 0.1);
}
.ctl-note {
  font-size: 12px;
  color: var(--text-3);
  margin-left: auto;
}
.share-bar {
  display: flex;
  height: 34px;
  border-radius: 9px;
  overflow: hidden;
  background: #f0f3f7;
  margin-bottom: 14px;
}
.share-bar > div {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}
.kpi {
  font-size: 17px;
  font-weight: 500;
  margin-top: 2px;
}
.kpi.muted {
  color: var(--text-2);
}
.kpi.accent {
  color: var(--brand);
}
.top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.top-row:last-child {
  border-bottom: 0;
}
.rank {
  width: 18px;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  text-align: center;
}
.rank.hot {
  color: var(--accent);
}
.top-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-sub {
  font-size: 11.5px;
  color: var(--text-3);
}

/* ============ 模板导入结果 ============ */
.import-done {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
}
.imp-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.imp-errors {
  margin-top: 10px;
  max-height: 180px;
  overflow-y: auto;
}
.imp-err {
  font-size: 12px;
  color: #a8443a;
  padding: 4px 0;
  border-top: 1px dashed var(--line);
}

/* ============ 审批链与分类标签 ============ */
.chain {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.chain-node {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-2);
}
.chain-node.brand {
  background: rgba(15, 92, 82, 0.08);
  border-color: rgba(15, 92, 82, 0.2);
  color: var(--brand);
  font-weight: 500;
}
.chain-node.cc {
  background: rgba(228, 145, 59, 0.1);
  border-color: rgba(228, 145, 59, 0.26);
  color: #a86a24;
}
.chain-arrow {
  color: var(--text-3);
  font-size: 12px;
}
.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 12px;
  background: rgba(15, 92, 82, 0.07);
  color: var(--brand);
  border: 1px solid rgba(15, 92, 82, 0.14);
}
.chip.alt {
  background: rgba(228, 145, 59, 0.09);
  color: #a86a24;
  border-color: rgba(228, 145, 59, 0.2);
}

/* ============ 费用分析：筛选提示 / 柱线组合图 / 交叉表 ============ */
.scope-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -4px 0 14px;
  padding: 9px 13px;
  border-radius: 9px;
  background: rgba(22, 118, 106, 0.06);
  border: 1px solid rgba(22, 118, 106, 0.14);
  font-size: 12.5px;
  color: var(--text-2);
}
.scope-tip svg {
  color: var(--brand);
  flex: none;
}
.scope-tip b {
  color: var(--brand);
  font-weight: 600;
}
.scope-tip .sub {
  color: var(--text-3);
}

.combo-wrap {
  width: 100%;
  min-height: 300px;
}
.combo-wrap svg text {
  font-family: inherit;
  user-select: none;
}

.chart-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.chart-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chart-stats .sub {
  font-size: 11.5px;
  color: var(--text-3);
}
.chart-stats b {
  font-size: 13.5px;
  font-weight: 600;
}

.matrix-tbl td,
.matrix-tbl th {
  white-space: nowrap;
  font-size: 12.5px;
}
.matrix-tbl tbody td:not(:first-child) {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .combo-wrap {
    min-height: 260px;
  }
  .chart-stats {
    gap: 8px 16px;
  }
  #f-dept,
  #f-cat {
    width: 132px !important;
  }
}

.chart-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(228, 145, 59, 0.08);
  border: 1px dashed rgba(228, 145, 59, 0.35);
  font-size: 12px;
  color: #8a6224;
}
.chart-note svg {
  flex: none;
  color: #b8802f;
}

/* ============ 流程设置 ============ */
.flow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  background: #fff;
  flex-wrap: wrap;
}
.flow-step input[type='checkbox'] {
  width: 14px;
  height: 14px;
  accent-color: var(--brand);
  margin: 0;
  cursor: pointer;
}
.chip.pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s;
}
.chip.pick input {
  width: 13px;
  height: 13px;
  accent-color: var(--brand);
  margin: 0;
  cursor: pointer;
}
.chip.pick.sel {
  background: rgba(27, 95, 208, 0.1);
  border-color: rgba(27, 95, 208, 0.34);
  color: var(--brand-600);
  font-weight: 500;
}
.chip.pick:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ============ 供餐对账 ============ */
.stat.ok .icon {
  background: var(--brand-50);
  color: var(--brand);
}
.stat.warn .icon {
  background: var(--accent-50);
  color: var(--accent);
}
.recon-kpi {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.recon-kpi b {
  font-size: 13.5px;
  color: var(--text);
}

/* ============ 用餐满意度调研 ============ */
.sv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 12px;
}
.sv-sup {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 12px;
  background: var(--surface-2);
}
.sv-sup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.sv-sup-head b {
  font-size: 13px;
  font-weight: 600;
}
.sv-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sv-bar {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
}
.sv-bar i {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: #e9eef4;
  overflow: hidden;
}
.sv-bar em {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: 99px;
  background: var(--brand);
  transition: width 0.35s ease;
}
.sv-bar em.t-green {
  background: var(--brand);
}
.sv-bar em.t-blue {
  background: var(--info);
}
.sv-bar em.t-orange {
  background: var(--accent);
}
.sv-bar em.t-red {
  background: var(--danger);
}
.sv-bar b {
  text-align: right;
  font-size: 12px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.sv-sup-foot {
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--text-3);
}
.sv-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--text-2);
}
.sv-section-title {
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.stars {
  display: inline-flex;
  gap: 2px;
}
.star {
  border: none;
  background: none;
  padding: 0 1px;
  font-size: 16px;
  line-height: 1;
  color: #a9b6c8;
  cursor: pointer;
  transition: color 0.12s, transform 0.12s;
}
.star.on {
  color: var(--accent);
}
.star:hover:not(:disabled) {
  transform: translateY(-1px);
}
.star:disabled {
  cursor: default;
}
.sv-rate-sup {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fff;
}
.sv-rate-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}
.sv-rate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 3px;
}
.sv-rate-row > span {
  width: 30px;
  font-size: 12.5px;
  color: var(--text-2);
}
.sv-comments {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}
.sv-comment {
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.sv-comment:last-child {
  border-bottom: none;
}
.sv-comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.sv-comment-time {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-3);
}
.sv-comment-text {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
}
.sv-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
}
.sv-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--brand);
  margin: 0;
  cursor: pointer;
}

/* ============ 数据范围标识 ============ */
.scope-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 500;
  background: #eef4fe;
  color: #1b5fd0;
  border: 1px solid #dbe7fb;
  white-space: nowrap;
}

.scope-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.scope-chip.dept {
  background: #f2efff;
  color: #5b45d6;
  border-color: #e6e1fd;
}

.scope-chip.self {
  background: #f2f5fa;
  color: #56637a;
  border-color: #e6ecf5;
}

/* ============ 申请流程中心 ============ */
.fc-head {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.fc-head h3 {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.fc-head p {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 3px;
}

.fc-head .right {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.fc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}

.fc-card:hover {
  border-color: #cddffb;
  box-shadow: 0 10px 26px rgba(20, 55, 110, 0.08);
  transform: translateY(-1px);
}

.fc-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.fc-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--brand-50);
  color: var(--brand);
  flex: none;
}

.fc-card.violet .fc-ico {
  background: var(--accent-50);
  color: var(--accent);
}

.fc-card.teal .fc-ico {
  background: var(--success-50);
  color: var(--success);
}

.fc-name {
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.4;
}

.fc-meta {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.fc-desc {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.7;
  min-height: 42px;
}

.fc-chain {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.fc-node {
  font-size: 11.5px;
  color: var(--text-2);
  background: #f4f7fc;
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

.fc-node b {
  font-weight: 600;
  color: var(--text);
}

.fc-node.skip {
  color: var(--text-3);
  background: #f7f9fc;
  text-decoration: line-through;
}

.fc-node.self {
  color: var(--brand);
  background: var(--brand-50);
}

.fc-arrow {
  font-size: 10px;
  color: var(--text-3);
}

.fc-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.fc-cc {
  font-size: 11.5px;
  color: var(--text-3);
}

.fc-foot .btn {
  margin-left: auto;
}

@media (max-width: 1240px) {
  .fc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .fc-grid {
    grid-template-columns: 1fr;
  }
}

/* ============ 个人工作台 ============ */
.pd-hello {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--r);
  background: linear-gradient(120deg, #0f1e36, #16305a 60%, #1c3f7a);
  color: #fff;
  overflow: hidden;
  position: relative;
}

.pd-hello::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  right: -100px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 139, 238, 0.5), transparent 68%);
}

.pd-hello .av {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 700;
  flex: none;
}

.pd-hello h3 {
  font-size: 17px;
  font-weight: 650;
}

.pd-hello p {
  font-size: 12.5px;
  color: rgba(220, 233, 252, 0.72);
  margin-top: 3px;
}

.pd-hello .right {
  margin-left: auto;
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.pd-hello .btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.pd-hello .btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 700px) {
  .pd-hello {
    flex-wrap: wrap;
  }
  .pd-hello .right {
    margin-left: 0;
    width: 100%;
  }
}

/* ============ 细节整理：更克制的层级与间距 ============ */
.card-head {
  padding: 15px 18px;
}

.card-head h3 {
  font-size: 14px;
  font-weight: 650;
}

.card-head .desc {
  font-size: 12px;
}

.card-body {
  padding: 16px 18px;
}

.stat {
  padding: 16px 17px;
}

.stat .val {
  font-size: 25px;
}

.tbl th {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.3px;
  background: var(--surface-2);
}

.tbl th,
.tbl td {
  padding: 11px 14px;
}

.tbl tbody tr:hover {
  background: #f9fbff;
}

.tab-line {
  gap: 4px;
}

.btn {
  border-radius: 8px;
}

.btn.primary {
  background: linear-gradient(135deg, #2a74e0, #1b5fd0);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(27, 95, 208, 0.22);
}

.btn.primary:hover {
  background: linear-gradient(135deg, #2f7bea, #1a58c2);
}

.badge {
  font-weight: 500;
}

.month-picker {
  border-radius: 9px;
}

.seg {
  border-radius: 9px;
}

.seg button.on {
  border-radius: 7px;
}

/* ============ 流程目录 / 权限说明 ============ */
.ft-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.ft-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex-wrap: wrap;
}

.ft-row:last-child {
  border-bottom: none;
}

.ft-row.off {
  background: #fafbfd;
  opacity: 0.72;
}

.ft-main {
  min-width: 230px;
  flex: 1;
}

.ft-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ft-name input {
  width: 14px;
  height: 14px;
  accent-color: var(--brand);
}

.ft-main .sub {
  margin: 2px 0 0 21px;
  font-size: 11.5px;
  color: var(--text-3);
}

.chip.default {
  background: #f4f7fc;
  color: var(--text-2);
  border-color: var(--line);
}

.scope-legend {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px 15px;
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, #f8fbff, #f5f8fd);
  border: 1px solid #e6eefa;
}

.scope-legend.compact {
  padding: 12px 14px;
}

.scope-legend > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  flex-wrap: wrap;
}

.scope-legend b {
  font-weight: 600;
  color: var(--text);
}

.scope-legend .lv {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.scope-legend .lv.all {
  background: #1b5fd0;
  box-shadow: 0 0 0 3px rgba(27, 95, 208, 0.14);
}

.scope-legend .lv.dept {
  background: #6f5bf0;
  box-shadow: 0 0 0 3px rgba(111, 91, 240, 0.14);
}

.scope-legend .lv.self,
.scope-legend .lv.profile {
  background: #94a1b5;
  box-shadow: 0 0 0 3px rgba(148, 161, 181, 0.16);
}

/* ==================================================================
   移动端适配 v2（手机 / 平板）
   侧边栏 → 底部标签栏 + 「更多」抽屉；表格横向滚动；弹窗底部抽屉
   ================================================================== */

.mtabbar,
.msheet,
.msheet-mask {
  display: none;
}

@media (max-width: 860px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  /* ---------- 布局骨架 ---------- */
  .app-shell {
    display: block;
  }
  .sidebar {
    display: none !important;
  }
  .main {
    margin-left: 0;
    min-height: 100vh;
  }
  .content {
    padding: 14px 14px calc(84px + env(safe-area-inset-bottom));
  }

  /* ---------- 顶栏 ---------- */
  .topbar {
    height: 56px;
    padding: 0 14px;
    gap: 10px;
  }
  .topbar h2 {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar .crumb,
  .topbar-date {
    display: none;
  }
  .topbar-right {
    gap: 7px;
    flex: none;
  }
  .scope-chip {
    height: 24px;
    padding: 0 9px;
    font-size: 11px;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-flex;
  }

  /* ---------- 底部标签栏 ---------- */
  .mtabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--line);
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(16, 30, 55, 0.05);
  }
  .mtab {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    padding: 5px 2px;
    border: 0;
    background: none;
    color: #8b98ab;
    font: inherit;
    font-size: 10.5px;
    letter-spacing: 0.1px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s;
  }
  .mtab .mt-ico {
    display: grid;
    place-items: center;
    width: 26px;
    height: 22px;
    transition: transform 0.15s;
  }
  .mtab .mt-txt {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mtab.on {
    color: var(--brand);
    font-weight: 600;
  }
  .mtab.on .mt-ico {
    transform: translateY(-1px);
  }
  .mtab:active .mt-ico {
    transform: scale(0.9);
  }
  .mt-dot {
    position: absolute;
    top: 3px;
    left: calc(50% + 6px);
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 99px;
    background: #e0483c;
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
  }

  /* ---------- 更多抽屉 ---------- */
  .msheet-mask {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 32, 0.44);
    z-index: 90;
    opacity: 1;
    transition: opacity 0.2s;
  }
  .msheet-mask.hide {
    opacity: 0;
    pointer-events: none;
  }
  .msheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    max-height: 86dvh;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -18px 48px rgba(10, 20, 40, 0.22);
    transform: translateY(0);
    transition: transform 0.24s cubic-bezier(0.32, 0.72, 0.28, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .msheet.hide {
    transform: translateY(103%);
    pointer-events: none;
  }
  body.sheet-open {
    overflow: hidden;
  }
  .msh-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px 12px;
    border-bottom: 1px solid var(--line);
  }
  .msh-head .av {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #3a7fe4, #1b5fd0);
    flex: none;
  }
  .msh-head .info {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .msh-head .info b {
    font-size: 15px;
    font-weight: 650;
    line-height: 1.4;
  }
  .msh-head .info span {
    font-size: 11.5px;
    color: var(--text-3);
  }
  .msh-close {
    margin-left: auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #f8fafd;
    color: var(--text-2);
    display: grid;
    place-items: center;
    flex: none;
  }
  .msh-scope {
    padding: 10px 16px 0;
  }
  .msh-body {
    overflow-y: auto;
    padding: 6px 12px 12px;
    -webkit-overflow-scrolling: touch;
  }
  .msh-group {
    margin-top: 10px;
  }
  .msh-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    color: var(--text-3);
    padding: 6px 6px 6px;
  }
  .msh-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  /* ---------- 登录页 ---------- */
  .login-wrap {
    padding: 20px 16px;
  }
  .login-shell {
    border-radius: 18px;
  }
  .login-pane {
    padding: 26px 22px 20px;
  }
  .login-pane h2 {
    font-size: 21px;
  }
  .login-tabs button {
    padding: 10px 8px;
    font-size: 13px;
  }
  .demo-list {
    max-height: 46dvh;
    overflow-y: auto;
  }
  .demo-user {
    padding: 11px 12px;
  }
  .msh-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .msh-item.on {
    border-color: #cbdcfb;
    background: #f4f8ff;
    color: var(--brand);
    font-weight: 600;
  }
  .msh-item .ico {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: #f2f6fd;
    color: var(--brand);
    flex: none;
  }
  .msh-item .txt {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .msh-item .arrow {
    color: var(--text-3);
    display: grid;
    place-items: center;
    flex: none;
  }
  .msh-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: #e0483c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    flex: none;
  }
  .msh-foot {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
  }
  .msh-foot .btn {
    width: 100%;
    justify-content: center;
    min-height: 42px;
  }

  /* ---------- 内容：卡片 / 网格 ---------- */
  .grid {
    gap: 12px;
  }
  .g4,
  .g3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .g2,
  .g23,
  .g32 {
    grid-template-columns: 1fr;
  }
  .card {
    border-radius: 12px;
  }
  .card-head {
    padding: 14px 14px 12px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .card-head .right {
    gap: 8px;
    flex-wrap: wrap;
  }
  .card-body {
    padding: 14px;
  }
  .stat {
    padding: 13px 12px;
  }
  .stat .val {
    font-size: 21px;
    margin-top: 7px;
  }
  .stat .val small {
    font-size: 11.5px;
  }
  .stat .lbl {
    font-size: 11.5px;
    gap: 5px;
  }
  .stat .foot {
    font-size: 11px;
    margin-top: 5px;
    line-height: 1.5;
  }
  .stat .icon {
    width: 28px;
    height: 28px;
    right: 10px;
    top: 10px;
    border-radius: 8px;
  }
  .stat .icon svg {
    width: 15px;
    height: 15px;
  }

  /* ---------- 表格：横向滚动 + 首列固定 ---------- */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  table.tbl {
    min-width: 100%;
    font-size: 12.5px;
  }
  table.tbl th,
  table.tbl td {
    padding: 10px 12px;
  }
  table.tbl td {
    white-space: nowrap;
  }
  table.tbl td .sub {
    white-space: normal;
    max-width: 210px;
  }
  table.tbl td .cell-wrap {
    white-space: normal;
    max-width: 220px;
  }
  table.tbl th:first-child,
  table.tbl td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 1px 0 0 var(--line);
    min-width: 96px;
    white-space: nowrap;
  }
  table.tbl th:first-child {
    z-index: 3;
    background: var(--surface-2);
  }
  table.tbl tbody tr:hover td:first-child {
    background: #fbfcfd;
  }

  /* ---------- 分页标签 / 分段控件 ---------- */
  .tab-line,
  .seg {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tab-line::-webkit-scrollbar,
  .seg::-webkit-scrollbar {
    display: none;
  }
  .tab-line button,
  .seg button {
    flex: none;
    white-space: nowrap;
  }

  /* ---------- 表单控件：触摸友好 + 防 iOS 缩放 ---------- */
  .input,
  .select,
  textarea.input,
  input.input {
    font-size: 16px;
    min-height: 40px;
  }
  .select {
    padding-right: 30px;
  }
  .search-box {
    flex: 1;
    min-width: 0;
  }
  .search-box .input {
    width: 100%;
    min-width: 0;
  }
  .btn {
    min-height: 38px;
  }
  .btn.sm {
    min-height: 34px;
  }
  .btn.sm.icon-only {
    width: 34px;
    height: 34px;
  }
  .field label {
    font-size: 12.5px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .form-grid .full {
    grid-column: auto;
  }

  /* ---------- 弹窗：底部抽屉 ---------- */
  .modal-mask {
    align-items: flex-end;
    padding: 0;
  }
  .modal-mask .modal {
    width: 100% !important;
    max-width: none !important;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    animation: sheetUp 0.24s cubic-bezier(0.32, 0.72, 0.28, 1);
  }
  .modal-head {
    padding: 16px 16px 12px;
    flex: none;
  }
  .modal-head h3 {
    font-size: 15px;
  }
  .modal-body {
    padding: 14px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-foot {
    flex: none;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    gap: 10px;
    border-radius: 0;
    background: #fff;
  }
  .modal-foot .btn {
    flex: 1;
    justify-content: center;
  }
  @keyframes sheetUp {
    from {
      transform: translateY(24px);
      opacity: 0.6;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  .modal-mask .modal * {
    max-width: 100%;
  }

  /* ---------- 浮动元素 ---------- */
  .toast {
    max-width: calc(100vw - 28px);
    font-size: 12.5px;
    padding: 9px 14px;
  }
  .toast-root {
    left: 14px;
    right: 14px;
    transform: none;
    align-items: center;
  }
  .notice-panel {
    right: 0;
    top: 46px;
    width: min(88vw, 340px);
  }
  .np-body {
    max-height: 60dvh;
  }
}

/* ---------- 窄屏手机 ---------- */
@media (max-width: 420px) {
  .content {
    padding: 12px 10px calc(84px + env(safe-area-inset-bottom));
  }
  .topbar {
    padding: 0 12px;
  }
  .topbar h2 {
    font-size: 15.5px;
  }
  .scope-chip {
    max-width: 34vw;
    font-size: 10.5px;
  }
  .stat .val {
    font-size: 19.5px;
  }
  .g4 {
    gap: 10px;
  }
  .card-head {
    padding: 13px 12px 11px;
  }
  .card-body {
    padding: 12px;
  }
}

/* ---------- 平板：底部标签栏居中悬浮 ---------- */
@media (min-width: 601px) and (max-width: 860px) {
  .mtabbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(100%, 540px);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 30px rgba(16, 30, 55, 0.09);
  }
}

/* ---------- 移动端高度：避免 iOS 地址栏跳动 ---------- */
@media (max-width: 860px) {
  .login-wrap,
  .main {
    min-height: 100dvh;
  }
}

/* ---------- 手机横屏：压缩纵向留白 ---------- */
@media (max-width: 860px) and (max-height: 480px) {
  .topbar {
    height: 48px;
  }
  .content {
    padding-top: 10px;
  }
  .modal-mask .modal {
    max-height: 96dvh;
  }
}

/* ---------- 满意度评价：手机端评分与提交 ---------- */
.sv-submit-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 860px) {
  .sv-rate-sup {
    padding: 12px;
  }
  .sv-rate-row {
    gap: 8px;
    flex-wrap: nowrap;
  }
  .stars {
    gap: 3px;
  }
  .star {
    font-size: 25px;
    line-height: 1;
    padding: 2px 2px;
    min-width: 30px;
    text-align: center;
  }
  .sv-submit-row {
    position: sticky;
    bottom: -14px;
    z-index: 3;
    margin: 14px -16px -14px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
  }
  .sv-submit-row .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
}

/* ---------- 表格首列：暗示可横向滑动 ---------- */
@media (max-width: 860px) {
  table.tbl td:first-child {
    box-shadow: 1px 0 0 var(--line), 9px 0 12px -9px rgba(16, 30, 55, 0.18);
  }
}

/* ==================================================================
   餐费扣款 / 泡面核算
   ================================================================== */

table.tbl td.c,
table.tbl th.c {
  text-align: center;
}

.mc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.mc-price {
  font-size: 12px;
  color: var(--text-3);
  background: #f6f9fe;
  border: 1px solid #e6eefb;
  border-radius: 99px;
  padding: 4px 11px;
  white-space: nowrap;
}

.mc-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.mc-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.mc-quick {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #f7fafe;
  border: 1px solid #e8effb;
  border-radius: var(--r-sm);
}

.mc-quick-right {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-2);
}

.mc-quick-right b {
  color: var(--brand);
  font-weight: 650;
}

.mc-table table.tbl th,
.mc-table table.tbl td {
  padding: 8px 10px;
}

.mc-num {
  width: 46px;
  min-height: 32px;
  padding: 4px 6px;
  text-align: center;
  font-size: 13px;
  border-radius: 7px;
}

.mc-num::-webkit-outer-spin-button,
.mc-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mc-num {
  -moz-appearance: textfield;
  appearance: textfield;
}

.mc-fee {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mc-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.mc-foot .btn {
  margin-left: auto;
}

.mc-checks {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: #fafcff;
}

.mc-checks label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
}

.mc-checks input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.roster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

@media (max-width: 860px) {
  .mc-head {
    gap: 8px;
  }
  .mc-price {
    order: 3;
    width: 100%;
    white-space: normal;
    line-height: 1.6;
    border-radius: 10px;
  }
  .mc-actions {
    margin-left: auto;
  }
  .mc-actions .btn {
    padding: 0 10px;
  }
  .mc-quick {
    gap: 6px;
    padding: 9px 10px;
  }
  .mc-quick .btn {
    font-size: 11.5px;
    padding: 0 9px;
    min-height: 32px;
  }
  .mc-quick-right {
    width: 100%;
    margin-left: 0;
    font-size: 11.5px;
    padding-top: 4px;
    border-top: 1px dashed var(--line);
  }
  .mc-num {
    width: 42px;
    min-height: 34px;
    font-size: 16px;
  }
  .mc-foot .btn {
    width: 100%;
    margin-left: 0;
    justify-content: center;
    min-height: 42px;
  }
  .mc-checks {
    gap: 10px 16px;
  }
}

/* ==================================================================
   申请附件
   ================================================================== */

.att-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px dashed #cfdcef;
  border-radius: 10px;
  background: #fafcff;
}

.att-zone .sub {
  font-size: 11.5px;
  line-height: 1.6;
}

.att-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.att-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.att-item.uploading {
  opacity: 0.7;
}

.att-badge {
  width: 36px;
  height: 24px;
  border-radius: 5px;
  background: #eef4fe;
  color: #1b5fd0;
  font-size: 9.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
  letter-spacing: 0.3px;
}

.att-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.att-size {
  font-size: 11.5px;
  color: var(--text-3);
  flex: none;
}

.att-ops {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: none;
}

.att-tip {
  font-size: 11px;
  color: var(--text-3);
}

.att-ops a.btn {
  text-decoration: none;
}

.att-section {
  margin: 4px 0 16px;
}

.att-section-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

@media (max-width: 860px) {
  .att-item {
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 9px 10px;
  }
  .att-name {
    flex: 1 1 60%;
    white-space: normal;
    word-break: break-all;
    line-height: 1.45;
  }
  .att-size {
    order: 0;
  }
  .att-ops {
    width: 100%;
    justify-content: flex-end;
    gap: 8px;
  }
  .att-ops .btn {
    min-height: 32px;
  }
  .att-zone {
    gap: 8px;
  }
  .att-zone .sub {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .page-hint {
    display: none;
  }
  .mc-desc {
    display: none;
  }
  .mc-toolbar {
    width: 100%;
  }
  .mc-toolbar #mc-date,
  .mc-toolbar #mc-dept {
    flex: 1;
    width: auto !important;
    min-width: 0;
  }
}



/* 名单操作列：按钮并排不换行 */
table.tbl td.ops {
  white-space: nowrap;
  min-width: 84px;
}

table.tbl td.ops .btn {
  vertical-align: middle;
}

table.tbl td.ops .btn + .btn {
  margin-left: 4px;
}

/* 我要报餐 */
.mr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.mr-row:last-of-type {
  border-bottom: 0;
}
.mr-label {
  font-weight: 600;
  font-size: 14px;
}
.mr-label .sub {
  margin-left: 6px;
  font-weight: 400;
  font-size: 12px;
  color: var(--text-3);
}
.mr-opts {
  display: flex;
  gap: 10px;
}
.mr-opt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: var(--text-2);
  background: #fff;
  transition: all .15s ease;
}
.mr-opt:hover {
  border-color: var(--brand-400);
}
.mr-opt.on {
  border-color: var(--brand);
  background: var(--brand-50);
  color: var(--brand-600);
  font-weight: 600;
}
.mr-opt input {
  accent-color: var(--brand);
  margin: 0;
}
.mr-opt input:disabled {
  cursor: not-allowed;
}
.mr-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.mr-total {
  font-size: 13px;
  color: var(--text-2);
}
.mr-total b {
  font-size: 16px;
  color: var(--text-1);
}

/* 导入上次答案：做成醒目的小按钮 */
#mr-import:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand-600);
  font-weight: 600;
}
