/* ── Shared Barly Styles ── */

/* Design tokens. Lifting the palette into :root means a single override block
   (see Phase 5 theming) can re-skin the whole app to match the bar's AI_Theme.
   The defaults below are the original BarlyOwner colours. */
:root {
    /* ── 2026 redesign palette (warm near-black + gold, Hanken Grotesk). ──
       Same token NAMES as before so every page keeps working; only the values
       changed. Per-bar AI_Theme (theme.js) still overrides accent/text/etc. */
    --bg: #0a0a0a;            /* page background */
    --surface: #1c1c1e;       /* cards, inputs, buttons, header chrome */
    --surface-active: #262628;/* pressed surface */
    --border: #2a2a2c;        /* borders + muted fills (kept visible) */
    --border-active: #35353a; /* pressed secondary */
    --text: #e4e2e4;
    --text-muted: #99907c;    /* tan — muted labels */
    --text-dim: #6b6459;
    --accent: #f2ca50;        /* gold primary */
    --accent-active: #d9b649;
    --accent-contrast: #0a0a0a;/* text/icon on top of --accent */
    --success: #22C55E;
    --danger: #EF4444;
    --danger-text: #FF6467;
    --info: #3B82F6;
    --purple: #7C3AED;
    --cyan: #06B6D4;
    --orange: #F97316;

    /* New-design specifics */
    --tan: #99907c;           /* muted uppercase labels */
    --tan-light: #d0c5af;     /* secondary body */
    --coral: #ff9284;         /* alerts */
    --card-border: rgba(255,255,255,0.05); /* faint hairline on big cards */
    --card-radius: 32px;      /* pill-soft cards in the new design */

    /* Layout */
    --content-max: 1200px;    /* centred content column cap on wide screens */
    --nav-h: 56px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }

/* Layout */
.page { display: flex; flex-direction: column; min-height: 100vh; padding: 16px; padding-top: env(safe-area-inset-top, 16px); }
.page-center { align-items: center; justify-content: center; }
.page-scroll { overflow-y: auto; }

/* Header */
.header { display: flex; align-items: center; padding: 8px 0 12px; }
.header-back { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-right: 12px; cursor: pointer; }
.header-title { font-size: 20px; font-weight: 700; flex: 1; }
.header-subtitle { font-size: 13px; color: var(--text-muted); }
.header-action { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }

/* Cards */
.card {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
}
.card + .card { margin-top: 12px; }

/* Action cards (home page) */
.action-card {
    display: flex;
    align-items: center;
    padding: 18px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.action-card:active { background: var(--surface-active); border-color: var(--accent); }
.action-card + .action-card { margin-top: 10px; }
.action-icon {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    font-size: 22px;
    flex-shrink: 0;
}
.action-info { margin-left: 14px; flex: 1; }
.action-title { font-size: 16px; font-weight: 600; }
.action-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.action-arrow { color: var(--text-dim); font-size: 18px; }

/* Sectioned home: 2-column tile grid (vertical layout, fits more in less scroll) */
.home-section + .home-section { margin-top: 18px; }
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    min-height: 116px;
    transition: border-color 0.2s, background 0.2s;
}
.action-tile:active { background: var(--surface-active); border-color: var(--accent); }
.action-tile-icon {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    margin-bottom: 10px;
    /* ── Icon colour system ──────────────────────────────────────────────
       One accent, app-wide. Every line icon is the theme accent stroke on a
       15%-accent tinted chip. Colour is NOT used to distinguish features —
       the label does that — so it reads as a single intentional system and
       re-tints automatically when a bar's AI theme changes --accent. */
    background: color-mix(in srgb, var(--accent) 15%, transparent);
    color: var(--accent);
}
.action-tile-icon svg { width: 24px; height: 24px; display: block; }
.action-tile-title { font-size: 14px; font-weight: 600; line-height: 1.25; }
.action-tile-desc { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.3; }

/* Buttons */
.btn {
    display: block; width: 100%; padding: 14px;
    /* Transparent 1px border keeps every variant the same total height,
       even when btn-danger / btn-success add a coloured border. */
    border: 1px solid transparent; border-radius: 12px;
    font-size: 16px; font-weight: 700;
    cursor: pointer; text-align: center;
}
.btn + .btn { margin-top: 10px; }
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:active { background: var(--accent-active); }
.btn-secondary { background: var(--border); color: var(--text-muted); }
.btn-secondary:active { background: var(--border-active); }

/* Horizontal action-button row inside forms (Save / Cancel pairs).
   Cancels the default ".btn + .btn { margin-top: 10px }" so siblings
   share the same baseline, and gives both buttons equal width. */
.form-actions { display: flex; gap: 10px; align-items: stretch; margin-top: 24px; }
.form-actions .btn + .btn { margin-top: 0; }
.form-actions .btn { flex: 1; }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--danger-text); border: 1px solid rgba(255,100,103,0.3); }
.btn-success { background: rgba(34,197,94,0.15); color: var(--success); border: 1px solid rgba(34,197,94,0.3); }

/* Lists */
.list-item {
    display: flex; align-items: center;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.list-item + .list-item { margin-top: 8px; }
.list-item-img {
    width: 50px; height: 50px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--border);
    flex-shrink: 0;
}
.list-item-info { margin-left: 12px; flex: 1; min-width: 0; }
.list-item-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.list-item-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Section headers */
.section-header { display: flex; align-items: center; padding: 12px 0 8px; }
.section-header-icon { margin-right: 8px; font-size: 18px; display: inline-flex; align-items: center; color: var(--accent); }
.section-header-icon svg { width: 18px; height: 18px; }

/* Shared line-icon glyph (from icons.js). Inherits colour via currentColor. */
.ico { display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }
.header-title .ico { color: var(--accent); margin-right: 8px; vertical-align: -0.12em; }
.btn .ico, button .ico { margin-right: 6px; }
.header-action .ico { vertical-align: middle; }
.section-header-title { font-size: 16px; font-weight: 700; }
.section-header-subtitle { font-size: 12px; color: var(--text-dim); margin-left: auto; }

/* Toggle switch */
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border); border-radius: 12px; transition: background 0.2s;
}
.toggle input:checked + .toggle-track { background: var(--success); }
.toggle-knob {
    position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
    background: white; border-radius: 50%; transition: transform 0.2s;
}
.toggle input:checked ~ .toggle-knob { transform: translateX(20px); }

/* Colors */
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--accent); }
.text-green { color: var(--success); }
.text-red { color: var(--danger-text); }
.text-blue { color: var(--info); }
.text-purple { color: var(--purple); }
.bg-gold { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.bg-green { background: rgba(34,197,94,0.15); }
.bg-blue { background: rgba(59,130,246,0.15); }
.bg-purple { background: rgba(124,58,237,0.15); }
.bg-red { background: rgba(239,68,68,0.15); }
.bg-cyan { background: rgba(6,182,212,0.18); }
.bg-orange { background: rgba(249,115,22,0.18); }

/* Spinner */
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Status bar */
.status-bar { position: fixed; top: 0; left: 0; right: 0; padding: 10px 16px; text-align: center; font-size: 14px; font-weight: 600; z-index: 100; transition: transform 0.3s; transform: translateY(-100%); }
.status-bar.show { transform: translateY(0); }
.status-bar.success { background: var(--success); color: white; }
.status-bar.error { background: var(--danger); color: white; }

/* Utility */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-center { text-align: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ============================================================================
   Top navigation bar — phone: hidden (the home hub + back button drive nav).
   Tablet/desktop: a horizontal bar above the page. Lives in _Layout.cshtml.
   ========================================================================== */
/* Scrollbars — hide HORIZONTAL scrollbars app-wide (scrolling still works);
   vertical scrollbars are left intact. WebKit/Blink can target the horizontal
   bar directly; the .no-scrollbar utility hides a container's bar entirely and
   is applied to the horizontal-only chip rows / nav so Firefox hides them too. */
::-webkit-scrollbar:horizontal { height: 0; display: none; }
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

.appbar, .topnav { display: none; }

/* Opt-in helper: add .cards-grid to a list container to flow its children into
   multiple columns on wide screens (used by the list-heavy pages). It is a
   no-op on phones — children keep their own stacking/margins there. */

/* ============================================================================
   Responsive — phones keep the original single-column layout untouched.
   ========================================================================== */
@media (min-width: 768px) {
    /* Centre the page content in a capped column so text/line-lengths stay
       comfortable on wide screens instead of stretching edge to edge. */
    .page {
        max-width: var(--content-max);
        margin-inline: auto;
        width: 100%;
        padding: 24px 28px;
    }
    /* Centred-form / single-control pages: cap narrower so forms and controls
       don't stretch to an awkward line length on wide screens. */
    .page.page-narrow { max-width: 640px; }

    /* Sticky app bar = a brand strip (Barly logo) above the nav tabs. The top
       padding clears the device status bar / embedding chrome (safe-area inset,
       with an 8px floor) so the nav isn't trapped under it on iPad standalone /
       embedded webviews. Background + border live here; the nav sits inside. */
    .appbar {
        display: block;
        position: sticky;
        top: 0;
        z-index: 60;
        background: color-mix(in srgb, var(--surface, #0F1629) 88%, transparent);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border, #1E2D4A);
        padding-top: max(8px, env(safe-area-inset-top, 0px));
    }
    .appbar-logo { display: flex; align-items: center; padding: 10px 24px 6px; }
    .appbar-logo img { height: 34px; width: auto; display: block; }

    /* Top nav — clean, modern tab bar: text-only links with an accent underline
       indicator for the active page. All theme-driven. */
    .topnav {
        display: flex;
        align-items: stretch;
        height: var(--nav-h);
        padding: 0 24px;
        overflow-x: auto;
        scrollbar-width: none; /* Firefox — hide the nav's scrollbar */
    }
    .topnav::-webkit-scrollbar { display: none; }
    .topnav-links { display: flex; align-items: stretch; gap: 0; }
    .topnav-links a {
        display: inline-flex; align-items: center;
        padding: 0 14px;
        font-size: 14px; font-weight: 500; color: var(--text-muted);
        white-space: nowrap;
        border-bottom: 2px solid transparent;
        transition: color 0.15s, border-color 0.15s;
    }
    .topnav-links a:hover { color: var(--text); }
    .topnav-links a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

    /* Home hub tiles flow to fill the wider column instead of locking to 2. */
    .action-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

    /* List-heavy pages opt into a multi-column card grid. */
    .cards-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 10px;
    }
    .cards-grid > * + * { margin-top: 0; }

    /* Form button rows shouldn't stretch the full wide column. */
    .form-actions { max-width: 520px; }
}

@media (min-width: 1200px) {
    .page { padding: 28px 32px; }
    .action-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   2026 REDESIGN — Dashboard (Home). Mobile-first 390px, centred on desktop.
   Namespaced .nu-* so it can't collide with the legacy page styles that other
   (not-yet-redesigned) pages still use.
   ═════════════════════════════════════════════════════════════════════════ */
.nu-home {
    max-width: 430px;
    margin: 0 auto;
    /* Widened at >=768 — see the responsive block. */
    padding-bottom: 8px;
    min-height: 100vh;
    background: var(--bg);
}
/* Bottom clearance so the last content clears the floating tab bar (shared). */
.nu-tab-space { height: calc(clamp(44px, 12.8vw, 68px) + clamp(8px, 2.1vw, 13px) * 2 + 42px); }

/* ── Hero: 3D device render + floating stat labels, fading into the page ── */
/* ── App header (logo + avatar) ── */
.nu-apphead {
    display: flex; align-items: center; justify-content: space-between;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 24px 0;
    position: relative; z-index: 4;
}
.nu-apphead__logo { height: 30px; width: auto; }
.nu-apphead__avatar {
    width: 38px; height: 38px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface); border: 1px solid rgba(212,175,55,0.6); color: var(--accent);
}

/* ── Hero: bar name + subtitle over the device render ── */
.nu-hero { position: relative; width: 100%; text-align: center; padding-top: 12px; }
.nu-hero__name { font-size: 20px; font-weight: 600; color: var(--accent); position: relative; z-index: 3; }
.nu-hero__sub { font-size: 15px; letter-spacing: 3px; text-transform: uppercase; color: var(--tan); position: relative; z-index: 3; margin-top: 2px; }
.nu-hero__img { display: block; width: 100%; max-width: 390px; margin: -8px auto 0; height: auto; position: relative; z-index: 1; }
.nu-hero__scrim {
    position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background: linear-gradient(to bottom, rgba(10,10,10,0) 60%, rgba(10,10,10,0.5) 82%, var(--bg) 100%);
}

/* ── Shared card ── */
.nu-card {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.nu-card:active { transform: scale(0.98); background: var(--surface-active); }
.nu-card__ico { color: var(--text); display: inline-flex; }
.nu-card__label { font-size: 16px; }
.nu-card__label--gold { color: var(--accent); }

/* ── Primary actions bento grid ── */
/* Columns fit themselves to the space rather than being locked to two at a
   fixed 342px. That width was the 390px design frame minus its 24px gutters,
   so it only ever landed right on a 390 phone — a 430 phone got 44px gutters
   and a desktop got a phone-width strip. A steady 24px gutter and auto-fit
   columns hold the design's proportions at every width. */
.nu-bento, .nu-grid2 {
    display: grid;
    gap: 16px;
    margin: 12px 24px 0; padding: 0;
}
/* Scan and Guest Orders span the row, so the bento stays a 2-up: more columns
   would leave its two half-tiles stranded against a full-width neighbour. */
.nu-bento { grid-template-columns: 1fr 1fr; }
/* A flat pool of equal tiles — let it take as many columns as fit. */
.nu-grid2 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.nu-grid2 { margin-top: 16px; }
.nu-bento__scan {
    grid-column: 1 / -1; height: 128px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    position: relative; overflow: hidden;
    box-shadow: 0 0 40px -10px rgba(212,175,55,0.18);
}
.nu-bento__scan .nu-card__ico {
    width: 40px; height: 40px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(242,202,80,0.1); color: var(--accent);
}
.nu-bento__scan::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
    background: linear-gradient(to right, rgba(242,202,80,0), rgba(242,202,80,0.5), rgba(242,202,80,0));
}

/* ── Tile: icon top-left, title, subtitle (left-aligned) ── */
.nu-tile {
    background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--card-radius);
    color: var(--text); cursor: pointer; padding: 20px; min-height: 155px;
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
    transition: transform 0.15s ease, background 0.2s ease; -webkit-tap-highlight-color: transparent;
}
.nu-tile:active { transform: scale(0.98); background: var(--surface-active); }
.nu-tile__ico {
    width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(242,202,80,0.1); color: var(--accent); margin-bottom: 4px;
}
.nu-tile__title { font-size: 16px; color: var(--text); }
.nu-tile__sub { font-size: 14px; color: var(--tan); line-height: 1.3; }
/* Guest Orders — full-width row with badge */
.nu-tile--row { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; min-height: 0; }
.nu-tile__main { display: flex; align-items: center; gap: 14px; }
.nu-tile__col { display: flex; flex-direction: column; gap: 2px; }
.nu-tile--row .nu-tile__ico { margin-bottom: 0; }
.nu-badge {
    background: rgba(242,202,80,0.1); color: var(--accent);
    border-radius: 9999px; padding: 5px 14px; font-size: 15px; white-space: nowrap;
}

/* ── Settings & Automation list ── */
.nu-settings { margin: 28px 24px 0; }
.nu-settings__title { font-size: 20px; font-weight: 500; color: var(--text); padding: 0 4px 14px; }
.nu-settings__list {
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--card-border);
    border-radius: var(--card-radius); overflow: hidden;
}
.nu-srow {
    display: flex; align-items: center; gap: 16px; padding: 18px 20px;
    color: var(--text); cursor: pointer;
    transition: background 0.15s ease;
}
.nu-srow + .nu-srow { border-top: 1px solid rgba(255,255,255,0.06); }
.nu-srow:active { background: var(--surface-active); }
.nu-srow__ico {
    width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(242,202,80,0.1); color: var(--accent); flex-shrink: 0;
}
.nu-srow__text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nu-srow__title { font-size: 16px; color: var(--text); }
.nu-srow__sub { font-size: 14px; color: var(--tan); }
.nu-srow__chev { color: var(--tan); flex-shrink: 0; }

/* ── Bottom tab bar — floating gold-bordered pill, 5 icons ── */
.nu-tabbar {
    position: fixed; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); left: 50%; transform: translateX(-50%);
    z-index: 50; display: flex; align-items: center;
    /* Scales with the viewport instead of staying a phone-sized pill adrift in
       the middle of a desktop window. 83.7vw reproduces the phone proportions
       exactly (314px on a 375px screen); the cap keeps it sane on a monitor.
       Tabs flex, so the internal ratio holds at every width. */
    width: min(83.7vw, 520px);
    justify-content: space-between;
    gap: clamp(12px, 3.2vw, 20px);
    padding: clamp(8px, 2.1vw, 13px) clamp(12px, 3.2vw, 20px);
    border-radius: 64px;
    background: linear-gradient(180deg, rgba(30,28,24,0.7), rgba(19,19,21,0.6));
    border: 1px solid transparent;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 0 15px 0 rgba(242,202,80,0.2);   /* Figma menu glow */
}
/* Gold border glowing brightest at the centre and fading out toward the
   left/right ends (Figma diamond-gradient look). */
.nu-tabbar::before {
    content: ''; position: absolute; inset: 0; padding: 1px; border-radius: 64px; pointer-events: none;
    background: linear-gradient(to right,
        rgba(212,175,55,0) 0%,
        rgba(212,175,55,0.15) 18%,
        rgba(242,202,80,0.95) 50%,
        rgba(212,175,55,0.15) 82%,
        rgba(212,175,55,0) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
.nu-tab {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 1 1 0; aspect-ratio: 1; max-width: 68px;
    border-radius: 9999px; color: var(--tan-light); cursor: pointer;
}
/* Icons track the tab so a wider bar doesn't leave them stranded and small. */
.nu-tab svg { width: clamp(22px, 40%, 28px); height: auto; }
.nu-tab.is-active {
    color: var(--accent); background: rgba(212,175,55,0.2); border: 1px solid rgba(242,202,80,0.4);
    box-shadow: 0 0 15px 0 rgba(242,202,80,0.3);
}

/* ═══ 2026 REDESIGN — shared inner-page components + Collections ═══════════ */
/* Inner-page top bar: back arrow, title, avatar. Reused across redesigned pages. */
.nu-topbar {
    display: flex; align-items: center; gap: 12px;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 20px 14px;
    max-width: 430px; margin: 0 auto;
}
.nu-topbar__back {
    width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
    color: var(--text); cursor: pointer; flex-shrink: 0;
}
.nu-topbar__title { font-size: 22px; font-weight: 600; color: var(--accent); flex: 1; }
.nu-topbar__title--plain { color: var(--text); }
.nu-topbar__avatar {
    width: 36px; height: 36px; border-radius: 9999px; object-fit: cover;
    background: var(--surface); border: 1px solid var(--card-border); flex-shrink: 0;
}
.nu-topbar__action {
    width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface); border: 1px solid var(--card-border); color: var(--tan); cursor: pointer;
}

/* Page shell for redesigned inner pages */
.nu-page { max-width: 430px; margin: 0 auto; padding: 0 20px 8px; min-height: 100vh; }

/* Search field */
.nu-search {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--card-border); border-radius: 9999px;
    padding: 12px 18px; color: var(--tan);
}
.nu-search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: 15px; font-family: inherit; }
.nu-search input::placeholder { color: var(--tan); }

/* Filter chips (horizontal scroll) */
.nu-chips { display: flex; gap: 10px; overflow-x: auto; margin-top: 16px; padding-bottom: 2px; scrollbar-width: none; }
.nu-chips::-webkit-scrollbar { display: none; }
.nu-chip {
    flex-shrink: 0; padding: 8px 18px; border-radius: 9999px; font-size: 14px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--card-border); color: var(--tan-light); white-space: nowrap;
}
.nu-chip.is-active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); font-weight: 600; }

/* Collections: big inventory card with progress */
.nu-invcard { display: block; margin-top: 20px; padding: 24px; }
.nu-invcard__ico { color: var(--accent); margin-bottom: 12px; }
.nu-invcard__title { font-size: 20px; color: var(--text); }
.nu-invcard__sub { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--tan); margin-top: 4px; }
.nu-progress { margin-top: 20px; display: flex; align-items: center; gap: 12px; }
.nu-progress__track { flex: 1; height: 5px; border-radius: 9999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.nu-progress__fill { height: 100%; border-radius: 9999px; background: linear-gradient(to right, var(--accent-active), var(--accent)); }
.nu-progress__pct { font-size: 13px; color: var(--accent); white-space: nowrap; }

/* Two-up mini cards (Library / Wishlist) */
.nu-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.nu-duo .nu-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; min-height: 92px; }
.nu-duo .nu-card__ico { color: var(--accent); }
.nu-duo__title { font-size: 16px; color: var(--text); }
.nu-duo__sub { font-size: 12px; color: var(--tan); }

/* Wide row card (Liquor Check) */
.nu-rowcard { display: flex; align-items: center; gap: 14px; padding: 18px 20px; margin-top: 16px; }
.nu-rowcard__badge {
    width: 40px; height: 40px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(242,202,80,0.12); color: var(--accent); flex-shrink: 0;
}
.nu-rowcard__body { flex: 1; }
.nu-rowcard__title { font-size: 16px; color: var(--text); }
.nu-rowcard__sub { font-size: 13px; color: var(--tan); margin-top: 2px; }
.nu-rowcard__chev { color: var(--tan); }

/* Curated horizontal lists */
.nu-section-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 14px; }
.nu-section-head h3 { font-size: 18px; font-weight: 500; color: var(--text); }
.nu-section-head a { font-size: 14px; color: var(--accent); cursor: pointer; }
.nu-hscroll { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 4px; }
.nu-hscroll::-webkit-scrollbar { display: none; }
.nu-curated {
    flex-shrink: 0; width: 210px; height: 150px; border-radius: 24px; overflow: hidden; position: relative;
    background: var(--surface); border: 1px solid var(--card-border);
}
.nu-curated img { width: 100%; height: 100%; object-fit: cover; }
.nu-curated__scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0) 60%); }
.nu-curated__cap { position: absolute; left: 16px; bottom: 14px; right: 16px; }
.nu-curated__cap b { display: block; font-size: 16px; color: #fff; font-weight: 600; }
.nu-curated__cap span { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,0.7); }

/* ── Home screen on larger screens ────────────────────────────────────────
   Lives at the end of the file on purpose: the shared responsive block sits
   above .nu-home, so anything overriding it has to come after. The column
   opens up and the tile grid fills it with however many columns fit. */
@media (min-width: 768px) {
    /* 720 keeps the bento's 2-up reading as cards; at 960 they stretched to
       440x155 letterboxes. grid2 fills the same width with four tiles the
       size they are on a phone. */
    .nu-home { max-width: 720px; }
    /* The device render was capped at phone width, leaving the top of a wider
       column mostly empty. */
    .nu-hero__img { max-width: 520px; }
    .nu-bento, .nu-grid2 { margin-left: 32px; margin-right: 32px; gap: 20px; }
    .nu-settings { margin-left: 32px; margin-right: 32px; }
}
