/* ------------------------------------------------------------------
   发票信息提取 · 界面样式
------------------------------------------------------------------ */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --ink: #12263a;
  --ink-2: #4a5c72;
  --ink-3: #8b9cb1;
  --line: #e5ecf4;
  --line-2: #eef2f8;
  --brand: #1b4f72;
  --brand-2: #2874a6;
  --gold: #b8893c;
  --green: #1a8e6b;
  --red: #c0392b;
  --amber: #b9772b;
  --side-1: #0d1f2f;
  --side-2: #17364f;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 9px;
  --sd-1: 0 1px 2px rgba(18, 38, 58, 0.05);
  --sd-2: 0 2px 6px rgba(18, 38, 58, 0.06), 0 12px 28px -18px rgba(18, 38, 58, 0.24);
  --sd-3: 0 24px 60px -24px rgba(10, 28, 45, 0.42);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "SF Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfdae8; border-radius: 20px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b3c3d6; }

.app { display: flex; min-height: 100vh; }

/* ---------------------------- 侧边栏 ---------------------------- */
.sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: linear-gradient(168deg, var(--side-1) 0%, var(--side-2) 100%);
  color: #e8f0f8;
  padding: 26px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(560px 320px at 12% -8%, rgba(64, 156, 216, 0.24), transparent 62%);
  pointer-events: none;
}

.brand { display: flex; align-items: center; gap: 11px; position: relative; z-index: 1; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #2f7fb8, #1b4f72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 16px -8px rgba(0, 0, 0, 0.7);
  color: #eaf4ff;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-text h1 { font-size: 15px; margin: 0; font-weight: 650; letter-spacing: 0.4px; }
.brand-text p {
  margin: 3px 0 0; font-size: 9px; letter-spacing: 1.9px;
  color: #7fa4c4; font-weight: 600;
}

.nav { display: flex; flex-direction: column; gap: 3px; position: relative; z-index: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm);
  color: #a9c1d6; text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  transition: background 0.18s, color 0.18s;
}
.nav-item svg { width: 17px; height: 17px; opacity: 0.85; }
.nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #eaf4ff; }
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.nav-item.active svg { opacity: 1; color: #8ec9f0; }

.engine-card {
  margin-top: auto;
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.engine-title { font-size: 12.5px; font-weight: 600; color: #dcebf8; }
.engine-sub { font-size: 10.5px; color: #7fa4c4; margin-top: 2px; }
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #f0b429; flex: 0 0 8px;
  box-shadow: 0 0 0 0 rgba(240, 180, 41, 0.55);
  animation: pulse 1.9s infinite;
}
.pulse.ok { background: #35d39a; box-shadow: 0 0 0 0 rgba(53, 211, 154, 0.55); }
.pulse.bad { background: #f0665a; animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(53, 211, 154, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(53, 211, 154, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 211, 154, 0); }
}

.sidebar-foot {
  position: relative; z-index: 1;
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 10.5px; line-height: 1.6; color: #6d90ae;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 14px;
}
.sidebar-foot svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; color: #4f7d9e; }

/* ---------------------------- 主区 ---------------------------- */
.main {
  flex: 1; min-width: 0;
  padding: 28px 34px 40px;
  display: flex; flex-direction: column; gap: 20px;
  max-width: 1560px;
}

.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.topbar-text h2 { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: 0.2px; }
.topbar-text p { margin: 6px 0 0; color: var(--ink-3); font-size: 12.5px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; flex: 0 0 auto; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.14s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(150deg, #22618c, #17435f);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 40, 60, 0.2), 0 10px 22px -12px rgba(23, 67, 95, 0.7);
}
.btn-primary:hover { box-shadow: 0 1px 2px rgba(15, 40, 60, 0.2), 0 14px 26px -12px rgba(23, 67, 95, 0.8); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  background: var(--surface); color: var(--ink-2);
  border-color: var(--line);
  box-shadow: var(--sd-1);
}
.btn-ghost:hover { border-color: #cfdceb; color: var(--ink); background: #fbfdff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }

/* ---------------------------- 上传区 ---------------------------- */
.dropzone {
  position: relative;
  background: var(--surface);
  border: 1.5px dashed #cfdceb;
  border-radius: var(--r-lg);
  padding: 34px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, padding 0.25s;
  box-shadow: var(--sd-1);
  overflow: hidden;
}
.dropzone::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(600px 180px at 50% 0%, rgba(40, 116, 166, 0.06), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.dropzone:hover { border-color: #9dc2dd; background: #fcfeff; }
.dropzone:hover::before { opacity: 1; }
.dropzone.dragging {
  border-color: var(--brand-2);
  background: #f6fbff;
  box-shadow: 0 0 0 4px rgba(40, 116, 166, 0.1), var(--sd-2);
}
.dropzone.compact { padding: 16px 20px; }
.dropzone.compact .dz-icon { width: 34px; height: 34px; margin-bottom: 0; }
.dropzone.compact .dz-icon svg { width: 18px; height: 18px; }
.dropzone.compact .dz-inner { flex-direction: row; gap: 14px; align-items: center; text-align: left; }
.dropzone.compact .dz-title { font-size: 13px; }
.dropzone.compact .dz-hint { font-size: 11px; margin-top: 3px; }

.dz-inner { position: relative; display: flex; flex-direction: column; align-items: center; z-index: 1; }
.dz-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, #f0f7fd, #e4eff9);
  border: 1px solid #dceaf6;
  color: var(--brand-2);
  margin-bottom: 13px;
  transition: transform 0.25s;
}
.dz-icon svg { width: 25px; height: 25px; }
.dropzone:hover .dz-icon { transform: translateY(-2px); }
.dz-title { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.dz-link { color: var(--brand-2); border-bottom: 1px solid rgba(40, 116, 166, 0.35); }
.dz-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 7px; }

.dz-corner {
  position: absolute; width: 12px; height: 12px;
  border: 1.5px solid #d7e3ef; opacity: 0;
  transition: opacity 0.25s;
}
.dropzone.dragging .dz-corner { opacity: 1; border-color: var(--brand-2); }
.dz-corner.tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.dz-corner.tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; border-radius: 0 4px 0 0; }
.dz-corner.bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; border-radius: 0 0 0 4px; }
.dz-corner.br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }

/* ---------------------------- 统计卡 ---------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 16px 14px;
  box-shadow: var(--sd-1);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--brand-2); opacity: 0.85;
}
.stat-card[data-tone="green"]::before { background: var(--green); }
.stat-card[data-tone="gold"]::before { background: var(--gold); }
.stat-card[data-tone="amber"]::before { background: var(--amber); }
.stat-label { font-size: 11.5px; color: var(--ink-3); font-weight: 600; letter-spacing: 0.3px; }
.stat-value {
  font-size: 26px; font-weight: 680; margin-top: 6px;
  letter-spacing: -0.5px; font-variant-numeric: tabular-nums;
  font-family: var(--font);
}
.stat-value.money { font-size: 23px; color: var(--brand); }
.stat-card[data-tone="gold"] .stat-value { color: var(--gold); }
.stat-foot { font-size: 10.5px; color: var(--ink-3); margin-top: 4px; }

/* ---------------------------- 结果面板 ---------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sd-2);
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-2);
  gap: 16px;
  background: linear-gradient(180deg, #fdfefe, #fafcfe);
}
.tabs { display: flex; gap: 4px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 0; background: transparent; border-radius: 8px;
  font-family: var(--font); font-size: 12.5px; font-weight: 600;
  color: var(--ink-3); cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.tab:hover { background: #f1f5fa; color: var(--ink-2); }
.tab.active { background: #eaf2fa; color: var(--brand); }
.tab-num {
  font-size: 10.5px; font-weight: 700;
  background: #dde8f3; color: #5d7b96;
  border-radius: 20px; padding: 1px 6px; min-width: 18px; text-align: center;
}
.tab.active .tab-num { background: var(--brand-2); color: #fff; }

.panel-tools { display: flex; align-items: center; gap: 9px; }
.search {
  position: relative; display: flex; align-items: center;
}
.search svg {
  position: absolute; left: 10px; width: 14px; height: 14px; color: #a4b4c6;
  pointer-events: none;
}
.search input {
  height: 32px; width: 236px;
  padding: 0 12px 0 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: var(--font); font-size: 12.5px; color: var(--ink);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.search input::placeholder { color: #aab8c8; }
.search input:focus { border-color: #a9c9e2; box-shadow: 0 0 0 3px rgba(40, 116, 166, 0.09); }

.table-wrap { position: relative; overflow-x: auto; max-height: 560px; overflow-y: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1180px; }
table.grid thead th {
  position: sticky; top: 0; z-index: 2;
  background: #f8fafd;
  font-size: 11px; font-weight: 700; color: #7d8fa5;
  letter-spacing: 0.4px; text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.grid tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  font-size: 12.5px; color: var(--ink-2);
  vertical-align: middle;
  white-space: nowrap;
}
table.grid tbody td:nth-child(4) { min-width: 94px; }
.type-tag .badge { margin-left: 5px; }
table.grid tbody tr { cursor: pointer; transition: background 0.15s; }
table.grid tbody tr:hover { background: #f8fbfe; }
table.grid tbody tr:last-child td { border-bottom: 0; }
.c-idx { width: 40px; color: #b0bece !important; font-variant-numeric: tabular-nums; }
.c-file { min-width: 210px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-party { max-width: 190px; }
.c-conf { width: 84px; }
.c-act { width: 44px; }

.cell-file { display: flex; align-items: center; gap: 9px; min-width: 0; }
.thumb {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 7px; object-fit: cover;
  border: 1px solid var(--line);
  background: #f2f6fa;
  color: #9db2c7; overflow: hidden;
  display: block;
}
div.thumb { display: grid; place-items: center; }
.thumb svg { width: 16px; height: 16px; }
.file-meta { min-width: 0; }
.file-name {
  font-size: 12px; color: var(--ink); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 168px;
}
.type-tag { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 168px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: -0.2px; color: var(--ink); }
.total-cell { font-weight: 680; color: var(--ink); }
.party-cell { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.empty-val { color: #c3cedb; }

.conf {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.conf-bar { width: 30px; height: 4px; border-radius: 3px; background: #e8eef6; overflow: hidden; }
.conf-bar i { display: block; height: 100%; border-radius: 3px; }
.conf.high { color: var(--green); } .conf.high i { background: var(--green); }
.conf.mid { color: var(--amber); } .conf.mid i { background: var(--amber); }
.conf.low { color: var(--red); } .conf.low i { background: var(--red); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 650;
  padding: 2px 7px; border-radius: 20px;
}
.badge.ok { background: #e8f6f1; color: var(--green); }
.badge.warn { background: #fdf3e4; color: var(--amber); }
.badge.err { background: #fdeceb; color: var(--red); }

.row-act {
  width: 26px; height: 26px; border-radius: 7px;
  border: 0; background: transparent; color: #b6c4d4;
  display: grid; place-items: center; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.row-act:hover { background: #f0f4f9; color: var(--red); }
.row-act svg { width: 14px; height: 14px; }

.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid #dbe6f1; border-top-color: var(--brand-2);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { display: none; flex-direction: column; align-items: center; padding: 46px 0 54px; color: var(--ink-3); }
.empty.show { display: flex; }
.empty-mark {
  width: 58px; height: 58px; border-radius: 16px;
  display: grid; place-items: center;
  background: #f3f7fb; border: 1px solid var(--line);
  color: #b7c8d9; margin-bottom: 14px;
}
.empty-mark svg { width: 26px; height: 26px; }
.empty p { margin: 0; font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
.empty span { font-size: 12px; margin-top: 5px; }

/* ---------------------------- 说明区 ---------------------------- */
.help { padding: 4px 2px 0; }
.help h3 { font-size: 14px; margin: 6px 0 13px; color: var(--ink); font-weight: 650; }
.help-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.help-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 15px 16px;
  box-shadow: var(--sd-1);
}
.help-num {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  color: var(--gold); letter-spacing: 1px; margin-bottom: 8px;
}
.help-item h4 { margin: 0 0 6px; font-size: 13px; font-weight: 650; }
.help-item p { margin: 0; font-size: 11.5px; line-height: 1.65; color: var(--ink-3); }
.foot { font-size: 11px; color: #a9b7c6; text-align: center; padding: 12px 0 0; }

/* ---------------------------- 抽屉 ---------------------------- */
.overlay {
  position: fixed; inset: 0; background: rgba(10, 26, 42, 0.34);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.24s; z-index: 40;
}
.overlay.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 520px; max-width: 94vw;
  background: var(--surface);
  box-shadow: var(--sd-3);
  transform: translateX(102%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0.2, 1);
  z-index: 50;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line-2);
}
.drawer-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px; color: var(--gold); }
.drawer-head h3 { margin: 6px 0 0; font-size: 16px; font-weight: 650; word-break: break-all; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-3); display: grid; place-items: center;
  cursor: pointer; flex: 0 0 30px;
}
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:hover { background: #f6f9fc; color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; }
.drawer-foot {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 14px 22px; border-top: 1px solid var(--line-2); background: #fbfdff;
}

.fgroup { margin-bottom: 20px; }
.fgroup-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  color: #8b9cb1; text-transform: uppercase; margin-bottom: 10px;
}
.fgroup-title::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.frow { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; margin-bottom: 9px; }
.frow label { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.frow input {
  height: 34px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--font); font-size: 12.5px; color: var(--ink);
  background: #fff; outline: none; width: 100%;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.frow input:hover { border-color: #cfdceb; }
.frow input:focus { border-color: #a9c9e2; box-shadow: 0 0 0 3px rgba(40, 116, 166, 0.09); background: #fdfeff; }
.frow input.money { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.frow input.empty-field { background: #fcfdfe; color: #aab8c8; }

.warn-box {
  background: #fdf7ee; border: 1px solid #f3e4cd; border-radius: 10px;
  padding: 11px 13px; margin-bottom: 18px;
}
.warn-box h5 {
  margin: 0 0 6px; font-size: 11.5px; color: var(--amber);
  font-weight: 700; display: flex; align-items: center; gap: 6px;
}
.warn-box ul { margin: 0; padding-left: 16px; }
.warn-box li { font-size: 11.5px; color: #8a6a3c; line-height: 1.7; }

.raw-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: #f8fafd; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 12px; font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--ink-2); cursor: pointer;
}
.raw-toggle svg { width: 14px; height: 14px; transition: transform 0.2s; }
.raw-toggle.open svg { transform: rotate(180deg); }
.raw-text {
  margin: 8px 0 0; padding: 12px;
  background: #fbfdff; border: 1px solid var(--line-2); border-radius: 9px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.85;
  color: #48607a; white-space: pre-wrap; max-height: 260px; overflow-y: auto;
}
.preview-box {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  margin-bottom: 18px; background: #f8fafd;
}
.preview-box img { width: 100%; display: block; max-height: 240px; object-fit: contain; }
.meta-line { display: flex; gap: 14px; font-size: 11px; color: var(--ink-3); margin-top: 8px; flex-wrap: wrap; }
.meta-line b { color: var(--ink-2); font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------------------------- 其它 ---------------------------- */
.veil {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(23, 54, 79, 0.42);
  backdrop-filter: blur(3px);
  display: none; place-items: center;
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 0.5px;
  pointer-events: none;
}
.veil.show { display: grid; }

.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #12263a; color: #eaf2fa;
  padding: 10px 16px; border-radius: 10px;
  font-size: 12.5px; font-weight: 500;
  box-shadow: 0 12px 30px -12px rgba(10, 26, 42, 0.6);
  animation: toastIn 0.26s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast.err { background: #8f2f24; }
.toast.ok { background: #14644c; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1280px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .help-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1000px) {
  .sidebar { display: none; }
  .main { padding: 20px 18px 32px; }
}
