/* =====================================================================
 *  IDEAL Caffè - Gestione Vendite (sales.caffeideal.com)
 *  Theme: Black / Gold / White - design system 2026
 *  Tutto vanilla CSS, mobile-first, nessuna dipendenza esterna.
 * =====================================================================*/

/* ---------- Reset & tokens ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

:root {
    --gold-50:  #fffaf0;
    --gold-100: #f9f1d8;
    --gold-200: #f1e1b1;
    --gold-300: #e6c87a;
    --gold-400: #d4af52;
    --gold-500: #c79a30;
    --gold-600: #a87d22;
    --gold-700: #7a5a18;
    --gold-grad: linear-gradient(135deg, #f1d774 0%, #c79a30 45%, #8a6515 100%);

    --ink-50:  #fafafa;
    --ink-100: #f3f3f5;
    --ink-200: #e6e6ea;
    --ink-300: #c8c8d0;
    --ink-400: #8a8a95;
    --ink-500: #5a5a64;
    --ink-700: #2a2a30;
    --ink-800: #18181c;
    --ink-900: #0a0a0c;

    --success: #2f8a4d;
    --danger:  #c8364a;
    --info:    #2f6fb5;
    --warning: #c47e2a;

    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 22px;

    --shadow-1: 0 1px 2px rgba(10,10,12,.06), 0 2px 6px rgba(10,10,12,.06);
    --shadow-2: 0 4px 12px rgba(10,10,12,.10), 0 12px 32px rgba(10,10,12,.10);
    --shadow-gold: 0 6px 24px rgba(199,154,48,.35);

    --font-base: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Playfair Display', 'Georgia', serif;

    --header-h: 56px;
    --bottom-nav-h: 68px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.standalone { scroll-padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 16px); }

body {
    margin: 0;
    font-family: var(--font-base);
    font-size: 15px;
    line-height: 1.45;
    color: var(--ink-800);
    background:
        radial-gradient(circle at 0% 0%, rgba(199,154,48,0.10), transparent 42%),
        radial-gradient(circle at 100% 20%, rgba(10,10,12,0.06), transparent 38%),
        linear-gradient(180deg, #f8f8fa 0%, var(--ink-50) 120px);
    min-height: 100vh;
    padding-top: calc(var(--header-h) + var(--safe-top));
    -webkit-tap-highlight-color: transparent;
}
body.guest {
    padding-top: var(--safe-top);
}
body.app-auth {
    padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 8px);
}
@media (min-width: 1024px) {
    body.app-auth { padding-bottom: var(--safe-bottom); }
}
html.standalone body.app-auth .app-footer { display: none; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink-900);
    margin: 0 0 .5em;
    letter-spacing: -.01em;
}
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 600; }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.25rem); font-weight: 600; }

a { color: var(--gold-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gold-700); }

/* ---------- Layout shell ---------- */
.app-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: calc(var(--header-h) + var(--safe-top));
    padding-top: var(--safe-top);
    background: linear-gradient(180deg, rgba(10,10,12,.97), rgba(24,24,28,.95));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    z-index: 50;
    box-shadow: 0 4px 24px rgba(0,0,0,.28);
    border-bottom: 1px solid rgba(199,154,48,.35);
}
.app-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
    padding: 0 16px;
    display: flex; align-items: center; gap: 16px;
}
.brand {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none;
}
.brand img {
    height: 36px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(199,154,48,.4));
}
.brand-text {
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: .03em;
    display: none;
}
@media (min-width: 768px) {
    .brand-text { display: block; }
}

.nav {
    margin-left: auto;
    display: flex; gap: 2px;
    align-items: center;
}
.nav a, .nav button {
    color: rgba(255,255,255,.82);
    background: transparent;
    border: 0;
    padding: 8px 14px;
    font: inherit;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .15s, color .15s;
    white-space: nowrap;
    text-decoration: none;
}
.nav a:hover, .nav button:hover { color: var(--gold-300); background: rgba(255,255,255,.06); }
.nav a.active { color: var(--gold-300); background: rgba(199,154,48,.12); }

.nav-toggle {
    display: none;
    background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--radius-sm); padding: 6px 10px; cursor: pointer;
    margin-left: auto;
}
.nav-toggle svg { width: 20px; height: 20px; }

.user-pill {
    margin-left: 8px;
    display: flex; align-items: center; gap: 8px;
    background: rgba(199,154,48,.12);
    border: 1px solid rgba(199,154,48,.3);
    border-radius: 99px;
    padding: 4px 10px 4px 4px;
    color: #fff;
    font-size: .85rem;
}
.user-pill .avatar {
    width: 28px; height: 28px;
    background: var(--gold-grad);
    border-radius: 50%;
    display: grid; place-items: center;
    color: var(--ink-900);
    font-weight: 700;
    font-size: .8rem;
}

/* Mobile nav drawer: see bottom-nav / .nav-desktop rules at end of file */

/* ---------- Main / container ---------- */
.shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px clamp(12px, 3vw, 28px) 40px;
}
.section { margin-bottom: 28px; }

.card {
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    overflow: hidden;
}
.card-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ink-200);
    background: linear-gradient(180deg, #fff, #fafafa);
    gap: 12px; flex-wrap: wrap;
}
.card-head h2 { margin: 0; }
.card-body { padding: 18px 20px; }

/* ---------- Hero (home) ---------- */
.hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(110% 140% at 100% 0%, rgba(199,154,48,.65), transparent 60%),
        radial-gradient(80% 100% at 0% 100%, rgba(199,154,48,.25), transparent 60%),
        linear-gradient(135deg, #18181c 0%, #2a2a30 100%);
    padding: clamp(24px, 4vw, 40px);
    margin-bottom: 24px;
    box-shadow: var(--shadow-2);
}
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,.85); max-width: 60ch; }
.hero .accent {
    background: var(--gold-grad);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    font-weight: 700;
}
.hero-meta {
    display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px;
}
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    padding: 6px 12px; border-radius: 99px; font-size: .85rem;
}
.chip strong { color: var(--gold-300); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 0;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--gold-grad);
    color: var(--ink-900);
    box-shadow: var(--shadow-gold);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-dark {
    background: var(--ink-900); color: #fff;
}
.btn-dark:hover { background: var(--ink-800); }
.btn-outline {
    background: transparent;
    color: var(--ink-900);
    border: 1px solid var(--ink-300);
}
.btn-outline:hover { background: var(--ink-100); }
.btn-ghost {
    background: transparent; color: var(--ink-700); border: 1px dashed var(--ink-300);
}
.btn-danger { background: #b1222e; color: #fff; }
.btn-success { background: #2f8a4d; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
label { font-size: .85rem; color: var(--ink-500); font-weight: 600; display: block; margin-bottom: 4px; }
input[type=text], input[type=number], input[type=password],
input[type=date], input[type=email], input[type=search],
select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ink-300);
    background: #fff;
    color: var(--ink-900);
    border-radius: var(--radius-sm);
    font: inherit;
    transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(199,154,48,.18);
}
.form-grid {
    display: grid; gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.form-row > * { flex: 1 1 180px; }

/* ---------- Tables ---------- */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--ink-200);
    background: #fff;
}
table.data {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .92rem;
}
table.data thead th {
    text-align: left;
    background: var(--ink-900);
    color: var(--gold-300);
    padding: 12px 14px;
    font-weight: 600;
    font-size: .8rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid rgba(199,154,48,.35);
    box-shadow: 0 1px 0 rgba(0,0,0,.2);
}
.table-wrap.table-scroll-y {
    max-height: min(62vh, 520px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
table.data tbody td {
    padding: 12px 14px;
    border-top: 1px solid var(--ink-200);
    vertical-align: middle;
}
table.data tbody tr:nth-child(odd) td { background: rgba(243,243,245,.6); }
table.data tbody tr:hover td { background: rgba(199,154,48,.10); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .strike td { text-decoration: line-through; color: var(--ink-400); }
table.data tfoot td {
    background: var(--ink-100);
    font-weight: 700;
    padding: 12px 14px;
    border-top: 2px solid var(--ink-300);
}

.table-actions {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin: 12px 0;
}
.table-search {
    position: relative;
}
.table-search input {
    padding-left: 36px;
}
.table-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-400); width: 18px; height: 18px; }

/* ---------- Messages ---------- */
.message {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 0 0 16px;
    font-weight: 500;
    border-left: 4px solid;
    background: #fff;
    box-shadow: var(--shadow-1);
}
.message.success { border-color: var(--success); color: #1c4f2e; background: #e8f4ec; }
.message.error   { border-color: var(--danger);  color: #6f1822; background: #fbeaec; }
.message.info    { border-color: var(--info);    color: #1a3f6b; background: #eaf2fb; }
.message.warning { border-color: var(--warning); color: #6b3f10; background: #fbf2e3; }

/* ---------- Pills/badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 600;
    background: var(--ink-100); color: var(--ink-700);
}
.badge.gold   { background: rgba(199,154,48,.16); color: var(--gold-700); border: 1px solid rgba(199,154,48,.35); }
.badge.dark   { background: var(--ink-900); color: var(--gold-300); }
.badge.blue   { background: rgba(47,111,181,.12); color: var(--info); }
.badge.red    { background: rgba(200,54,74,.12);  color: var(--danger); }

/* ---------- Login ---------- */
.login-wrap,
.login-scene {
    min-height: calc(100dvh - var(--safe-top) - var(--safe-bottom));
    display: grid;
    place-items: center;
    padding: 24px clamp(16px, 4vw, 32px);
}
.login-scene {
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(199,154,48,.22), transparent),
        radial-gradient(circle at 100% 100%, rgba(10,10,12,.08), transparent 50%);
}
.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-2);
    border: 1px solid var(--ink-200);
}
.login-card--premium {
    max-width: 440px;
    border: 1px solid rgba(199,154,48,.25);
    box-shadow: var(--shadow-2), 0 0 0 1px rgba(255,255,255,.6) inset;
}
.login-logo-ring {
    width: 88px;
    height: 88px;
    margin: 0 auto 8px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 20%, rgba(241,215,116,.5), rgba(199,154,48,.15));
    border: 1px solid rgba(199,154,48,.45);
    box-shadow: 0 8px 28px rgba(199,154,48,.35);
}
.login-logo-ring img { height: auto; max-height: 56px; width: auto; }
.login-hint { font-size: .82rem; text-align: center; margin: 16px 0 0; }
.login-form .field-touch input { min-height: 48px; font-size: 16px; }
.btn-touch { min-height: 48px; touch-action: manipulation; }
.offline-pulse { animation: pulse-ring 2s ease-in-out infinite; }
@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(199,154,48,.35); }
    50% { box-shadow: 0 0 0 12px rgba(199,154,48,0); }
}
.login-card .head {
    background: linear-gradient(135deg, var(--ink-900), var(--ink-700));
    color: #fff;
    padding: 28px;
    text-align: center;
    position: relative;
}
.login-card .head::before {
    content: "";
    position: absolute; inset: 0;
    background:
        radial-gradient(60% 80% at 50% 0%, rgba(199,154,48,.45), transparent 65%);
    pointer-events: none;
}
.login-card .head img { height: 56px; position: relative; filter: drop-shadow(0 4px 10px rgba(199,154,48,.45)); }
.login-card .head h1 {
    color: #fff; margin: 12px 0 4px;
    font-size: 1.5rem;
    position: relative;
}
.login-card .head p {
    color: rgba(255,255,255,.7); margin: 0;
    position: relative; font-size: .9rem;
}
.login-card .body { padding: 22px 24px 26px; }
.login-card .body .form-grid { grid-template-columns: 1fr; }

/* ---------- Cart / order ---------- */
.cart-summary {
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(135deg, var(--ink-900), var(--ink-800));
    color: #fff;
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-2);
}
.cart-summary .total {
    color: var(--gold-300);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.qty-input {
    width: 80px !important;
    text-align: center;
}

.lotto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.lotto-pill {
    background: var(--ink-100);
    border: 1px solid var(--ink-200);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    text-align: left;
    color: var(--ink-800);
    cursor: pointer;
    transition: all .12s;
    text-decoration: none;
    font-size: .85rem;
}
.lotto-pill:hover { background: var(--gold-100); border-color: var(--gold-400); color: var(--ink-900); }
.lotto-pill strong { display: block; color: var(--gold-700); }

/* ---------- DDT print ---------- */
.print-only { display: none; }
@media print {
    body { background: #fff; padding-top: 0; }
    .app-header, .nav, .no-print, footer { display: none !important; }
    .shell { max-width: 100%; padding: 0; }
    .card, .table-wrap { box-shadow: none; border: 1px solid #000; }
}

/* ---------- Footer ---------- */
footer.app-footer {
    background: var(--ink-900);
    color: rgba(255,255,255,.7);
    padding: 24px 16px;
    text-align: center;
    border-top: 1px solid rgba(199,154,48,.3);
    font-size: .85rem;
    margin-top: 40px;
}
footer.app-footer .gold-line {
    height: 2px;
    background: var(--gold-grad);
    width: 80px;
    margin: 0 auto 12px;
    border-radius: 2px;
}
footer.app-footer a { color: var(--gold-300); }

/* ---------- Utility ---------- */
.grid          { display: grid; gap: 16px; }
.grid-2        { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3        { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.flex          { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.flex-between  { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted         { color: var(--ink-500); }
.right         { text-align: right; }
.center        { text-align: center; }
.mt-0          { margin-top: 0; }
.mt-1          { margin-top: 8px; }
.mt-2          { margin-top: 16px; }
.mt-3          { margin-top: 24px; }
.mb-0          { margin-bottom: 0; }
.mb-2          { margin-bottom: 16px; }
.hidden        { display: none !important; }

/* ---------- PWA install banner ---------- */
.install-banner {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-2);
    padding: 12px 16px;
    display: none;
    align-items: center; gap: 12px;
    z-index: 90;
    border: 1px solid var(--gold-300);
}
.install-banner.show { display: flex; }
.install-banner img { width: 36px; height: 36px; }
.install-banner .text { flex: 1; }
.install-banner .text strong { display: block; font-size: .95rem; }
.install-banner .text small { color: var(--ink-500); }
.install-banner .close { background: transparent; border: 0; cursor: pointer; color: var(--ink-400); font-size: 1.2rem; min-width: 44px; min-height: 44px; }

/* ---------- PWA: bottom nav, sheet, status, tablet ---------- */
.header-page-title {
    margin: 0;
    flex: 1;
    font-size: .9rem;
    color: rgba(255,255,255,.75);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}
@media (min-width: 600px) {
    .header-page-title { display: block; }
}

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    height: calc(var(--bottom-nav-h) + var(--safe-bottom));
    padding: 6px 8px calc(6px + var(--safe-bottom));
    background: linear-gradient(180deg, rgba(24,24,28,.98), rgba(10,10,12,.99));
    border-top: 1px solid rgba(199,154,48,.35);
    box-shadow: 0 -8px 32px rgba(0,0,0,.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
@media (min-width: 1024px) {
    .bottom-nav { display: none; }
    body.app-auth { padding-bottom: 0; }
    .nav-toggle { display: none !important; }
    .nav-desktop { display: flex !important; transform: none !important; position: static !important; }
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 52px;
    min-width: 56px;
    padding: 4px 6px;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.65);
    font: inherit;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-decoration: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    touch-action: manipulation;
    transition: color .15s, background .15s;
}
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item.is-active,
.bottom-nav-item:hover,
.bottom-nav-item:focus-visible {
    color: var(--gold-300);
    background: rgba(199,154,48,.12);
}
.bottom-nav-item.is-active svg { stroke: var(--gold-400); }

.bottom-sheet[hidden] { display: none !important; }
.bottom-sheet {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.bottom-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10,10,12,.55);
}
.bottom-sheet-panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 12px 16px calc(20px + var(--safe-bottom));
    box-shadow: var(--shadow-2);
    animation: sheet-up .25s ease;
}
@keyframes sheet-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--ink-300);
    border-radius: 99px;
    margin: 0 auto 14px;
}
.bottom-sheet-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ink-200);
}
.bottom-sheet-user .avatar {
    width: 44px;
    height: 44px;
    background: var(--gold-grad);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--ink-900);
}
.bottom-sheet-user small { color: var(--ink-500); display: block; }
.bottom-sheet-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--ink-800);
    font-weight: 600;
    text-decoration: none;
    border: 0;
    width: 100%;
    background: var(--ink-100);
    margin-bottom: 8px;
    cursor: pointer;
    font: inherit;
    touch-action: manipulation;
}
.bottom-sheet-link.danger { background: #fbeaec; color: var(--danger); }
.bottom-sheet-link.muted { background: transparent; color: var(--ink-500); justify-content: center; }

.network-status {
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    background: var(--danger);
    color: #fff;
    padding: 8px 16px;
    border-radius: 99px;
    font-size: .85rem;
    font-weight: 600;
    box-shadow: var(--shadow-2);
}
.network-status[hidden] { display: none !important; }

.ios-install-hint {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 12px);
    max-width: 400px;
    margin: 0 auto;
    background: var(--ink-900);
    color: #fff;
    padding: 12px 40px 12px 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(199,154,48,.4);
    font-size: .82rem;
    z-index: 85;
    box-shadow: var(--shadow-2);
}
.ios-install-hint[hidden] { display: none !important; }
.ios-install-hint .ios-share {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255,255,255,.12);
    border-radius: 4px;
    font-weight: 600;
}
.ios-install-hint .close {
    position: absolute;
    top: 4px;
    right: 4px;
    background: transparent;
    border: 0;
    color: rgba(255,255,255,.6);
    font-size: 1.3rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

@media (max-width: 1023px) {
    .nav-desktop {
        position: fixed;
        inset: calc(var(--header-h) + var(--safe-top)) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--ink-900);
        padding: 14px;
        border-bottom: 1px solid rgba(199,154,48,.25);
        transform: translateY(-130%);
        transition: transform .25s ease;
        gap: 4px;
        margin-left: 0;
        z-index: 55;
    }
    .nav-desktop.open { transform: translateY(0); }
    .nav-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
    .header-logout { display: none; }
    .nav-toggle-label { font-size: .85rem; }
}

.btn, .nav a, .lotto-pill { touch-action: manipulation; }
.btn-sm { min-height: 40px; padding: 8px 14px; }

.hero {
    border: 1px solid rgba(199,154,48,.2);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c79a30' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    opacity: .6;
}

.install-banner {
    bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 12px);
}
@media (min-width: 1024px) {
    .install-banner { bottom: calc(16px + var(--safe-bottom)); }
}
.install-banner.show { display: flex; }

/* ---------- Landing commerciale (pre-login) ---------- */
.landing {
    min-height: 100dvh;
    color: var(--ink-800);
}
.landing-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: calc(12px + var(--safe-top)) clamp(16px, 4vw, 32px) 12px;
    background: linear-gradient(180deg, var(--ink-900), var(--ink-800));
    border-bottom: 1px solid rgba(199,154,48,.35);
    position: sticky;
    top: 0;
    z-index: 40;
}
.landing-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
}
.landing-brand img { filter: drop-shadow(0 2px 8px rgba(199,154,48,.45)); }
.landing-hero {
    display: grid;
    gap: 32px;
    align-items: center;
    padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 40px);
    max-width: 1200px;
    margin: 0 auto;
}
@media (min-width: 900px) {
    .landing-hero { grid-template-columns: 1.1fr .9fr; }
}
.landing-kicker {
    margin: 0 0 8px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-600);
}
.landing-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    margin-bottom: 16px;
}
.landing-hero .accent {
    background: var(--gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.landing-lead {
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    color: var(--ink-500);
    max-width: 52ch;
    margin: 0 0 24px;
}
.landing-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.btn-lg { padding: 14px 24px; font-size: 1rem; min-height: 52px; }
.landing-badges {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.landing-badges li {
    font-size: .8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 99px;
    background: var(--ink-100);
    border: 1px solid var(--ink-200);
    color: var(--ink-700);
}
.landing-device {
    background: linear-gradient(145deg, var(--ink-900), #1e1e24);
    border-radius: 24px;
    padding: 14px;
    box-shadow: var(--shadow-2), 0 0 0 1px rgba(199,154,48,.25);
    max-width: 360px;
    margin: 0 auto;
}
.landing-device-bar {
    height: 6px;
    width: 40%;
    background: rgba(255,255,255,.15);
    border-radius: 99px;
    margin: 0 auto 12px;
}
.landing-device-screen {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    color: var(--ink-800);
}
.landing-device-screen .pill {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 4px 10px;
    border-radius: 99px;
    margin-bottom: 10px;
}
.landing-device-screen .pill.gold {
    background: rgba(199,154,48,.15);
    color: var(--gold-700);
}
.landing-device-screen strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin-bottom: 14px;
}
.landing-mini-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid var(--ink-200);
    font-size: .9rem;
}
.landing-mini-row em {
    font-style: normal;
    color: var(--gold-600);
    font-weight: 600;
}
.landing-features {
    padding: 40px clamp(16px, 4vw, 40px) 48px;
    max-width: 1200px;
    margin: 0 auto;
}
.landing-features h2 {
    text-align: center;
    margin-bottom: 28px;
}
.landing-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.landing-card {
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-1);
    transition: transform .15s, box-shadow .15s;
}
.landing-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
    border-color: rgba(199,154,48,.35);
}
.landing-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(199,154,48,.12);
    color: var(--gold-700);
    display: grid;
    place-items: center;
    margin-bottom: 12px;
}
.landing-icon svg { width: 24px; height: 24px; }
.landing-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.landing-card p { margin: 0; color: var(--ink-500); font-size: .92rem; }
.landing-cta-band {
    text-align: center;
    padding: 48px 24px;
    margin: 0 clamp(16px, 4vw, 40px) 32px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(80% 120% at 50% 0%, rgba(199,154,48,.35), transparent 60%),
        linear-gradient(135deg, var(--ink-900), var(--ink-800));
    color: #fff;
}
.landing-cta-band h2 { color: #fff; margin-bottom: 8px; }
.landing-cta-band p { color: rgba(255,255,255,.8); margin: 0 0 20px; }
.landing-footer {
    text-align: center;
    padding: 24px 16px calc(24px + var(--safe-bottom));
    background: var(--ink-900);
    color: rgba(255,255,255,.7);
    font-size: .85rem;
    line-height: 1.6;
}
.landing-footer a { color: var(--gold-300); }
.login-back {
    max-width: 440px;
    margin: 0 auto 8px;
    padding: 16px 16px 0;
    text-align: left;
}
.login-back a {
    font-size: .88rem;
    font-weight: 600;
    color: var(--gold-600);
}
