/* Shell mobile (Utente Prenotazione / Check-in) + pagine centrate (login, QR neutro).
   I token comuni sono in tokens.css (caricato prima). */

/* --- schermata centrata: login, messaggi neutri --- */
.screen-centered {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 40px 16px; overflow-x: hidden;
}
.card-narrow {
  box-sizing: border-box; width: 100%; max-width: 384px; min-width: 0;
  background: var(--surface-container-lowest); border: 1px solid var(--border-subtle);
  border-radius: 20px; padding: 28px 24px; box-shadow: var(--elev-2);
}

/* logo lockup centrato */
.logo-img { display: block; margin: 0 auto 18px; width: 170px; max-width: 60%; height: auto; }

/* --- login --- */
.auth-title { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; text-align: center; margin: 0 0 22px; color: var(--on-surface); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-group { display: flex; flex-direction: column; gap: 8px; }
.auth-group > label {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--on-surface-variant);
}
.input-wrap { position: relative; display: block; }
.input-wrap > input {
  display: block; width: 100%; height: 52px; padding: 0 14px 0 44px;
  font: 400 16px/1.4 var(--font-sans); color: var(--on-surface);
  background: var(--surface-muted); border: 1px solid var(--border-subtle); border-radius: 10px;
}
.input-wrap > input::placeholder { color: var(--outline); }
.input-wrap > input:focus { outline: none; border-color: var(--primary); background: var(--surface-container-lowest);
  box-shadow: 0 0 0 2px rgba(50, 79, 70, .25); }
.input-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--outline); pointer-events: none; }
.input-wrap:focus-within .input-ic { color: var(--primary); }

.input-wrap.has-toggle > input { padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; cursor: pointer; color: var(--outline); border-radius: 8px;
}
.pw-toggle:hover { color: var(--on-surface-variant); background: var(--surface-muted); }
.pw-toggle .ic-eye-off { display: none; }
.pw-toggle.is-shown .ic-eye { display: none; }
.pw-toggle.is-shown .ic-eye-off { display: block; }

.auth-submit { height: 52px; border-radius: 10px; font-size: 16px; margin-top: 6px; }

/* --- shell app mobile --- */
.app-mobile .content { max-width: 640px; margin: 0 auto; padding: var(--gutter-mobile); }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--gutter-mobile); background: var(--surface-container-lowest); border-bottom: 1px solid var(--border-subtle);
}
.topbar .brand { font-size: 18px; }
.topbar-logo { display: flex; align-items: center; }
.topbar-logo img { height: 34px; width: auto; display: block; }
.drawer-logo { width: 150px; max-width: 60%; height: auto; display: block; margin-bottom: 2px; }
.burger { width: var(--tap); height: var(--tap); border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.burger span { display: block; width: 22px; height: 2px; background: var(--on-surface); }

/* --- drawer / burger menu --- */
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: 82%; max-width: 300px;
  background: var(--surface-container-lowest); border-left: 1px solid var(--border-subtle);
  transform: translateX(100%); transition: transform .2s ease; z-index: 30;
  display: flex; flex-direction: column; padding: 16px;
}
.drawer.is-open { transform: translateX(0); }
.drawer-head { display: flex; flex-direction: column; gap: 6px; padding: 2px 36px 14px 0;
  border-bottom: 1px solid var(--border-subtle); position: relative; }
.drawer-user { margin: 0; color: var(--on-surface-variant); font-size: 14px; font-weight: 600; }
.drawer-close { position: absolute; top: 0; right: 0; width: 32px; height: 32px; border: 0;
  background: transparent; font-size: 26px; line-height: 1; cursor: pointer; color: var(--on-surface-variant); }
.drawer-list { list-style: none; margin: 12px 0; padding: 0; flex: 1; }
.drawer-list a { display: block; padding: 14px 8px; text-decoration: none; color: var(--on-surface);
  border-radius: var(--radius-btn); font-weight: 500; }
.drawer-list a:hover { background: var(--surface-muted); }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 20; }

/* --- password toggle --- */
.pw-wrap { position: relative; display: flex; }
.pw-wrap > input { flex: 1; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; font-size: 18px; cursor: pointer; }

/* --- form generico mobile --- */
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }

/* --- lista giorni (Step 1 prenotazione) --- */
.day-list { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 20px; }
.day-option { display: block; position: relative; }
.day-option input { position: absolute; opacity: 0; pointer-events: none; }
.day-option > .card { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; transition: border-color .12s; }
.day-option input:checked + .card { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(50,79,70,.25); }
.day-option.is-full > .card { opacity: .55; cursor: not-allowed; }
.day-radio { width: 20px; height: 20px; border: 2px solid var(--outline); border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.day-option input:checked + .card .day-radio { border-color: var(--primary); background:
  radial-gradient(circle, var(--primary) 45%, transparent 47%); }
.day-main { flex: 1; }
.day-date { font-weight: 700; }
.day-meta { color: var(--on-surface-variant); font-size: 14px; }

/* --- stepper numero persone --- */
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-btn); padding: 6px; background: var(--surface-container-lowest); }
.stepper button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--primary);
  color: var(--on-primary); font-size: 20px; cursor: pointer; }
.stepper button[disabled] { background: var(--surface-container-high); color: var(--outline); cursor: not-allowed; }
.stepper output { font-size: 18px; font-weight: 700; }

/* --- progress step wizard --- */
.wizard-head { margin: 4px 0 16px; }
.wizard-meta { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--on-surface-variant); }
.progress { height: 6px; background: var(--border-subtle); border-radius: var(--radius-pill); overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; background: var(--primary); }

/* --- riepilogo dati --- */
.recap { list-style: none; margin: 12px 0; padding: 0; }
.recap li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-subtle); }
.recap li:last-child { border-bottom: 0; }
.recap .k { color: var(--on-surface-variant); font-size: 14px; }
.recap .v { font-weight: 600; text-align: right; }

/* --- esito (success/checkin) --- */
.result-icon { width: 72px; height: 72px; border-radius: 50%; margin: 8px auto 16px; display: flex;
  align-items: center; justify-content: center; font-size: 34px; color: #fff; }
.result-icon.ok { background: var(--success); }
.result-icon.err { background: var(--error); }
.result-icon.warn { background: var(--warning); }
.result-center { text-align: center; }

/* --- lista card generica (storico, ricerca, log) --- */
.cards { display: flex; flex-direction: column; gap: 12px; }
.list-card { display: flex; flex-direction: column; gap: 4px; }
.list-card .row { display: flex; justify-content: space-between; gap: 8px; }
.list-card .sub { color: var(--on-surface-variant); font-size: 13px; }
.list-card .ts { font-family: var(--font-mono); font-size: 12px; color: var(--on-surface-variant); }

/* --- dashboard giorni (riepilogo mobile) --- */
.day-cards { display: flex; flex-direction: column; gap: 12px; }
.day-cards .card { display: flex; flex-direction: column; gap: 6px; }
.day-cards .nums { display: flex; gap: 16px; font-size: 14px; }
.day-cards .nums b { display: block; font-size: 20px; }
.bar { height: 8px; background: var(--border-subtle); border-radius: var(--radius-pill); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--primary); }

/* --- ricerca --- */
.searchbar { margin-bottom: 12px; }
.searchbar input { width: 100%; padding: 12px 14px; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn); font: 400 16px var(--font-sans); background: var(--surface-container-lowest); }
.filters { display: flex; gap: 8px; margin-bottom: 12px; }
.filters select { flex: 1; padding: 10px; border: 1px solid var(--border-subtle); border-radius: var(--radius-btn); font: inherit; }

.notice { background: var(--surface-container-lowest); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); padding: 24px; text-align: center; box-shadow: var(--elev-1); }

/* --- Check-in scanner --- */
.checkin-counter { background: var(--surface-container-lowest); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card); padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--elev-1);
  display: flex; flex-direction: column; gap: 2px; text-align: center; }
.checkin-counter .ck-day { font-size: 13px; color: var(--on-surface-variant); font-weight: 600; }
.checkin-counter .ck-num { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.checkin-counter .ck-num strong { color: var(--primary); }
.checkin-counter .ck-lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--on-surface-variant); }

.scanner-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 16px; }
.scanner-frame { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1;
  background: #0b0f0e; border-radius: var(--radius-card); overflow: hidden; }
.scanner-frame #reader { width: 100% !important; height: 100% !important; }
.scanner-frame #reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.scanner-frame #reader img[alt="Info icon"], .scanner-frame #reader__dashboard { display: none !important; }
.scanner-brackets { position: absolute; inset: 14px; pointer-events: none; }
.scanner-brackets i { position: absolute; width: 34px; height: 34px; border: 0 solid var(--primary); }
.scanner-brackets i:nth-child(1) { top: 0; left: 0; border-top-width: 8px; border-left-width: 8px; border-top-left-radius: 6px; }
.scanner-brackets i:nth-child(2) { top: 0; right: 0; border-top-width: 8px; border-right-width: 8px; border-top-right-radius: 6px; }
.scanner-brackets i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 8px; border-left-width: 8px; border-bottom-left-radius: 6px; }
.scanner-brackets i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 8px; border-right-width: 8px; border-bottom-right-radius: 6px; }
.scanner-wrap.is-error .scanner-frame { display: none; }
.scanner-hint { margin: 0; color: var(--on-surface-variant); font-size: 14px; text-align: center; }

.scan-result { margin-top: 4px; }
.scan-banner { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--radius-card);
  color: #fff; font-weight: 700; font-size: 18px; margin-bottom: 12px; }
.scan-banner.scan-ok { background: var(--success); }
.scan-banner.scan-err { background: var(--error); }
.scan-banner.scan-warn { background: var(--warning); }
.scan-ic { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; font-size: 20px; }
.scan-extra { color: var(--on-surface-variant); font-size: 14px; margin: 8px 0 12px; }

.loglist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.loglist li { background: var(--surface-container-lowest); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-btn); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.log-azione { font-weight: 600; }
.log-quando { color: var(--on-surface-variant); font-size: 12px; font-family: var(--font-mono); }
.log-det { color: var(--on-surface-variant); font-size: 12px; word-break: break-word; }
