/* ============================================================
   自助打印后台 — 印萌风格设计体系
   深色侧栏 · 绿色主色 · 浅灰内容区 · 白色卡片
   ============================================================ */
:root {
  /* 主色（绿） */
  --green: #16a34a;
  --green-dark: #15803d;
  --green-light: #f0fdf4;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;

  /* 辅助 */
  --orange: #ea580c;
  --red: #dc2626;
  --blue: #2563eb;

  /* 中性色 */
  --text: #1f2937;
  --text-2: #4b5563;
  --muted: #9aa3ae;
  --border: #e9edf2;
  --bg: #f5f6f8;
  --card: #ffffff;

  /* 侧栏 */
  --sidebar: #1b1e24;
  --sidebar-2: #23272e;
  --sidebar-text: #b6bcc6;
  --sidebar-text2: #8b93a0;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-s: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 4px 16px -8px rgba(16, 24, 40, 0.12);
  --shadow-lg: 0 22px 50px -20px rgba(16, 24, 40, 0.25);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}

.container { max-width: 720px; margin: 0 auto; padding: 20px 16px 40px; }

/* ============ 卡片与标题 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-s);
}
h1 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
h2 { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: var(--text); }
.sub { color: var(--text-2); font-size: 13px; margin: 0 0 16px; }
.hint { color: var(--muted); font-size: 12px; font-weight: 400; }
label.field { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }

/* ============ 表单控件 ============ */
input[type="text"], input[type="number"], input[type="time"], input[type="password"],
input[type="email"], select, textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; color: var(--text); background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="time"]:focus,
input[type="password"]:focus, input[type="email"]:focus, select:focus, textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; }
textarea { resize: vertical; min-height: 60px; }
.field-row { display: flex; gap: 14px; }
.field-row > div { flex: 1; min-width: 0; }

/* ============ 选项按钮组 ============ */
.opt-group { display: flex; gap: 10px; flex-wrap: wrap; }
.opt-group label {
  flex: 1; min-width: 88px; text-align: center; padding: 11px 10px;
  border: 1px solid var(--border); border-radius: 12px; cursor: pointer;
  font-size: 14px; color: var(--text-2); background: #fff; transition: all .15s; user-select: none;
}
.opt-group label:hover { border-color: #b9e6c8; }
.opt-group input { display: none; }
.opt-group label.selected {
  border-color: var(--green); background: var(--green-50); color: var(--green);
  font-weight: 600; box-shadow: 0 0 0 1px var(--green) inset;
}
.opt-group.big label { min-width: 110px; padding: 16px 10px; font-size: 16px; font-weight: 600; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.opt-group.big .ico { font-size: 26px; }

/* ============ 步进器 / 页数范围 ============ */
.stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.stepper button { width: 44px; height: 44px; border: none; background: #f8fafc; font-size: 22px; cursor: pointer; color: var(--text); line-height: 1; transition: background .12s; }
.stepper button:hover { background: var(--green-50); color: var(--green); }
.stepper span { width: 56px; text-align: center; font-size: 18px; font-weight: 700; }
.page-range { display: flex; align-items: center; gap: 8px; }
.page-range input { flex: 1; }
.page-range span { color: var(--muted); font-size: 13px; }

/* ============ 文件选择 ============ */
.drop-zone {
  border: 2px dashed #cfd6de; border-radius: 14px; padding: 34px 16px;
  text-align: center; color: var(--muted); cursor: pointer; font-size: 14px;
  transition: all .15s; background: #fafbfc;
}
.drop-zone:hover, .drop-zone.active { border-color: var(--green); color: var(--green); background: var(--green-50); }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; }
.file-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; font-size: 14px; gap: 8px; background: #fff; }
.file-list li:hover { border-color: #cfd6de; }
.file-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .del { color: var(--red); cursor: pointer; flex-shrink: 0; font-weight: 700; }

/* ============ 按钮 ============ */
.btn {
  display: block; width: 100%; padding: 12px 18px;
  background: var(--green); color: #fff; border: none; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
  box-shadow: 0 2px 8px -2px rgba(22, 163, 74, 0.5); transition: all .15s;
}
.btn:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 6px 16px -4px rgba(22, 163, 74, 0.5); }
.btn:active { transform: translateY(0); }
.btn:disabled { background: #cbd5e1; box-shadow: none; cursor: not-allowed; transform: none; }
.btn.small { display: inline-block; width: auto; padding: 6px 12px; font-size: 13px; font-weight: 600; border-radius: 8px; box-shadow: none; }
.btn.small:hover { transform: translateY(-1px); }
.btn.green { background: var(--green); box-shadow: 0 2px 8px -2px rgba(22, 163, 74, 0.5); }
.btn.green:hover { background: var(--green-dark); }
.btn.orange { background: var(--orange); box-shadow: 0 2px 8px -2px rgba(234, 88, 12, 0.45); }
.btn.orange:hover { background: #c2410c; }
.btn.red { background: var(--red); box-shadow: 0 2px 8px -2px rgba(220, 38, 38, 0.45); }
.btn.red:hover { background: #b91c1c; }
.btn.gray { background: #e5e7eb; color: var(--text-2); box-shadow: none; }
.btn.gray:hover { background: #d1d5db; color: var(--text); }
.btn.download { background: var(--green-50); color: var(--green); box-shadow: none; }
.btn.download:hover { background: var(--green-100); color: var(--green-dark); }
.shop-save-row { display: flex; justify-content: center; margin-top: 18px; }
.shop-save-btn { display: inline-block; width: auto; padding: 9px 14px; font-size: 13px; border-radius: 9px; }
.col-btn { width: 100%; display: flex; justify-content: center; }

/* ============ 横拉开关 ============ */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; cursor: pointer; border-radius: 999px; background: #d3d9e0; transition: background .2s; }
.switch .slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(16, 24, 40, 0.3); }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch.sm { width: 38px; height: 22px; }
.switch.sm .slider::before { width: 16px; height: 16px; left: 3px; top: 3px; }
.switch.sm input:checked + .slider::before { transform: translateX(16px); }
.toggle-label { font-size: 12px; color: var(--text-2); margin-left: 8px; }

/* ============ 表格 ============ */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
thead th { background: #f8fafb; color: var(--text-2); font-weight: 600; white-space: nowrap; font-size: 12.5px; }
thead th:first-child { border-radius: 8px 0 0 8px; }
thead th:last-child { border-radius: 0 8px 8px 0; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: #f8fafb; }
table input[type="checkbox"] { width: 15px; height: 15px; vertical-align: middle; cursor: pointer; }
.table-scroll { overflow-x: auto; }
.link { color: var(--green); cursor: pointer; font-weight: 500; }
.link:hover { color: var(--green-dark); }
.link.del { color: var(--green); }
.link-sep { color: #cfd6de; margin: 0 4px; }

/* ============ 状态徽标 / 胶囊 ============ */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge.pending_payment { background: #fef3c7; color: #b45309; }
.badge.pending_print { background: var(--green-100); color: #15803d; }
.badge.printing { background: #e0e7ff; color: #4338ca; }
.badge.completed { background: var(--green-100); color: #15803d; }
.badge.failed { background: #fee2e2; color: #b91c1c; }
.badge.picked_up { background: #f1f5f9; color: #475569; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f1f5f9; color: #64748b; }
.pill.on { background: var(--green-50); color: var(--green); border: 1px solid #bbe8cb; }

/* ============ 空状态 ============ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-drop { position: relative; display: inline-block; margin-bottom: 18px; }
.empty-drop::before { content: ""; position: absolute; left: -14px; right: -14px; top: -12px; bottom: -14px; background: var(--green-50); border-radius: 20px; }
.empty-drop .ico { position: relative; width: 64px; height: 78px; border: 3px solid #a7e6bf; border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; }
.empty-drop .ico::after { content: "▤"; font-size: 34px; color: #8fd6ab; }
.empty-state .txt { font-size: 14px; color: var(--muted); }

/* ============ 取件码 / 价格 ============ */
.pick-code { font-weight: 800; color: var(--green); font-family: Consolas, "Courier New", monospace; letter-spacing: 1px; }
.pickup-code { font-size: 44px; font-weight: 800; letter-spacing: 5px; color: var(--green); text-align: center; margin: 10px 0; font-family: Consolas, "Courier New", monospace; }
.price { font-weight: 700; white-space: nowrap; }
.price-box { text-align: center; padding: 18px; background: #f8fafb; border: 1px solid var(--border); border-radius: 14px; margin: 14px 0; }
.price-box .total { font-size: 34px; font-weight: 800; color: var(--orange); line-height: 1.3; }
.price-box .total small { font-size: 15px; }
.mono { font-family: Consolas, "Courier New", monospace; word-break: break-all; }
.qr-wrap { text-align: center; padding: 18px; }
.qr-wrap img { width: 220px; height: 220px; border-radius: 12px; border: 1px solid var(--border); }
.pay-qr-small img { width: 110px; height: 110px; object-fit: contain; border: 1px solid var(--border); border-radius: 10px; }
.notice { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 16px; }
.spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.actions-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.batch-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }

/* ============ 后台布局：侧栏（深色） ============ */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: var(--sidebar); color: var(--sidebar-text);
  padding: 14px 10px; position: sticky; top: 0; height: 100vh;
  overflow-y: auto; flex-shrink: 0; display: flex; flex-direction: column;
}
.sidebar nav { flex: 1; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; color: #fff; padding: 6px 8px 18px; letter-spacing: .5px; }
.brand-ico { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.menu-group { margin-bottom: 8px; }
.menu-title { font-size: 12px; color: var(--sidebar-text2); padding: 8px 10px 4px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
.menu-title .mt-ico { margin-right: 6px; }
.menu-arrow { font-size: 11px; transition: transform .2s; display: inline-block; }
.menu-group.collapsed .menu-arrow { transform: rotate(-90deg); }
.menu-group.collapsed > .menu-item { display: none; }
.menu-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; color: var(--sidebar-text); text-decoration: none; font-size: 13.5px; cursor: pointer; margin-bottom: 2px; transition: all .12s; }
.menu-item .mi-ico { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.menu-item:hover { background: var(--sidebar-2); color: #fff; }
.menu-item.active { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; font-weight: 600; box-shadow: 0 6px 14px -6px rgba(22, 163, 74, 0.6); }
.sidebar-user { padding: 14px 10px; border-top: 1px solid var(--sidebar-2); color: var(--sidebar-text2); font-size: 13px; }
.su-name { font-weight: 600; color: #fff; }

/* ============ 后台布局：内容区 ============ */
.content { flex: 1; padding: 0 0 44px; min-width: 0; }
.panel { max-width: none; padding: 0 26px; }
.card-head { display: flex; align-items: center; }
.placeholder { color: var(--muted); }
.placeholder p { font-size: 14px; margin: 8px 0 0; }
.client-status { font-size: 14px; color: #334155; }

/* 面包屑（顶部） */
.breadcrumb { padding: 16px 26px 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.breadcrumb .bc-here { color: var(--green); font-weight: 600; }

/* ============ 顶栏 ============ */
.topbar { background: #fff; border-bottom: 1px solid var(--border); padding: 10px 26px; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.topbar-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 13px; font-weight: 600; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text-2); cursor: pointer; font-family: inherit; transition: all .15s; }
.topbar-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-50); }
.topbar-btn.accent { border-color: var(--green); color: #fff; background: var(--green); }
.topbar-btn.accent:hover { background: var(--green-dark); }
.topbar-link { font-size: 13px; color: var(--text-2); padding: 7px 12px; cursor: pointer; font-weight: 500; }
.topbar-link:hover { color: var(--green); }
.topbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.user-menu { position: relative; }
.user-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; user-select: none; font-size: 13px; font-weight: 600; color: var(--text); }
.user-chip:hover { border-color: var(--green); }
.user-chip .uc-ico { color: var(--green); }
.chip-arrow { font-size: 11px; color: var(--muted); transition: transform .2s; }
.user-menu.open .chip-arrow { transform: rotate(180deg); }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; display: none; z-index: 60; }
.user-menu.open .user-dropdown { display: block; }
.ud-role { padding: 11px 14px 7px; font-size: 12px; color: var(--muted); }
.ud-item { padding: 10px 14px; font-size: 13px; cursor: pointer; transition: background .1s; }
.ud-item:hover { background: #f1f5f9; }
.ud-logout { color: var(--red); font-weight: 600; border-top: 1px solid var(--border); margin-top: 5px; }

/* ============ 左侧主列 + 右侧小部件（首页） ============ */
.page-grid { display: flex; gap: 18px; align-items: flex-start; }
.page-main { flex: 1; min-width: 0; }
.page-side { width: 280px; flex-shrink: 0; }
.widget { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow-s); }
.widget-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.widget-more { float: right; font-size: 12px; color: var(--green); cursor: pointer; font-weight: 500; }
.widget-text { font-size: 13px; color: var(--text-2); line-height: 1.8; white-space: pre-wrap; }
.widget-img { width: 100%; height: 110px; border-radius: 10px; background: linear-gradient(135deg, #fef3c7, #fde68a); display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 10px; }

/* ============ 经营数据（遮罩） ============ */
.biz-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.biz-title { font-size: 15px; font-weight: 700; }
.biz-mask-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.biz-stats { display: flex; }
.biz-stat { flex: 1; text-align: center; padding: 22px 10px; position: relative; }
.biz-stat + .biz-stat::before { content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: #f0f2f5; }
.biz-num { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: 2px; }
.biz-lbl { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ============ 页签栏 ============ */
.tabbar { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tabbar .tab { padding: 10px 16px; font-size: 14px; color: var(--text-2); cursor: pointer; position: relative; font-weight: 500; }
.tabbar .tab.on { color: var(--green); font-weight: 700; }
.tabbar .tab.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2.5px; background: var(--green); border-radius: 2px; }
.tabbar .tab-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ============ 筛选行 / 日期范围 ============ */
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.filter-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.filter-item input, .filter-item select { width: 150px; padding: 7px 10px; }
.daterange { display: flex; align-items: center; gap: 6px; }
.daterange input { width: 130px; padding: 7px 10px; }
.filter-btn { background: var(--green); color: #fff; border: none; border-radius: 8px; padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 8px -2px rgba(22,163,74,.5); }
.filter-btn:hover { background: var(--green-dark); }
.filter-btn.ghost { background: #fff; color: var(--text-2); border: 1px solid var(--border); box-shadow: none; }
.filter-btn.ghost:hover { border-color: var(--green); color: var(--green); background: var(--green-50); }

/* ============ 图表 ============ */
.chart-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.chart-title { font-size: 15px; font-weight: 700; }
.chart-tabs { display: flex; gap: 4px; }
.chart-tabs .ct { padding: 5px 12px; font-size: 12px; color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.chart-tabs .ct.on { background: var(--green-100); color: var(--green); border-color: var(--green); font-weight: 600; }
.chart-context { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 200px; padding: 6px 4px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 5px; }
.chart-bar { width: 100%; max-width: 34px; background: linear-gradient(180deg, #4ade80, #16a34a); border-radius: 5px 5px 2px 2px; min-height: 3px; transition: opacity .15s; }
.chart-bar:hover { opacity: .85; }
.chart-val { font-size: 11px; color: var(--text-2); font-weight: 600; }
.chart-lbl { font-size: 11px; color: var(--muted); }
.chart-empty { color: var(--muted); text-align: center; padding: 40px 0; }
.line-chart { position: relative; height: 200px; padding: 6px 4px 0; }
.line-svg { width: 100%; height: 100%; }
.line-y { font-size: 10px; fill: var(--muted); }
.line-x { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.line-dot { fill: #fff; stroke: #22c55e; stroke-width: 2; }

/* ============ 反馈卡片 ============ */
.fb-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow-s); transition: box-shadow .15s, transform .15s; }
.fb-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.fb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.fb-icon { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; background: var(--green-50); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.fb-meta { font-size: 12px; font-weight: 600; color: var(--text-2); }
.fb-badge { margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #f1f5f9; color: var(--muted); }
.fb-badge.done { background: var(--green-100); color: #15803d; }
.fb-content { font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; line-height: 1.7; }
.fb-time { font-size: 11px; color: var(--muted); margin-top: 8px; }
.fb-reply { margin-top: 10px; background: var(--green-50); border: 1px solid #bbe8cb; border-radius: 10px; padding: 10px 12px; }
.fb-reply-head { font-size: 11px; color: var(--green); font-weight: 600; margin-bottom: 4px; }
.fb-reply-text { font-size: 13px; color: #166534; line-height: 1.6; white-space: pre-wrap; }
.fb-reply-row { display: flex; gap: 8px; margin-top: 10px; }
.fb-reply-row input { flex: 1; min-width: 0; }
.fb-reply-row .btn { flex-shrink: 0; }

/* ============ 手机自助面板 ============ */
.mobile-hero { display: flex; align-items: center; justify-content: space-between; }
.mobile-title { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.mobile-title .pill { margin-left: 8px; }
.mobile-row { margin-top: 14px; }

/* ============ 弹窗 ============ */
.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(2px); }
.modal-content { position: relative; background: #fff; border-radius: 16px; width: 92%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalIn .18s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h1 { font-size: 17px; margin: 0; }
.modal-close { border: none; background: none; font-size: 20px; cursor: pointer; color: var(--muted); line-height: 1; border-radius: 6px; padding: 2px 6px; transition: all .12s; }
.modal-close:hover { background: #f1f5f9; color: var(--text); }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px 18px; border-top: 1px solid var(--border); }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.setting-row input[type="checkbox"] { width: auto; }

/* ============ 登录页 ============ */
.login-mask { position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f0f5f2 0%, #dcfce7 55%, #bbe8cb 100%); }
.login-card { background: #fff; border-radius: 20px; padding: 34px 30px; width: 350px; max-width: 92%; border: 1px solid var(--border); box-shadow: 0 30px 70px -24px rgba(22, 163, 74, 0.45); }
.lc-title { font-size: 18px; font-weight: 800; text-align: center; margin-bottom: 22px; }
.lc-input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 12px; outline: none; transition: all .15s; }
.lc-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12); }

/* ============ 操作指引 ============ */
.guide-body { font-size: 14px; line-height: 1.8; color: var(--text-2); }
.guide-body h3 { font-size: 15px; margin: 20px 0 6px; color: var(--text); }
.guide-body h3:first-child { margin-top: 0; }
.guide-body p { margin: 4px 0; }
.guide-body ul { margin: 4px 0 0; padding-left: 18px; }
.guide-body li { margin: 3px 0; }
.guide-body strong { color: var(--green); }
.guide-tip { background: var(--green-50); border: 1px solid #bbe8cb; color: #166534; border-radius: 12px; padding: 12px 14px; margin-top: 18px; font-size: 13px; }

/* ============ 滚动条 ============ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 浮动帮助 ============ */
.help-fab { position: fixed; right: 24px; bottom: 28px; z-index: 40; }
.help-fab .hf-btn { width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; }
.help-fab .hf-title { text-align: center; font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ============ 响应式 ============ */
@media (max-width: 1000px) {
  .page-grid { flex-direction: column; }
  .page-side { width: 100%; }
  .sidebar { width: 200px; }
  .menu-item, .menu-title { font-size: 13px; }
}
@media (max-width: 800px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .content { padding: 0 0 32px; }
  .panel { padding: 0 14px; }
  .breadcrumb { padding: 14px 14px 0; }
  .topbar { padding: 10px 14px; }
  .field-row { flex-direction: column; }
  .filter-item input, .filter-item select, .daterange input { width: 100%; }
}
