/* Offside Cards app design system — afgeleid van het oorspronkelijke prototype. */
:root {
  --ink: #192f29; --muted: #697570; --line: #dfe5df; --line-strong: #c9d3c9; --green: #224d3c; --green-dark: #153a29;
  --lime: #cef478; --lime-dark: #80b52b; --paper: #f5f7f3; --white: #fff; --side: #162e27; --side-hover: #294237;
  --danger: #b3261e; --danger-bg: #fbe9e7; --warn: #8a5a00; --warn-bg: #fff3d6; --ok: #2f6b3a; --ok-bg: #e5f2e3; --info-bg: #eaf0e3;
  --gold: #e6d9ae; --silver: #bdc9d1; --greenb: #afc9a6; --blue: #a9c4d9;
  --radius: 10px; --shadow: 0 4px 10px #20311c17; --shadow-lg: 0 25px 100px #0004;
  --art: url("/img/card-art.jpg");
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Inter, Arial, Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid var(--lime-dark); outline-offset: 3px; }
a { color: #3c5c37; }
svg.icon, .icon > svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.4px; }
h1 { font-size: 36px; letter-spacing: -1.4px; line-height: 1.12; }
h2 { font-size: 22px; letter-spacing: -.6px; }
h3 { font-size: 16px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 700; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Layout ─────────────────────────────────────────────────────────── */
.side { width: 232px; position: fixed; inset: 0 auto 0 0; background: var(--side); color: #e8ede9; padding: 30px 20px 24px; display: flex; flex-direction: column; z-index: 40; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; font-size: 25px; font-weight: 800; letter-spacing: -1px; color: #fff; text-decoration: none; }
.brand .mark { width: 35px; height: 39px; background: var(--lime); color: #193529; border-radius: 8px; display: grid; place-items: center; transform: rotate(-8deg); }
.brand .mark svg { width: 21px; height: 21px; }
.side .brand { font-size: 21px; gap: 8px; white-space: nowrap; }
.side .brand .mark { width: 31px; height: 35px; }
.nav-caption { font-size: 11px; color: #9bafa4; letter-spacing: 1.4px; margin: 34px 12px 10px; font-weight: 700; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav .secondary-nav { display: contents; }
.nav a { display: flex; align-items: center; gap: 12px; border: 0; background: none; border-radius: 8px; text-align: left; padding: 11px 13px; color: #c4d0ca; font-size: 15px; text-decoration: none; }
.nav a.active { background: var(--lime); color: #183125; font-weight: 700; }
.nav a:hover:not(.active) { background: var(--side-hover); color: #fff; }
.nav .count { margin-left: auto; font-size: 12px; background: #ffffff15; padding: 1px 7px; border-radius: 4px; min-width: 22px; text-align: center; }
.nav .active .count { background: #172e2712; }
.nav .count.alert { background: #ff8a65; color: #1b1b1b; font-weight: 700; }
.nav .active .count.alert { background: #e65100; color: #fff; }
.side-note { border: 1px solid #3c5549; padding: 16px; border-radius: 10px; margin-top: auto; }
.side-note strong { font-size: 14px; display: block; color: var(--lime); margin-bottom: 4px; }
.side-note p { font-size: 13px; color: #adbbb3; }
.side-note a { color: #fff; }
.profile { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 14px; color: #fff; text-decoration: none; padding: 6px; border-radius: 8px; }
.profile:hover { background: var(--side-hover); }
.profile small { display: block; color: #a4b5aa; font-size: 12px; }
.avatar { border-radius: 50%; display: grid; place-items: center; width: 36px; height: 36px; background: #e0e9d8; color: #274634; font-weight: 700; flex-shrink: 0; text-transform: uppercase; }
.avatar.lg { width: 64px; height: 64px; font-size: 26px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.shell { margin-left: 232px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 72px; padding: 0 40px; border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 20px; position: sticky; top: 0; z-index: 30; }
.breadcrumb { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; min-width: 0; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb b { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { border: 1px solid var(--line); background: #fff; width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; position: relative; color: var(--ink); text-decoration: none; }
.icon-btn:hover { background: #eef3e8; }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e65100; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.content { max-width: 1500px; width: 100%; padding: 32px 40px 48px; margin: 0 auto; flex: 1; }
.content.narrow { max-width: 900px; }
.announcement { background: var(--lime); color: #183125; padding: 10px 40px; font-size: 14px; font-weight: 600; }
.footer-note { font-size: 12px; color: #7b857c; margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-note a { color: inherit; }

/* ── Headings ───────────────────────────────────────────────────────── */
.heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; letter-spacing: 1.7px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.heading h1 { margin: 6px 0 6px; }
.heading h1 .dot, h1 .dot { color: #87a969; }
.sub { color: var(--muted); font-size: 15px; max-width: 60ch; }
.heading .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn { border: 0; border-radius: 7px; padding: 11px 18px; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none; line-height: 1.2; transition: background .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); }
.btn.secondary { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn.secondary:hover { background: #eef3e8; }
.btn.lime { background: var(--lime); color: #183125; }
.btn.lime:hover { background: #bfe86a; }
.btn.danger { background: var(--danger-bg); color: var(--danger); border: 1px solid #f0c8c4; }
.btn.danger:hover { background: #f5d7d4; }
.btn.ghost { background: transparent; color: #3c5c37; padding: 8px 10px; }
.btn.ghost:hover { background: #eef3e8; }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn.xs { padding: 4px 9px; font-size: 12px; border-radius: 5px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn .icon svg, .btn > svg { width: 18px; height: 18px; }
.text-button { border: 0; background: none; padding: 5px 0; color: #3c5c37; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.text-button:hover { text-decoration: underline; }
.link { background: none; border: 0; padding: 0; color: #3c5c37; text-decoration: underline; cursor: pointer; font-size: inherit; }

/* ── Stats ──────────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 28px; overflow: hidden; }
.stat { padding: 18px 22px; position: relative; text-decoration: none; color: inherit; }
.stat + .stat { border-left: 1px solid var(--line); }
a.stat:hover { background: #f8faf6; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-top { display: flex; justify-content: space-between; align-items: center; }
.stat-top svg { color: #96a69b; width: 18px; height: 18px; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -1px; margin: 4px 0; }
.stat-value small { font-size: 16px; }
.stat-foot { font-size: 12px; color: var(--muted); }
.stat-foot em { font-style: normal; color: #427343; }

/* ── Layout helpers ─────────────────────────────────────────────────── */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.layout.wide-aside { grid-template-columns: minmax(0, 1fr) 340px; }
.aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ── Panels ─────────────────────────────────────────────────────────── */
.panel { border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 20px; }
.panel h3 { font-size: 16px; margin: 0 0 14px; }
.panel .panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel .panel-head h3 { margin: 0; }
.panel.tight { padding: 14px 16px; }
.panel.flat { background: #f8faf6; }
.album { background: #203d2f; color: #fff; border: 0; overflow: hidden; position: relative; }
.album .eyebrow { color: #b6c6b1; font-size: 10px; }
.album h3 { font-size: 24px; letter-spacing: -.7px; line-height: 1.05; margin: 12px 0 6px; max-width: 220px; color: #fff; }
.album p { font-size: 13px; color: #c6d1bf; }
.album .album-no { position: absolute; right: 14px; top: 6px; font-size: 64px; line-height: 1; color: #ffffff0c; font-weight: 900; }
.progress { height: 5px; background: #ffffff20; border-radius: 5px; margin: 18px 0 8px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--lime); transition: width .4s; }
.progress.light { background: #e5ebe2; }
.progress.light > span { background: var(--green); }
.album-bottom { display: flex; justify-content: space-between; font-size: 12px; color: #d9e2d1; }
.album .btn.outline { margin-top: 18px; padding: 9px 0; width: 100%; border: 1px solid #81947c; color: #fff; background: transparent; font-weight: 600; }
.album .btn.outline:hover { background: #ffffff14; }
.note { background: var(--info-bg); padding: 13px 16px; border-radius: 8px; font-size: 13px; color: #4c6144; }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.danger { background: var(--danger-bg); color: var(--danger); }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.note a { color: inherit; }

/* ── Tools / filters ────────────────────────────────────────────────── */
.collection-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.collection-head h2 span { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.tools { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; flex: 1; min-width: 200px; }
.search svg { position: absolute; left: 13px; width: 18px; height: 18px; color: #7a857d; pointer-events: none; }
.search input { width: 100%; padding: 10px 14px 10px 40px; }
.filters { display: flex; gap: 7px; margin-bottom: 20px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); padding: 6px 12px; border-radius: 6px; background: #fff; font-size: 13px; color: var(--ink); text-decoration: none; }
.pill:hover { background: #eef3e8; }
.pill.active { background: #e2ebd9; border-color: #c2d3b9; color: #25482d; font-weight: 700; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a, .tabs button { border: 0; background: none; padding: 10px 14px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; white-space: nowrap; }
.tabs .active { color: var(--ink); font-weight: 700; border-bottom-color: var(--green); }

/* ── Cards grid + card art ──────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; }
.grid.dense { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.card-button { padding: 0; border: 0; text-align: left; background: none; min-width: 0; width: 100%; display: block; color: inherit; text-decoration: none; }
.card-button:hover .card-art { transform: translateY(-5px) rotate(-1deg); box-shadow: 0 12px 25px #15291d29; }
.card-art { aspect-ratio: 2/3; background: #233930; border: 6px solid var(--gold); box-shadow: var(--shadow); position: relative; border-radius: 9px; overflow: hidden; transition: transform .2s, box-shadow .2s; container-type: inline-size; }
.card-art.silver { border-color: var(--silver); } .card-art.green { border-color: var(--greenb); } .card-art.blue { border-color: var(--blue); } .card-art.gold { border-color: var(--gold); }
.card-art.sm { border-width: 3px; border-radius: 5px; box-shadow: none; }
.card-art.missing { filter: grayscale(1) brightness(.75); opacity: .75; }
.card-art.missing:after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 8px, #ffffff10 8px 16px); }
.card-photo { position: absolute; inset: 0; background-image: var(--art); background-size: 300% 100%; background-position: 0 50%; background-repeat: no-repeat; }
.card-photo.pos1 { background-position: 50% 50%; } .card-photo.pos2 { background-position: 100% 50%; }
.card-photo:after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #071f151a, transparent 38%, #081c18 100%); }
.card-edition { position: absolute; top: 5%; left: 6%; font-size: 6cqw; letter-spacing: .12em; font-weight: bold; color: #fff; }
.card-rating { position: absolute; top: 12%; left: 6%; color: #fff; font-size: 19cqw; line-height: 1; font-weight: 700; }
.card-role { position: absolute; top: 33%; left: 6.5%; color: #fff; font-size: 5.5cqw; letter-spacing: .05em; }
.card-bottom { position: absolute; bottom: 6%; left: 6%; right: 6%; color: #fff; }
.card-bottom .card-name { font-size: 12cqw; font-weight: 800; letter-spacing: -.02em; line-height: 1.05; text-transform: uppercase; display: block; }
.card-bottom small { font-size: 5.5cqw; letter-spacing: .1em; color: #dbdbc4; display: block; margin-top: 3%; }
.card-bottom .card-score { border-top: 1px solid #ffffff50; margin-top: 5%; padding-top: 4%; font-size: 5.5cqw; display: flex; justify-content: space-between; }
.card-info { display: flex; justify-content: space-between; align-items: flex-start; gap: 5px; margin-top: 11px; }
.card-info strong { font-size: 14px; display: block; }
.card-info small { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
.card-price { font-size: 14px; white-space: nowrap; font-weight: 700; }
.card-tags { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 2px 7px; background: #e6ece2; border-radius: 4px; color: #50624f; white-space: nowrap; }
.tag.rare { background: #eee5cd; color: #796022; } .tag.legend { background: #efd9a8; color: #5a4200; } .tag.blue { background: #dde9f3; color: #2c4c66; }
.tag.ok { background: var(--ok-bg); color: var(--ok); } .tag.warn { background: var(--warn-bg); color: var(--warn); } .tag.danger { background: var(--danger-bg); color: var(--danger); }
.tag.lime { background: var(--lime); color: #183125; }
.tag.premium { background: #1b3a2c; color: var(--lime); }
.card-qty { position: absolute; top: -8px; right: -8px; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 12px; border: 2px solid #fff; z-index: 2; }
.card-wrap { position: relative; }
.mini-card { width: 40px; height: 54px; border-radius: 4px; background: #e8edde; border: 1px dashed #b8c5ae; display: grid; place-items: center; color: #718567; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.card-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #ecf0e8; }
.card-row:first-child { border-top: 0; padding-top: 0; }
.card-row .thumb { width: 44px; flex-shrink: 0; }
.card-row strong { display: block; font-size: 13px; }
.card-row small { font-size: 12px; color: var(--muted); }
.card-row .go { margin-left: auto; border: 0; background: #f0f4ea; width: 28px; height: 28px; border-radius: 50%; font-size: 17px; display: grid; place-items: center; text-decoration: none; color: var(--ink); }
.thumb .card-art { border-width: 2px; border-radius: 4px; box-shadow: none; }
.thumb .card-edition, .thumb .card-role, .thumb .card-bottom small, .thumb .card-score { display: none; }

/* ── Empty & loading ────────────────────────────────────────────────── */
.empty { padding: 48px 20px; border: 1px dashed #cad7c4; border-radius: 10px; grid-column: 1/-1; text-align: center; background: #fbfcf9; }
.empty h3 { margin-bottom: 6px; }
.empty p { font-size: 14px; color: var(--muted); }
.empty .btn { margin-top: 16px; }
.loading { padding: 40px; text-align: center; color: var(--muted); font-size: 14px; }
.skeleton { background: linear-gradient(90deg, #eef1ea 25%, #f6f8f3 50%, #eef1ea 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; min-height: 18px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border: 2px solid #ffffff60; border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.btn.secondary .spinner, .spinner.dark { border-color: #c9d3c9; border-top-color: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ──────────────────────────────────────────────────────────── */
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"], input[type="url"], input[type="tel"], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: #fff; border-radius: 7px; font-size: 14px; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--lime-dark); outline: none; box-shadow: 0 0 0 3px #cef47866; }
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23697570' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 34px; }
.tools select { width: auto; max-width: 200px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-size: 13px; font-weight: 700; }
.field .hint { font-size: 12px; color: var(--muted); }
.field .error { font-size: 12px; color: var(--danger); }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
.field.inline input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green); margin: 0; }
.field.inline label { font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1/-1; }
.form-error { background: var(--danger-bg); color: var(--danger); padding: 10px 14px; border-radius: 7px; font-size: 13px; margin-bottom: 14px; }
.form-ok { background: var(--ok-bg); color: var(--ok); padding: 10px 14px; border-radius: 7px; font-size: 13px; margin-bottom: 14px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #fff; }
.qty button { border: 0; background: #f4f7f1; width: 32px; height: 34px; font-size: 18px; }
.qty button:hover { background: #e8eee2; }
.qty span { min-width: 36px; text-align: center; font-weight: 700; }
.radio-cards { display: grid; gap: 8px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; background: #fff; }
.radio-card:has(input:checked) { border-color: var(--green); background: #f4f8f0; }
.radio-card input { margin-top: 3px; accent-color: var(--green); }
.color-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.color-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.color-dot.active { border-color: var(--green); box-shadow: 0 0 0 2px #fff inset; }

/* ── Tables ─────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef0ea; vertical-align: middle; }
.table th { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 700; background: #f8faf6; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fafcf8; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { white-space: nowrap; text-align: right; }

/* ── Dialogs ────────────────────────────────────────────────────────── */
dialog { border: 0; border-radius: 16px; padding: 26px; width: min(540px, calc(100% - 32px)); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; }
dialog.wide { width: min(820px, calc(100% - 32px)); }
dialog::backdrop { background: #0c251bbb; backdrop-filter: blur(4px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 20px; }
.dialog-head h2 { font-size: 20px; }
.close { border: 1px solid var(--line); border-radius: 50%; width: 32px; height: 32px; background: #fff; font-size: 20px; flex-shrink: 0; line-height: 1; }
.dialog-footer { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.dialog-footer .btn { flex: 1; }
.modal-note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.detail-grid { display: grid; grid-template-columns: 180px 1fr; gap: 22px; align-items: center; }
.details dl { font-size: 13px; margin: 0; }
.details dt { color: var(--muted); margin-top: 10px; }
.details dd { margin: 0; font-weight: 700; }
.scan-area { aspect-ratio: 1.4; background: #1a3329; border-radius: 10px; margin: 14px 0; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.scan-area video, .scan-area img, .scan-area canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { border: 2px dashed #c9ef8c; border-radius: 9px; width: 34%; aspect-ratio: 2/3; display: grid; place-items: center; color: #b8d38e; z-index: 2; }
.scan-frame svg { width: 36px; height: 36px; }

/* ── Toast ──────────────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); padding: 13px 20px; border-radius: 9px; background: #19392d; color: #fff; box-shadow: 0 8px 30px #0003; font-size: 14px; z-index: 100; max-width: calc(100% - 30px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.error { background: var(--danger); }

/* ── Misc components ────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 12px; background: #e6ece2; color: #50624f; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.danger { background: var(--danger-bg); color: var(--danger); } .badge.info { background: #dde9f3; color: #2c4c66; } .badge.premium { background: #1b3a2c; color: var(--lime); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; font-weight: 600; font-size: 14px; }
.user-chip small { color: var(--muted); font-weight: 400; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pagination button { border: 1px solid var(--line); background: #fff; padding: 6px 12px; border-radius: 6px; font-size: 13px; }
.pagination button.active { background: var(--green); color: #fff; border-color: var(--green); }
.pagination button:disabled { opacity: .5; cursor: default; }
.notif-list { display: flex; flex-direction: column; }
.notif { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid #ecf0e8; text-decoration: none; color: inherit; align-items: flex-start; }
.notif:first-child { border-top: 0; }
.notif.unread strong { color: var(--green); }
.notif .n-icon { width: 34px; height: 34px; border-radius: 8px; background: #eef3e8; display: grid; place-items: center; color: #3c5c37; flex-shrink: 0; }
.notif.unread .n-icon { background: var(--lime); color: #183125; }
.notif strong { display: block; font-size: 14px; }
.notif small { color: var(--muted); font-size: 12px; }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; padding: 4px; }
.bubble { max-width: 80%; padding: 9px 13px; border-radius: 12px; background: #eef3e8; font-size: 14px; }
.bubble.mine { align-self: flex-end; background: var(--green); color: #fff; }
.bubble small { display: block; font-size: 11px; opacity: .7; margin-top: 3px; }
.sparkline { width: 100%; height: 70px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 14px 16px; }
.kpi .v { font-size: 24px; font-weight: 700; letter-spacing: -.8px; }
.kpi .l { font-size: 12px; color: var(--muted); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.price-big { font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.premium-hero { background: linear-gradient(135deg, #162e27, #224d3c); color: #fff; border-radius: 14px; padding: 32px; position: relative; overflow: hidden; }
.premium-hero h2 { color: #fff; font-size: 28px; letter-spacing: -1px; }
.premium-hero .lime { color: var(--lime); }
.premium-hero ul { padding-left: 18px; color: #d7e2d3; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check-list li:before { content: '✓'; color: var(--lime-dark); font-weight: 700; }
.dropzone { border: 2px dashed #b8c5ae; border-radius: 10px; padding: 24px; text-align: center; color: var(--muted); font-size: 13px; background: #fbfcf9; cursor: pointer; }
.dropzone.over { border-color: var(--lime-dark); background: #f1f7e8; }
.cart-line { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #ecf0e8; }
.cart-line:first-child { border-top: 0; }
.totals { font-size: 14px; }
.totals div { display: flex; justify-content: space-between; padding: 5px 0; }
.totals .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 16px; }
.step-list { counter-reset: s; display: grid; gap: 12px; }
.step-list li { list-style: none; display: flex; gap: 12px; align-items: flex-start; }
.step-list li:before { counter-increment: s; content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--lime); color: #183125; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; font-size: 13px; }

/* ── Auth pages ─────────────────────────────────────────────────────── */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: var(--side) var(--art) center/cover; position: relative; }
.auth-art:after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #162e2799, #162e27ee); }
.auth-art .brand { position: absolute; top: 32px; left: 36px; z-index: 2; }
.auth-art blockquote { position: absolute; bottom: 40px; left: 36px; right: 36px; z-index: 2; color: #fff; margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.6px; line-height: 1.25; }
.auth-art blockquote small { display: block; font-size: 13px; color: #b6c6b1; font-weight: 400; margin-top: 10px; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-size: 30px; margin-bottom: 6px; }
.auth-box .sub { margin-bottom: 22px; }
.auth-box form { margin-top: 12px; }
.auth-foot { margin-top: 18px; font-size: 14px; color: var(--muted); }
.demo-box { margin-top: 24px; border: 1px dashed #c9d3c9; padding: 12px 14px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.demo-box .btn { margin: 6px 6px 0 0; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (min-width: 1600px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
  .side { width: 200px; padding: 26px 14px; } .shell { margin-left: 200px; } .content { padding: 26px 26px 40px; } .topbar { padding: 0 26px; } .side .brand { font-size: 18px; } .side .brand .mark { width: 28px; height: 31px; }
  .layout, .layout.wide-aside { grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; } .stat { padding: 16px; } .grid { gap: 20px 14px; } .grid.cols-6 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  .layout, .layout.wide-aside { grid-template-columns: 1fr; } .aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .aside.single { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr 1fr; } .auth-shell { grid-template-columns: 1fr; } .auth-art { display: none; }
}
@media (max-width: 700px) {
  .side { position: sticky; top: 0; inset: auto; width: 100%; height: auto; padding: 12px 16px; display: block; overflow: visible; }
  .brand { font-size: 22px; } .brand .mark { height: 28px; width: 26px; border-radius: 5px; } .brand .mark svg { width: 17px; height: 17px; }
  .side .nav-caption, .side-note, .profile, .nav .secondary-nav { display: none; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--side); flex-direction: row; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 50; box-shadow: 0 -4px 20px #0003; }
  .nav a { flex-direction: column; gap: 3px; padding: 7px 6px; font-size: 10px; flex: 1; border-radius: 6px; text-align: center; }
  .nav a.mobile-hide { display: none; } .nav .count { display: none; } .nav svg { width: 20px; height: 20px; }
  .shell { margin: 0; } .topbar { height: 52px; padding: 0 16px; position: static; } .breadcrumb { font-size: 12px; }
  .content { padding: 20px 16px 100px; } .heading { align-items: flex-start; gap: 10px; } h1 { font-size: 29px; }
  .stats { grid-template-columns: repeat(2, 1fr); } .stat { padding: 14px 16px; } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat-value { font-size: 24px; } .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; } .grid.cols-4, .grid.cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aside { grid-template-columns: 1fr; } .two-col, .three-col { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 130px 1fr; gap: 16px; } .toast { bottom: 84px; } dialog { padding: 20px; } .dialog-footer .btn { flex-basis: 100%; }
  .announcement { padding: 8px 16px; font-size: 13px; } .footer-note { flex-direction: column; gap: 6px; }
}
@media print { .side, .topbar, .btn, .toast { display: none !important; } .shell { margin: 0; } }
