/* =========================================================
   Tundem · gestionale di esempio — tema minimale (stile app di iPhone e Mac)
   Si appoggia sopra style.css: per tornare all'aspetto di prima
   basta togliere il <link> a questo file da index.html.
   Cambia solo l'aspetto: colori, caratteri, forme. Funzioni identiche.
   ========================================================= */
/* Inter: lo stesso carattere su iPhone, Android, Mac e Windows (licenza libera, file nel pannello) */
@font-face{ font-family:"Inter"; src:url("font/inter/Inter-latin.woff2") format("woff2"); font-weight:100 900; font-display:swap; }
:root{
  --font-ui:"Inter",-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --bone:#F2F2F7;            /* fondo grigio chiaro delle app di iPhone */
  --bone-2:#E5E5EA;
  --hairline:rgba(60,60,67,.14);
  --muted:#6C6C70;           /* testo secondario: contrasto 5:1 sul bianco */
  --tinta:rgba(120,120,128,.12);
  --ok:#1E7B36; --bad:#C4271B; --warn:#A8742B;
  --ombra:0 1px 0 rgba(0,0,0,.02),0 6px 22px rgba(0,0,0,.05);
}
body{ font-size:.9375rem; letter-spacing:-.01em; line-height:1.45; color:#000; }

/* ---- Titoli: grandi e neri, senza maiuscolo ---- */
h2.h2{ font-family:var(--font-ui); font-weight:700; font-size:1.375rem; letter-spacing:-.02em; text-transform:none; color:#000; line-height:1.2; }
section[data-panel] > .toolbar h2.h2,section[data-panel] > h2.h2:first-child{ font-size:2.125rem; letter-spacing:-.025em; line-height:1.12; }
h2.h2[data-cal-title],h2.h2[data-conti-title],h2.h2[data-lst-title]{ letter-spacing:-.025em; }
h2.h2[data-cal-title]::first-letter,h2.h2[data-conti-title]::first-letter,h2.h2[data-lst-title]::first-letter{ text-transform:uppercase; }
.toolbar h2.h2{ margin-bottom:0; }
.chart-legend{ text-transform:none; letter-spacing:0; font-size:.8125rem; }
.giorno{ font-family:var(--font-ui); font-weight:700; font-size:2.125rem; letter-spacing:-.025em; line-height:1.12; }
.giorno::first-letter{ text-transform:uppercase; }
.sintesi{ font-size:.9375rem; }
.h h2,.pannello-testa h2,.card h3,.rule h3{ font-family:var(--font-ui); text-transform:none; letter-spacing:-.015em; color:#000; }
.h h2{ font-size:1.25rem; font-weight:600; }
.pannello-testa h2,.card h3{ font-size:1.0625rem; font-weight:600; }
.card h3::first-letter{ text-transform:uppercase; }
.rule h3{ font-size:.9375rem; font-weight:600; }
.h .badge{ min-width:22px; height:22px; border-radius:11px; font-size:.8125rem; font-weight:600; }
.h .resto,.pannello-testa .per{ font-size:.875rem; }

/* contorno di selezione da tastiera nel colore della casa */
:focus-visible{ outline:2px solid var(--petrol); outline-offset:2px; }

/* ---- Pulsanti a pillola ---- */
.btn{ border:0; min-height:38px; padding:.5rem 1.05rem; font-size:.875rem; font-weight:600; text-transform:none; letter-spacing:-.01em;
  background:var(--tinta); color:var(--petrol); transition:background .15s,transform .1s; }
.btn:hover{ background:rgba(120,120,128,.2); color:var(--petrol); }
.btn:active{ transform:scale(.97); }
a.btn{ text-decoration:none; }
.btn--solid{ background:var(--petrol); color:#fff; } .btn--solid:hover{ background:var(--petrol-dark); color:#fff; }
.btn--ok,.btn--ok:hover{ color:var(--ok); }
.btn--bad,.btn--bad:hover{ color:var(--bad); }
.btn--ok:hover,.btn--bad:hover{ background:rgba(120,120,128,.2); }
.btn--sm{ min-height:32px; padding:.32rem .85rem; font-size:.8125rem; letter-spacing:-.01em; }
.link{ color:var(--petrol); }

/* ---- Campi: riquadri grigi arrotondati ---- */
.field > label{ font-size:.8125rem; font-weight:500; letter-spacing:0; text-transform:none; color:var(--muted); }
.field input,.field select,.field textarea{ min-height:44px; padding:.55rem .8rem; background:var(--tinta); border:0; border-radius:10px; }
.field input:focus,.field select:focus,.field textarea:focus{ background:#fff; box-shadow:0 0 0 2px rgba(31,58,70,.45); }
.toolbar .cerca,.toolbar select{ border:0; background:var(--tinta); border-radius:10px; font-size:.9375rem; min-height:38px; }
.toolbar .cerca:focus{ background:#fff; box-shadow:0 0 0 2px rgba(31,58,70,.45); }
.inl{ background:var(--tinta); border:0; border-radius:6px; }
.suggerimenti button{ border:0; border-radius:10px; }

/* ---- Accesso ---- */
.login{ background:var(--bone); color:#000; }
.login-box{ background:#fff; border-radius:22px; box-shadow:0 10px 40px rgba(0,0,0,.08); }
.login-box .display{ font-family:var(--font-ui); font-weight:700; text-transform:none; letter-spacing:-.025em; font-size:2.125rem; }
.recupero{ border-top-color:var(--hairline); }

/* ---- Barra laterale chiara, come le app del Mac ---- */
.side{ background:rgba(236,236,241,.94); color:#1C1C1E; border-right:1px solid var(--hairline); padding:1.2rem .75rem; }
.side .brand{ color:#000; padding:0 .55rem; }
.side .brand span{ color:var(--muted); text-transform:none; letter-spacing:0; font-size:.75rem; }
.tabs button{ color:#1C1C1E; font-size:.875rem; padding:.45rem .6rem; border-radius:8px; gap:.6rem; }
.tabs button:hover{ background:rgba(120,120,128,.1); color:#000; }
.tabs button[aria-current="page"]{ background:rgba(31,58,70,.11); color:var(--petrol); font-weight:600; }
.tabs .p,.altro-menu .p{ width:18px; height:18px; border:0; border-radius:0; opacity:1; flex:none; background:var(--petrol);
  -webkit-mask:var(--ic) center/18px 18px no-repeat; mask:var(--ic) center/18px 18px no-repeat; }
.tabs button[aria-current="page"] .p{ background:var(--petrol); }
.tabs .n{ min-width:20px; height:20px; border-radius:10px; font-size:.72rem; font-weight:600; }
.side .giu{ border-top:1px solid var(--hairline); color:var(--muted); padding:.9rem .55rem 0; }
.side .giu b{ color:#000; }
.side .giu .link{ color:var(--petrol); }
.tabs .altro,.altro-menu{ display:none; }   /* solo sul telefono (.tabs button la mostrerebbe) */

/* ---- Riquadri bianchi arrotondati, senza bordi ---- */
.pannello,.card,.rule,.chart,.item{ background:#fff; border:0; border-radius:18px; box-shadow:var(--ombra); }
.empty{ border:0; background:#fff; border-radius:16px; box-shadow:var(--ombra); }
.cards > div{ border-top:0; background:#fff; border-radius:16px; padding:1rem 1.1rem; box-shadow:var(--ombra); }
.cards b,.soldi .big{ font-family:var(--font-ui); font-weight:700; letter-spacing:-.025em; }
.cards b{ font-size:1.75rem; }
.soldi .big{ font-size:1.75rem; }
.cards span{ text-transform:none; letter-spacing:0; font-size:.8125rem; color:var(--muted); }
.item .code{ font-family:var(--font-ui); font-weight:600; letter-spacing:-.01em; }

/* cose da fare: schede come le notifiche del telefono */
.lavoro{ border:0; border-left:0; border-radius:16px; background:#fff; box-shadow:var(--ombra); padding:.85rem 1rem; }
.lavoro .cod,.tbl .cod,.cal--quindici td.unit .cod{ background:var(--tinta); border-radius:6px; }
.lavoro .r1{ font-size:.9688rem; }
.lavoro .r2{ font-size:.8125rem; }
.pillola{ border-radius:999px; padding:.12rem .5rem; letter-spacing:.04em; }
.pillola.rosso{ background:rgba(196,39,27,.1); color:var(--bad); }
.pillola.ambra{ background:rgba(184,154,90,.2); color:#7A5A1E; }
.pillola.verde{ background:rgba(30,123,54,.1); color:var(--ok); }
.casa-riga .nm{ font-weight:500; font-size:.9375rem; }
.casa-riga .st,.mini{ font-size:.875rem; }

/* etichette di stato: pillole colorate piene invece che a contorno */
.tag{ border:0; padding:.2rem .6rem; font-size:.6875rem; font-weight:600; letter-spacing:.04em; background:var(--tinta); color:var(--muted); }
.tag.confermata{ background:rgba(30,123,54,.11); color:var(--ok); }
.tag.richiesta{ background:rgba(184,154,90,.2); color:#7A5A1E; }
.tag.cancellata,.tag.rifiutata,.tag.scaduta{ background:rgba(196,39,27,.1); color:var(--bad); }
.tag.telefono{ background:rgba(193,81,61,.12); color:#A8402D; }
.tag.email{ background:rgba(31,95,163,.11); color:#1F5FA3; }

/* sotto-schede dei Prezzi: controllo a segmenti */
.subtabs{ display:inline-flex; flex-wrap:wrap; gap:0; padding:2px; background:var(--tinta); border-radius:9px; }
.subtabs button{ border:0; border-radius:7px; padding:.38rem .95rem; font-size:.8125rem; font-weight:500; letter-spacing:-.01em; text-transform:none; color:#000; }
.subtabs button[aria-current="page"]{ background:#fff; color:#000; font-weight:600; box-shadow:0 1px 3px rgba(0,0,0,.12); }

/* ---- Calendari: solo righe sottili orizzontali, barre a pillola ---- */
.cal-scroll{ border:0; background:#fff; border-radius:16px; box-shadow:var(--ombra); }
.pannello--cal .cal-scroll{ box-shadow:none; border-radius:0; }
.cal th,.cal td{ border:0; border-bottom:1px solid var(--hairline); }
.cal th{ background:#fff; color:var(--muted); font-weight:500; }
.cal th.unit,.cal td.unit,.cal th.cod,.cal td.cod{ background:#fff; }
.cal th.unit{ letter-spacing:0; text-transform:none; font-size:.8125rem; }
.cal td.day:hover{ background:rgba(120,120,128,.06); }
.cal td.past{ background:rgba(120,120,128,.045); }
.cal td.oggi,.cal--quindici td.oggi{ background:rgba(31,58,70,.05); }
.cal .bar.start,.cal--quindici .bar.start{ border-radius:999px 0 0 999px; }
.cal .bar.end,.cal--quindici .bar.end{ border-radius:0 999px 999px 0; }
.cal .bar.start.end,.cal--quindici .bar.start.end{ border-radius:999px; }
.cal .bar.bloc{ background:#DDD5C6; }
.cal .pulire,.cal--quindici .pulire{ border-radius:999px; }
.cal .bar span,.cal--quindici .bar span{ letter-spacing:0; font-size:.75rem; font-weight:500; }
.legend{ letter-spacing:0; text-transform:none; font-size:.8125rem; }
.legend i{ border-radius:999px; }

/* ---- Tabelle da computer: un riquadro bianco con righe sottili ---- */
@media (min-width:641px){
  .table-scroll{ background:#fff; border-radius:16px; box-shadow:var(--ombra); }
  .tbl{ background:transparent; font-size:.875rem; }
  .tbl th{ font-size:.75rem; letter-spacing:0; text-transform:none; font-weight:600; color:var(--muted); }
  .tbl tr:last-child td{ border-bottom:0; }
  .tbl tr[data-row]:hover{ background:rgba(120,120,128,.06); }
}

/* ---- Finestre e avvisi ---- */
.modal{ background:rgba(0,0,0,.32); }
.modal-box{ background:#fff; border-radius:22px; box-shadow:0 20px 60px rgba(0,0,0,.2); }
.modal-box h3{ font-family:var(--font-ui); font-weight:700; text-transform:none; letter-spacing:-.02em; font-size:1.5rem; line-height:1.2; }
.modal-box dt{ text-transform:none; letter-spacing:0; font-size:.8125rem; }
.toast{ border-radius:999px; background:rgba(28,28,30,.94); padding:.7rem 1.3rem; font-size:.875rem; }

/* ---- Telefono ---- */
@media (max-width:860px){
  /* la barra in basso diventa una pillola che galleggia, con cinque voci */
  .side{ background:none; border:0; padding:0 12px calc(12px + env(safe-area-inset-bottom)); pointer-events:none; }
  .tabs{ pointer-events:auto; grid-auto-columns:1fr; overflow:visible; padding:6px; gap:2px; border-radius:33px;
    background:rgba(255,255,255,.84); -webkit-backdrop-filter:blur(20px) saturate(1.6); backdrop-filter:blur(20px) saturate(1.6);
    box-shadow:0 8px 30px rgba(0,0,0,.12),0 0 0 .5px rgba(0,0,0,.06); }
  .tabs button{ border-radius:27px; padding:.42rem .1rem; font-size:.66rem; color:#3C3C43; gap:.18rem; }
  .tabs button[aria-current="page"],.tabs .altro.attivo{ background:rgba(31,58,70,.1); color:var(--petrol); font-weight:600; }
  .tabs .p{ width:22px; height:22px; background:currentColor; -webkit-mask-size:22px 22px; mask-size:22px 22px; }
  .tabs button[aria-current="page"] .p{ background:currentColor; }
  .tabs > [data-tab="prezzi"],.tabs > [data-tab="conti"],.tabs > [data-tab="registro"]{ display:none; }
  .tabs .altro{ display:flex; }
  .wrap{ padding-bottom:7.5rem; }
  /* "Altro": Prezzi, Conti, Registro ed Esci in un menu sopra la barra */
  .altro-menu:not([hidden]){ display:block; }
  .altro-menu{ position:fixed; right:14px; bottom:calc(92px + env(safe-area-inset-bottom)); z-index:40; min-width:230px; padding:4px 0;
    background:rgba(255,255,255,.96); -webkit-backdrop-filter:blur(20px); backdrop-filter:blur(20px); border-radius:14px; box-shadow:0 14px 44px rgba(0,0,0,.2); }
  .altro-menu .chi{ font-size:.8125rem; color:var(--muted); padding:.55rem 1rem .35rem; overflow-wrap:anywhere; }
  .altro-menu button{ display:flex; align-items:center; gap:.8rem; width:100%; padding:.7rem 1rem; font-size:1.0625rem; text-align:left; position:relative; }
  .altro-menu button + button::before{ content:''; position:absolute; top:0; left:1rem; right:0; height:1px; background:var(--hairline); }
  .altro-menu button[aria-current="page"]{ color:var(--petrol); font-weight:600; }
  .altro-menu [data-logout]{ color:var(--bad); }
  .altro-menu [data-logout] .p{ background:var(--bad); }
}
@media (max-width:640px){
  /* le tabelle diventano schede bianche arrotondate */
  .tbl tr{ border:0; border-radius:16px; box-shadow:var(--ombra); }
  .tbl td::before{ letter-spacing:0; text-transform:none; font-size:.75rem; }
  .tbl--pren td[data-l="Totale"]::before,.tbl--pren td[data-l="Acconto"]::before,
  .tbl--rub td[data-l="Documento"]::before,.tbl--rub td[data-l="Soggiorni"]::before{ letter-spacing:0; text-transform:none; font-size:.75rem; }
  .tbl--pren td[data-l="Ospite"],.tbl--rub td[data-l="Persona"],.tbl--sch .k-tit{ font-size:1.0625rem; letter-spacing:-.015em; }
  .pannello{ border-radius:16px; }
  .lavoro .actions .btn{ min-height:44px; font-size:.9375rem; }
}

/* ---- Icone delle voci (le stesse della barra del telefono) ---- */
.tabs [data-tab="oggi"] .p,.altro-menu [data-tab="oggi"] .p{ --ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2.6v2M12 19.4v2M2.6 12h2M19.4 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M18.7 5.3l-1.4 1.4M6.7 17.3l-1.4 1.4'/%3E%3C/svg%3E"); }
.tabs [data-tab="calendario"] .p,.altro-menu [data-tab="calendario"] .p{ --ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2.5'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.tabs [data-tab="prenotazioni"] .p,.altro-menu [data-tab="prenotazioni"] .p{ --ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.8 4.8v14.4'/%3E%3Cpath d='M2.8 9.6h16.4a2.4 2.4 0 0 1 2.4 2.4v7.2'/%3E%3Cpath d='M2.8 16.4h18.8'/%3E%3Cpath d='M7 9.6v6.8'/%3E%3C/svg%3E"); }
.tabs [data-tab="ospiti"] .p,.altro-menu [data-tab="ospiti"] .p{ --ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9.2' cy='8' r='3.3'/%3E%3Cpath d='M2.8 20c0-3.4 2.9-5.4 6.4-5.4s6.4 2 6.4 5.4'/%3E%3Cpath d='M16.2 5.1a3.3 3.3 0 0 1 0 5.9'/%3E%3Cpath d='M18.2 14.9c1.9.8 3 2.4 3 4.4'/%3E%3C/svg%3E"); }
.tabs [data-tab="prezzi"] .p,.altro-menu [data-tab="prezzi"] .p{ --ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18.5 6.3a7.4 7.4 0 1 0 0 11.4'/%3E%3Cpath d='M3.8 10.4h9.4M3.8 14h9.4'/%3E%3C/svg%3E"); }
.tabs [data-tab="conti"] .p,.altro-menu [data-tab="conti"] .p{ --ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.3' y='6' width='19.4' height='12' rx='2.5'/%3E%3Ccircle cx='12' cy='12' r='2.6'/%3E%3Cpath d='M6 12h.01M18 12h.01'/%3E%3C/svg%3E"); }
.tabs [data-tab="registro"] .p,.altro-menu [data-tab="registro"] .p{ --ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 6.8V12l3.4 2.2'/%3E%3C/svg%3E"); }
.tabs .altro .p{ --ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5.5' cy='12' r='1.2'/%3E%3Ccircle cx='12' cy='12' r='1.2'/%3E%3Ccircle cx='18.5' cy='12' r='1.2'/%3E%3C/svg%3E"); }
.altro-menu [data-logout] .p{ --ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-3'/%3E%3Cpath d='M10 8l-4 4 4 4'/%3E%3Cpath d='M6 12h10'/%3E%3C/svg%3E"); }

.altro-menu{ pointer-events:auto; }

/* Pulizia segnata oggi: resta visibile, più leggera, con "Annulla" */
.lavoro.fatto{ background:transparent; box-shadow:inset 0 0 0 1px var(--hairline); }
.lavoro.fatto .r1 b{ color:var(--ok); }
