/* base.css — 全局布局与公共组件样式（移动优先，断点 768 / 1200） */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* 锁定整页缩放：保留单指横竖滚动，双指缩放在 JS 中兜底拦截 */
  touch-action: pan-x pan-y;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
.icon { display: inline-block; vertical-align: -3px; }

/* ---------- 通用 ---------- */
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.mono { font-variant-numeric: tabular-nums; font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.req { color: var(--danger); font-style: normal; }
.link { color: var(--brand); font-weight: 500; }
.link:hover { text-decoration: underline; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }

/* ---------- 员工端外壳 ---------- */
.staff-app {
  min-height: 100vh;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg);
  padding-bottom: calc(78px + var(--safe-bottom));
  position: relative;
}
.staff-main { padding: 14px 16px 28px; }
.staff-main.no-nav { padding-bottom: 16px; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px 10px;
  background: rgba(247, 247, 248, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-title { font-size: 20px; font-weight: 600; letter-spacing: 0.2px; }
.topbar-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  font-weight: 600; overflow: hidden; flex: none;
}
.avatar-sm { width: 34px; height: 34px; font-size: 13px; }
.avatar-xs { width: 26px; height: 26px; font-size: 11px; }
.avatar-lg { width: 52px; height: 52px; font-size: 17px; }
.avatar-btn { position: relative; border: none; background: transparent; padding: 0; border-radius: 50%; }
.avatar-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* 站内消息未读：头像数字角标 / 入口纯红点 */
.avatar-msg-badge {
  position: absolute; top: -4px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--danger); color: var(--white);
  font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
  border: 2px solid var(--white); box-sizing: content-box; pointer-events: none;
}
.msg-dot {
  position: absolute; top: 0; right: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--white); box-sizing: content-box; pointer-events: none;
}

.bottom-nav {
  /* 不用 transform 居中：left/right 同时锚定 + margin auto，避免半像素与滚动条宽度造成偏移 */
  position: fixed; bottom: 0; left: 0; right: 0; margin: 0 auto;
  width: 100%; max-width: 640px; z-index: 40;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--white);
  border-top: 1px solid var(--line);
  /* 左右留白一致（都为 0），等宽列由 1fr 均分，底边叠加刘海安全区 */
  padding: 6px 0 calc(6px + var(--safe-bottom));
}
.nav-tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  min-width: 0; min-height: 48px; padding: 5px 0; color: var(--ink-3); font-size: 11px;
}
.nav-tab .nav-icon { position: relative; line-height: 1; }
.nav-tab .nav-label { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-tab .nav-badge {
  position: absolute; top: -5px; right: -11px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--danger); color: var(--white);
  font-size: 10px; font-weight: 600; line-height: 16px; text-align: center;
}
.nav-tab.active { color: var(--brand); font-weight: 600; }
.admin-tip-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 640px; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: var(--brand-soft); color: var(--brand-dark); font-size: 12px;
  border-top: 1px solid var(--brand-soft-2);
}

/* ---------- 管理端外壳 ---------- */
.admin-app { min-height: 100vh; }
.side-nav {
  position: fixed; top: 0; left: 0; bottom: 0; width: 200px; z-index: 60;
  background: #FFFFFF; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 12px 12px;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 14px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px; letter-spacing: 0.5px;
}
.side-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.side-brand-text strong { font-size: 15px; }
.side-brand-text span { font-size: 10.5px; color: var(--ink-3); }
.side-store {
  padding: 10px 12px; margin: 0 2px 12px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--line-2);
}
.side-store-name { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.side-store-code { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.side-list { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.side-item {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px;
  border-radius: var(--radius-sm); color: var(--ink-2); font-size: 13.5px; font-weight: 500;
}
.side-item:hover { background: var(--bg); color: var(--ink); }
.side-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side-item-icon { display: flex; }
.side-user {
  display: flex; align-items: center; gap: 8px; padding: 10px 6px 0;
  border-top: 1px solid var(--line-2); margin-top: 8px;
}
.side-user-text { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.side-user-text strong { font-size: 13px; }
.side-user-text span { font-size: 11px; color: var(--ink-3); }
.side-user .icon-btn { color: var(--ink-3); }
.side-overlay { display: none; }
.admin-body { margin-left: 200px; min-height: 100vh; display: flex; flex-direction: column; }
.admin-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.admin-topbar .menu-btn { display: none; }
.admin-topbar-title { flex: 1; min-width: 0; }
.admin-topbar-title h1 { font-size: 20px; font-weight: 600; }
.admin-topbar-date { font-size: 12px; color: var(--ink-3); }
.admin-topbar-right { display: flex; align-items: center; gap: 14px; }
.top-link { font-size: 13px; color: var(--ink-2); }
.top-link:hover { color: var(--brand); }
.top-user {
  display: flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  background: #fff; border-radius: 999px; padding: 4px 12px 4px 5px; font-size: 13px;
}
.admin-main { flex: 1; }
.admin-content { max-width: 1200px; margin: 0 auto; padding: 22px 28px 48px; }

/* ---------- 页面头 ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; font-weight: 600; }
.page-head p { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 14px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line-2);
}
.card-title { font-size: 15.5px; font-weight: 600; }
.card-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.card-body { padding: 16px; }
.card-body.tight { padding: 10px 16px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--line-2); background: #FCFCFD; }
.card-accent { border-left: 3px solid var(--brand); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 2px 10px; }
.section-title { font-size: 16px; font-weight: 600; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  background: var(--white); color: var(--ink); font-size: 14px; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s, opacity .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-4); color: var(--ink); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover:not(:disabled) { background: var(--brand-soft-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #B91C1C; }
.btn-danger-ghost { background: #fff; border-color: #F3C9C9; color: var(--danger); }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { min-height: 46px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-text { min-height: 32px; padding: 0 6px; background: transparent; border: none; color: var(--brand); font-size: 13px; }
.btn-text:hover { text-decoration: underline; }
.btn-text.danger { color: var(--danger); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; border: none; background: transparent;
  color: var(--ink-2);
}
.icon-btn:hover { background: var(--line-2); }
.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(200, 16, 46, .22); border-top-color: var(--brand);
  display: inline-block; animation: spin .7s linear infinite; vertical-align: -2px;
}
.spinner-light { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-inline { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 26px; color: var(--ink-3); font-size: 13px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(200, 16, 46, .08); }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:disabled, .select:disabled, .textarea:disabled { background: #F5F6F7; color: var(--ink-3); cursor: not-allowed; }
/* iOS Safari 聚焦小于 16px 的输入控件会自动放大页面，移动端统一提到 16px */
@media (max-width: 820px) {
  input, select, textarea { font-size: 16px; }
}
.select {
  appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235B6169' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; line-height: 1.5; }
.error-text { font-size: 12px; color: var(--danger); margin-top: 5px; min-height: 0; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field.has-error .input:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .08); }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-stack { display: block; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.readonly-value {
  min-height: 42px; padding: 9px 12px; background: #F7F8F9; border: 1px dashed var(--line);
  border-radius: 10px; color: var(--ink-2); font-size: 14px;
}
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-size: 13.5px;
}
.radio-chip input { accent-color: var(--brand); }
.radio-chip.checked { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.checkbox { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--ink-2); cursor: pointer; line-height: 1.55; }
.checkbox input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 999px; background: #D8DADE; position: relative; transition: background .16s; cursor: pointer; }
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: left .16s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked { background: var(--brand); }
.switch input:checked::after { left: 21px; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- 徽标与提示 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px;
  border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.6; white-space: nowrap;
}
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: #F0F1F3; color: var(--ink-3); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.alert {
  display: flex; gap: 9px; padding: 11px 13px; border-radius: 10px;
  font-size: 13px; line-height: 1.6; margin-bottom: 14px; border: 1px solid transparent;
}
.alert .alert-icon { flex: none; margin-top: 1px; }
.alert-title { font-weight: 600; }
.alert-warn { background: var(--warn-soft); border-color: #F6E1BE; color: #8A4B06; }
.alert-danger { background: var(--danger-soft); border-color: #F6CECE; color: #8F1D1D; }
.alert-info { background: var(--info-soft); border-color: #D3E2FC; color: #1D4ED8; }
.alert-success { background: var(--success-soft); border-color: #C8EBD6; color: #15803D; }
.alert-neutral { background: #F7F8F9; border-color: var(--line); color: var(--ink-2); }
.notice-box { background: #FBFBFC; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; }
.notice-text { font-size: 12.5px; color: var(--ink-2); white-space: pre-line; line-height: 1.75; max-height: 0; overflow: hidden; transition: max-height .25s; }
.notice-text.open { max-height: 640px; }

/* ---------- 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.data-table th {
  background: #FAFAFB; color: var(--ink-3); font-weight: 500; font-size: 12px;
  white-space: nowrap; position: relative;
}
.data-table tbody tr:hover { background: #FCFCFD; }
.data-table td { color: var(--ink); }
.data-table .num, .data-table .money { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .col-sticky { position: sticky; left: 0; background: #fff; z-index: 2; }
.data-table th.col-sticky { background: #FAFAFB; z-index: 3; }
.data-table tbody tr:hover .col-sticky { background: #FCFCFD; }
.cell-user { display: flex; align-items: center; gap: 9px; min-width: 128px; }
.cell-user .avatar { width: 32px; height: 32px; font-size: 12px; }
.cell-user-name { font-weight: 600; }
.cell-user-sub { font-size: 11.5px; color: var(--ink-3); }
.table-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.table-actions .btn-text { min-height: 28px; font-size: 12.5px; }
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: #fff;
}
.toolbar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.search-box { position: relative; min-width: 220px; }
.search-box .input { padding-left: 34px; min-height: 38px; }
.search-box .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.toolbar .select { min-height: 38px; width: auto; min-width: 108px; padding-top: 6px; padding-bottom: 6px; }
.toolbar .input { min-height: 38px; }
.mobile-cards { display: none; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px; text-align: left; border-top: 3px solid var(--brand); cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.stat-card:hover { border-color: var(--brand); }
.stat-label { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 26px; font-weight: 700; margin: 6px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.stat-sub { font-size: 11.5px; color: var(--ink-3); }
.stat-card.warn { border-top-color: var(--warn); }
.stat-card.danger { border-top-color: var(--danger); }
.stat-card.success { border-top-color: var(--success); }

/* ---------- 信息列表 ---------- */
.info-list { display: flex; flex-direction: column; }
.info-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px dashed var(--line-2); font-size: 13.5px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--ink-3); flex: none; min-width: 84px; font-size: 13px; }
.info-value { text-align: right; color: var(--ink); word-break: break-all; flex: 1; }
.info-row.block { flex-direction: column; align-items: stretch; gap: 4px; }
.info-row.block .info-value { text-align: left; }

/* ---------- 弹窗 / 抽屉 / Toast / 预览 ---------- */
.modal-mask, .drawer-mask {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 22, 26, .46); opacity: 0; transition: opacity .18s; padding: 16px;
}
.modal-mask.show, .drawer-mask.show { opacity: 1; }
.modal {
  width: 100%; max-width: 520px; max-height: calc(100vh - 60px);
  background: #fff; border-radius: var(--radius-lg); display: flex; flex-direction: column;
  transform: translateY(10px) scale(.99); transition: transform .18s; box-shadow: var(--shadow-lg);
}
.modal-mask.show .modal { transform: none; }
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 860px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px 20px 12px; }
.modal-title { font-size: 17px; font-weight: 600; }
.modal-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.modal-body { padding: 4px 20px 18px; overflow-y: auto; font-size: 13.5px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid var(--line-2); }
.drawer-mask { justify-content: flex-end; padding: 0; }
.drawer {
  width: 100%; max-width: 520px; height: 100%; background: #fff;
  display: flex; flex-direction: column; transform: translateX(24px); transition: transform .22s;
  box-shadow: var(--shadow-lg);
}
.drawer-lg { max-width: 680px; }
.drawer-sm { max-width: 420px; }
.drawer-mask.show .drawer { transform: none; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line-2); }
.drawer-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px calc(14px + var(--safe-bottom)); border-top: 1px solid var(--line-2); background: #FCFCFD; }
.confirm-body { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.confirm-detail { margin-top: 10px; padding: 10px 12px; background: #F8F9FA; border-radius: 8px; font-size: 12.5px; }

.toast-wrap {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 32px); max-width: 420px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 8px; padding: 11px 14px;
  background: #2A2E34; color: #fff; border-radius: 10px; font-size: 13px; line-height: 1.5;
  box-shadow: var(--shadow-md); animation: toastIn .2s ease-out; opacity: 1; transition: opacity .22s, transform .22s;
}
.toast.out { opacity: 0; transform: translateY(-6px); }
.toast-icon { display: flex; margin-top: 1px; }
.toast-success { background: #17683A; }
.toast-error { background: #A11B1B; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.viewer-mask {
  position: fixed; inset: 0; z-index: 300; background: rgba(12, 13, 15, .92);
  display: flex; flex-direction: column; color: #fff; animation: fadeIn .16s;
}
.viewer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.viewer-title { font-size: 14px; color: rgba(255,255,255,.9); }
.viewer-btn {
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08);
  color: #fff; border-radius: 8px; padding: 6px 12px; font-size: 12.5px;
}
.viewer-btn:hover { background: rgba(255,255,255,.18); }
.viewer-wrap { flex: 1; position: relative; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 20px; }
.viewer-stage { display: flex; align-items: center; justify-content: center; max-width: 100%; }
.viewer-img { max-width: 90vw; max-height: 70vh; transition: transform .2s; transform-origin: center center; border-radius: 4px; }
.viewer-watermark {
  position: absolute; right: 22px; bottom: 16px; font-size: 12px;
  color: rgba(255,255,255,.62); background: rgba(0,0,0,.35); padding: 5px 10px; border-radius: 6px;
  pointer-events: none; letter-spacing: .3px;
}
.viewer-tools { display: flex; justify-content: center; gap: 10px; padding: 14px 16px calc(22px + var(--safe-bottom)); }
.pdf-viewer { display: flex; flex-direction: column; gap: 10px; }
.pdf-viewer iframe { width: 100%; height: min(66vh, 640px); border: 1px solid var(--line); border-radius: 8px; background: #F1F2F4; }
.pdf-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pdf-hint { font-size: 12px; color: var(--ink-3); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 空态 / 错误 / 骨架 ---------- */
.state-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px; text-align: center; gap: 8px;
}
.state-icon {
  width: 62px; height: 62px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 4px;
}
.state-icon.danger { background: var(--danger-soft); color: var(--danger); }
.state-title { font-size: 15.5px; font-weight: 600; }
.state-desc { font-size: 13px; color: var(--ink-3); max-width: 340px; line-height: 1.7; }
.state-box .btn { margin-top: 10px; min-width: 132px; }
.skeleton-wrap { display: flex; flex-direction: column; gap: 12px; }
.skeleton-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.sk-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #F1F2F4 25%, #E8E9EC 37%, #F1F2F4 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; margin-bottom: 10px; }
.sk-line:last-child { margin-bottom: 0; }
.sk-40 { width: 40%; } .sk-55 { width: 55%; } .sk-70 { width: 70%; } .sk-100 { width: 100%; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.page-info { font-size: 12px; color: var(--ink-3); }
.page-btns { display: flex; gap: 4px; }
.page-btn {
  min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 12.5px; padding: 0 8px;
}
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn.disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 登录 / 注册 ---------- */
.auth-page {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px calc(24px + var(--safe-bottom));
  background: radial-gradient(1200px 420px at 50% -10%, #FBE3E8 0%, var(--bg) 62%);
}
.auth-card {
  width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 22px; box-shadow: var(--shadow-sm);
}
.auth-brand { text-align: center; margin-bottom: 20px; }
.auth-mark {
  width: 56px; height: 56px; border-radius: 16px; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700;
  margin: 0 auto 12px; letter-spacing: 1px;
}
.auth-brand h1 { font-size: 19px; font-weight: 600; }
.auth-brand p { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12px; color: var(--ink-3); line-height: 1.8; }
.auth-extra { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 16px; }
.auth-extra .link { font-size: 12.5px; }
.auth-links { display: flex; gap: 14px; justify-content: center; margin-top: 14px; }
.demo-panel { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 14px; }
.demo-title { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; text-align: center; }
.demo-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.demo-account {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px;
  font-size: 12px; color: var(--ink-2); line-height: 1.35; text-align: left;
}
.demo-account:hover { border-color: var(--brand); color: var(--brand); }
.demo-account strong { display: block; font-size: 12px; }
.demo-account span { color: var(--ink-3); font-size: 11px; }

/* ---------- 步骤条 ---------- */
.stepper { display: flex; align-items: flex-start; gap: 4px; margin-bottom: 18px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 13px; left: calc(50% + 18px); right: calc(-50% + 18px);
  height: 2px; background: var(--line); border-radius: 1px;
}
.step.done:not(:last-child)::after { background: var(--brand); }
.step-index {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #F0F1F3; color: var(--ink-3); font-size: 12px; font-weight: 600; z-index: 1;
}
.step.active .step-index { background: var(--brand); color: #fff; }
.step.done .step-index { background: var(--brand-soft); color: var(--brand); }
.step-label { font-size: 11.5px; color: var(--ink-3); text-align: center; }
.step.active .step-label { color: var(--brand); font-weight: 600; }
.step.done .step-label { color: var(--ink-2); }
.step.done { cursor: pointer; }
.step-footer {
  position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; align-items: center;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  margin: 20px -16px -28px;
}
.step-footer .btn { flex: 1; }
.step-footer .btn-secondary { flex: 0 0 auto; min-width: 96px; }

/* ---------- 上传卡片 ---------- */
.upload-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.upload-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.upload-head { padding: 11px 13px; border-bottom: 1px solid var(--line-2); }
.upload-name { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.upload-req { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.upload-drop {
  margin: 12px; border: 1px dashed #D7D9DE; border-radius: 10px; background: #FAFAFB;
  min-height: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: var(--ink-3); font-size: 12.5px; text-align: center; padding: 14px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.upload-drop:hover, .upload-drop.drag { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.upload-drop .icon { color: var(--ink-4); }
.upload-thumb { position: relative; display: flex; gap: 10px; padding: 12px; align-items: center; }
.upload-thumb img { width: 74px; height: 74px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #F4F5F6; }
.upload-thumb .pdf-icon {
  width: 56px; height: 70px; border-radius: 8px; background: var(--danger-soft); color: var(--danger);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: none;
}
.upload-meta { flex: 1; min-width: 0; font-size: 12px; color: var(--ink-3); }
.upload-meta strong { display: block; font-size: 12.5px; color: var(--ink); font-weight: 500; word-break: break-all; }
.upload-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.upload-progress { height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; margin-top: 8px; }
.upload-progress span { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.upload-card.has-error { border-color: var(--danger); }

/* ---------- 档案 ---------- */
.profile-hero {
  display: flex; align-items: center; gap: 14px; padding: 18px 16px;
  background: linear-gradient(140deg, #fff 0%, #FFF7F8 100%); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 14px;
}
.profile-photo {
  width: 62px; height: 62px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); background: #F4F5F6;
}
.profile-hero h2 { font-size: 19px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.profile-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.profile-meta { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.id-reveal { display: inline-flex; align-items: center; gap: 6px; }
.cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cert-item {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff;
  cursor: pointer; text-align: left; padding: 0;
}
.cert-item img { width: 100%; height: 92px; object-fit: cover; background: #F2F3F5; }
.cert-item span { display: block; padding: 7px 10px; font-size: 12px; color: var(--ink-2); }
.cert-item:hover { border-color: var(--brand); }
.cert-item.pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 120px; background: #FCFCFD; }
.cert-item.pdf .pdf-badge { color: var(--danger); font-weight: 700; letter-spacing: 1px; font-size: 13px; }
.health-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.health-icon { width: 44px; height: 52px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex: none; }

/* ---------- 薪资 ---------- */
.sum-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.sum-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px; text-align: center; }
.sum-label { font-size: 11.5px; color: var(--ink-3); }
.sum-value { font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 4px; letter-spacing: -0.3px; }
.sum-card.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.sum-card.primary .sum-label { color: rgba(255,255,255,.75); }
.sum-card.primary .sum-value { font-size: 25px; }
.money-list { display: flex; flex-direction: column; }
.money-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.money-item:last-child { border-bottom: none; }
.money-item .mi-label { font-size: 13.5px; color: var(--ink-2); }
.money-item .mi-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.money-item .mi-value { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-item.total { background: #FAFAFB; font-weight: 600; }
.money-item.total .mi-label { color: var(--ink); }
.money { font-variant-numeric: tabular-nums; }
.money.neg { color: var(--danger); }
.money-strong { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.month-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.month-select { display: inline-flex; align-items: center; gap: 6px; }
.month-select .select { min-width: 148px; min-height: 38px; }

/* ---------- 量化分 ---------- */
.score-hero { text-align: center; padding: 20px 16px 16px; }
.score-total { font-size: 46px; font-weight: 700; line-height: 1; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.score-total span { font-size: 16px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.grade-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; margin-top: 10px;
}
.grade-A { background: var(--success-soft); color: var(--success); }
.grade-B { background: var(--info-soft); color: var(--info); }
.grade-C { background: var(--warn-soft); color: var(--warn); }
.grade-D { background: var(--danger-soft); color: var(--danger); }
.dim-row { padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.dim-row:last-child { border-bottom: none; }
.dim-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.dim-name { color: var(--ink-2); }
.dim-score { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 12.5px; }
.dim-score b { color: var(--ink); font-size: 14px; }
.dim-bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin-top: 7px; }
.dim-bar span { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .4s; }
.dim-desc { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; line-height: 1.5; }
.adjust-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.adjust-item:last-child { border-bottom: none; }
.adjust-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.adjust-value.plus { color: var(--success); }
.adjust-value.minus { color: var(--danger); }
.chart-box { padding: 8px 12px 4px; }
.chart-box canvas { width: 100%; display: block; }

/* ---------- 排休 ---------- */
.leave-hero { display: flex; align-items: center; gap: 16px; padding: 18px 16px; }
.leave-remain { flex: 1; }
.leave-remain .lr-num { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -1px; }
.leave-remain .lr-num small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.leave-remain .lr-label { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.leave-rule { padding: 10px 16px; background: #FAFAFB; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.leave-item { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.leave-item:last-child { border-bottom: none; }
.leave-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.leave-date { font-size: 14.5px; font-weight: 600; }
.leave-sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.leave-actions { display: flex; gap: 6px; margin-top: 8px; }
.leave-reason { margin-top: 8px; font-size: 12.5px; color: #8F1D1D; background: var(--danger-soft); padding: 8px 10px; border-radius: 8px; line-height: 1.6; }
.progress-track { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--brand); border-radius: 4px; }

/* ---------- 工作台 ---------- */
.todo-list { display: flex; flex-direction: column; }
.todo-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line-2);
  cursor: pointer;
}
.todo-item:last-child { border-bottom: none; }
.todo-item:hover { background: #FCFCFD; }
.todo-icon {
  width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex: none;
  background: var(--brand-soft); color: var(--brand);
}
.todo-icon.warn { background: var(--warn-soft); color: var(--warn); }
.todo-icon.danger { background: var(--danger-soft); color: var(--danger); }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-size: 13.5px; font-weight: 500; }
.todo-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.todo-tag { flex: none; font-size: 12px; align-self: center; }
.todo-tag.red { color: var(--danger); font-weight: 600; }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-item {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; font-size: 13.5px; color: var(--ink);
}
.quick-item:hover { border-color: var(--brand); color: var(--brand); }
.quick-item .icon { color: var(--brand); }

/* ---------- 设置页 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab {
  padding: 10px 14px; border: none; background: transparent; color: var(--ink-2);
  font-size: 13.5px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.dim-edit-row { display: grid; grid-template-columns: 1.4fr 0.7fr 2fr auto; gap: 10px; align-items: start; }
.formula-note { font-size: 12px; color: var(--ink-3); background: #FAFAFB; border-radius: 8px; padding: 9px 11px; line-height: 1.7; }

/* ---------- 详情页 / 汇总条 / 编辑器 ---------- */
a.stat-card { display: block; color: inherit; text-decoration: none; }
a.todo-item, a.quick-item { color: inherit; text-decoration: none; }
.detail-grid { display: grid; grid-template-columns: 380px 1fr; gap: 14px; align-items: start; }
.detail-side { min-width: 0; }
.detail-actions {
  display: flex; justify-content: flex-end; gap: 10px; padding: 12px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.detail-action-wrap { position: sticky; bottom: 16px; margin-top: 14px; }
@media (max-width: 1023px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-action-wrap { position: static; }
}
.summary-bar {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 11px 16px; background: #FBFBFC; border-bottom: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--ink-2);
}
.summary-bar .strong { color: var(--ink); }
.editor-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px;
  background: var(--brand-soft); border-radius: 10px; margin-bottom: 14px;
}
.editor-summary > div { display: flex; flex-direction: column; gap: 2px; }
.editor-summary b { font-size: 16px; font-variant-numeric: tabular-nums; }
.editor-summary .primary b { color: var(--brand); font-size: 18px; }
.form-section-title {
  font-size: 13.5px; font-weight: 600; margin: 18px 0 10px; padding-left: 9px;
  border-left: 3px solid var(--brand); line-height: 1.2;
}
.divider { height: 1px; background: var(--line-2); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.score-table th .th-sub { font-size: 10.5px; font-weight: 400; color: var(--ink-4); }
.score-input {
  width: 78px; min-height: 34px; padding: 4px 8px; text-align: right;
  border: 1px solid var(--line); border-radius: 8px; font-variant-numeric: tabular-nums;
}
.score-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(200,16,46,.08); }
.score-cell { font-weight: 600; font-variant-numeric: tabular-nums; }
.score-table .grade-badge { margin-top: 0; padding: 2px 9px; font-size: 12px; }
.inline-number {
  width: 66px; min-height: 32px; padding: 4px 8px; text-align: right;
  border: 1px solid var(--line); border-radius: 8px; font-variant-numeric: tabular-nums;
}
.inline-number:focus { outline: none; border-color: var(--brand); }

/* ---------- 审批卡片（桌面与移动一致） ---------- */
.approval-cards { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.approval-card { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 12px 13px; }
.approval-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.approval-card-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.approval-card-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.approval-card-body { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.approval-card-body .k { color: var(--ink-3); margin-right: 6px; }
.approval-card-foot { margin-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- 门店通讯录 / 生日关怀 ---------- */
.contact-row { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.contact-row:last-child { border-bottom: 0; }
.contact-main { flex: 1; min-width: 0; }
.birthday-slot { padding: 10px 16px 0; }
.birthday-slot:empty { display: none; }
.birthday-slot .birthday-banner { margin: 0; }
.birthday-banner {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fff4ec, #ffe9e3);
  border: 1px solid #ffd9c7; color: #8a3a1c;
}
.birthday-banner .bb-title { font-weight: 600; font-size: 13.5px; }
.birthday-banner .bb-text { font-size: 13px; margin-top: 3px; line-height: 1.6; }

/* ---------- 通用内边距修正 ---------- */
.card-body .card { margin-bottom: 0; }
.form-section-title + .form-grid { margin-bottom: 4px; }

@media (max-width: 767px) {
  .detail-grid { grid-template-columns: 1fr; }
  .editor-summary { grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 10px; }
  .editor-summary b { font-size: 14px; }
  .editor-summary .primary b { font-size: 16px; }
  .summary-bar { gap: 10px; }
}

@media (max-width: 1199px) {
  .side-nav { width: 64px; padding: 16px 8px 10px; }
  .side-brand { justify-content: center; padding-bottom: 12px; }
  .side-brand-text, .side-store, .side-item-label, .side-user-text, .side-user .icon-btn { display: none; }
  .side-item { justify-content: center; padding: 0; }
  .side-user { justify-content: center; }
  .admin-body { margin-left: 64px; }
  .admin-topbar { padding: 12px 20px; }
  .admin-content { padding: 18px 20px 40px; }
}
@media (max-width: 767px) {
  body { font-size: 14px; }
  .side-nav {
    width: 240px; transform: translateX(-100%); transition: transform .22s;
    padding: 18px 12px 12px; box-shadow: var(--shadow-lg);
  }
  .admin-app.nav-open .side-nav { transform: none; }
  .admin-app.nav-open .side-overlay {
    display: block; position: fixed; inset: 0; background: rgba(20,22,26,.4); z-index: 50;
  }
  .side-brand { justify-content: flex-start; }
  .side-brand-text, .side-store, .side-item-label, .side-user-text, .side-user .icon-btn { display: flex; }
  .side-store { display: block; }
  .side-item { justify-content: flex-start; padding: 0 12px; }
  .side-user { justify-content: flex-start; }
  .admin-body { margin-left: 0; }
  .admin-topbar { padding: 10px 14px; gap: 8px; }
  .menu-btn { display: inline-flex; }
  .admin-topbar .menu-btn { display: inline-flex; }
  .admin-topbar-title h1 { font-size: 17px; }
  .admin-topbar-date { font-size: 11px; }
  .admin-topbar-right .top-link { display: none; }
  .admin-content { padding: 14px 14px 32px; }
  .page-head h1 { font-size: 18px; }
  .page-head p { font-size: 12px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 22px; }
  .toolbar { padding: 10px 12px; gap: 8px; }
  .toolbar .search-box { min-width: 0; flex: 1 1 100%; }
  .toolbar .select { flex: 1 1 30%; min-width: 0; }
  .form-grid.two { grid-template-columns: 1fr; }
  .data-table th, .data-table td { padding: 10px; }
  .data-table.desktop-only, .table-wrap.desktop-only { display: none; }
  .mobile-cards { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
  .mobile-card {
    display: flex; gap: 11px; padding: 12px; border: 1px solid var(--line);
    border-radius: var(--radius-sm); background: #fff; align-items: flex-start;
  }
  .mobile-card .avatar { width: 40px; height: 40px; font-size: 13px; }
  .mobile-card-main { flex: 1; min-width: 0; }
  .mobile-card-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; flex-wrap: wrap; }
  .mobile-card-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
  .mobile-card-meta { font-size: 12px; color: var(--ink-3); margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
  .mobile-card-action { flex: 0 0 auto; align-self: center; }
  .mobile-card-action .btn { white-space: nowrap; }
  .birthday-banner { margin-bottom: 10px; }
  .sum-grid { gap: 8px; }
  .sum-value { font-size: 17px; }
  .sum-card.primary .sum-value { font-size: 21px; }
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal { max-width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
  .modal-foot { padding-bottom: calc(16px + var(--safe-bottom)); }
  .modal-foot .btn { flex: 1; }
  .drawer { max-width: 100%; }
  .quick-grid { grid-template-columns: 1fr; }
  .dim-edit-row { grid-template-columns: 1fr 1fr; }
  .dim-edit-row .dim-desc-input { grid-column: 1 / -1; }
  .upload-grid { grid-template-columns: 1fr; }
  .step-footer { margin: 20px -16px -28px; }
  .auth-card { padding: 22px 18px; }
  .info-row { gap: 10px; }
  .info-label { min-width: 74px; }
  .score-total { font-size: 40px; }
  .viewer-img { max-width: 96vw; }
}
@media (min-width: 768px) {
  .staff-app { background: var(--bg); }
  .upload-grid { grid-template-columns: 1fr 1fr; }
  .sum-value { font-size: 21px; }
}

