/*
 * 有稿 · 公共样式
 * 视觉参考：星河设计接单系统截图（浅蓝灰底、白色圆角卡片、蓝色主按钮、红色金额、绿色状态）。
 * 设计基准：Ant Design 字体规范（基础字号 14px / 行高 22px，字重 400/500）、4/8 间距刻度、WCAG AA 对比度。
 * 只有浅色主题；字体使用系统字体，不依赖境外字体服务。
 */
:root {
  --bg: #edf2f8;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-hover: #f1f5fb;
  --border: #e8edf4;
  --border-strong: #d5dde8;

  --text: #141a26;
  --text-2: #4e5969;
  --text-3: #6b7585;
  --text-4: #a0a8b4;

  /* 主色取自参考截图 #5E8AF3，按钮底色加深到 #3F6FE8 使白字对比度达到 4.5:1 */
  --accent: #3f6fe8;
  --accent-hover: #3460d6;
  --accent-ink: #3561d8;
  --accent-soft: #edf3fe;
  --accent-soft-2: #e1eafd;
  --accent-ring: rgba(63, 111, 232, .22);

  --red: #c94540;
  --red-soft: #fdeeed;
  --green: #1e7a52;
  --green-bright: #2f9a66;
  --green-soft: #e5f6ee;
  --amber: #a85a0c;
  --amber-soft: #fdf2e2;
  --blue: #2f5fd0;
  --blue-soft: #eaf1ff;
  --violet: #6046c4;
  --violet-soft: #f0ecfd;
  --ink: #121826;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-num: "DIN Alternate", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: var(--font);

  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 10px rgba(16, 24, 40, .04);
  --shadow-pop: 0 6px 24px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .06);
  --shadow-focus: 0 0 0 3px var(--accent-ring);

  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 8px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur-fast: 120ms;
  --dur: 180ms;

  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5715; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--text); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
svg { display: block; }
::selection { background: var(--accent-soft-2); }
.mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
[hidden] { display: none !important; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.content > * { animation: fade-in 160ms var(--ease) both; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* ---------- 框架：侧边栏 + 顶栏 ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; }
.sidebar-brand .logo-mark {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(140deg, #5e8af3, #3762e2); color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-brand .name { font-weight: 600; font-size: 15px; }
.sidebar-brand .sub { font-size: 12px; color: var(--text-3); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 14px; border-radius: var(--radius);
  color: var(--text-2); font-size: 14px; cursor: pointer; position: relative; user-select: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-item .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-3); }
.nav-item:hover { background: var(--surface-hover); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; }
.nav-item.active .icon { color: var(--accent); }
.badge-dot {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: #e5484d; color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}
.badge-dot:empty { display: none; }
.sidebar-foot {
  margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--radius);
  background: var(--surface-2);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 14px; background: var(--accent);
}
.sidebar-foot .uname { font-size: 14px; font-weight: 500; }
.sidebar-foot .urole { font-size: 12px; color: var(--text-3); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30;
}
.topbar > .flex { min-width: 0; }
.topbar .crumb {
  font-size: 15px; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.topbar .crumb .sep, .topbar .crumb .text-sub { color: var(--text-4); font-weight: 400; margin: 0 6px; }
.crumb-home, .breadcrumb-home { border: 0; background: none; color: inherit; font: inherit; font-weight: 600; padding: 0; cursor: pointer; }
.crumb-home:hover, .breadcrumb-home:hover { color: var(--accent-ink); }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logout-pill {
  height: 32px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-2); font-size: 13px; cursor: pointer; transition: border-color var(--dur-fast), color var(--dur-fast);
}
.logout-pill:hover { border-color: var(--red); color: var(--red); }

/* 语音提醒开关（参考截图的绿色 ON 开关） */
.voice-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.voice-toggle input[type=checkbox] {
  appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 99px; margin: 0; flex-shrink: 0;
  background: #cfd6e0; position: relative; cursor: pointer; transition: background var(--dur) var(--ease);
}
.voice-toggle input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform var(--dur) var(--ease);
}
.voice-toggle input[type=checkbox]:checked { background: #4caf50; }
.voice-toggle input:checked::after { transform: translateX(20px); }
.voice-toggle input:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

.content { padding: 20px 24px 64px; width: 100%; max-width: 1240px; margin: 0 auto; }
/* 参考系统的页面没有大标题，页面名称在顶栏；页面说明以一行提示文字出现 */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head:empty { display: none; }
.page-hint { color: var(--text-3); font-size: 13px; margin: 0; flex: 1 1 260px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* ---------- 卡片 ---------- */
.card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.card-pad { padding: 20px; }
.card + .card { margin-top: 14px; }
/* 网格/列表容器自带间距，避免与相邻卡片外边距叠加 */
.admin-content-cards > .card, .content-cards > .card, .order-list > .card, .hall-list > .card, .report-grid > .card, .report-metrics > .card { margin-top: 0; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.data-table th {
  text-align: left; font-weight: 500; color: var(--text-3); font-size: 13px; padding: 12px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; background: var(--surface); }
table.data-table td.wrap, table.data-table .wrap { white-space: normal; min-width: 160px; max-width: 280px; }
table.data-table tbody tr:last-child td { border-bottom: none; }
table.data-table tbody tr:hover td { background: var(--surface-hover); }
/* 操作列固定在右侧（参考截图 25–30、37） */
table.data-table.sticky-ops th:last-child,
table.data-table.sticky-ops td:last-child { position: sticky; right: 0; z-index: 1; border-left: 1px solid var(--border); }
table.data-table.sticky-ops th:last-child { background: var(--surface-2); }
.cell-main { font-weight: 500; color: var(--text); }
.cell-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.cell-amount, .amount { font-family: var(--font-num); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--red); }
.amount-plain { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.avatar-sm { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.sort-mark { display: inline-block; margin-left: 4px; color: var(--text-4); font-size: 11px; }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--accent-ink); }
.sortable.sorted .sort-mark { color: var(--accent); }

/* ---------- 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 500; line-height: 20px; white-space: nowrap;
}
.badge.gray { background: #f1f3f6; color: var(--text-2); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; border: 1px solid transparent; cursor: pointer;
  white-space: nowrap; transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn:active { opacity: .85; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: #fbe0de; }
.btn-danger-solid { background: #e15b57; color: #fff; }
.btn-danger-solid:hover { background: #cf4a46; }
.btn-success { background: var(--green-soft); color: var(--green); }
.btn-success:hover { background: #d6efe3; }
.btn-text { background: none; border: 0; color: var(--accent-ink); padding: 0 4px; height: auto; }
.btn-text:hover { text-decoration: underline; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn:focus-visible, .icon-btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
/* 图标按钮：表格和卡片里的查看 / 编辑 / 转单 / 删除（参考截图的眼睛、铅笔、垃圾桶） */
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--text-3);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { background: var(--surface-hover); color: var(--accent-ink); }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.icon-actions { display: inline-flex; align-items: center; gap: 2px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field > label, .field-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.field .hint, .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.req { color: var(--red); margin-left: 2px; }
input:not([type]), input[type=text], input[type=number], input[type=password], input[type=url], input[type=tel],
input[type=email], input[type=search], input[type=date], textarea, select {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); font-size: 14px; font-family: inherit; color: var(--text); line-height: 1.4;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  -webkit-appearance: none; appearance: none;
}
input[type=date] { padding-right: 8px; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
select {
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7585' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
input::placeholder, textarea::placeholder { color: var(--text-4); }
input:hover, textarea:hover, select:hover { border-color: #b9c4d4; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-focus); }
input:disabled, textarea:disabled, select:disabled { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.radio-group { display: flex; gap: 20px; flex-wrap: wrap; min-height: 38px; align-items: center; }
.radio-group label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; margin: 0; font-weight: 400; }
.radio-group input { width: 18px; height: 18px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }

/* ---------- 页签 ---------- */
/* 下划线页签（参考截图 34 发布订单）：窄屏横向滚动，不换行 */
.tabs {
  display: flex; gap: 28px; border-bottom: 1px solid var(--border); margin-bottom: 18px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-item {
  flex-shrink: 0; white-space: nowrap; padding: 10px 2px; font-size: 14px; color: var(--text-3); cursor: pointer;
  border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font-family: inherit;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.tab-item:hover { color: var(--text); }
.tab-item.active { color: var(--accent-ink); font-weight: 500; border-bottom-color: var(--accent); }
.tab-item:disabled { color: var(--text-4); cursor: not-allowed; }
.tab-item .count { margin-left: 4px; color: var(--text-4); font-variant-numeric: tabular-nums; }
/* 分段页签（参考截图 31–33 订单状态）：激活项为深色胶囊 */
.seg-tabs {
  display: flex; gap: 4px; padding: 6px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-bottom: 14px;
}
.seg-tabs::-webkit-scrollbar { display: none; }
.seg-tab {
  flex-shrink: 0; white-space: nowrap; border: 0; background: transparent; font-family: inherit; font-size: 14px;
  color: var(--text-2); padding: 8px 16px; border-radius: var(--radius); cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast);
}
.seg-tab:hover { background: var(--surface-hover); color: var(--text); }
.seg-tab.active { background: var(--ink); color: #fff; }
.seg-tab .count { margin-left: 6px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.seg-tab.active .count { color: rgba(255, 255, 255, .7); }

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty-illus { width: 64px; height: 64px; margin: 0 auto 14px; }
.empty-illus svg { width: 100%; height: 100%; }
.empty-state .title { font-size: 15px; font-weight: 500; color: var(--text-2); }
.empty-state .desc { font-size: 13px; margin-top: 4px; }

/* ---------- 弹窗 ---------- */
@keyframes modal-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 20, 30, .45); display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 16px; animation: fade-in var(--dur) var(--ease);
}
.modal {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-pop); width: 100%; max-width: 480px;
  max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; animation: modal-pop 200ms var(--ease);
}
.modal.modal-wide { max-width: 680px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.modal-head h3 { font-size: 16px; }
.modal-close { width: 32px; height: 32px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--text-3); cursor: pointer; font-size: 18px; line-height: 1; }
.modal-close:hover { background: var(--surface-hover); color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }

/* ---------- 提示 ---------- */
#toast-root { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  background: rgba(20, 26, 38, .92); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px;
  box-shadow: var(--shadow-pop); animation: toast-in 220ms var(--ease); text-align: center;
}
.toast.success { background: #1f8f5c; }
.toast.error { background: #d2453f; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- 登录页：左侧品牌区 + 右侧表单，浅色主题 ---------- */
.login-wrap { min-height: 100vh; display: flex; background: var(--bg); }
.login-brand-pane {
  flex: 1.05; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px 48px; background: linear-gradient(150deg, #5e8af3 0%, #3f6fe8 55%, #2f56c9 100%); color: #fff;
}
.login-brand-pane::after {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -180px; bottom: -200px;
  background: rgba(255, 255, 255, .08);
}
.login-brand-pane::before {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; right: 80px; top: -120px;
  background: rgba(255, 255, 255, .06);
}
.login-brand-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }
.login-brand-top .mark {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .2); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
}
.login-brand-top .wordmark { font-weight: 600; font-size: 16px; }
.login-brand-mid { position: relative; z-index: 1; max-width: 440px; }
.login-brand-mid h2 { color: #fff; font-size: 32px; font-weight: 600; line-height: 1.35; }
.login-brand-mid p { font-size: 15px; color: rgba(255, 255, 255, .82); margin-top: 14px; line-height: 1.75; }
.login-feature-list { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.login-feature-list .f { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255, 255, 255, .92); }
.login-feature-list .f .ic {
  width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, .16); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.login-foot-note { position: relative; z-index: 1; font-size: 12px; color: rgba(255, 255, 255, .6); }
.login-form-pane { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-card); padding: 32px 28px; }
.login-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 24px; }
.login-mobile-brand .mark {
  width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(140deg, #5e8af3, #3762e2); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
}
.login-mobile-brand .wordmark { font-weight: 600; font-size: 16px; }
.login-logo { margin-bottom: 24px; }
.login-logo h1 { font-size: 22px; }
.login-logo p { font-size: 14px; color: var(--text-3); margin-top: 6px; }
.login-card .btn-primary { height: 42px; font-size: 15px; }
.login-err { background: var(--red-soft); color: var(--red); font-size: 13px; padding: 10px 12px; border-radius: 8px; margin-bottom: 16px; display: none; }
.login-err.show { display: block; }
.login-demo { margin-top: 18px; font-size: 13px; color: var(--text-3); line-height: 1.7; }
.login-demo b { color: var(--text-2); font-weight: 500; }
.login-switch { margin-top: 14px; font-size: 13px; color: var(--text-3); }
.login-switch a { color: var(--accent-ink); font-weight: 500; }
.login-switch a:hover { text-decoration: underline; }
@media (max-width: 880px) {
  .login-brand-pane { display: none; }
  .login-form-pane { padding: 28px 16px; align-items: flex-start; padding-top: 12vh; }
  .login-mobile-brand { display: flex; }
}

/* ---------- 工具类 ---------- */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-14 { gap: 14px; }
.text-sub { color: var(--text-3); font-size: 13px; }
.mt-8 { margin-top: 8px; } .mt-14 { margin-top: 14px; } .mt-18 { margin-top: 18px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 菜单按钮与窄屏 ---------- */
.menu-toggle {
  display: none; width: 36px; height: 36px; align-items: center; justify-content: center; flex-shrink: 0;
  border-radius: var(--radius-sm); border: 0; background: transparent; cursor: pointer; color: var(--text-2);
}
.menu-toggle:hover { background: var(--surface-hover); }
.sidebar-backdrop { display: none; }
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: min(78vw, 280px); transform: translateX(-100%); transition: transform var(--dur) var(--ease); box-shadow: var(--shadow-pop); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(15, 20, 30, .4); opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  .menu-toggle { display: flex !important; }
  .topbar { padding: 0 12px 0 8px; height: 54px; }
  .topbar .crumb { font-size: 16px; }
  .topbar .crumb .crumb-trail { display: none; }
  .content { padding: 14px 12px 88px; }
  .card-pad { padding: 16px; }
  .row-2, .row-3 { grid-template-columns: 1fr; }
  /* iOS 会放大字号小于 16px 的输入框，统一 16px 避免点击输入时页面被放大 */
  input:not([type]), input[type=text], input[type=number], input[type=password], input[type=url], input[type=tel],
  input[type=email], input[type=search], input[type=date], textarea, select { font-size: 16px; height: 42px; }
  textarea { height: auto; }
  .btn { height: 40px; }
  .btn-sm { height: 34px; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal, .modal.modal-wide { max-width: none; border-radius: 16px 16px 0 0; max-height: 92vh; }
  .modal-foot .btn { flex: 1; }
}

/* ---------- 不要左右滚动（2026-10-14 用户反馈） ---------- */
/* 电脑：单元格允许换行，表格自动适应宽度 */
@media (min-width: 861px) {
  table.data-table th, table.data-table td { padding: 11px 10px; }
  table.data-table th { white-space: normal; word-break: keep-all; min-width: 3em; }
  table.data-table td { white-space: nowrap; }
  table.data-table td.wrap, table.data-table td.title-cell, table.data-table td.remark-cell { white-space: normal; overflow-wrap: anywhere; min-width: 120px; }
  .designer-table { min-width: 0 !important; }
}
/* 手机：每行变成一张小卡片，字段名在左、内容在右 */
@media (max-width: 860px) {
  .table-wrap { overflow-x: visible; }
  table.data-table, table.data-table tbody, table.data-table tr, table.data-table td { display: block; width: 100%; }
  table.data-table thead { display: none; }
  table.data-table tr { padding: 10px 14px; border-bottom: 8px solid var(--bg); }
  table.data-table tbody tr:last-child { border-bottom: 0; }
  table.data-table td { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 6px 0; border: 0; white-space: normal; text-align: right; overflow-wrap: anywhere; position: static !important; min-width: 0 !important; max-width: none !important; }
  table.data-table td::before { content: attr(data-label); color: var(--text-3); font-size: 13px; text-align: left; flex-shrink: 0; }
  table.data-table td[data-label=""]::before { content: none; }
  table.data-table td.select-cell, table.data-table td:first-child:has(> input[type=checkbox]) { justify-content: flex-start; }
  table.data-table td:last-child { justify-content: flex-end; border-left: 0 !important; border-top: 1px solid var(--border) !important; margin-top: 6px; padding-top: 10px; }
  table.data-table td:last-child::before { content: none; }
  table.data-table tbody tr:hover td { background: transparent; }
  table.data-table td .icon-actions { flex-wrap: wrap; justify-content: flex-end; }
}
