/* Vetro UI 1.0.0 — il sistema grafico del POS di Riccardo, esportato per qualsiasi sito o app.
   Lastre di vetro smerigliato su uno sfondo chiaro con tre luci sfocate, testo scuro, accento arancio,
   angoli concentrici, numeri grandi tabellari, movimenti a molla.
   Nessuna dipendenza. Tutto è dentro @layer: il CSS del progetto (fuori dai layer) vince sempre.
   Si personalizza solo dai token --v-* (in fondo: "Adattare al progetto"). */

@layer vetro.tokens, vetro.base, vetro.components, vetro.motion, vetro.utilities;

/* ───────────── 1. TOKEN ───────────── */
@layer vetro.tokens {
  :root {
    /* superfici */
    --v-bg: #dfe0e3;
    --v-bg-grad: linear-gradient(170deg, #eceef1, #dfe1e5);
    --v-panel: #ffffff;
    --v-glass: linear-gradient(180deg, rgba(250,250,251,.62), rgba(226,227,231,.42));
    --v-glass-2: rgba(246,246,248,.78);                       /* vetro pieno: hover, fallback senza blur */
    --v-glass-solid: linear-gradient(180deg, rgba(250,250,251,.82), rgba(234,235,238,.7)); /* touch: niente blur */
    --v-glass-line: rgba(255,255,255,.7);
    --v-field: rgba(255,255,255,.6);
    --v-fill: rgba(118,118,128,.12);                          /* binario dei controlli segmentati */
    --v-tint: rgba(24,24,27,.07);                             /* cerchietti, tracce dei grafici */
    /* testo */
    --v-ink: #18181b;  --v-on-ink: #ffffff;
    --v-muted: #5f6068;
    --v-line: rgba(24,24,27,.09);
    /* stato */
    --v-ok: #1f8a4c;  --v-ok-soft: rgba(31,138,76,.13);
    --v-warn: #b45309; --v-warn-soft: rgba(180,83,9,.12);
    --v-bad: #d23c2c;  --v-bad-soft: rgba(210,60,44,.12);
    /* accento e grafici */
    --v-accent: #e5603a;
    --v-accent-soft: color-mix(in srgb, var(--v-accent) 14%, transparent);
    --v-chart: var(--v-accent);
    --v-chart-2: var(--v-ink);
    /* le tre luci dello sfondo */
    --v-glow-1: rgba(255,170,130,.55);
    --v-glow-2: rgba(150,195,240,.55);
    --v-glow-3: rgba(185,215,190,.5);
    --v-glow-4: rgba(255,255,255,.9);
    /* profondità */
    --v-shadow: inset 0 1px 0 rgba(255,255,255,.85), inset 0 -1px 0 rgba(0,0,0,.03), 0 10px 30px rgba(24,24,27,.08);
    --v-shadow-lift: 0 2px 6px rgba(0,0,0,.18);
    --v-blur: blur(30px) saturate(180%);
    /* tipografia */
    --v-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Onest", system-ui, "Segoe UI", sans-serif;
    --v-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Onest", system-ui, "Segoe UI", sans-serif;
    --v-mono: ui-monospace, "SF Mono", "IBM Plex Mono", Menlo, monospace;
    --v-fs: 15px;
    /* geometria: angoli concentrici (raggio interno = raggio lastra − margine) */
    --v-r: 28px;
    --v-pad: 16px;
    --v-r-in: calc(var(--v-r) - var(--v-pad));
    --v-gap: 14px;
    --v-col: 440px;                                           /* colonna "da telefono", anche su desktop */
    /* movimento */
    --v-spring: cubic-bezier(.32,.72,0,1);                    /* la curva delle app che si aprono su iPhone */
    --v-ease: ease;
    --v-t-fast: .12s; --v-t: .25s; --v-t-open: .56s; --v-t-close: .52s; --v-t-settle: .34s;
    color-scheme: light;
  }

  /* tema scuro: stesso vetro, luci più basse, accento più chiaro per il contrasto */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --v-bg: #121316; --v-bg-grad: linear-gradient(170deg, #17181c, #0f1012); --v-panel: #1c1d21;
      --v-glass: linear-gradient(180deg, rgba(52,53,59,.55), rgba(30,31,35,.45)); --v-glass-2: rgba(44,45,51,.82);
      --v-glass-solid: linear-gradient(180deg, rgba(46,47,53,.92), rgba(32,33,37,.88)); --v-glass-line: rgba(255,255,255,.1);
      --v-field: rgba(255,255,255,.06); --v-fill: rgba(118,118,128,.24); --v-tint: rgba(255,255,255,.08);
      --v-ink: #f2f2f4; --v-on-ink: #141416; --v-muted: #a3a4ab; --v-line: rgba(255,255,255,.1);
      --v-ok: #3fbf74; --v-ok-soft: rgba(63,191,116,.16); --v-warn: #f0a443; --v-warn-soft: rgba(240,164,67,.16);
      --v-bad: #ff6b5a; --v-bad-soft: rgba(255,107,90,.16); --v-accent: #ff7a52;
      --v-glow-1: rgba(255,120,80,.22); --v-glow-2: rgba(80,130,220,.22); --v-glow-3: rgba(90,150,110,.18); --v-glow-4: rgba(255,255,255,.04);
      --v-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 30px rgba(0,0,0,.35);
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --v-bg: #121316; --v-bg-grad: linear-gradient(170deg, #17181c, #0f1012); --v-panel: #1c1d21;
    --v-glass: linear-gradient(180deg, rgba(52,53,59,.55), rgba(30,31,35,.45)); --v-glass-2: rgba(44,45,51,.82);
    --v-glass-solid: linear-gradient(180deg, rgba(46,47,53,.92), rgba(32,33,37,.88)); --v-glass-line: rgba(255,255,255,.1);
    --v-field: rgba(255,255,255,.06); --v-fill: rgba(118,118,128,.24); --v-tint: rgba(255,255,255,.08);
    --v-ink: #f2f2f4; --v-on-ink: #141416; --v-muted: #a3a4ab; --v-line: rgba(255,255,255,.1);
    --v-ok: #3fbf74; --v-ok-soft: rgba(63,191,116,.16); --v-warn: #f0a443; --v-warn-soft: rgba(240,164,67,.16);
    --v-bad: #ff6b5a; --v-bad-soft: rgba(255,107,90,.16); --v-accent: #ff7a52;
    --v-glow-1: rgba(255,120,80,.22); --v-glow-2: rgba(80,130,220,.22); --v-glow-3: rgba(90,150,110,.18); --v-glow-4: rgba(255,255,255,.04);
    --v-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 30px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

/* ───────────── 2. BASE ───────────── */
@layer vetro.base {
  .vetro, .vetro *, .vetro *::before, .vetro *::after { box-sizing: border-box; }
  /* .vetro sul <body> (o su un contenitore) attiva sfondo e tipografia senza toccare il resto del sito */
  .vetro { background-color: var(--v-bg); color: var(--v-ink); font: var(--v-fs)/1.5 var(--v-body); -webkit-font-smoothing: antialiased; }
  body.vetro { margin: 0; min-height: 100%; }
  /* le luci su un livello fisso a parte: background-attachment:fixed su iOS ridisegna la pagina a ogni scroll */
  body.vetro::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; transform: translateZ(0);
    background:
      radial-gradient(38% 30% at 12% 8%, var(--v-glow-1), transparent 70%),
      radial-gradient(40% 34% at 92% 26%, var(--v-glow-2), transparent 72%),
      radial-gradient(46% 36% at 30% 92%, var(--v-glow-3), transparent 72%),
      radial-gradient(60% 40% at 70% 60%, var(--v-glow-4), transparent 70%),
      var(--v-bg-grad);
    background-color: var(--v-bg); }
  .vetro :is(h1,h2,h3) { font-family: var(--v-display); font-weight: 700; letter-spacing: -.022em; line-height: 1.1; text-wrap: balance; margin: 0; }
  .vetro h1 { font-size: clamp(30px, 8vw, 40px); letter-spacing: -.03em; line-height: 1.05; }
  .vetro h2 { font-size: 18px; letter-spacing: -.02em; }
  .vetro p { margin: 0; max-width: 65ch; }
  .vetro :focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }
  .vetro ::selection { background: var(--v-accent-soft); }
}

/* ───────────── 3. COMPONENTI ───────────── */
@layer vetro.components {
  /* colonna: larga come un telefono anche su desktop, gutter sicuro sui lati */
  .v-col { max-width: var(--v-col); margin-inline: auto; display: grid; gap: 22px; padding-block: 22px 40px;
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .v-col.wide { max-width: 1080px; }

  /* LASTRA — il mattone di tutto */
  .v-glass, .v-card, .v-block, .v-now, .v-tile, .v-kpi, .v-pill {
    background: var(--v-glass); border: 1px solid var(--v-glass-line); border-radius: var(--v-r); box-shadow: var(--v-shadow);
    -webkit-backdrop-filter: var(--v-blur); backdrop-filter: var(--v-blur); }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .v-glass, .v-card, .v-block, .v-now, .v-tile, .v-kpi, .v-pill { background: var(--v-glass-2); } }
  .v-card { padding: var(--v-pad); display: grid; gap: 12px; min-width: 0; }

  /* intestazione di pagina */
  .v-header { display: grid; gap: 6px; padding: 10px 4px 4px; justify-items: center; text-align: center; }
  .v-header .v-sub { color: var(--v-muted); font-size: 14px; }
  .v-eyebrow { font: 600 12px/1.2 var(--v-body); letter-spacing: .06em; text-transform: uppercase; color: var(--v-muted); }

  /* PILLOLA (orologio, badge) */
  .v-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 14px;
    font: 600 15px var(--v-display); font-variant-numeric: tabular-nums; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }

  /* ADESSO — cosa conta in questo momento */
  .v-now { display: grid; gap: 4px; padding: 18px var(--v-pad); }
  .v-now .lbl { font: 600 12px var(--v-body); letter-spacing: .06em; text-transform: uppercase; color: var(--v-accent); }
  .v-now .big { font: 700 clamp(20px, 5.4vw, 26px)/1.15 var(--v-display); letter-spacing: -.02em; }
  .v-now .sub { font-size: 14px; color: var(--v-muted); }
  .v-now .sub b { color: var(--v-ink); font-weight: 600; }

  /* TILE — lastra che apre una vista: icona in un cerchio, nome, freccia */
  .v-tiles { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--v-gap); }
  @media (max-width: 360px) { .v-tiles { grid-template-columns: 1fr; } }
  .v-tile { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 18px; text-align: center; container-type: inline-size; min-height: 196px; padding: var(--v-pad);
    background: var(--v-glass); border: 1px solid var(--v-glass-line); border-radius: var(--v-r); box-shadow: var(--v-shadow);
    -webkit-backdrop-filter: var(--v-blur); backdrop-filter: var(--v-blur);
    transition: transform var(--v-t) var(--v-ease), box-shadow var(--v-t) var(--v-ease); -webkit-tap-highlight-color: transparent; }
  .v-tile:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 3px; }
  .v-tile .ic { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: var(--v-accent);
    background: radial-gradient(circle at 50% 30%, var(--v-panel), color-mix(in srgb, var(--v-panel) 72%, transparent));
    box-shadow: inset 0 0 0 .5px var(--v-line), 0 12px 28px color-mix(in srgb, var(--v-accent) 16%, transparent), 0 2px 6px rgba(0,0,0,.05); }
  .v-tile .ic svg, .v-icon { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .v-tile .go { position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    background: var(--v-tint); color: var(--v-ink); font-size: 15px; }
  .v-tile .nm { font: 650 min(25px, 13cqi)/1.1 var(--v-display); letter-spacing: -.025em; color: var(--v-ink); white-space: nowrap; }
  .v-tile .meta { font-size: 13px; color: var(--v-muted); margin-top: -10px; }

  /* BLOCCO — sezione con titolo e contatore */
  .v-block { display: grid; gap: 10px; padding: 16px var(--v-pad); min-width: 0; }
  .v-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .v-hd > :not(h2) { font-size: 13px; color: var(--v-muted); }
  .v-duo { display: grid; gap: var(--v-gap); grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); }
  @media (max-width: 620px) { .v-duo { grid-template-columns: 1fr; } }

  /* LISTA CON SPUNTE — ora · testo · cerchio */
  .v-list { list-style: none; margin: 0; padding: 0; display: grid; }
  .v-list > li { display: grid; grid-template-columns: 48px minmax(0,1fr) 34px; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--v-line); }
  .v-list > li:first-child { border-top: 0; }
  .v-list.no-time > li { grid-template-columns: 34px minmax(0,1fr) 28px; }
  .v-list .h { font: 600 13px var(--v-mono); color: var(--v-muted); font-variant-numeric: tabular-nums; }
  .v-list .t { font-size: 14px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
  .v-list .t b { font-weight: 600; }
  .v-list .t small { display: block; color: var(--v-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .v-list > li.past .t { opacity: .55; }
  .v-list > li.now { background: linear-gradient(90deg, color-mix(in srgb, var(--v-accent) 10%, transparent), transparent); border-radius: var(--v-r-in); }
  .v-list > li.done .t { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--v-ink) 30%, transparent); opacity: .6; }
  .v-check { all: unset; box-sizing: border-box; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
    border: 1.5px solid color-mix(in srgb, var(--v-ink) 25%, transparent); color: #fff; font-size: 15px; position: relative;
    transition: background .2s, border-color .2s, transform var(--v-t-fast); }
  .v-check::after { content: ""; position: absolute; inset: -7px; }      /* area di tocco 44px */
  .v-check[aria-pressed="true"] { background: var(--v-ok); border-color: var(--v-ok); }
  .v-check[aria-pressed="true"]::before { content: "✓"; }
  .v-check:active { transform: scale(.88); }
  .v-x { all: unset; cursor: pointer; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--v-muted); font-size: 16px; }
  .v-x:hover { background: var(--v-line); }

  /* TIMELINE — voci con l'ora, quella in corso evidenziata */
  .v-timeline { list-style: none; margin: 0; padding: 4px 0; }
  .v-timeline > li { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 2px 12px; padding: 12px 16px; border-top: 1px solid var(--v-line); }
  .v-timeline > li:first-child { border-top: 0; }
  .v-timeline .h { font: 600 14px var(--v-mono); font-variant-numeric: tabular-nums; }
  .v-timeline .t { font-weight: 600; line-height: 1.3; min-width: 0; }
  .v-timeline .d { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; color: var(--v-muted); }
  .v-timeline > li.past { opacity: .55; }
  .v-timeline > li.now { background: var(--v-accent-soft); border-radius: var(--v-r-in); margin: 0 8px; }

  /* KPI — icona in un cerchio, numero grande, riga sotto con variazione */
  .v-kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .v-kpi { padding: 14px 16px; display: grid; gap: 6px; min-width: 0; transition: transform var(--v-t) var(--v-ease), background var(--v-t) var(--v-ease); }
  .v-kpi .l { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--v-muted); }
  .v-kpi .l i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px;
    background: color-mix(in srgb, var(--v-panel) 75%, transparent); box-shadow: inset 0 0 0 .5px var(--v-line); color: var(--v-chart); }
  .v-kpi .v { font: 700 clamp(22px, 4.6vw, 28px)/1.05 var(--v-display); font-variant-numeric: tabular-nums; letter-spacing: -.03em; overflow-wrap: anywhere; }
  .v-kpi .s { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--v-muted); }

  /* CHIP */
  .v-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6;
    white-space: nowrap; background: var(--v-tint); color: var(--v-muted); }
  .v-chip.ok, .v-chip.up { background: var(--v-ok-soft); color: var(--v-ok); }
  .v-chip.warn { background: var(--v-warn-soft); color: var(--v-warn); }
  .v-chip.bad, .v-chip.down { background: var(--v-bad-soft); color: var(--v-bad); }
  .v-chip.acc { background: var(--v-accent-soft); color: var(--v-accent); }

  /* BOTTONI E CAMPI */
  .v-btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 0 18px; border-radius: 999px; font: 600 15px var(--v-body); background: var(--v-ink); color: var(--v-on-ink);
    transition: transform var(--v-t-fast), opacity var(--v-t); }
  .v-btn:active { transform: scale(.96); }
  .v-btn:disabled, .v-btn[aria-disabled="true"] { opacity: .4; cursor: default; transform: none; }
  .v-btn.accent { background: var(--v-accent); color: #fff; }
  .v-btn.ghost { background: var(--v-fill); color: var(--v-ink); }
  .v-btn:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }
  .v-input, .v-textarea, .v-select { font: 16px var(--v-body); color: var(--v-ink); background: var(--v-field); border: 1px solid var(--v-line); border-radius: 999px;
    padding: 11px 16px; min-width: 0; width: 100%; }   /* 16px: su iPhone niente zoom al tocco */
  .v-textarea { border-radius: var(--v-r-in); min-height: 96px; resize: vertical; }
  .v-input:focus-visible, .v-textarea:focus-visible, .v-select:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }
  .v-row { display: flex; gap: 8px; }
  .v-row > .v-input { flex: 1 1 0; width: 0; }
  .v-status { font-size: 13px; color: var(--v-muted); }
  .v-status.ok { color: var(--v-ok); } .v-status.err { color: var(--v-bad); }

  /* CONTROLLO SEGMENTATO (iOS) */
  .v-seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--v-fill); flex-wrap: wrap; }
  .v-seg > button, .v-seg > a { all: unset; cursor: pointer; padding: 6px 14px; border-radius: 999px; font: 500 13px var(--v-body); color: var(--v-ink);
    transition: background var(--v-t), color var(--v-t); }
  .v-seg > :is(button,a):hover { background: color-mix(in srgb, var(--v-panel) 60%, transparent); }
  .v-seg > [aria-pressed="true"], .v-seg > [aria-current="page"] { background: var(--v-ink); color: var(--v-on-ink); box-shadow: var(--v-shadow-lift); }
  .v-seg > :focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }

  /* DOCK — barra fluttuante in cima a ogni vista: ‹ indietro + sezioni a icona, quella aperta si allarga col nome */
  .v-dock { position: fixed; z-index: 50; top: calc(10px + env(safe-area-inset-top, 0px)); left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px));
    max-width: 420px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 999px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--v-panel) 82%, transparent), color-mix(in srgb, var(--v-bg) 60%, transparent));
    border: 1px solid var(--v-glass-line); box-shadow: inset 0 1px 0 var(--v-glass-line), 0 8px 24px rgba(0,0,0,.08);
    -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%); font: 600 14px var(--v-body); }
  .v-dock > .back { all: unset; cursor: pointer; flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: var(--v-ink); color: var(--v-on-ink); font-size: 20px; line-height: 1; }
  .v-dock nav { flex: 1; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--v-fill); overflow-x: auto; scrollbar-width: none; }
  .v-dock nav::-webkit-scrollbar { display: none; }
  .v-dock nav button { all: unset; cursor: pointer; flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
    height: 34px; min-width: 38px; padding: 0 9px; box-sizing: border-box; border-radius: 999px; color: var(--v-ink); font-size: 13.5px; transition: background var(--v-t); }
  .v-dock nav svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .v-dock nav button span { display: none; }
  .v-dock nav button[aria-current="page"] { flex: 1; padding: 0 12px; background: var(--v-ink); color: var(--v-on-ink); box-shadow: var(--v-shadow-lift); }
  .v-dock nav button[aria-current="page"] span { display: inline; }
  .v-dock button:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }

  /* VISTA A TUTTO SCHERMO — si apre dalla tile (vetro.js) */
  .v-view { position: fixed; inset: 0; z-index: 20; background: var(--v-bg); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; touch-action: pan-y; padding-top: calc(66px + env(safe-area-inset-top, 0px)); }
  .v-view::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: inherit; }
  /* chiusa = fuori dallo schermo: su iPhone un livello trasparente sopra la pagina ruba lo scroll anche con pointer-events:none */
  .v-view:not(.on) { visibility: hidden; pointer-events: none; transform: translate3d(-300vw,0,0); }
  html.v-locked, html.v-locked body { overflow: hidden; }

  /* DISCLOSURE — <details> che si apre morbido (vetro.js anima l'altezza) */
  details.v-disclosure { border-top: 1px solid var(--v-line); padding-top: 6px; overflow: hidden; }
  details.v-disclosure > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; font-weight: 600; }
  details.v-disclosure > summary::-webkit-details-marker { display: none; }
  details.v-disclosure > summary::after { content: "+"; font: 600 16px var(--v-mono); color: var(--v-muted); transition: transform var(--v-t) var(--v-spring); }
  details.v-disclosure[open] > summary::after { transform: rotate(45deg); }
  details.v-disclosure > summary .d { font: 500 12px var(--v-body); color: var(--v-muted); margin-left: auto; }

  /* PUNTINI DELLA SETTIMANA — vuoto / mezzo / pieno / mancato */
  .v-dots { display: grid; grid-template-columns: 28px repeat(7, minmax(0,1fr)); gap: 8px 4px; align-items: center; justify-items: center; }
  .v-dots .gg { font: 600 11px var(--v-body); color: var(--v-muted); text-transform: uppercase; text-align: center; }
  .v-dots .gg b { display: block; font: 700 15px var(--v-display); color: var(--v-ink); }
  .v-dots .gg.today { color: var(--v-ink); }
  .v-dot { width: 12px; height: 12px; border-radius: 50%; }
  .v-dot.plan { border: 1.5px solid color-mix(in srgb, var(--v-ink) 35%, transparent); }
  .v-dot.half { background: linear-gradient(90deg, var(--v-ink) 50%, transparent 50%); border: 1.5px solid var(--v-ink); }
  .v-dot.done { background: var(--v-ink); }
  .v-dot.miss { border: 1.5px dashed color-mix(in srgb, var(--v-bad) 70%, transparent); }

  /* ANELLO — conto alla rovescia / avanzamento */
  .v-ring { position: relative; width: 132px; height: 132px; justify-self: center; }
  .v-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .v-ring .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
  .v-ring .c b { font: 700 34px/1 var(--v-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
  .v-ring .c span { font-size: 12px; color: var(--v-muted); }

  /* BARRE ORIZZONTALI — etichetta · traccia · numero */
  .v-bars { display: grid; gap: 8px; }
  .v-bar { display: grid; grid-template-columns: 86px minmax(0,1fr) 64px; gap: 10px; align-items: center; font-size: 13px; }
  .v-bar .l { color: var(--v-muted); }
  .v-bar .t { height: 10px; border-radius: 999px; background: var(--v-tint); overflow: hidden; }
  .v-bar .t i { display: block; height: 100%; border-radius: 999px; background: var(--v-chart); transform-origin: left; }
  .v-bar.alt .t i { background: var(--v-chart-2); }
  .v-bar .n { text-align: right; font: 600 13px var(--v-mono); font-variant-numeric: tabular-nums; }

  /* GRAFICI SVG (vetro.js: Vetro.spark, Vetro.columns) */
  .v-chart { width: 100%; height: auto; display: block; overflow: visible; }
  .v-chart text { font: 500 10px var(--v-body); fill: var(--v-muted); }
  .v-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--v-muted); }
  .v-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--v-chart); }
  .v-legend i.alt { background: var(--v-chart-2); }

  /* TABELLA */
  .v-table-wrap { overflow-x: auto; margin-inline: calc(var(--v-pad) * -1); padding-inline: var(--v-pad); }
  .v-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
  .v-table th { text-align: left; font-weight: 600; color: var(--v-muted); padding: 6px 8px; border-bottom: 1px solid var(--v-line); }
  .v-table td { padding: 8px; border-bottom: 1px solid var(--v-line); white-space: nowrap; }

  /* VUOTO */
  .v-empty { padding: 18px var(--v-pad); border: 1px dashed var(--v-line); border-radius: var(--v-r); color: var(--v-muted); text-align: center; font-size: 14px; }

  /* TOAST */
  .v-toast { position: fixed; z-index: 80; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
    max-width: min(420px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 999px; background: var(--v-ink); color: var(--v-on-ink);
    font: 500 14px var(--v-body); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
}

/* ───────────── 4. MOVIMENTO E PRESTAZIONI ───────────── */
@layer vetro.motion {
  @media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .v-tile:hover, .v-kpi:hover { transform: translateY(-3px); }
    .v-kpi:hover { background: var(--v-glass-2); }
  }
  .v-tile:active { transform: scale(.96); transition-duration: var(--v-t-fast); }
  /* sul telefono il vetro non ricalcola la sfocatura scorrendo: dietro c'è solo un grigio sfumato, a occhio è uguale */
  @media (hover: none) {
    .v-glass, .v-card, .v-block, .v-now, .v-tile, .v-kpi, .v-pill { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--v-glass-solid); }
  }
  /* comparsa a cascata delle lastre (attivata da vetro.js con data-v-enter) */
  @media (prefers-reduced-motion: no-preference) {
    /* backwards, non both: finita la comparsa, hover e :active tornano a muovere la lastra */
    [data-v-enter] > * { animation: v-rise .5s var(--v-spring) backwards; animation-delay: calc(var(--v-i, 0) * 40ms); }
  }
  @keyframes v-rise { from { opacity: 0; transform: translateY(10px) scale(.985); } }
  @media (prefers-reduced-motion: reduce) {
    .vetro *, .vetro *::before, .vetro *::after { transition: none !important; animation: none !important; }
  }
}

/* ───────────── 5. UTILITÀ ───────────── */
@layer vetro.utilities {
  .v-muted { color: var(--v-muted); }
  .v-mono { font-family: var(--v-mono); font-variant-numeric: tabular-nums; }
  .v-num { font-variant-numeric: tabular-nums; }
  .v-center { text-align: center; justify-items: center; }
  .v-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .v-stack { display: grid; gap: var(--v-gap); }
}

/* ───────────── Adattare al progetto ─────────────
   Nel CSS del progetto, FUORI dai layer (vince sempre):
   :root { --v-accent: <colore del marchio>; --v-display: "Font del marchio", var(--v-display); --v-col: 480px; }
   Non cambiare i nomi dei token: i componenti e vetro.js li usano. */
