/* Look: warm blush paper, deep burgundy accents, bold rounded sans (Figtree, self-hosted), pill chips. */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url("/static/fonts/figtree-latin.woff2") format("woff2"); }
:root {
  --bg: #fbf1ef;
  --bg-2: #f3e6e1;
  --card: #fffaf8;
  --ink: #2b1a1f;
  --muted: #7d6a6f;
  --line: #e8d9d6;
  --accent: #6e1630;
  --accent-2: #8c2342;
  --accent-ink: #ffffff;
  --accent-soft: #f3e1e3;
  --ok: #2f7d4f;
  --warn: #a8611c;
  --cloth: #ffffff;          /* the "white tablecloth" behind colour swatches */
  --radius: 20px;
  --shadow: 0 1px 2px rgba(80, 30, 40, .05), 0 6px 20px rgba(80, 30, 40, .07);
  --wine: #8A0B1B;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --display: var(--sans);
  --tabbar: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1215;
    --bg-2: #22181c;
    --card: #261b1f;
    --ink: #f4e9ec;
    --muted: #b09ca2;
    --line: #3d2c32;
    --accent: #c9516f;
    --accent-2: #db6a86;
    --accent-ink: #1a0d11;
    --accent-soft: #3e2229;
    --cloth: #f4f1ec;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); min-height: 100vh;
  background: var(--bg);
  font: 16px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.has-tabbar { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
a { color: var(--accent); }
h1, h2, .serif { font-family: var(--display); font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: 1.8rem; line-height: 1.15; margin: .2em 0 .35em; }
h2 { font-size: 1.2rem; margin: 1.4em 0 .5em; }
h3 { font-size: .95rem; font-weight: 650; margin: 1.1em 0 .5em; }
.lead { margin: 0 0 1.1em; color: var(--muted); }
h1 + .lead { margin-top: -.3em; }
.back-link { margin: -4px 0 2px -10px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.inline { display: inline; }
.page { max-width: 640px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 18px 24px; }
.wide { max-width: 1100px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 18px 24px; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon.sm { width: 15px; height: 15px; }

/* top bar: brand + page title area */
.top {
  display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 18px 0;
}
.brand { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--accent); text-decoration: none; }
.brand .icon { width: 26px; height: 26px; }
.top-actions { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--accent-soft); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.head-row h1 { margin-bottom: .3em; }
button.link { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--accent); text-decoration: underline; font: inherit; font-size: .9rem; }

/* bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar nav { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 520px; margin: 0 auto; height: var(--tabbar); align-items: center; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .72rem; }
.tabbar a.on { color: var(--accent); font-weight: 650; }
.tabbar a.on .icon { stroke-width: 2.1; }
.tabbar a.fab { justify-self: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); justify-content: center; box-shadow: 0 6px 16px rgba(110, 22, 48, .35); transform: translateY(-10px); }
.tabbar a.fab .icon { width: 26px; height: 26px; stroke-width: 2.2; }
body.wizard .tabbar { display: none; }

/* segmented tabs (Wijnen / Historiek / Kelder) */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 4px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 8px 2px 10px; text-decoration: none; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--accent); border-color: var(--accent); font-weight: 650; }

/* cards, lists */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; box-shadow: var(--shadow); }
.card > h3:first-child, .card > summary + * h3:first-child { margin-top: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list.card { padding: 2px 18px; }
.list > li { border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.row-link { display: flex; gap: 12px; align-items: center; padding: 12px 2px; text-decoration: none; color: inherit; }
.row-link .grow { flex: 1; min-width: 0; }
.row-link .title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--muted); flex: none; }
.empty { color: var(--muted); padding: 14px 2px; }
.empty-state { text-align: center; padding: 28px 20px; color: var(--muted); }
.empty-state > .icon { width: 40px; height: 40px; color: var(--accent); stroke-width: 1.3; }
.empty-state p { margin: 8px auto 14px; max-width: 280px; }
.empty-state p:last-child { margin-bottom: 0; }
.count { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
.grid2.wide-first { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.tag { display: inline-block; background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 2px 10px; font-size: .8rem; margin: 2px 3px 2px 0; text-decoration: none; }
a.tag.on, .tag.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; border: 1px solid rgba(0,0,0,.15); flex: none; }
.dot-white { background: #ecd982; } .dot-rose { background: #f1a68c; } .dot-red { background: #7d1022; } .dot-orange { background: #c98a3b; }
.stars { color: #b8862a; letter-spacing: 1px; white-space: nowrap; }
.badge { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.badge.ok { background: #e2f2e8; color: var(--ok); } .badge.warn { background: #fbecd9; color: var(--warn); }

/* wine cards (list rows with a photo-like glass tile) */
.wine-card { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 10px 10px; margin: 10px 0; box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.wine-card .grow { flex: 1; min-width: 0; }
.wine-card .name { font-family: var(--display); font-weight: 650; font-size: 1.05rem; line-height: 1.2; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wine-card .where { display: flex; align-items: center; gap: 3px; font-size: .82rem; color: var(--muted); margin: 2px 0 5px; }
.wine-card .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.thumb { flex: none; width: 76px; height: 84px; border-radius: 14px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 15%, #6b4a3c 0%, #3b2620 55%, #24160f 100%); }
.thumb .glass path[stroke], .thumb .glass ellipse { stroke: #e9dcd3; }
.thumb.sm { width: 52px; height: 58px; border-radius: 12px; }

/* hero (home + wine detail) */
.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 22px 20px; margin: 8px 0 18px; color: #fff;
  background: radial-gradient(90% 80% at 85% 20%, rgba(255, 210, 170, .35), transparent 60%),
              linear-gradient(160deg, #8a3b4c 0%, #5a1426 55%, #3a0c18 100%); box-shadow: var(--shadow); }
.hero h1, .hero h2 { color: #fff; margin: 0 0 .25em; }
.hero p { margin: 0 0 16px; opacity: .9; max-width: 62%; }
.hero .glass { position: absolute; right: 10px; bottom: -8px; width: 120px; height: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); }
.hero .glass path[stroke], .hero .glass ellipse { stroke: rgba(255,255,255,.75); }
.hero .btn { background: #fff; color: var(--accent); border-color: #fff; position: relative; }
.hero-wine { position: relative; min-height: 230px; display: grid; place-items: center; padding: max(30px, env(safe-area-inset-top)) 20px 46px; margin: calc(-1 * max(14px, env(safe-area-inset-top))) -18px 0; border-radius: 0 0 28px 28px;
  background: radial-gradient(70% 60% at 50% 35%, rgba(255, 220, 190, .25), transparent 70%), linear-gradient(170deg, #4a3029 0%, #2a1712 100%); }
.hero-wine .back { position: absolute; left: 8px; top: max(10px, env(safe-area-inset-top)); color: #fff; }
.hero-wine .back:hover { background: rgba(255,255,255,.12); }
.hero-wine .glass { filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.hero-wine .glass path[stroke], .hero-wine .glass ellipse { stroke: #eadfd6; }
.sheet-card { position: relative; margin-top: -32px; background: var(--card); border-radius: 26px 26px var(--radius) var(--radius); padding: 20px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.sheet-card h1 { margin: 0 0 .1em; }

/* forms */
label.field { display: block; margin: 12px 0; }
label.field > span, .field > span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; min-height: 46px;
}
input[type=search] { border-radius: 999px; padding-left: 42px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d6a6f' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 15px center / 18px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px;
  padding: 12px 24px; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--accent);
  color: var(--accent-ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 12px rgba(110, 22, 48, .18); transition: transform .1s;
}
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--accent); box-shadow: none; }
.btn.small { min-height: 36px; padding: 6px 14px; font-size: .9rem; box-shadow: none; }
.btn.danger { background: transparent; color: #b3261e; border-color: #b3261e; box-shadow: none; }
.btn.block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.error { background: #fde7e7; color: #8c1d18; padding: 10px 14px; border-radius: 14px; }
details > summary { cursor: pointer; }
details.card > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin: 0 4px 3px; }
details.card[open] > summary::after { transform: rotate(-135deg); margin-bottom: -3px; }
details.card > summary b { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.chips.tight { gap: 6px; }
.chips.tight .chip > span { padding: 8px 11px; }
.chips + label.field { margin-top: 16px; }

/* chips (radio / checkbox) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input, .box input, .swatch input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.chip > span {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; user-select: none; font-size: .92rem; transition: background .15s, color .15s;
}
.chip > input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span, .box input:focus-visible + span, .swatch input:focus-visible + span, .seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* three-box scales */
.scale3 { display: flex; align-items: center; gap: 6px; margin: 6px 0 12px; }
.scale3 .lo, .scale3 .hi { font-size: .82rem; color: var(--muted); flex: 1; }
.scale3 .hi { text-align: right; }
.box > span { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--card); cursor: pointer; color: var(--muted); }
.box input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* colour swatches: shown on a white "tablecloth" in both themes */
.cloth { background: var(--cloth); border-radius: var(--radius); padding: 10px 6px; color: #3a3236; border: 1px solid var(--line); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px; }
.swatches.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.swatches.five .swatch > span { font-size: .74rem; hyphens: auto; overflow-wrap: anywhere; }
.swatches.five .glass { width: 100%; max-width: 48px; height: auto; }
.swatch > span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px 8px; border-radius: 14px; border: 2px solid transparent; cursor: pointer; text-align: center; font-size: .82rem; line-height: 1.2; }
.swatch input:checked + span { border-color: #6e1630; background: #f6eef0; font-weight: 700; }
.glass { display: block; }
.tip { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }

/* palate: five stops on a line, drawn like a slider */
.axis { display: grid; grid-template-columns: 34px 1fr; gap: 0 12px; margin: 6px 0 22px; }
.axis > .icon { width: 30px; height: 30px; color: var(--accent); margin-top: 2px; stroke-width: 1.5; }
.axis .name { font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.seg { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 4px; }
.seg::before { content: ""; position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: var(--line); transform: translateY(-50%); }
.seg > label { position: relative; display: grid; place-items: center; height: 44px; cursor: pointer; }
.seg > label > span { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--line); font-size: 0; transition: all .15s; }
.seg input:checked + span { width: 24px; height: 24px; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.seg-labels { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); padding: 0 2%; }

/* aromas */
.fam { margin: 18px 0; }
.fam h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.fam h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--fam); }
.fam .chip > input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.fam input[type=text] { margin-top: 10px; }
.chip-add { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 999px; border: 1px dashed var(--muted); background: none; color: var(--muted); font: inherit; font-size: .92rem; cursor: pointer; }
[hidden] { display: none !important; }
.aroma-search { position: sticky; top: 0; z-index: 5; padding: 8px 0; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.picked-count { display: block; font-size: .82rem; color: var(--muted); margin: 6px 4px 0; }

/* tasting wizard */
.wizard-top { display: flex; align-items: center; gap: 8px; margin: 0 -8px 4px; }
main { overflow-x: clip; }
.steps { flex: 1; position: relative; display: flex; justify-content: space-between; align-items: center; max-width: 220px; margin: 0 auto; }
.steps::before { content: ""; position: absolute; left: 8px; right: 8px; top: 50%; height: 1.5px; background: var(--line); }
.steps button { position: relative; width: 22px; height: 30px; border: 0; background: none; padding: 0; cursor: pointer; font-size: 0; }
.steps button::before { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--bg); border: 1.5px solid var(--muted); box-sizing: border-box; }
.steps button.done::before { background: var(--accent-soft); border-color: var(--accent); }
.steps button.on::before { width: 15px; height: 15px; background: var(--accent); border-color: var(--accent); }
.wizard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .85rem; color: var(--muted); margin-top: 8px; }
.wizard-head .wine-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#saved { font-size: .8rem; color: var(--ok); min-height: 1.2em; transition: opacity .6s; white-space: nowrap; }
.wizard-nav { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bg) 72%, transparent); padding: 18px 0 max(14px, env(safe-area-inset-bottom)); display: flex; gap: 10px; margin-top: 18px; }
.wizard-nav .btn { flex: 1; }
.wizard-nav .btn.ghost { flex: .8; }
.help, .hint { font-size: .86rem; color: var(--muted); margin: 0 0 10px; }
h2 + .hint, .head-row + .hint { margin-top: -.35em; }
.cloth + .hint { margin-top: 8px; }
details.more { margin: 14px 0; border-top: 1px solid var(--line); }
details.more > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 2px; color: var(--accent); font-weight: 600; font-size: .95rem; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg); transition: transform .2s; margin-right: 6px; }
details.more[open] > summary::after { transform: rotate(-135deg); }
.card details.more:last-child { margin-bottom: 0; }

/* star rating */
.star-pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 2px; }
.star-pick input { position: absolute; opacity: 0; pointer-events: none; }
.star-pick label { font-size: 2.3rem; line-height: 1; padding: 2px 3px; color: var(--line); cursor: pointer; transition: color .12s, transform .12s; }
.star-pick input:checked ~ label { color: #c9962e; }
.star-pick label:active { transform: scale(1.2); }
.star-pick input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 8px; }
.star-pick output { order: -1; margin-left: 12px; font-weight: 600; }
.star-pick output span { display: none; }
.star-pick output span[data-n="0"] { display: inline; font-weight: 400; font-size: .9rem; }
.star-pick:has(input:checked) output span[data-n="0"] { display: none; }
.star-pick input[value="1"]:checked ~ output span[data-n="1"], .star-pick input[value="2"]:checked ~ output span[data-n="2"],
.star-pick input[value="3"]:checked ~ output span[data-n="3"], .star-pick input[value="4"]:checked ~ output span[data-n="4"],
.star-pick input[value="5"]:checked ~ output span[data-n="5"] { display: inline; }

/* tasting result */
.done-badge { display: grid; place-items: center; width: 74px; height: 74px; margin: 6px auto 8px; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 0 0 9px var(--accent-soft); }
.done-badge .icon { width: 34px; height: 34px; stroke-width: 2.6; }
.center { text-align: center; }
.radar { display: block; width: 100%; max-width: 330px; height: auto; margin: 4px auto; overflow: visible; }
.radar .ring { fill: none; stroke: var(--line); }
.radar .ring.outer { fill: var(--accent-soft); fill-opacity: .45; }
.radar .spoke { stroke: var(--line); }
.radar .shape { fill: var(--accent); fill-opacity: .28; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.radar .pt { fill: var(--accent); }
.radar text { fill: var(--ink); font-size: 12.5px; font-family: var(--sans); }
.soft { background: var(--accent-soft); border-color: transparent; box-shadow: none; }

/* profile */
.avatar { display: grid; place-items: center; width: 78px; height: 78px; margin: 8px auto 10px; border-radius: 50%; background: #a8776b; color: #fff; font-family: var(--display); font-weight: 600; font-size: 1.9rem; text-transform: uppercase; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 2px; color: inherit; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.menu-list a > span, .menu-list button > span { flex: 1; }
.seg-pick { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg-pick button { border: 0; background: none; padding: 5px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .85rem; color: var(--muted); }
.seg-pick button.on { background: var(--accent); color: var(--accent-ink); }

/* tables */
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.data th, table.data td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; font-size: .82rem; }

/* filters */
.filters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.filters .full { grid-column: 1 / -1; }
@media (min-width: 700px) { .filters { grid-template-columns: repeat(4, 1fr); } }

/* stats */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.kpi b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.7rem; }
.chart-box { position: relative; height: 260px; }

/* login */
body.splash { --bg: #fbf1ef; --card: #fffaf9; --ink: #2b1a1f; --muted: #7d6a6f; --line: #e8d9d6; --accent: #6e1630; --accent-ink: #fff; color-scheme: light; background: var(--bg); }
body.splash main.login-wrap { max-width: none; padding: 0; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.login { max-width: 420px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 22px 120px; text-align: center; position: relative; z-index: 1; }
.login .logo { width: 62px; height: 62px; color: var(--accent); stroke-width: 1.5; }
.login h1 { font-size: 2.9rem; font-weight: 800; letter-spacing: -.02em; color: var(--accent); margin: 6px 0 8px; }
.login .tagline { color: #5a3a44; font-size: 1.05rem; margin: 0 auto; max-width: 270px; }
.stage { position: relative; height: 236px; margin: 6px 0 -6px; }
.stage .blob { position: absolute; left: 50%; top: 22px; width: 300px; max-width: 90%; transform: translateX(-46%); }
.stage .hero-glass { position: absolute; left: 50%; top: 0; height: 100%; width: auto; transform: translateX(-50%); filter: drop-shadow(0 12px 14px rgba(110, 22, 48, .18)); }
.login form.card { position: relative; text-align: left; padding: 22px 22px 24px; border-radius: 28px; border-color: transparent; box-shadow: 0 10px 40px rgba(110, 22, 48, .12); background: var(--card); }
.login form.card label.field { margin: 0 0 14px; }
.login form.card label.field > span { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 500; color: var(--accent); margin-bottom: 8px; }
.login form.card label.field > span .icon { width: 24px; height: 24px; }
.login form.card input { background: #fff; min-height: 52px; border-radius: 999px; padding: 0 20px; }
.login form.card input::placeholder { color: #a8979c; }
.pw { position: relative; }
.pw input { padding-right: 52px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 50%; }
.login .btn.block { min-height: 54px; margin-top: 4px; font-size: 1.1rem; }
.login .langs { display: flex; justify-content: center; gap: 22px; margin-top: 26px; }
.login .langs form { display: contents; }
.login .langs button { color: var(--muted); font-weight: 600; font-size: 1rem; text-decoration: none; padding: 4px 6px 6px; border-bottom: 2.5px solid transparent; }
.login .langs button.on { color: var(--accent); border-color: var(--accent); }
.wave { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; height: 92px; z-index: 0; pointer-events: none; }
@media (min-height: 900px) { .stage { height: 260px; } }
