/* WineTracker — warm editorial / sommelier-magazine theme.
   Cream paper, Newsreader serif, Hanken Grotesk UI, IBM Plex Mono metadata.
   Light + dark ("Keller") modes, four accents. Ported from the design handoff. */

:root {
    --bg: #ece2d2;
    --surface: #faf4e9;
    --surface-alt: #f3ead9;
    --sunk: #e3d8c5;
    --sidebar: #f3ead9;
    --ink: #241c16;
    --ink-soft: #6f6051;
    --ink-faint: #a99c89;
    --line: rgba(36, 28, 22, 0.10);
    --line-strong: rgba(36, 28, 22, 0.18);
    --gold: #9a6f1e;
    --accent: #6d1a2b;
    --on-accent: #faf4e9;
    --accent-shadow: rgba(109, 26, 43, 0.24);
    --danger: #a8413a;

    --serif: "Newsreader", Georgia, serif;
    --sans: "Hanken Grotesk", -apple-system, system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, monospace;

    color-scheme: light;
}

[data-font="cormorant"] { --serif: "Cormorant Garamond", Georgia, serif; }
[data-font="spectral"]  { --serif: "Spectral", Georgia, serif; }

/* ── Accents (light) ── */
[data-accent="gold"]   { --accent: #9c7613; --accent-shadow: rgba(156, 118, 19, 0.24); }
[data-accent="forest"] { --accent: #37523f; --accent-shadow: rgba(55, 82, 63, 0.24); }
[data-accent="plum"]   { --accent: #503152; --accent-shadow: rgba(80, 49, 82, 0.24); }

/* ── Dark "Keller" mode ── */
[data-mode="dark"] {
    --bg: #15110f;
    --surface: #1f1916;
    --surface-alt: #272019;
    --sunk: #100c0a;
    --sidebar: #1a1512;
    --ink: #f2e8d8;
    --ink-soft: rgba(242, 232, 216, 0.62);
    --ink-faint: rgba(242, 232, 216, 0.34);
    --line: rgba(242, 232, 216, 0.12);
    --line-strong: rgba(242, 232, 216, 0.20);
    --gold: #c9a24a;
    --accent: #b03650;
    --on-accent: #15110f;
    --accent-shadow: transparent;
    --danger: #d98a8a;

    color-scheme: dark;
}
[data-mode="dark"][data-accent="gold"]   { --accent: #d8b44e; }
[data-mode="dark"][data-accent="forest"] { --accent: #5e8466; }
[data-mode="dark"][data-accent="plum"]   { --accent: #9166a0; }

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; overflow-x: hidden; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }
input::placeholder, textarea::placeholder { color: var(--ink-faint); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Shell: sidebar + main ─────────────────────────────────────────────── */
.wt-shell { display: flex; min-height: 100vh; }

.wt-sidebar {
    width: 264px;
    flex-shrink: 0;
    align-self: flex-start;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--sidebar);
    border-right: 1px solid var(--line);
}

.wt-brand { display: flex; align-items: center; gap: 12px; padding: 26px 22px 22px; }
.wt-brand__mark {
    width: 38px; height: 38px; border-radius: 11px; background: var(--accent);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    color: var(--on-accent); box-shadow: 0 2px 8px var(--accent-shadow);
}
.wt-brand__name { display: block; font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -0.3px; line-height: 1; }
.wt-brand__sub { display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: 2.5px; color: var(--ink-faint); margin-top: 3px; }

.wt-scanbtn {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    margin: 0 12px 10px; padding: 13px 16px; border-radius: 12px; cursor: pointer;
    background: var(--accent); border: none; color: var(--on-accent);
    font-family: var(--sans); font-size: 14.5px; font-weight: 700;
    box-shadow: 0 3px 12px var(--accent-shadow);
}

.wt-nav { flex: 1; padding-top: 6px; }
.wt-nav__label { font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; color: var(--ink-faint); padding: 8px 26px 6px; }
.wt-nav-item {
    display: flex; align-items: center; gap: 13px; width: calc(100% - 24px);
    text-align: left; cursor: pointer; padding: 11px 14px; margin: 2px 12px;
    border-radius: 12px; background: transparent; border: 1px solid transparent;
    color: var(--ink-soft); transition: all .14s;
}
.wt-nav-item:hover { background: var(--surface); color: var(--ink); }
.wt-nav-item.active {
    background: var(--surface); border-color: var(--line); color: var(--accent);
    box-shadow: 0 1px 2px rgba(36, 28, 22, 0.05);
}
.wt-nav-item__name { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.wt-nav-item.active .wt-nav-item__name { font-weight: 700; }
.wt-nav-item__sub { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.4px; color: var(--ink-faint); margin-top: 2px; text-transform: uppercase; }

.wt-user {
    display: flex; align-items: center; gap: 11px; margin: 0 12px 12px; padding: 12px 14px;
    border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
    cursor: pointer; text-align: left; width: calc(100% - 24px);
}
.wt-user__avatar {
    width: 36px; height: 36px; border-radius: 50%; background: var(--accent); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--on-accent);
}
.wt-user__name { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-user__mail { font-family: var(--mono); font-size: 9.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-user form { margin: 0; }
.wt-user__logout { background: transparent; border: none; color: var(--ink-faint); cursor: pointer; padding: 4px; display: flex; }

.wt-main { flex: 1; min-width: 0; }
.wt-page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 40px 52px 72px; }

/* ── Page head ─────────────────────────────────────────────────────────── */
.wt-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }
.wt-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; color: var(--accent); font-weight: 600; text-transform: uppercase; }
.wt-title { font-family: var(--serif); font-size: 46px; font-weight: 600; margin: 6px 0 0; letter-spacing: -0.8px; line-height: 1; white-space: nowrap; }
.wt-sub { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-soft); margin: 8px 0 0; }
.wt-head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.wt-btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 11px 18px; border-radius: 11px; font-family: var(--sans);
    font-size: 14px; font-weight: 600; transition: all .14s; white-space: nowrap;
    background: var(--surface); color: var(--ink); border: 1px solid var(--line);
    min-height: 0;
}
.wt-btn:hover { background: var(--surface-alt); }
.wt-btn.primary {
    background: var(--accent); color: var(--on-accent); border-color: var(--accent);
    box-shadow: 0 2px 10px var(--accent-shadow);
}
.wt-btn.primary:hover { background: var(--accent); filter: brightness(1.05); }
.wt-btn.ghost { background: transparent; border-color: var(--line); }
.wt-btn.danger { color: var(--danger); border-color: var(--line); background: transparent; }
.wt-btn svg { display: block; flex-shrink: 0; }

/* ── Mono / dot / status helpers ───────────────────────────────────────── */
.wt-mono { font-family: var(--mono); }
.wt-statustag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.5px; text-transform: uppercase; font-weight: 600; }
.wt-statustag .wt-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── Stats band ────────────────────────────────────────────────────────── */
.wt-statsband {
    display: flex; background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; overflow: hidden; margin-bottom: 22px;
    box-shadow: 0 1px 2px rgba(36, 28, 22, 0.04);
}
.wt-stat { flex: 1; min-width: 0; padding: 20px 22px; border-right: 1px solid var(--line); }
.wt-stat:last-child { border-right: none; }
.wt-stat__big { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; white-space: nowrap; }
.wt-stat__small { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.8px; color: var(--ink-faint); text-transform: uppercase; margin-top: 6px; }

/* ── Filter bar ────────────────────────────────────────────────────────── */
.wt-filterbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.wt-search {
    display: flex; align-items: center; gap: 10px; background: var(--surface);
    border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; flex: 1; min-width: 240px;
}
.wt-search input { flex: 1; border: none; outline: none; background: transparent; font-family: var(--sans); font-size: 15px; color: var(--ink); min-height: 0; padding: 0; }
.wt-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.wt-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px;
    cursor: pointer; white-space: nowrap; font-family: var(--sans); font-size: 13px; font-weight: 500;
    color: var(--ink); background: var(--surface); border: 1px solid var(--line); transition: all .14s;
}
.wt-chip .wt-dot { width: 7px; height: 7px; border-radius: 50%; }
.wt-chip.active { color: var(--on-accent); background: var(--ink); border-color: var(--ink); font-weight: 600; }
.wt-viewtoggle { display: flex; gap: 3px; background: var(--surface-alt); border-radius: 11px; padding: 3px; margin-left: auto; }
.wt-viewtoggle a {
    width: 38px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
    color: var(--ink-faint); cursor: pointer;
}
.wt-viewtoggle a.active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

/* ── Editorial catalogue table ─────────────────────────────────────────── */
:root { --wt-cols: minmax(0, 2.5fr) 1.2fr 0.7fr 1.2fr 0.8fr 0.7fr 0.95fr; }
.wt-catalogue { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(36, 28, 22, 0.04); }
.wt-cat-head { display: grid; grid-template-columns: var(--wt-cols); gap: 16px; padding: 13px 22px; border-bottom: 1px solid var(--line); background: var(--surface-alt); }
.wt-cat-head span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.9px; color: var(--ink-faint); text-transform: uppercase; }
.wt-cat-row {
    display: grid; grid-template-columns: var(--wt-cols); align-items: center; gap: 16px;
    width: 100%; text-align: left; cursor: pointer; padding: 17px 22px; border: none;
    border-bottom: 1px solid var(--line); background: transparent; transition: background .14s; color: var(--ink);
}
.wt-cat-row:last-child { border-bottom: none; }
.wt-cat-row:hover { background: var(--surface-alt); }
.wt-cat-row__name { display: flex; gap: 13px; align-items: center; min-width: 0; }
.wt-cat-row__spine { width: 4px; align-self: stretch; min-height: 34px; border-radius: 4px; flex-shrink: 0; }
.wt-cat-row__title { font-family: var(--serif); font-size: 18px; font-weight: 500; line-height: 1.18; }
.wt-cat-row__producer { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--ink-soft); margin-top: 1px; }
.wt-cat-row__region { font-family: var(--sans); font-size: 13.5px; }
.wt-cat-row__vintage { font-family: var(--serif); font-size: 17px; }
.wt-cat-row__rating { font-family: var(--mono); font-size: 13px; }
.wt-cat-row__rating b { font-size: 14px; }
.wt-cat-row__rating span { color: var(--ink-faint); }
.wt-cat-row__qty { display: flex; align-items: baseline; gap: 3px; }
.wt-cat-row__qty b { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.wt-cat-row__value { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--sans); font-size: 13.5px; }
.wt-cat-empty { padding: 70px 30px; text-align: center; color: var(--ink-faint); font-family: var(--serif); font-style: italic; font-size: 19px; }
.wt-count { margin-top: 16px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.5px; color: var(--ink-faint); text-align: right; }

/* ── Label art tile ────────────────────────────────────────────────────── */
.wt-labelart {
    border-radius: 4px; position: relative; overflow: hidden; flex-shrink: 0;
    background: #fbf7ee; box-shadow: 0 1px 2px rgba(36, 28, 22, 0.12); border: 1px solid rgba(36, 28, 22, 0.1);
}
[data-mode="dark"] .wt-labelart { background: #efe7d6; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); }
.wt-labelart__spine { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; }
.wt-labelart__lines { position: absolute; inset: 0; opacity: 0.5; background-image: repeating-linear-gradient(0deg, transparent 0 5px, rgba(36, 28, 22, 0.04) 5px 6px); }
.wt-labelart__inner { position: relative; padding: 9px 9px 8px 13px; height: 100%; display: flex; flex-direction: column; justify-content: space-between; color: #241c16; }
.wt-labelart--big .wt-labelart__inner { padding: 14px 14px 12px 16px; }
.wt-labelart__top { display: flex; justify-content: space-between; align-items: flex-start; }
.wt-labelart__code { font-family: var(--mono); font-size: 8.5px; letter-spacing: 1px; font-weight: 600; }
.wt-labelart--big .wt-labelart__code { font-size: 10px; }
.wt-labelart__country { font-family: "Newsreader", serif; font-style: italic; font-size: 10px; color: #6f6051; }
.wt-labelart--big .wt-labelart__country { font-size: 13px; }
.wt-labelart__producer { font-family: "Newsreader", serif; font-weight: 500; font-size: 13px; line-height: 1.1; color: #241c16; }
.wt-labelart--big .wt-labelart__producer { font-size: 19px; }
.wt-labelart__meta { font-family: var(--mono); font-size: 8.5px; letter-spacing: 1.5px; color: #6f6051; margin-top: 2px; }
.wt-labelart--big .wt-labelart__meta { font-size: 11px; margin-top: 4px; }
.wt-labelart__bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.wt-labelart__size { font-family: "Newsreader", serif; font-size: 10px; font-style: italic; color: #241c16; }
.wt-labelart--big .wt-labelart__size { font-size: 14px; }
.wt-labelart__alc { width: 18px; height: 18px; border-radius: 50%; border: 1px solid; display: flex; align-items: center; justify-content: center; font-family: "Newsreader", serif; font-size: 8px; }
.wt-labelart--big .wt-labelart__alc { width: 26px; height: 26px; font-size: 11px; }

/* ── Drink-window meter ────────────────────────────────────────────────── */
.wt-meter { width: 100%; }
.wt-meter__track { position: relative; margin-bottom: 6px; }
.wt-meter__rail { position: absolute; top: 50%; transform: translateY(-50%); left: 0; right: 0; height: 3px; border-radius: 3px; background: var(--line); }
.wt-meter__band { position: absolute; top: 50%; transform: translateY(-50%); height: 6px; border-radius: 6px; opacity: 0.85; }
.wt-meter__now { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.wt-meter__nowline { width: 2px; height: 100%; background: var(--ink); }
.wt-meter__nowdot { position: absolute; top: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); }
.wt-meter__scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); letter-spacing: 0.3px; }

/* ── Gallery cards ─────────────────────────────────────────────────────── */
.wt-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 16px; }
.wt-gcard {
    display: flex; flex-direction: column; text-align: left; cursor: pointer; gap: 12px; padding: 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 1px 2px rgba(36, 28, 22, 0.05); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; color: var(--ink);
}
.wt-gcard:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 12px 28px rgba(36, 28, 22, 0.14); }
.wt-gcard__body { padding: 0 3px 3px; }
.wt-gcard__title { font-family: var(--serif); font-size: 16.5px; font-weight: 500; line-height: 1.16; min-height: 38px; }
.wt-gcard__producer { font-family: var(--serif); font-style: italic; font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }
.wt-gcard__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }

/* ── Storage cards ─────────────────────────────────────────────────────── */
.wt-cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; }
.wt-storage {
    text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--line);
    border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 18px; color: var(--ink);
    box-shadow: 0 1px 2px rgba(36, 28, 22, 0.05); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.wt-storage:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 12px 28px rgba(36, 28, 22, 0.13); }
.wt-storage__head { display: flex; align-items: center; gap: 16px; }
.wt-storage__icon { width: 52px; height: 52px; border-radius: 14px; background: var(--surface-alt); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.wt-storage__name { font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1.12; }
.wt-storage__count { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; text-align: right; }
.wt-storage__ribbon { display: flex; height: 7px; border-radius: 7px; overflow: hidden; background: var(--surface-alt); }
.wt-storage__foot { display: flex; justify-content: space-between; align-items: center; padding-top: 4px; }
.wt-storage__view { display: inline-flex; align-items: center; gap: 4px; font-family: var(--sans); font-size: 13px; color: var(--accent); font-weight: 600; }
.wt-addcard {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 200px;
    border-radius: 18px; cursor: pointer; background: transparent; border: 1.5px dashed var(--line-strong);
    color: var(--ink-soft); font-family: var(--sans); font-size: 15px; font-weight: 600;
}

/* ── Generic panel + sticky bar ────────────────────────────────────────── */
.wt-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.wt-bar {
    position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
    padding: 14px 52px; background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.wt-back { display: inline-flex; align-items: center; gap: 6px; border: none; background: transparent; cursor: pointer; color: var(--ink); font-family: var(--sans); font-size: 14.5px; font-weight: 600; padding: 4px; }

/* ── Detail two-column ─────────────────────────────────────────────────── */
.wt-2col { display: grid; gap: 48px; align-items: start; }
.wt-2col.rail-left { grid-template-columns: 340px minmax(0, 1fr); }
.wt-2col.rail-right { grid-template-columns: minmax(0, 1fr) 360px; }
.wt-sticky { position: sticky; top: 96px; }
.wt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); column-gap: 8px; }
.wt-fact__big { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; white-space: nowrap; }
.wt-fact__small { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.8px; color: var(--ink-faint); text-transform: uppercase; margin-top: 6px; }
.wt-metapair { padding: 12px 0; border-bottom: 1px solid var(--line); }
.wt-metapair__k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.8px; color: var(--ink-faint); text-transform: uppercase; margin-bottom: 4px; }
.wt-metapair__v { font-family: var(--serif); font-size: 16.5px; line-height: 1.2; }
.wt-detail-eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.wt-detail-title { font-family: var(--serif); font-size: 44px; font-weight: 600; margin: 0; line-height: 1.04; letter-spacing: -0.6px; }
.wt-detail-producer { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink-soft); margin-top: 6px; }
.wt-qtystepper { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.wt-qtybtn {
    width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center;
    background: var(--surface-alt); color: var(--ink); border: 1px solid var(--line); min-height: 0;
}
.wt-qtybtn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.wt-qtybtn:disabled { opacity: 0.4; cursor: default; }
.wt-qtystepper form { margin: 0; }
.wt-qtynum { font-family: var(--serif); font-size: 38px; font-weight: 600; line-height: 1; text-align: center; }
.wt-qtynum small { display: block; font-family: var(--mono); font-size: 9px; color: var(--ink-faint); letter-spacing: 0.5px; margin-top: 2px; font-weight: 400; }
.wt-section-label { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; color: var(--ink-soft); }
.wt-notes-body { font-family: var(--serif); font-size: 19px; line-height: 1.55; margin: 8px 0 0; max-width: 640px; }
.wt-usernote { background: var(--surface-alt); border-radius: 14px; padding: 16px 20px; border-left: 3px solid var(--accent); max-width: 640px; }
.wt-usernote p { font-family: var(--serif); font-style: italic; font-size: 17.5px; line-height: 1.5; color: var(--ink); margin: 7px 0 0; }

.wt-move summary { list-style: none; }
.wt-move summary::-webkit-details-marker { display: none; }
.wt-move summary { cursor: pointer; }
.wt-move[open] summary { background: var(--surface-alt); }

/* ── Forms (editorial) ─────────────────────────────────────────────────── */
.wt-form { display: grid; gap: 18px; }
.wt-form .wt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wt-form label { display: grid; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.wt-form input, .wt-form select, .wt-form textarea {
    min-height: 44px; min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px;
    color: var(--ink); background: var(--surface); font-family: var(--sans); font-size: 15px; font-weight: 400;
    text-transform: none; letter-spacing: 0;
}
.wt-form label.wt-check { display: flex; flex-direction: row; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); font-weight: 500; }
.wt-form label.wt-check input { width: auto; min-height: 0; }
.wt-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.wt-form input:focus, .wt-form select:focus, .wt-form textarea:focus { outline: none; border-color: var(--accent); }
.wt-form textarea { min-height: 96px; resize: vertical; }
.wt-form-actions { display: flex; gap: 10px; align-items: center; }

/* ── Auth ──────────────────────────────────────────────────────────────── */
.wt-auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.wt-auth__art {
    background: radial-gradient(120% 90% at 30% 20%, var(--surface), var(--bg));
    display: flex; flex-direction: column; justify-content: center; padding: 64px; border-right: 1px solid var(--line);
}
.wt-auth__art h2 { font-family: var(--serif); font-size: 52px; font-weight: 600; letter-spacing: -1px; line-height: 1.02; margin: 18px 0 0; }
.wt-auth__art p { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ink-soft); margin: 16px 0 0; max-width: 420px; }
.wt-auth__form { display: flex; flex-direction: column; justify-content: center; padding: 64px; max-width: 520px; }
.wt-auth__form h1 { font-family: var(--serif); font-size: 34px; font-weight: 600; margin: 0 0 20px; }
.wt-auth__form .wt-form button { width: 100%; }
.wt-auth__form .wt-altlink { font-family: var(--sans); font-size: 14px; color: var(--ink-soft); margin-top: 20px; }
.wt-auth__form .wt-altlink a { color: var(--accent); font-weight: 600; }

/* ── Account dashboard ─────────────────────────────────────────────────── */
.wt-donut { width: 168px; height: 168px; border-radius: 50%; position: relative; flex-shrink: 0; }
.wt-donut__hole { position: absolute; inset: 45px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wt-donut__num { font-family: var(--serif); font-size: 32px; font-weight: 600; line-height: 1; }
.wt-statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.wt-statcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.wt-statcard__big { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; white-space: nowrap; }
.wt-bar-row { display: flex; align-items: center; gap: 16px; }
.wt-bar-row__label { width: 120px; font-family: var(--serif); font-size: 16px; flex-shrink: 0; }
.wt-bar-row__track { flex: 1; height: 9px; border-radius: 9px; background: var(--surface-alt); overflow: hidden; }
.wt-bar-row__fill { height: 100%; background: var(--accent); border-radius: 9px; }
.wt-bar-row__val { width: 34px; text-align: right; font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); }
.wt-swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); padding: 0; }
.wt-swatch.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.wt-seg { display: flex; gap: 3px; background: var(--surface-alt); border-radius: 11px; padding: 3px; }
.wt-seg button, .wt-seg a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; cursor: pointer; border: none; background: transparent; color: var(--ink-faint); font-family: var(--sans); font-size: 13px; font-weight: 500; min-height: 0; }
.wt-seg button.active, .wt-seg a.active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); font-weight: 700; }

/* ── Confidence bar (scan review) ──────────────────────────────────────── */
.wt-conf { height: 6px; border-radius: 6px; background: var(--sunk); overflow: hidden; margin-top: 7px; }
.wt-conf__fill { height: 100%; border-radius: 6px; background: #3f7d4e; }
.wt-dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 40px 26px;
    border-radius: 16px; border: 1.5px dashed var(--line-strong); background: var(--surface); cursor: pointer; color: var(--ink-soft);
}
.wt-dropzone input[type="file"] { font-family: var(--sans); text-transform: none; font-weight: 400; }

/* ── Plain table (admin) ───────────────────────────────────────────────── */
.wt-table { width: 100%; min-width: 680px; border-collapse: collapse; font-family: var(--sans); font-size: 14px; }
.wt-table th { text-align: left; padding: 13px 18px; background: var(--surface-alt); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink-faint); border-bottom: 1px solid var(--line); }
.wt-table td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.wt-table tr:last-child td { border-bottom: none; }
.wt-table form { margin: 0; }

.wt-error {
    padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--danger); border-radius: 10px;
    color: var(--danger); background: var(--surface); font-family: var(--sans);
}
.wt-error.warn { border-left-color: var(--gold); color: var(--ink); }
.wt-error ul { margin: 8px 0 0; padding-left: 18px; }
.wt-error a { color: var(--accent); font-weight: 600; }

.wt-status-ready { color: #3f7d4e; }
.wt-status-failed { color: var(--danger); }
.wt-status-queued, .wt-status-processing { color: var(--gold); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .wt-2col { grid-template-columns: 1fr !important; gap: 30px; }
    .wt-sticky { position: static !important; }
    .wt-statgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .wt-sidebar { width: 76px; }
    .wt-brand__name, .wt-brand__sub, .wt-nav__label, .wt-nav-item__name, .wt-nav-item__sub, .wt-scanbtn span, .wt-user__meta { display: none; }
    .wt-brand { justify-content: center; padding: 26px 0 22px; }
    .wt-brand__mark { margin: 0 auto; }
    .wt-nav-item { justify-content: center; width: auto; }
    .wt-scanbtn { padding: 13px 0; }
    .wt-user { justify-content: center; width: auto; }
    .wt-user form { display: none; }
    /* keep Wein · Bestand · Wert (cols 1, 6, 7) — the most useful on small screens */
    .wt-cat-head, .wt-cat-row { grid-template-columns: minmax(0, 2fr) 0.5fr 0.8fr; gap: 12px; padding-left: 16px; padding-right: 16px; }
    .wt-cat-head span:nth-child(2), .wt-cat-head span:nth-child(3), .wt-cat-head span:nth-child(4), .wt-cat-head span:nth-child(5),
    .wt-cat-row > *:nth-child(2), .wt-cat-row > *:nth-child(3), .wt-cat-row > *:nth-child(4), .wt-cat-row > *:nth-child(5) { display: none; }
}
@media (max-width: 720px) {
    .wt-page { padding: 28px 22px 60px; }
    .wt-bar { padding-left: 22px; padding-right: 22px; }
    .wt-title { font-size: 36px; white-space: normal; }
    .wt-auth { grid-template-columns: 1fr; }
    .wt-auth__art { display: none; }
    .wt-auth__form { padding: 40px 26px; }
    .wt-statsband { flex-wrap: wrap; }
    .wt-stat { flex-basis: 50%; border-right: 1px solid var(--line); }
    .wt-form .wt-grid { grid-template-columns: 1fr; }
    .wt-statgrid { grid-template-columns: 1fr 1fr; }
    .wt-cardgrid { grid-template-columns: 1fr; }
    .wt-gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .wt-filterbar { gap: 10px; }
    .wt-viewtoggle { margin-left: 0; }
}
