/* 鲜昊宏经销商管理系统 - 样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
.req-star { color: #dc2626; margin-left: 3px; }
th.req::after { content: ' *'; color: #dc2626; font-weight: 400; }
.btn-ghost {
  background: none; border: 1px solid var(--line); color: var(--muted);
  padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 12px;
  font-family: inherit;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); }
/* 结算状态行内切换 */
.settle-toggle {
  border: none; border-radius: 999px; padding: 4px 12px; font-size: 12px;
  cursor: pointer; font-family: inherit; transition: filter .15s;
  white-space: nowrap;
}
/* 快捷过滤 */
.quick-filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.qf {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 12px; font-size: 12px; color: var(--muted); cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.qf:hover { border-color: var(--accent); color: var(--accent-dark); }
.qf.on { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); font-weight: 600; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--accent-dark); }
.settle-detail { padding: 10px 6px; background: #fafcfe; border-radius: 8px; }
/* 手机端订单卡片流 */
.order-cards { display: flex; flex-direction: column; gap: 12px; }
.order-card {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 13px 14px; box-shadow: var(--shadow);
}
.order-card:active { background: #f8fafc; }
.oc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.oc-no {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.oc-main { flex: 1; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-date { font-size: 11px; color: var(--muted); }
.oc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 10px;
  background: #f8fafc; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
}
.oc-grid div span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.oc-grid div b { font-size: 13px; }
.oc-grid div b.teal { color: var(--accent-dark); }
.oc-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oc-note { font-size: 11px; color: var(--muted); }
/* 达成率进度条 */
.prog { height: 7px; background: #eef2f6; border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.prog i { display: block; height: 100%; border-radius: 99px; }
.prog-txt { font-size: 11px; color: var(--muted); }
/* 收件箱候选折叠 */
.cand-fold {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 12px; background: #f8fafc; border-radius: 9px 9px 0 0;
  border: 1px solid var(--line); font-size: 13px; font-weight: 600;
}
.cand-fold + .cand-grid { border-radius: 0 0 9px 9px; }
.cand-fold .fold-arrow { color: var(--accent-dark); }
.cand-summary { font-weight: 400; color: var(--muted); font-size: 12px; }
/* toast 类型 */
.toast.info { background: #1d4ed8; }
.btn-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fecaca; }
/* 收款记录 */
.pay-block { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.pay-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 13px; }
.pay-sum { color: var(--accent-dark); font-weight: 600; }
.pay-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.pay-item {
  display: flex; align-items: center; gap: 14px; font-size: 13px;
  background: #f8fafc; border-radius: 8px; padding: 6px 10px;
}
.pay-item b { color: var(--accent-dark); }
.pay-type { background: #eef2f6; border-radius: 6px; padding: 1px 8px; font-size: 11px; color: var(--muted); }
.pay-note { color: var(--muted); font-size: 12px; flex: 1; }
.pay-empty { color: var(--muted); font-size: 12px; }
.link-btn {
  background: none; border: none; padding: 0; color: var(--accent-dark);
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
  text-decoration: underline dotted;
}
.link-btn:hover { color: var(--accent); }
.prod-pill {
  background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0;
  border-radius: 99px; padding: 2px 10px; font-size: 11px; cursor: pointer;
}
.prod-pill.on { background: #ccfbf1; color: #0f766e; border-color: #5eead4; }
.prod-step {
  border: 1px solid var(--line); background: #fff; border-radius: 99px;
  padding: 5px 12px; font-size: 12px; cursor: pointer; color: var(--muted);
}
.prod-step.on { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.log-item {
  display: flex; gap: 14px; align-items: baseline; font-size: 13px;
  border-bottom: 1px dashed var(--line); padding-bottom: 8px;
}
.log-time { color: var(--muted); white-space: nowrap; font-size: 12px; min-width: 130px; }
.log-main { flex: 1; }
.log-detail { color: var(--muted); margin-left: 8px; }
.log-ip { color: #94a3b8; font-size: 11px; white-space: nowrap; }
.gs-sec { font-size: 11px; color: var(--muted); font-weight: 700; padding: 8px 6px 3px; }
.gs-item { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.gs-item:hover { background: var(--accent-soft); }
.muted { color: var(--muted); }
.teal { color: #0f766e; font-weight: 600; }
.danger { color: #dc2626; font-weight: 600; }
.pay-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pay-add input, .pay-add select {
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; font-family: inherit;
}
.settle-toggle.on { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.settle-toggle.off { background: #f1f5f9; color: var(--muted); }
.settle-toggle:hover { filter: brightness(.94); }
:root {
  --bg: #f2f5f9;
  --card: #ffffff;
  --ink: #16222f;
  --muted: #6b7a8c;
  --line: #e3e9f0;
  --accent: #0d9488;
  --accent-dark: #0b7a70;
  --accent-soft: #e6f6f4;
  --warn: #d97706;
  --danger: #dc2626;
  --sidebar: #0e2233;
  --sidebar-ink: #c9d6e2;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 42, 67, .08), 0 4px 14px rgba(16, 42, 67, .05);
}
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
}
.app { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 216px; flex-shrink: 0;
  background: linear-gradient(180deg, #0e2233 0%, #0a1a29 100%);
  color: var(--sidebar-ink);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 24px 14px 16px; text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand-logo-img {
  width: 150px; height: 42px; object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .4));
}
.brand-name { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 2px; }
.brand-sub { font-size: 10.5px; color: #7d93a8; margin-top: 1px; letter-spacing: .5px; }
.nav { flex: 1; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 8px;
  color: var(--sidebar-ink); text-decoration: none;
  font-size: 14px; transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(13,148,136,.28), rgba(13,148,136,.1));
  color: #5eead4; font-weight: 600;
}
.nav-icon { width: 18px; text-align: center; font-size: 15px; opacity: .85; }
.nav-badge {
  background: #ef4444; color: #fff; border-radius: 99px;
  font-size: 10px; padding: 1px 6px; margin-left: auto;
}
#asBadge { background: #ef4444; }
.sidebar-foot { padding: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.today { font-size: 12px; color: #7d93a8; }
.pw-link {
  margin-top: 10px; background: none; border: 1px solid rgba(255,255,255,.15);
  color: #9fb3c7; font-size: 12px; padding: 6px 12px; border-radius: 6px;
  cursor: pointer; width: 100%; font-family: inherit;
}
.pw-link:hover { color: #5eead4; border-color: rgba(13,148,136,.5); }
#pwForm { display: flex; flex-direction: column; gap: 12px; }
#pwForm input {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; outline: none; font-family: inherit;
}
#pwForm input:focus { border-color: var(--accent); }

/* ---------- 主区 ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 26px; background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.page-title { font-size: 19px; font-weight: 700; }
.content { padding: 22px 26px 40px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 18px 20px; margin-bottom: 18px;
}
.card-title {
  font-size: 15px; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between;
}

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 18px 20px; position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; right: -18px; top: -18px;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--stat-tint, rgba(13,148,136,.08));
}
.stat-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: .5px; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }
.stat-card.accent { --stat-tint: rgba(13,148,136,.12); }
.stat-card.amber  { --stat-tint: rgba(217,119,6,.12); }
.stat-card.blue   { --stat-tint: rgba(59,130,246,.10); }
.stat-card.purple { --stat-tint: rgba(139,92,246,.10); }
.stat-card.teal   { --stat-tint: rgba(13,148,136,.12); }
.stat-card.gray   { --stat-tint: rgba(148,163,184,.14); }

.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }

/* ---------- 表格 ---------- */
.table-wrap {
  overflow: auto;               /* 左右 + 上下双向滚动 */
  max-height: calc(100vh - 210px);
}
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; padding: 9px 10px; font-size: 12px; color: var(--muted);
  background: #f8fafc; border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
  box-shadow: 0 1px 0 rgba(15, 40, 60, .08);
}
.table-wrap::-webkit-scrollbar { height: 10px; width: 10px; }
.table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
table.data td {
  padding: 9px 10px; border-bottom: 1px solid #eef2f7;
  white-space: nowrap; vertical-align: middle;
}
table.data tbody tr:hover { background: #f6faf9; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .money { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
table.data .row-del { color: var(--danger); background: none; border: none; cursor: pointer; font-size: 13px; }
table.data .row-edit { color: var(--accent); background: none; border: none; cursor: pointer; font-size: 13px; margin-right: 6px; }
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px;
}
.badge.teal { background: var(--accent-soft); color: var(--accent-dark); }
.badge.amber { background: #fef3c7; color: #b45309; }
.badge.gray { background: #f1f5f9; color: var(--muted); }
.badge.blue { background: #dbeafe; color: #1d4ed8; }
.badge.danger { background: #fee2e2; color: #b91c1c; }

/* ---------- 待办中心 ---------- */
.todo-list { display: flex; flex-direction: column; gap: 10px; }
.todo-item {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px;
  background: #fff;
}
.todo-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.todo-body { flex: 1; min-width: 0; }
.todo-title { font-size: 14px; font-weight: 600; }
.todo-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 13px; }

/* ---------- 工具条 ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=text], .toolbar select {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; background: #fff; outline: none; min-width: 140px;
}
.toolbar input[type=text]:focus, .toolbar select:focus { border-color: var(--accent); }
.toolbar .spacer { flex: 1; }

/* ---------- 按钮 ---------- */
.btn {
  padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 13px; cursor: pointer;
  transition: all .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-accent {
  background: linear-gradient(135deg, #0d9488, #0b7a70);
  color: #fff; border: none; font-weight: 600;
}
.btn-accent:hover { color: #fff; box-shadow: 0 4px 12px rgba(13,148,136,.35); }
.btn-danger { color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; border-color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(10, 20, 32, .5);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 12px; width: 760px; max-width: 94vw;
  max-height: 90vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { border: none; background: none; font-size: 22px; color: var(--muted); cursor: pointer; }
.modal-body { padding: 18px 22px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px; border-top: 1px solid var(--line);
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.grid-3 label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.grid-3 input, .grid-3 select {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px;
  font-size: 13px; color: var(--ink); outline: none;
}
.grid-3 input:focus, .grid-3 select:focus { border-color: var(--accent); }
.span-2 { grid-column: span 2; }
.hint { font-size: 11px; color: var(--warn); }

/* ---------- 收件箱 ---------- */
.inbox-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 18px; align-items: start; }
textarea.inbox-text {
  width: 100%; min-height: 300px; padding: 14px; font-size: 13px; line-height: 1.7;
  border: 1px solid var(--line); border-radius: 10px; resize: vertical;
  font-family: inherit; outline: none; background: #fbfdfe;
}
textarea.inbox-text:focus { border-color: var(--accent); }
.inbox-tip { font-size: 12px; color: var(--muted); line-height: 1.9; margin-bottom: 10px; }
.inbox-tip code {
  background: #eef4f3; color: var(--accent-dark); padding: 1px 6px;
  border-radius: 4px; font-size: 12px;
}
.rule-list { display: flex; flex-direction: column; gap: 10px; }
.rule-item {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: #fff; box-shadow: var(--shadow);
}
.rule-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rule-meta { font-size: 12px; color: var(--muted); }
.rule-fields { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.rule-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.rule-fields input, .rule-fields select {
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; outline: none;
}
.rule-fields input:focus, .rule-fields select:focus { border-color: var(--accent); }
.cand-row { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: #fff; }
.cand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 12px; margin-bottom: 8px; }
.cand-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.cand-grid input, .cand-grid select {
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; outline: none;
}
.cand-grid input:focus, .cand-grid select:focus { border-color: var(--accent); }
.cand-foot { display: flex; align-items: center; gap: 10px; }
.cand-conf { font-size: 12px; }
.cand-issues { color: var(--warn); font-size: 12px; }
.raw-box {
  background: #f8fafc; border: 1px dashed var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 12px; color: var(--muted);
  margin-bottom: 8px; white-space: pre-wrap; max-height: 90px; overflow: auto;
}

/* ---------- Excel ---------- */
.excel-status-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.excel-status-row .kv b { display: block; font-size: 18px; margin-top: 4px; }
.kv { font-size: 12px; color: var(--muted); }
.excel-path {
  background: #f8fafc; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 14px; font-size: 12px; color: var(--muted);
  word-break: break-all; margin-bottom: 16px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: #16222f; color: #fff; padding: 11px 22px; border-radius: 8px;
  font-size: 13px; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  animation: toastIn .25s ease;
}
.toast.ok { background: var(--accent-dark); }
.toast.err { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 图表 */
.chart-svg { width: 100%; height: 220px; display: block; }
.chart-bar-label { font-size: 11px; fill: var(--muted); }
.chart-bar-val { font-size: 11px; fill: var(--ink); font-weight: 600; }
.chart-month { font-size: 11px; fill: var(--muted); }

/* ---------- 登录页（双栏品牌布局） ---------- */
.login-page {
  position: fixed; inset: 0; z-index: 300;
  display: flex; background: #f4f8fb;
}
.login-hero {
  flex: 1.25; position: relative; overflow: hidden;
  background: linear-gradient(155deg, #07232e 0%, #0b3340 45%, #0d4038 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.hero-inner {
  position: relative; z-index: 2; max-width: 520px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; animation: fadeUp .6s ease both;
}
.hero-logo { display: inline-block; margin-bottom: 34px; }
.hero-logo img {
  display: block; height: 76px; width: auto;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .4));
}
.hero-title {
  font-size: 44px; font-weight: 800; color: #fff; letter-spacing: 4px;
  line-height: 1.25; margin-bottom: 16px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}
.hero-sub { font-size: 14px; color: rgba(208, 235, 228, .72); line-height: 1.9; letter-spacing: 1.5px; }
.hero-decor {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(460px 340px at 50% 20%, rgba(20, 184, 166, .30), transparent 72%),
    radial-gradient(520px 400px at 88% 90%, rgba(20, 184, 166, .14), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: auto, auto, 46px 46px, 46px 46px;
}
.login-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; background: #f4f8fb;
}
.panel-inner {
  width: min(360px, 100%); animation: fadeUp .6s .1s ease both;
}
.panel-mobile-brand { display: none; }
.panel-title { font-size: 26px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.panel-hint { font-size: 13px; color: var(--muted); margin-bottom: 26px; }
.panel-inner input {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--line);
  border-radius: 11px; font-size: 15px; outline: none; margin-bottom: 16px;
  font-family: inherit; background: #fff; transition: border-color .2s;
}
.panel-inner input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13, 148, 136, .12); }
.login-btn {
  width: 100%; padding: 13px 0; font-size: 16px; border-radius: 11px;
  background: linear-gradient(135deg, #0d9488, #0aa); font-weight: 700;
}
.login-btn:hover { filter: brightness(1.05); }
.login-err { color: var(--danger); font-size: 13px; margin-top: 10px; text-align: center; }
.login-tip { color: var(--muted); font-size: 12px; margin-top: 14px; text-align: center; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- 移动端底部导航 ---------- */
.mobile-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: #fff; border-top: 1px solid var(--line);
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mn-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 0 7px; font-size: 11px; color: var(--muted);
  text-decoration: none; background: none; border: none; font-family: inherit; cursor: pointer;
  position: relative;
}
.mn-item.active { color: var(--accent-dark); font-weight: 600; }
.mn-icon { font-size: 19px; line-height: 1; }
.more-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 210;
  background: #fff; border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(15, 40, 60, .18);
  padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0));
  animation: fadeUp .25s ease both;
}
.more-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; text-align: center; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 4px; border-radius: 12px; background: #f4f8fb;
  font-size: 12px; color: var(--ink); text-decoration: none; border: 1px solid var(--line);
}
.more-item span { font-size: 20px; }
.more-item:active { background: var(--accent-soft); }
.more-close {
  width: 100%; margin-top: 14px; padding: 11px 0; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; font-size: 14px; cursor: pointer;
  font-family: inherit; color: var(--muted);
}
.more-sheet + .mobile-nav { display: none; }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .inbox-grid { grid-template-columns: 1fr; }
  .cand-grid { grid-template-columns: repeat(2, 1fr); }
  .rule-fields { grid-template-columns: repeat(3, 1fr); }
}
/* 平板/小屏：登录页单栏 */
@media (max-width: 900px) {
  .login-page { flex-direction: column; overflow-y: auto; }
  .login-hero {
    flex: none; padding: 46px 24px 36px;
    align-items: center; justify-content: center;
  }
  .hero-inner { max-width: 100%; }
  .hero-logo { margin-bottom: 20px; }
  .hero-logo img { height: 44px; }
  .hero-title { font-size: 30px; letter-spacing: 2px; }
  .hero-sub { font-size: 12.5px; }
  .login-panel { flex: 1; padding: 34px 24px 48px; }
  .panel-inner { width: min(400px, 100%); }
  .panel-mobile-brand { display: none; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .mobile-nav { display: grid; }
  .panel-mobile-brand { display: block; text-align: center; margin-bottom: 22px; }
  .panel-mobile-brand img { height: 40px; }
  .content { padding: 12px 12px calc(76px + env(safe-area-inset-bottom, 0)); }
  .topbar { padding: 12px 14px; position: sticky; top: 0; z-index: 120; background: var(--bg); }
  .topbar .btn { font-size: 12px; padding: 7px 10px; }
  .page-title { font-size: 16px; }
  .modal { max-width: 97vw; max-height: 88vh; overflow-y: auto; }
  .grid-3 { grid-template-columns: 1fr; }
  .rule-fields { grid-template-columns: 1fr 1fr; }
  .cand-grid { grid-template-columns: 1fr; }
  .toolbar input[type=text], .toolbar select { min-width: 0; flex: 1; }
  .toolbar { flex-wrap: wrap; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card .stat-value { font-size: 20px; }
  .stat-card { padding: 14px; }
  #statusDist > div { grid-template-columns: repeat(3, 1fr) !important; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .dash-grid .card { padding: 14px; }
  .card-title { font-size: 14px; }
  .todo-item { padding: 10px 12px; }
  .login-hero { padding: 34px 22px 28px; }
  .hero-title { font-size: 26px; }
  .panel-inner input { padding: 13px 14px; font-size: 16px; }
}
/* 小屏手机：统计卡片单列 */
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .panel-title { font-size: 22px; }
}
