/* KoensWerkt Mailer — beheerpaneel */

:root {
  --bg: #f5f5f4;
  --surface: #ffffff;
  --surface-2: #fafaf9;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --text: #1c1917;
  --text-2: #57534e;
  --muted: #78716c;
  --accent: #e8590c;
  --accent-hover: #c2410c;
  --accent-soft: #fff4ed;
  --accent-text: #ffffff;
  --sidebar: #1c1917;
  --sidebar-text: #d6d3d1;
  --sidebar-muted: #8a847f;
  --sidebar-active: #292524;
  --ok: #15803d; --ok-bg: #dcfce7;
  --bad: #b91c1c; --bad-bg: #fee2e2;
  --warn: #a16207; --warn-bg: #fef3c7;
  --info: #1d4ed8; --info-bg: #dbeafe;
  --neutral: #57534e; --neutral-bg: #f0efee;
  --chart-sent: #e8590c; --chart-spam: #d6d3d1; --chart-failed: #b91c1c;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .06), 0 1px 3px rgba(28, 25, 23, .04);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e0d;
    --surface: #1a1918;
    --surface-2: #211f1e;
    --border: #2e2b29;
    --border-strong: #44403c;
    --text: #f5f5f4;
    --text-2: #d6d3d1;
    --muted: #a8a29e;
    --accent: #f97316;
    --accent-hover: #fb923c;
    --accent-soft: #2a1a10;
    --accent-text: #1c1917;
    --sidebar: #141312;
    --sidebar-active: #262422;
    --ok: #4ade80; --ok-bg: #0f2a19;
    --bad: #f87171; --bad-bg: #2d1414;
    --warn: #facc15; --warn-bg: #2b2410;
    --info: #93c5fd; --info-bg: #122039;
    --neutral: #d6d3d1; --neutral-bg: #292524;
    --chart-sent: #f97316; --chart-spam: #57534e; --chart-failed: #f87171;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2 { font-size: 16px; font-weight: 650; margin-bottom: 14px; }
h3 { font-size: 13px; font-weight: 650; margin: 22px 0 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
p { margin: 0 0 12px; }
code { font-family: var(--mono); font-size: .88em; background: var(--neutral-bg); padding: 1px 5px; border-radius: 4px; }
ul, ol { padding-left: 20px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
td .small, td .muted.small, .list .muted.small { display: block; }
.text-bad { color: var(--bad); }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.center { text-align: center; }
[hidden] { display: none !important; }
.mobile-only { display: none; }

/* ---------- Layout ---------- */
.has-nav { padding-left: 232px; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 232px; background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; padding: 18px 12px; z-index: 30; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 15px; padding: 4px 10px 22px; text-decoration: none !important; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff; flex: none; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a, .sidebar-foot a, .sidebar-foot .linklike {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 7px;
  color: var(--sidebar-text); font-weight: 500; text-decoration: none; width: 100%;
}
.sidebar svg { opacity: .75; flex: none; }
.sidebar nav a:hover, .sidebar-foot a:hover, .sidebar-foot .linklike:hover { background: var(--sidebar-active); color: #fff; }
.sidebar nav a.active, .sidebar-foot a.active { background: var(--sidebar-active); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.sidebar nav a.active svg { opacity: 1; color: var(--accent); }
.nav-count { margin-left: auto; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 0 7px; line-height: 18px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid #2e2b29; padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-foot form { margin: 0; }
.linklike { background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.warn-dot { color: #facc15; font-style: normal; font-size: 10px; }
.version { color: var(--sidebar-muted); font-size: 11px; padding: 10px 10px 0; margin: 0; }

.topbar { display: none; }
.nav-backdrop { display: none; }

.main { max-width: 1180px; margin: 0 auto; padding: 32px 32px 80px; }
.no-nav .main { max-width: none; padding: 0; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 4px !important; }
.crumbs a { color: var(--muted); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.card .grid { gap: 0 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.card.stack, form.stack { gap: 12px; }
.main > * + * { margin-top: 16px; }
.grid > .card, .stack > .card { margin: 0; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card-highlight { border-color: var(--accent); background: var(--accent-soft); }
.card > h2:last-child, .card > p:last-child { margin-bottom: 0; }
details.card > summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
details.card > summary::before { content: '›'; display: inline-block; transition: transform .15s; font-size: 18px; line-height: 1; color: var(--muted); }
details.card[open] > summary::before { transform: rotate(90deg); }
details.card[open] > summary { margin-bottom: 14px; }
.danger-zone > summary { color: var(--bad); }
details.subtle { margin-top: 16px; }
details.subtle > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.subtle[open] > summary { margin-bottom: 10px; }
.empty { text-align: center; padding: 48px 24px; }
.inline-panel { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 8px; padding: 16px; margin-bottom: 16px; }

/* ---------- Stats & chart ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.stat-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.stat-sub { font-size: 12px; color: var(--muted); }
.stat-bad .stat-value { color: var(--bad); }

.legend { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: 8px; }
.lg-sent { background: var(--chart-sent); } .lg-spam { background: var(--chart-spam); } .lg-failed { background: var(--chart-failed); }
.chart { display: flex; align-items: stretch; gap: 3px; height: 160px; padding-bottom: 20px; }
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; position: relative; min-width: 0; }
.chart-col:hover { background: var(--surface-2); border-radius: 3px; }
.chart-stack { display: flex; flex-direction: column; min-height: 2px; border-radius: 3px 3px 0 0; overflow: hidden; background: var(--border); }
.seg { display: block; min-height: 2px; flex-basis: 0; }
.seg-sent { background: var(--chart-sent); } .seg-spam { background: var(--chart-spam); } .seg-failed { background: var(--chart-failed); }
.chart-x { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-col:nth-child(odd) .chart-x { visibility: hidden; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.list li:first-child { border-top: 0; }
.list li > a { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-meta { display: flex; align-items: center; gap: 8px; flex: none; }
.ok-line { display: flex; align-items: center; gap: 8px; color: var(--ok); }

.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.client-card { color: var(--text); text-decoration: none !important; display: flex; flex-direction: column; gap: 12px; transition: border-color .12s, transform .12s; padding: 18px 20px; }
.client-card:hover { border-color: var(--accent); }
.client-card-head { display: flex; gap: 12px; align-items: center; }
.client-card-head strong { display: block; }
.swatch { width: 34px; height: 34px; border-radius: 8px; flex: none; border: 1px solid rgba(0,0,0,.08); }
.client-card-badges { display: flex; gap: 6px; }
.client-card-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding-top: 12px; border-top: 1px solid var(--border); }
.client-card-stats dt { font-size: 11px; color: var(--muted); }
.client-card-stats dd { margin: 0; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.card:not(.card-flush) .table th { background: none; padding-left: 0; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.card:not(.card-flush) .table td { padding-left: 0; }
.table tr:last-child td { border-bottom: 0; }
.table-hover tbody tr[data-href] { cursor: pointer; }
.table-hover tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { margin-left: 4px; }
.w-check { width: 36px; }
.empty-row { text-align: center; color: var(--muted); padding: 32px !important; }
.bulk-bar { padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface-2); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bulk-help { padding: 0 12px 10px; background: var(--surface-2); margin: 0; }
.payload { margin-top: 6px; }
.payload summary { cursor: pointer; color: var(--muted); font-size: 11px; }
.payload pre { margin: 6px 0 0; padding: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; font: 11px/1.5 var(--mono); max-width: 420px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.dismiss-form { display: inline; margin: 0; }
.card-head-sub { margin: 20px 0 4px; }
.card-head-sub h3 { margin: 0; }

.field-table td { padding: 6px 8px 6px 0 !important; vertical-align: middle; }
.field-table input[type=text], .field-table select { width: 100%; }
.field-table .options-input { margin-top: 6px; }
.field-table .drag { white-space: nowrap; width: 60px; }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: 11px; font-weight: 600; line-height: 18px; padding: 0 8px; border-radius: 20px; white-space: nowrap; vertical-align: middle; background: var(--neutral-bg); color: var(--neutral); }
h1 .badge { font-size: 12px; line-height: 22px; }
.badge-sent { background: var(--ok-bg); color: var(--ok); }
.badge-failed { background: var(--bad-bg); color: var(--bad); }
.badge-spam, .badge-blocked { background: var(--warn-bg); color: var(--warn); }
.badge-pending { background: var(--info-bg); color: var(--info); }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; min-width: 0; }
.field > label { display: block; }
.label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; color: var(--text-2); }
.help { font-size: 12px; color: var(--muted); margin: 5px 0 0; }
.help code { font-size: 11px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=search], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 7px; padding: 8px 11px; min-height: 38px;
  transition: border-color .12s, box-shadow .12s;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--muted); }
input[type=color] { width: 48px; height: 38px; padding: 3px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); cursor: pointer; }
.color-field { display: flex; align-items: center; gap: 10px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; flex: none; }
.checks { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 2px; }
.check small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.check strong { font-weight: 600; }
.check-inline { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; max-height: 260px; overflow: auto; }
.check-grid .small { display: inline; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input { width: auto; flex: 1; min-width: 160px; }
form.inline { display: inline; }
.form-actions, .row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions { margin-top: 12px; }
.sticky-actions { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px; padding: 14px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.placeholders { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.placeholders .label { margin: 0 4px 0 0; }
.placeholders code { cursor: pointer; }
.placeholders code:hover { background: var(--accent-soft); color: var(--accent); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; }
.filters select, .filters input[type=search], .filters input[type=date] { width: auto; min-width: 140px; flex: 0 1 auto; }
.filters input[type=search] { flex: 1 1 200px; }
.search input { width: 240px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: 13px; line-height: 1; white-space: nowrap;
  padding: 0 14px; height: 36px; border-radius: 7px; cursor: pointer; text-decoration: none !important;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: var(--bad); filter: brightness(.9); border-color: var(--bad); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--neutral-bg); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 28px; }
.btn-block { width: 100%; height: 42px; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Flash ---------- */
.flash { padding: 11px 14px; border-radius: 8px; border: 1px solid transparent; font-weight: 500; }
.flash + .flash { margin-top: 8px; }
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--bad-bg); color: var(--bad); }
.flash-warning { background: var(--warn-bg); color: var(--warn); }
.flash-info { background: var(--info-bg); color: var(--info); }
.flash a { color: inherit; text-decoration: underline; }
.card .flash { margin-bottom: 14px; }

/* ---------- Tabs ---------- */
.tab-list { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab-list > a, .tab-list > button {
  background: none; border: 0; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer;
  padding: 10px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important;
}
.tab-list > .active { color: var(--text); border-bottom-color: var(--accent); }
.tab-nav { margin-bottom: 0; }

/* ---------- Detail ---------- */
.data-list { margin: 0; }
.data-list > div { padding: 12px 0; border-top: 1px solid var(--border); }
.data-list > div:first-child { border-top: 0; padding-top: 0; }
.data-list dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 3px; }
.data-list dd { margin: 0; font-size: 15px; white-space: pre-wrap; word-wrap: break-word; }
.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; min-width: 0; }
.meta-cols { grid-template-columns: auto 1fr auto 1fr auto 1fr; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { border-left: 2px solid var(--border); padding: 4px 0 16px 16px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.timeline-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.timeline-item p { margin: 0 0 4px; }
.event-list { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }
.mail-preview { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: 8px; background: #f3f4f6; margin-top: 12px; }
.preview-tabs { display: flex; gap: 6px; }

.copybox { position: relative; margin: 8px 0 12px; }
.copybox pre { margin: 0; background: #1c1917; color: #e7e5e4; border-radius: 8px; padding: 16px; overflow-x: auto; font: 12.5px/1.6 var(--mono); max-height: 460px; }
.copybox pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.copybox .copy-btn { position: absolute; top: 8px; right: 8px; background: #292524; color: #e7e5e4; }
.copybox .copy-btn:hover { background: #44403c; }

.steps { padding-left: 20px; }
.steps li { margin-bottom: 10px; }
.qr { margin: 12px 0; width: 196px; min-height: 196px; padding: 8px; background: #fff; border-radius: 8px; border: 1px solid var(--border); }
.qr img, .qr canvas { display: block; }
.secret { display: inline-block; margin-top: 8px; font-size: 14px; letter-spacing: .05em; padding: 6px 10px; user-select: all; }
.otp-input { width: 130px !important; flex: none !important; font: 600 18px/1 var(--mono) !important; letter-spacing: .2em; text-align: center; }

.docs .table td:first-child { white-space: nowrap; width: 1%; }
.faq dt { font-weight: 650; margin-top: 14px; }
.faq dd { margin: 4px 0 0; color: var(--text-2); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; font-size: 13px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 20% 0%, var(--accent-soft), var(--bg) 60%); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 32px; box-shadow: 0 12px 32px rgba(28, 25, 23, .08); }
.auth-card h1 { margin-bottom: 6px; font-size: 22px; }
.auth-card > p { margin-bottom: 20px; }
.auth-card form { margin-top: 18px; }
.auth-card .field { margin: 0; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 22px; }
.auth-links { margin: 18px 0 0; font-size: 13px; text-align: center; color: var(--muted); }
.auth-card .otp-input { width: 100% !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-cols { grid-template-columns: auto 1fr; }
}

@media (max-width: 860px) {
  .has-nav { padding-left: 0; }
  .topbar {
    display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 20;
    background: var(--sidebar); color: #fff; padding: 8px 12px; font-weight: 700;
  }
  .topbar .btn-ghost { color: #fff; }
  .topbar .btn-ghost:hover { background: var(--sidebar-active); }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .nav-toggle:checked ~ .sidebar { transform: none; }
  .nav-toggle:checked ~ .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 25; }
  .main { padding: 20px 16px 64px; }
  .grid-2, .grid-3, .grid-4, .grid-main { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 18px 16px; }
  .card-flush { padding: 0; }
  .search input { width: 100%; }
  .page-actions { width: 100%; }
  .page-actions .search { flex: 1; }
  h1 { font-size: 21px; }
  .chart-col:nth-child(3n+1) .chart-x { visibility: visible; }
  .chart-col:not(:nth-child(3n+1)) .chart-x { visibility: hidden; }
  .field-table thead { display: none; }
  .field-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .field-table td { border: 0 !important; padding: 0 !important; }
  .field-table .drag { order: 5; }
  .field-table td:last-child { order: 6; text-align: right; }
  .field-table td.center { text-align: left; display: flex; align-items: center; }
  .mobile-only { display: inline; }
  .filters select, .filters input[type=date] { flex: 1 1 140px; }
}
