/* 膜店云 PC 管理端 */
:root {
  --sidebar-w: 256px;
  --sidebar-mini-w: 72px;
  --header-h: 56px;
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --bg: #f1f5f9;
  --card: #fff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --sidebar-bg: #fff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.sidebar-brand {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sidebar-brand-text { flex: 1; min-width: 0; }
.sidebar-brand > span:first-child {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.sidebar-nav { flex: 1; padding: 6px 0 10px; overflow-y: auto; background: #fafbfc; min-height: 0; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

.sidebar-nav-tools {
  display: flex;
  gap: 6px;
  padding: 6px 10px 8px;
  flex-shrink: 0;
}
.nav-tool-btn {
  flex: 1;
  padding: 5px 8px;
  font-size: 0.68rem;
  color: #64748b;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-tool-btn:hover {
  color: #0284c7;
  border-color: #bae6fd;
  background: #f0f9ff;
}

/* ── 一级导航：可折叠分组 ── */
.nav-section {
  margin: 0 8px 3px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}
.nav-section:first-child { margin-top: 2px; }
.nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.02em;
  user-select: none;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #0284c7;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.nav-group:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.nav-group-label { flex: 1; line-height: 1.25; min-width: 0; }
.nav-group-icon {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, #0ea5e9, #4f46e5);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  box-shadow: 0 1px 6px rgba(14, 165, 233, 0.28);
}
.nav-group-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
}
.nav-group-chevron::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(-45deg);
  transition: transform 0.2s;
}
.nav-section:not(.is-collapsed) .nav-group {
  border-left-color: #4f46e5;
  color: #1e3a8a;
  background: linear-gradient(90deg, #eff6ff 0%, #fff 100%);
  box-shadow: 0 1px 4px rgba(14, 165, 233, 0.08);
}
.nav-section:not(.is-collapsed) .nav-group-chevron::after {
  transform: rotate(45deg);
}
.nav-section.is-active-section .nav-group {
  border-left-color: #4f46e5;
}
.nav-section.is-collapsed .nav-section-items {
  display: none;
}

/* ── 二级导航 ── */
.nav-section-items {
  position: relative;
  padding: 4px 8px 6px 0;
  margin: 4px 0 2px 18px;
  border-left: 2px solid #e2e8f0;
  background: transparent;
}
.sidebar-nav a.nav-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 8px 2px 0;
  padding: 9px 12px 9px 18px;
  font-size: 0.875rem;
  color: #475569;
  font-weight: 500;
  border-radius: 0 8px 8px 0;
  position: relative;
  transition: background 0.15s, color 0.15s, padding-left 0.15s;
}
.sidebar-nav a.nav-sub::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 50%;
  width: 10px;
  height: 2px;
  background: #cbd5e1;
  transform: translateY(-50%);
  border-radius: 0;
  border: none;
  transition: background 0.15s, width 0.15s;
}
.sidebar-nav a.nav-sub:hover {
  background: #e0f2fe;
  color: #0369a1;
  padding-left: 22px;
}
.sidebar-nav a.nav-sub:hover::before { background: #38bdf8; width: 14px; }
.sidebar-nav a.nav-sub.active {
  background: #fff;
  color: #0369a1;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #0ea5e9, 0 1px 4px rgba(14, 165, 233, 0.12);
}
.sidebar-nav a.nav-sub.active::before {
  background: #0ea5e9;
  width: 14px;
}

/* 无二级缩进的一级直达项 */
.sidebar-nav a.nav-item {
  display: flex;
  align-items: center;
  margin: 1px 0;
  padding: 8px 10px 8px 36px;
  font-size: 0.84rem;
  color: #64748b;
  border-left: none;
  border-radius: 8px;
}
.sidebar-nav a.nav-item:hover { background: #f8fafc; color: #0284c7; }
.sidebar-nav a.nav-item.active {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #0ea5e9;
}

/* 兼容旧写法（不影响 nav-sub / nav-item） */
.nav-group-old { padding: 8px 16px 4px; font-size: 0.7rem; color: var(--muted); }
.sidebar-nav a:not(.nav-sub):not(.nav-item) {
  display: block;
  padding: 10px 20px;
  font-size: 0.9rem;
  color: var(--muted);
  border-left: 3px solid transparent;
}
.sidebar-nav a:not(.nav-sub):not(.nav-item):hover { background: #f8fafc; color: var(--primary-dark); }
.sidebar-nav a:not(.nav-sub):not(.nav-item).active {
  background: #e0f2fe;
  color: var(--primary-dark);
  border-left-color: var(--primary);
  font-weight: 600;
}
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
}
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* 窄侧栏：仅图标，点击弹出二级菜单 */
.layout.sidebar-mini { --sidebar-w: var(--sidebar-mini-w); }
.layout.sidebar-mini .sidebar-brand-text,
.layout.sidebar-mini .sidebar-nav-tools,
.layout.sidebar-mini .nav-group-label,
.layout.sidebar-mini .nav-group-chevron,
.layout.sidebar-mini .sidebar-footer { display: none; }
.layout.sidebar-mini .sidebar-brand { justify-content: center; padding: 12px 8px; }
.layout.sidebar-mini .nav-section { margin: 0 6px 4px; }
.layout.sidebar-mini .nav-group {
  justify-content: center;
  padding: 8px;
  border-left-width: 0;
}
.layout.sidebar-mini .nav-section.is-flyout-open .nav-section-items {
  display: block;
  position: fixed;
  left: calc(var(--sidebar-mini-w) + 4px);
  min-width: 200px;
  max-width: 240px;
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  border-left: none;
  z-index: 300;
}
.layout.sidebar-mini .nav-section.is-flyout-open .nav-section-items {
  top: var(--flyout-top, 120px);
}
.layout.sidebar-mini .nav-section.is-flyout-open .nav-group {
  background: #eff6ff;
  border-color: #bae6fd;
}
.topbar {
  height: var(--header-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 12px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.topbar-title { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-date { color: var(--muted); font-size: 0.85rem; flex-shrink: 0; }
.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.topbar-btn:hover { color: var(--primary-dark); border-color: #bae6fd; background: #f0f9ff; }
.topbar-help {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  color: var(--muted);
}
.topbar-back-icon {
  width: 8px; height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

/* 桌面端整栏隐藏 */
@media (min-width: 1025px) {
  .layout.sidebar-hidden .sidebar { transform: translateX(-100%); }
  .layout.sidebar-hidden .main { margin-left: 0; }
  .layout.sidebar-hidden .sidebar-toggle { background: #eef2f7; }
}
.sidebar-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.sidebar-toggle span {
  display: block;
  height: 2px;
  background: #334155;
  border-radius: 2px;
}
.sidebar-backdrop { display: none; }
.mobile-tip-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #e0f2fe, #f0f9ff);
  border: 1px solid #bae6fd;
  border-radius: 10px;
  font-size: 0.8125rem;
  color: #0369a1;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 4px;
}
.table-wrap table { min-width: 520px; }
.grid-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.content { padding: 24px; flex: 1; }
.page-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 20px; }
.page-guide {
  background: #f0f7ff;
  border: 1px solid #cfe3f7;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #334155;
}
.page-guide strong { color: #1e40af; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.stat-card .label { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.stat-card .value { font-size: 1.75rem; font-weight: 700; color: var(--primary-dark); }
.stat-card .sub { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: 0.2s;
}
.btn-primary { background: linear-gradient(135deg, #38bdf8, #6366f1); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn-link {
  background: none; border: none; padding: 0; font-weight: 500;
  color: var(--primary-dark, #0284c7); text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; color: var(--muted); font-weight: 600; font-size: 0.8rem; }
tr:hover td { background: #fafbfc; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-blue { background: #e0f2fe; color: #0284c7; }
.badge-green { background: #dcfce7; color: #16a34a; }
.badge-orange { background: #ffedd5; color: #ea580c; }
.badge-gray { background: #f1f5f9; color: #64748b; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary); }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.empty { text-align: center; padding: 40px; color: var(--muted); }
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eef7ff, #f8fafc);
}
.login-box {
  width: 100%; max-width: 400px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}
.login-box h1 { text-align: center; margin-bottom: 8px; font-size: 1.5rem; }
.login-box .sub { text-align: center; color: var(--muted); margin-bottom: 28px; font-size: 0.9rem; }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 16px; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.app-footer {
  padding: 12px 24px 16px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: #fff;
}
.app-footer a {
  color: #64748b;
  text-decoration: none;
}
.app-footer a:hover { color: var(--primary); }

.brand-footer {
  padding: 14px 16px 8px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}
.brand-footer a {
  color: #64748b;
  text-decoration: none;
}
.brand-footer a:hover { color: var(--primary); }

/* 演示水印 — 内容由 config/project.api.json demo.watermark 控制 */
.demo-watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
  background-repeat: repeat;
  background-size: 480px 220px;
}

.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 90%; max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .stats-grid[style*="repeat(3"] { grid-template-columns: repeat(2, 1fr) !important; }
  .stats-grid[style*="repeat(4"] { grid-template-columns: repeat(2, 1fr) !important; }
  .mobile-tip-bar { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }
  .layout.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.18);
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 99;
  }
  .layout.sidebar-open .sidebar-backdrop { display: block; }
  .main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 0 12px 0 8px; }
  .card { padding: 16px; }
  .grid-cards-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr !important; gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card .value { font-size: 1.45rem; }
  .content { padding: 12px; }
  .page-title { font-size: 1.15rem; }
  .topbar-date { display: none; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar input[type="search"] { width: 100% !important; }
  .toolbar > div { display: flex; flex-direction: column; gap: 8px; width: 100%; }
  .toolbar .btn, .toolbar a.btn { width: 100%; justify-content: center; min-height: 44px; }
  .btn { min-height: 40px; }
  table { font-size: 0.8rem; }
  th, td { padding: 8px 10px; }
  .login-box { padding: 28px 20px; margin: 16px; }
  .modal { width: 94%; padding: 20px; }
  .mobile-tip-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .mobile-tip-bar .btn { width: 100%; justify-content: center; min-height: 44px; }
  .erp-form-actions { flex-direction: column; }
  .erp-form-actions .btn { width: 100%; min-height: 44px; justify-content: center; }
}

/* ────────────────────────── UI 标准库组件样式 ────────────────────────── */

/* Toast */
.ui-toast-wrap {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.ui-toast {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #fff;
  background: #334155;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s;
  max-width: 80vw;
}
.ui-toast.show { opacity: 1; transform: translateY(0); }
.ui-toast.hide { opacity: 0; transform: translateY(-8px); }
.ui-toast-success { background: #16a34a; }
.ui-toast-error { background: #dc2626; }

/* 确认框 / 帮助浮层 通用遮罩 */
.ui-confirm-overlay, .ui-help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ui-confirm, .ui-help, .ui-qr {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  animation: ui-pop 0.18s ease;
}
@keyframes ui-pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.ui-confirm { max-width: 380px; padding: 22px; }
.ui-confirm h3 { font-size: 1.02rem; margin-bottom: 10px; }
.ui-confirm-msg { color: var(--muted); font-size: 0.88rem; line-height: 1.6; margin-bottom: 20px; }
.ui-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* 帮助浮层 */
.ui-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.ui-help-close {
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
}
.ui-help-close:hover { color: var(--text); }
.ui-help-body { padding: 16px 20px 20px; font-size: 0.9rem; line-height: 1.8; color: #334155; }
.ui-help-body p { margin: 6px 0; }
.ui-help-body ol, .ui-help-body ul { margin: 6px 0 6px 20px; }

/* 手机端二维码 */
.ui-qr-body { padding: 20px; text-align: center; }
.ui-qr-img-wrap { display: flex; justify-content: center; margin-bottom: 12px; }
.ui-qr-img { width: 200px; height: 200px; border: 1px solid var(--border); border-radius: 10px; }
.ui-qr-empty { width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); }
.ui-qr-tip { color: var(--muted); font-size: 0.8rem; margin-bottom: 12px; }
.ui-qr-link-row { display: flex; gap: 8px; margin-bottom: 12px; }
.ui-qr-link { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.8rem; color: var(--muted); background: #f8fafc; }
.ui-qr-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ui-qr-links a { font-size: 0.8rem; color: var(--primary-dark); }

/* 分页 */
.ui-paginate-body { margin-bottom: 4px; }
.ui-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 4px 2px; }
.ui-pager-info { color: var(--muted); font-size: 0.82rem; }
.ui-pager-info strong { color: var(--text); }
.ui-pager-controls { display: flex; align-items: center; gap: 6px; }
.ui-pager-size { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.8rem; background: #fff; }
.ui-pager-btn {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 0.8rem;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.ui-pager-btn:hover:not(:disabled) { color: var(--primary-dark); border-color: #bae6fd; background: #f0f9ff; }
.ui-pager-btn:disabled { color: #cbd5e1; cursor: not-allowed; }

/* 省市区级联 */
.region-cascade { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.region-cascade select, .region-cascade input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.875rem;
  background: #fff;
}
@media (max-width: 640px) { .region-cascade { grid-template-columns: 1fr; } }

/* 表单校验 */
input.is-invalid { border-color: #ef4444 !important; }
.field-error { color: #ef4444; font-size: 0.75rem; margin-top: 4px; }

/* 危险按钮 */
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { opacity: 0.9; }

/* 钻取返回 / 可点击卡片 */
.drill-back-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  padding: 5px 12px;
  border: 1px solid #bae6fd;
  border-radius: 100px;
  background: #f0f9ff;
  color: var(--primary-dark);
  font-size: 0.8rem;
  cursor: pointer;
}
.drill-back-chip:hover { background: #e0f2fe; }
.stat-card.clickable { cursor: pointer; transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s; }
.stat-card.clickable:hover { box-shadow: 0 6px 18px rgba(14, 165, 233, 0.16); border-color: #bae6fd; transform: translateY(-1px); }
.stat-card.clickable .drill-hint { font-size: 0.72rem; color: #94a3b8; margin-top: 6px; opacity: 0; transition: opacity 0.15s; }
.stat-card.clickable:hover .drill-hint { opacity: 1; }

/* ── 帮助抽屉：页面说明右侧滑出，不占工作区 ── */
.ui-help-overlay.open { display: flex; }
.ui-help.ui-drawer-mode {
  display: flex;
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(420px, 92vw);
  max-width: none; max-height: none;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  animation: uiDrawerIn 0.22s ease;
}
@keyframes uiDrawerIn { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
.ui-help.ui-drawer-mode .ui-help-body { flex: 1; overflow: auto; }
.ui-drawer-foot { padding: 12px 20px; border-top: 1px solid #eef2f7; text-align: right; }
.ui-help-line { display: flex; gap: 8px; margin: 4px 0; }
.ui-help-k { color: var(--text); font-weight: 600; white-space: nowrap; }
.ui-help-line .ui-help-k:after { content: ''; }

/* ── 顶栏下拉菜单 ── */
.ui-menu-pop {
  position: fixed;
  z-index: 1400;
  min-width: 280px;
  max-width: min(92vw, 360px);
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
  animation: uiPopIn 0.14s ease;
}
@keyframes uiPopIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.ui-menu-pop .ui-menu-title {
  padding: 10px 14px 6px; font-size: 0.72rem; color: #94a3b8;
  font-weight: 600; letter-spacing: 0.04em; border-bottom: 1px solid #f1f5f9;
}
.ui-menu-pop .ui-menu-group-title {
  padding: 8px 14px 2px; font-size: 0.72rem; color: #94a3b8; font-weight: 600;
}
.ui-menu-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; font-size: 0.85rem; color: var(--text);
  cursor: pointer; text-decoration: none;
}
.ui-menu-item:hover { background: #f0f9ff; }
.ui-menu-item .ui-menu-count {
  margin-left: auto; min-width: 20px; text-align: center;
  padding: 1px 7px; border-radius: 999px;
  background: #fee2e2; color: #dc2626; font-size: 0.74rem; font-weight: 700;
}
.ui-menu-item.urgent .ui-menu-count { background: #ef4444; color: #fff; }
.ui-menu-item .ui-menu-ico { width: 18px; text-align: center; }
.ui-menu-empty { padding: 18px 14px; color: #94a3b8; font-size: 0.82rem; text-align: center; }

/* 顶栏待办铃铛徽标 */
.topbar-btn { position: relative; }
.topbar-bell-dot {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: #ef4444; color: #fff;
  font-size: 0.66rem; font-weight: 700; line-height: 17px;
  text-align: center; border: 2px solid #fff;
}
.topbar-menu-hint { color: #94a3b8; font-size: 0.78rem; padding: 0 2px; }

/* 手机端提示条（原定义见 .mobile-tip-bar 常规段） */

@media (max-width: 860px) {
  .topbar-date { display: none; }
  .topbar-right { gap: 6px; }
  .topbar-btn { padding: 0 10px; }
}