/* ==========================================================================
   叶子环保 · 代理商发货管理系统（后台）
   ========================================================================== */

:root {
  --teal: #1fa1a0;
  --teal-dark: #17827f;
  --teal-deep: #0d5c5a;
  --teal-ink: #0a3d3c;
  --teal-soft: #e9f7f6;
  --ink: #16292a;
  --ink-2: #435a59;
  --muted: #7d9290;
  --line: #e3ecea;
  --bg: #f3f7f6;
  --white: #fff;
  --ok: #1f9d7a;
  --warn: #c9821c;
  --err: #c9473d;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(13, 92, 90, .06);
  --shadow-md: 0 12px 34px rgba(13, 92, 90, .12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
svg { width: 100%; height: 100%; fill: currentColor; }
[hidden] { display: none !important; }

/* -------------------------------- 登录页 -------------------------------- */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1000px 600px at 82% -10%, rgba(31, 161, 160, .35), transparent 60%),
    linear-gradient(135deg, #0d5c5a 0%, #0a3d3c 100%);
  position: relative;
  overflow: hidden;
}

.login-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 28% 40%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 28% 40%, #000, transparent 72%);
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 404px;
  background: #fff;
  border-radius: 16px;
  padding: 38px 38px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .26);
}

.login-brand { margin-bottom: 26px; }
.login-brand .mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #26b1ae, #17827f);
  display: grid; place-items: center;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 8px 18px rgba(31, 161, 160, .3);
}
.login-brand .mark svg { width: 24px; height: 24px; }
.login-brand h1 { font-size: 21px; letter-spacing: .5px; }
.login-brand p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.login-card .field { margin-bottom: 16px; }
.login-card .field label {
  display: block;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.login-card input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1.5px solid #dce8e6;
  border-radius: 9px;
  background: #fbfdfd;
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.login-card input:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 161, 160, .12);
}

.login-btn {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #22adaa, #17827f);
  color: #fff;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 8px 20px rgba(23, 130, 127, .26);
  transition: filter .18s, transform .18s;
}
.login-btn:hover { filter: brightness(1.05); }
.login-btn:active { transform: translateY(1px); }
.login-btn[disabled] { opacity: .65; cursor: default; }

.login-err {
  min-height: 20px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--err);
}

.login-tip {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.8;
}

/* -------------------------------- 主框架 -------------------------------- */

.app { display: flex; min-height: 100vh; }

.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  background: linear-gradient(180deg, #0e5f5d 0%, #0a3d3c 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 22px;
}

.side-brand .mark {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .18);
  display: grid; place-items: center;
}
.side-brand .mark svg { width: 21px; height: 21px; color: #7fe0d9; }

.side-brand h1 { font-size: 15.5px; letter-spacing: .6px; line-height: 1.3; }
.side-brand p { font-size: 11px; color: rgba(255, 255, 255, .55); letter-spacing: .8px; margin-top: 2px; }

.side-nav {
  flex: 1;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .74);
  transition: background .18s, color .18s;
  position: relative;
}
.side-nav a svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.side-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side-nav a.on {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-weight: 600;
}
.side-nav a.on::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  border-radius: 0 3px 3px 0;
  background: #6fe3da;
}

.side-foot {
  padding: 16px 20px 20px;
  font-size: 11px;
  color: rgba(255, 255, 255, .38);
  border-top: 1px solid rgba(255, 255, 255, .09);
  line-height: 1.8;
}

.main {
  flex: 1;
  min-width: 0;
  margin-left: 232px;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar h1 { font-size: 19px; letter-spacing: .4px; }
.topbar p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.top-right { display: flex; align-items: center; gap: 14px; }

.who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
}
.who::before {
  content: "";
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2bb3b1, #17827f);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
}

.content { padding: 24px 28px 44px; flex: 1; }

.view { display: none; }
.view.on { display: block; animation: fadeUp .3s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------- 卡片 --------------------------------- */

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}

.card + .card { margin-top: 18px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.card-head h2 { font-size: 15.5px; letter-spacing: .3px; }
.card-head .sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.card-head .link { font-size: 12.5px; color: var(--teal); }
.card-head .link:hover { text-decoration: underline; }

/* --------------------------------- 统计 --------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  right: -30px; top: -30px;
  width: 92px; height: 92px;
  border-radius: 50%;
  background: var(--teal-soft);
  opacity: .75;
}

.stat .label { font-size: 12.5px; color: var(--muted); }
.stat .value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 4px;
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}
.stat .value small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat .foot { font-size: 11.5px; color: var(--muted); margin-top: 4px; position: relative; z-index: 1; }
.stat.teal .value { color: var(--teal-dark); }
.stat.warn .value { color: var(--warn); }

.dash-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  align-items: start;
}

/* 排行榜 */
.rank-list { display: flex; flex-direction: column; gap: 13px; }
.rank-item { display: flex; align-items: center; gap: 12px; }
.rank-no {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 6px;
  display: grid; place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  background: #f2f6f5;
}
.rank-item:nth-child(1) .rank-no { background: var(--teal); color: #fff; }
.rank-item:nth-child(2) .rank-no { background: #cfeae8; color: var(--teal-dark); }
.rank-item:nth-child(3) .rank-no { background: #e2f2f1; color: var(--teal-dark); }
.rank-main { flex: 1; min-width: 0; }
.rank-name { font-size: 13px; display: flex; justify-content: space-between; gap: 10px; }
.rank-name em { font-style: normal; color: var(--muted); font-size: 12px; }
.rank-bar {
  height: 6px;
  border-radius: 4px;
  background: #eef3f2;
  margin-top: 6px;
  overflow: hidden;
}
.rank-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #39bfb7, #17827f);
  transition: width .5s ease;
}
.rank-item.empty { color: var(--muted); font-size: 12.5px; }

/* 最近操作 */
.log-list { display: flex; flex-direction: column; }
.log-item {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.log-item:last-child { border-bottom: 0; }
.log-dot {
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  margin-top: 7px;
}
.log-body { flex: 1; min-width: 0; }
.log-body b { font-weight: 600; font-size: 12.5px; }
.log-body span { color: var(--ink-2); }
.log-time { flex: none; color: var(--muted); font-size: 11.5px; }

/* --------------------------------- 表单 --------------------------------- */

.field { margin-bottom: 18px; }
.field > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.field > label .count { color: var(--teal); font-weight: 600; }

.inp, .sel, textarea {
  width: 100%;
  border: 1.5px solid #dce8e6;
  border-radius: 9px;
  background: #fbfdfd;
  padding: 0 13px;
  height: 42px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
  font-family: inherit;
}

textarea {
  height: auto;
  min-height: 140px;
  padding: 12px 13px;
  line-height: 1.9;
  resize: vertical;
  font-family: "SF Mono", Consolas, "PingFang SC", monospace;
  letter-spacing: .6px;
}

.inp:focus, .sel:focus, textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(31, 161, 160, .11);
}

.inp.mono { font-family: "SF Mono", Consolas, monospace; letter-spacing: 1px; }

.field-tip { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.7; }
.field-tip.ok { color: var(--ok); }
.field-tip.err { color: var(--err); }

.input-row { display: flex; gap: 10px; }
.input-row .inp { flex: 1; }

/* --------------------------------- 按钮 --------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid #dce8e6;
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  font-size: 13px;
  white-space: nowrap;
  transition: all .18s;
}
.btn:hover { border-color: #b9d6d3; color: var(--teal-dark); background: #fbfdfd; }
.btn svg { width: 15px; height: 15px; }

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #22adaa, #17827f);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 5px 14px rgba(23, 130, 127, .24);
}
.btn.primary:hover { filter: brightness(1.06); color: #fff; }
.btn.danger { border-color: #f0d2cf; color: var(--err); background: #fffafa; }
.btn.danger:hover { background: #fdf1f0; border-color: #e6b7b2; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .55; cursor: default; filter: none; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12px; }
.btn.link {
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal);
  font-size: 12.5px;
}
.btn.link:hover { text-decoration: underline; background: none; }

/* --------------------------------- 工具栏 -------------------------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar .inp, .toolbar .sel { width: auto; height: 38px; font-size: 13px; }
.toolbar .inp.search { width: 240px; }
.toolbar .inp.agent { width: 150px; }
.toolbar .sel { padding-right: 30px; }
.toolbar .spacer { flex: 1; }

/* --------------------------------- 表格 --------------------------------- */

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
}

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--muted);
  background: #f7faf9;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f5f4;
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafcfc; }

.tbl .code {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 12.5px;
  letter-spacing: .6px;
  color: var(--ink);
  white-space: nowrap;
}
.tbl .sub { color: var(--muted); font-size: 11.5px; }
.tbl .num { font-variant-numeric: tabular-nums; }

.tbl input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: var(--teal);
  cursor: pointer;
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 5px;
  font-size: 11.5px;
  line-height: 1.7;
  white-space: nowrap;
}
.badge.ok { color: #0f7b78; background: rgba(31, 161, 160, .11); }
.badge.stock { color: var(--warn); background: #fdf5e7; }
.badge.void { color: #8d9493; background: #f0f3f2; text-decoration: line-through; }
.badge.off { color: var(--err); background: #fcefee; }

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.pager { display: flex; align-items: center; gap: 6px; }
.pager button {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #dce8e6;
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
}
.pager button:hover:not(:disabled) { border-color: var(--teal); color: var(--teal-dark); }
.pager button.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.pager button:disabled { opacity: .45; cursor: default; }

.empty-row { padding: 46px 0; text-align: center; color: var(--muted); font-size: 13px; }
.empty-row b { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }

/* 批量操作条 */
.batch-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin-bottom: 12px;
  background: var(--teal-soft);
  border: 1px solid #cfe9e6;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--teal-dark);
}
.batch-bar.on { display: flex; }
.batch-bar .spacer { flex: 1; }

/* -------------------------------- 发货页 -------------------------------- */

.ship-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 18px;
  align-items: start;
}

.ship-actions { display: flex; gap: 10px; margin-top: 4px; }
.ship-actions .btn.primary { height: 44px; padding: 0 30px; font-size: 14px; }
.ship-actions .btn { height: 44px; }

.ship-result {
  min-height: 180px;
  font-size: 13px;
}
.ship-result.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12.5px;
  border: 1px dashed #dbe8e6;
  border-radius: 10px;
  background: #fbfdfd;
  min-height: 220px;
  text-align: center;
  line-height: 1.9;
}

.res-summary {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.res-summary .cell {
  flex: 1;
  text-align: center;
  padding: 12px 6px;
  border-radius: 9px;
  background: #f7faf9;
}
.res-summary .cell b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.res-summary .cell span { font-size: 11.5px; color: var(--muted); }
.res-summary .cell.ok b { color: var(--teal-dark); }
.res-summary .cell.fail b { color: var(--err); }
.res-summary .cell.skip b { color: var(--warn); }

.res-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; }
.res-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.6;
}
.res-line .c { font-family: "SF Mono", Consolas, monospace; letter-spacing: .5px; }
.res-line .r { margin-left: auto; color: var(--muted); font-size: 11.5px; text-align: right; }
.res-line.ok { background: #f2faf8; color: #14695f; }
.res-line.err { background: #fdf3f2; color: #9c352c; }
.res-line.skip { background: #fdf8ee; color: #8a5b12; }

.tip-box {
  margin-top: 16px;
  padding: 13px 15px;
  background: #f7faf9;
  border-left: 2px solid rgba(31, 161, 160, .45);
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.9;
}
.tip-box b { color: var(--teal-dark); }

/* -------------------------------- 设置页 -------------------------------- */

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.settings-grid .card + .card { margin-top: 0; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .k { color: var(--ink); }
.setting-row .v { color: var(--muted); font-size: 12.5px; }

.about-list { font-size: 12.5px; color: var(--ink-2); line-height: 2; padding-left: 18px; }
.about-list li { margin-bottom: 2px; }

/* --------------------------------- 弹窗 --------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 40, 39, .48);
  backdrop-filter: blur(3px);
  animation: fade .18s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
  animation: pop .22s cubic-bezier(.34, 1.4, .64, 1) both;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
}
.modal-head h3 { font-size: 16px; }
.modal-head .x {
  width: 30px; height: 30px;
  border: 0;
  border-radius: 7px;
  background: #f2f6f5;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}
.modal-head .x:hover { background: #e8efee; color: var(--ink); }
.modal-body { padding: 4px 24px 8px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px 22px;
}
.modal-foot .btn.primary { min-width: 96px; }

.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* --------------------------------- Toast -------------------------------- */

.toast {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translate(-50%, -16px);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 9px;
  background: #123c3a;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: #14695f; }
.toast.err { background: #a63c33; }

/* -------------------------------- 响应式 -------------------------------- */

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .ship-grid, .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .side {
    position: static;
    width: 100%;
    flex-direction: column;
  }
  .side-brand { padding: 16px 18px 12px; }
  .side-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 12px 10px;
    gap: 4px;
  }
  .side-nav a { flex: none; padding: 9px 13px; font-size: 12.5px; }
  .side-nav a.on::before { display: none; }
  .side-foot { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 12px 16px; min-height: 64px; }
  .topbar h1 { font-size: 17px; }
  .topbar p { display: none; }
  .content { padding: 16px 16px 32px; }
  .toolbar .inp.search { width: 100%; }
  .toolbar .spacer { display: none; }
  .form-2col { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 24px; }
  .card { padding: 16px 14px; }
  .table-foot { flex-direction: column; align-items: flex-start; }
}
