/* ============================================================
   运营管理系统 - 全局样式
   现代浅色风格 · 移动端优先适配
   ============================================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-deep: #1e3a8a;
  --primary-light: #dbeafe;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #0891b2;
  --info-light: #cffafe;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --text: #0f172a;
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #e6eaf2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px -2px rgba(15, 23, 42, .07);
  --shadow-lg: 0 18px 45px -12px rgba(15, 23, 42, .22);
  --topbar-h: 60px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ---------------- 顶部导航 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: linear-gradient(90deg, #0d2a72 0%, #1e3a8a 45%, #2563eb 100%);
  border-bottom: none;
  box-shadow: 0 4px 18px -6px rgba(13, 42, 114, .45);
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}
.brand:hover { color: #fff; }
.brand-logo {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
  box-shadow: inset 0 1px 2px rgba(255,255,255,.25), 0 2px 6px rgba(0,0,0,.18);
}
.brand-text { letter-spacing: .5px; }

.main-nav { flex: 1; display: flex; }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 2px; }
.main-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, .82);
  font-weight: 500;
  transition: all .15s;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.main-nav a.active {
  color: var(--primary-deep);
  background: #fff;
  font-weight: 600;
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, .28);
}

.user-menu { margin-left: auto; position: relative; }

.dropdown { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  padding: 6px 8px; border-radius: var(--radius-sm);
  font-size: 14px; color: #fff;
}
.user-btn:hover { background: rgba(255, 255, 255, .14); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff; color: var(--primary-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.user-name { font-weight: 600; white-space: nowrap; }
.caret { color: rgba(255, 255, 255, .75); transition: transform .2s; }
.dropdown.open .caret { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  right: 0; top: calc(100% + 6px);
  min-width: 160px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
  z-index: 120;
}
.dropdown.open .dropdown-menu { display: block; animation: fadeIn .15s ease; }
.dropdown-menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px;
}
.dropdown-menu a:hover { background: var(--bg); color: var(--primary); }
.dropdown-menu a.danger-link:hover { background: var(--danger-light); color: var(--danger); }

/* 汉堡按钮 */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: none; background: none;
  cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: var(--bg); }
.nav-toggle span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mask {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 90;
}

/* ---------------- 内容区 ---------------- */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-title { font-size: 20px; font-weight: 700; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  transition: box-shadow .18s ease, transform .18s ease;
}

/* ---------------- 搜索栏 ---------------- */
.toolbar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.search-input {
  height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; min-width: 180px; max-width: 280px;
  outline: none; background: #fff; color: var(--text);
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

/* ---------------- 批量操作条 ---------------- */
.batch-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  flex-wrap: wrap;
}
.batch-checkall {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--text); cursor: pointer; user-select: none;
}
.batch-count { font-size: 13px; color: var(--muted); }
.table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.search-select {
  height: 36px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; background: #fff; color: var(--text); outline: none;
}
.toolbar .spacer { flex: 1; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: all .15s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(37, 99, 235, .55);
}
.btn-primary:hover { background: linear-gradient(135deg, #1d4ed8, #1e40af); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* 表格操作链接组 */
.row-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--primary); font-size: 13px; padding: 2px 4px;
  border-radius: 4px;
}
.link-btn:hover { background: var(--primary-light); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: var(--danger-light); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th {
  text-align: left;
  padding: 11px 14px;
  font-size: 12.5px; font-weight: 600;
  color: var(--muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f8fafc; }
.table .num { font-variant-numeric: tabular-nums; }

/* ---------------- 徽章 ---------------- */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  line-height: 1.6;
}
.badge-success { background: var(--success-light); color: #15803d; }
.badge-danger  { background: var(--danger-light); color: #b91c1c; }
.badge-warning { background: var(--warning-light); color: #b45309; }
.badge-info    { background: var(--info-light); color: #0e7490; }
.badge-muted   { background: #f1f5f9; color: var(--muted); }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }

/* ---------------- 分页 ---------------- */
.pagination {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 14px 16px;
}
.page-info { color: var(--muted); font-size: 13px; margin-right: auto; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); font-size: 13px;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link.disabled { color: var(--muted-light); background: #f8fafc; cursor: not-allowed; }
.page-ellipsis { color: var(--muted); padding: 0 2px; }

/* ---------------- 提示 / Flash ---------------- */
.alert {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  display: flex; align-items: center; gap: 8px;
  animation: fadeIn .2s ease;
}
.alert-success { background: var(--success-light); color: #15803d; }
.alert-danger  { background: var(--danger-light); color: #b91c1c; }
.alert-warning { background: var(--warning-light); color: #b45309; }
.alert-info    { background: var(--info-light); color: #0e7490; }

/* ---------------- 模态框 ---------------- */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .5);
  z-index: 200;
}
.modal-backdrop.show { display: block; }

.modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -46%);
  width: min(560px, calc(100vw - 32px));
  max-height: 88vh;
  overflow: auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 210;
}
.modal.show { display: block; animation: modalIn .22s ease forwards; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--card); z-index: 2;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border: none; background: none;
  font-size: 20px; line-height: 1; cursor: pointer;
  color: var(--muted); border-radius: 50%;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 20px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  position: sticky; bottom: 0; background: var(--card);
}

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-item label .req { color: var(--danger); margin-left: 2px; }
.form-item .hint { font-size: 12px; color: var(--muted); }

.input, .select, .textarea {
  width: 100%;
  height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; background: #fff; color: var(--text);
  outline: none;
  font-family: inherit;
}
.textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.input.readonly { background: #f8fafc; color: var(--muted); }

.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-card {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14px;
  transition: all .15s;
  background: #fff;
}
.radio-card input { accent-color: var(--primary); }
.radio-card.checked,
.radio-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

/* ---------------- 统计卡片（首页） ---------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), #60a5fa);
  border-radius: 0 4px 4px 0;
  opacity: .85;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card .stat-label { font-size: 13px; color: var(--muted); }
.stat-card .stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-card .stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; }
.icon-blue { background: var(--primary-light); }
.icon-green { background: var(--success-light); }
.icon-orange { background: var(--warning-light); }
.icon-red { background: var(--danger-light); }
.icon-cyan { background: var(--info-light); }
.icon-purple { background: #ede9fe; }

.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-head {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: space-between;
}
.panel-head .more { font-size: 13px; font-weight: 400; }
.panel-body { padding: 6px 16px 14px; }
.mini-list { list-style: none; }
.mini-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
}
.mini-list li:last-child { border-bottom: none; }
.mini-list .li-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mini-list .li-sub { color: var(--muted); font-size: 12px; white-space: nowrap; }
.empty-tip { text-align: center; color: var(--muted); padding: 24px 0; font-size: 13px; }

/* ---------------- 登录页 ---------------- */
body.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background:
    radial-gradient(1100px 560px at 85% -10%, rgba(96, 165, 250, .45), transparent 60%),
    radial-gradient(900px 480px at -10% 110%, rgba(52, 211, 153, .25), transparent 55%),
    radial-gradient(700px 420px at 110% 90%, rgba(129, 140, 248, .28), transparent 60%),
    linear-gradient(135deg, #0d2a72 0%, #1e3a8a 50%, #2563eb 100%);
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--card);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 24px 60px -16px rgba(2, 8, 30, .5);
  padding: 36px 32px;
}
.login-logo {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.login-title { text-align: center; font-size: 20px; font-weight: 700; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin-top: 4px; margin-bottom: 24px; }
.login-form .form-item { margin-bottom: 16px; }
.captcha-row { display: flex; gap: 10px; }
.captcha-row .input { flex: 1; }
.captcha-img {
  height: 38px; width: 110px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer;
}
.login-btn { width: 100%; height: 42px; font-size: 15px; margin-top: 4px; }
.login-error {
  background: var(--danger-light); color: #b91c1c;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 14px;
}

/* ---------------- 售后明细表单 ---------------- */
.items-table { width: 100%; border-collapse: collapse; }
.items-table th {
  text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600;
  padding: 8px 6px; border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.items-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.items-table .select, .items-table .input { height: 34px; font-size: 13px; }
.add-row-btn { margin-top: 10px; }

.summary-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 16px;
}
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; font-size: 14px;
}
.summary-row .sum-label { color: var(--muted); }
.summary-row .sum-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.summary-row.total { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 10px; }
.summary-row.total .sum-value { color: var(--primary); font-size: 17px; }

/* 详情/审核布局 */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.detail-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.detail-item .d-label { color: var(--muted); flex-shrink: 0; }
.detail-item .d-value { text-align: right; font-weight: 500; word-break: break-all; }

/* ---------------- 页脚 ---------------- */
.app-footer {
  text-align: center; color: var(--muted-light); font-size: 12px;
  padding: 20px 16px 30px;
}

/* ---------------- 动画 ---------------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, -42%); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* ---------------- 响应式：平板 ---------------- */
@media (max-width: 992px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: 1fr; }
}

/* ---------------- 响应式：手机 ---------------- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .brand-text { display: none; }
  .brand { font-size: 15px; }

  .main-nav {
    position: fixed;
    top: var(--topbar-h);
    left: 0; right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 95;
    max-height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
  }
  .main-nav.open { display: block; animation: fadeIn .18s ease; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 8px; }
  .main-nav a { padding: 12px 14px; font-size: 15px; color: var(--text); border-radius: 10px; }
  .main-nav a:hover { color: var(--primary); background: var(--bg); }
  .main-nav a.active { color: var(--primary); background: var(--primary-light); box-shadow: none; }
  .nav-mask.show { display: block; }

  .user-name { display: none; }

  .page { padding: 14px 12px 50px; }
  .page-title { font-size: 18px; }
  .page-sub { font-size: 12px; }

  .toolbar { padding: 12px; }
  .toolbar form { width: 100%; }
  .search-input { flex: 1; min-width: 0; max-width: none; }

  /* 表格卡片化 */
  .table-wrap { overflow: visible; }
  .table { min-width: 0; display: block; }
  .table thead { display: none; }
  .table tbody { display: block; }
  .table tbody tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
    background: #fff;
    box-shadow: var(--shadow);
  }
  .table tbody tr:hover { background: #fff; }
  .table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 6px 0;
    border-bottom: none;
    border-bottom: 1px dashed var(--border);
    font-size: 13.5px;
  }
  .table td:last-child { border-bottom: none; }
  .table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12.5px;
    flex-shrink: 0;
    width: 88px;
  }
  .table td .td-value { text-align: right; word-break: break-all; }
  .row-actions { justify-content: flex-end; }

  .form-grid { grid-template-columns: 1fr; }
  .modal { width: calc(100vw - 20px); }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-value { font-size: 22px; }
  .pagination { gap: 4px; }
  .page-link { min-width: 30px; height: 30px; padding: 0 8px; }
  .detail-grid { grid-template-columns: 1fr; }
  .btn { height: 38px; }
}

/* 桌面端隐藏提示（移动卡片化的说明不需要） */
@media (min-width: 769px) {
  .only-mobile { display: none !important; }
}

/* ---------------- 导航分组下拉（桌面端 hover 展开） ---------------- */
.nav-group { position: relative; }
.nav-group-toggle { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.nav-caret { color: rgba(255, 255, 255, .7); }
.nav-group-menu {
  position: absolute;
  left: 0; top: 100%;
  margin-top: 4px;
  min-width: 150px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
  z-index: 120;
}
/* 用透明桥接覆盖按钮与菜单之间的空隙，避免鼠标移过时 hover 中断 */
.nav-group::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: 8px;
}
.nav-group:hover .nav-group-menu,
.nav-group:focus-within .nav-group-menu { display: block; animation: fadeIn .15s ease; }
.main-nav .nav-group-menu a {
  display: flex; align-items: center;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px;
}
.main-nav .nav-group-menu a:hover { background: var(--bg); color: var(--primary); }
.main-nav .nav-group-menu a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

/* 移动端：分组直接平铺，组标题作为小标题 */
@media (max-width: 768px) {
  .nav-group { display: block; }
  .nav-group::after { display: none; }
  .nav-group-toggle {
    pointer-events: none; cursor: default;
    color: var(--muted); font-size: 12px; font-weight: 600;
    text-transform: none; padding: 12px 14px 2px;
  }
  .nav-caret { display: none; }
  .nav-group-menu {
    position: static; display: block;
    background: none; border: none; box-shadow: none; padding: 0 0 6px; min-width: 0;
  }
  .main-nav .nav-group-menu a { padding: 11px 14px; font-size: 15px; color: var(--text); border-radius: 10px; }
  .main-nav .nav-group-menu a.active { color: var(--primary); background: var(--primary-light); }
}

/* 卡片内顶部的供应商 Tab 条，与下方搜索栏同卡 */
.tabs-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 16px 16px 0; }
.tabs-bar + .toolbar { padding-top: 12px; }

/* Tab 上的数字徽章 */
.tab-badge {
  display: inline-block; min-width: 22px; padding: 1px 8px; margin-left: 4px;
  border-radius: 11px; background: #e2e8f0; color: #334155;
  font-size: 12px; font-weight: 700; line-height: 18px; text-align: center;
}
.tab-badge-red { background: #e5484d; color: #fff; }

/* 结算确认弹窗：加宽，合计在表格下方 */
.modal.settle-modal { width: min(760px, calc(100vw - 32px)); }
.settle-total { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); text-align: right; font-size: 15px; font-weight: 700; color: var(--primary); }
