/* PORTAL — stile dell'app (/app). Mobile-first, pulito, eredita il colore tema (--accent) dal sito.
   Niente emoji: icone SVG. */
:root { --accent: #0f3a46; --ink: #16323c; --muted: #5e727b; --line: #e6edf0; --bg: #f4f7f9; --card: #fff; --ok: #2e7d52; --warn: #be4a24; --blue: #2f6f8f; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif; color: var(--ink); background: var(--bg); -webkit-text-size-adjust: 100%; }
svg { width: 18px; height: 18px; flex: 0 0 auto; }
#app.loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }

/* ── login ── */
#app.pt-auth { min-height: 100svh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1100px 520px at 50% -10%, #fff, var(--bg)); }
.pt-card { width: min(390px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 30px 26px; box-shadow: 0 20px 60px rgba(0,0,0,.10); display: flex; flex-direction: column; gap: 12px; }
.pt-logo-big { height: 64px; width: auto; align-self: center; margin-bottom: 4px; }
.pt-card h1 { margin: 0; font-size: 22px; text-align: center; }
.pt-sub { margin: -4px 0 8px; text-align: center; color: var(--muted); font-size: 14px; }
.pt-card label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pt-card input { font: inherit; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); }
.pt-card input:focus { outline: none; border-color: var(--accent); }
.pt-btn { font: 700 15px/1 inherit; background: var(--accent); color: #fff; border: 0; border-radius: 11px; padding: 13px 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.pt-btn:disabled { opacity: .6; }
.pt-btn.sec { background: #fff; color: var(--accent); border: 1px solid var(--line); }
.pt-link { background: none; border: 0; color: var(--accent); font: 600 13px/1 inherit; cursor: pointer; text-decoration: underline; align-self: center; padding: 4px; }
.pt-err { color: var(--warn); font-size: 13px; min-height: 16px; text-align: center; }

/* ── shell (header + main) ── */
.pt-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--accent); color: #fff; }
.pt-logo { height: 34px; width: auto; border-radius: 8px; background: #fff2; }
.pt-ttl { display: flex; flex-direction: column; line-height: 1.15; flex: 1; min-width: 0; }
.pt-ttl b { font-size: 16px; }
.pt-ttl span { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-out { margin-left: auto; background: #fff2; border: 0; color: #fff; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.pt-main { max-width: 720px; margin: 0 auto; padding: 18px 16px 40px; display: flex; flex-direction: column; gap: 18px; }

/* tile (apri calendario) */
.pt-tile { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.pt-tile:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0,0,0,.10); border-color: var(--accent); }
.pt-tile-ic { width: 46px; height: 46px; border-radius: 13px; background: var(--bg); color: var(--accent); display: grid; place-items: center; }
.pt-tile-ic svg { width: 24px; height: 24px; }
.pt-tile-t { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pt-tile-t b { font-size: 16px; }
.pt-tile-t small { color: var(--muted); font-size: 13px; }
.pt-tile-go { color: var(--accent); }

/* sezioni */
.pt-sec { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 18px; }
.pt-sec h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 16px; }
.pt-sec h2 svg { color: var(--accent); }
.pt-muted { color: var(--muted); font-size: 14px; margin: 4px 0; }
.pt-list { display: flex; flex-direction: column; gap: 10px; }

/* prenotazioni */
.pt-bk { border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; }
.pt-bk.off { opacity: .6; }
.pt-bk-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pt-bk-h b { font-size: 15.5px; }
.pt-bk-when { color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 7px; margin-top: 6px; }
.pt-bk-when svg { width: 15px; height: 15px; }
.pt-bk-act { display: flex; gap: 8px; margin-top: 12px; }
.pt-badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--bg); white-space: nowrap; }
.pt-badge.paid { background: #e3f3ea; color: var(--ok); }
.pt-badge.confirmed { background: #e4eef5; color: var(--blue); }
.pt-badge.pending { background: #fdf0d8; color: #a9742a; }
.pt-badge.cancelled { background: #f1e6e2; color: var(--warn); }

/* utenti (admin) */
.pt-urow { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.pt-uinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pt-uinfo b { font-size: 14.5px; }
.pt-uinfo small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-uact { display: flex; gap: 6px; }
.pt-mini { font: 600 13px/1 inherit; background: var(--bg); border: 1px solid var(--line); color: var(--ink); border-radius: 9px; padding: 8px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.pt-mini svg { width: 15px; height: 15px; }
.pt-mini:hover { border-color: var(--accent); color: var(--accent); }
.pt-mini.danger:hover { border-color: var(--warn); color: var(--warn); }

/* modale sposta */
.pt-ov { position: fixed; inset: 0; background: rgba(12,24,30,.5); display: grid; place-items: center; padding: 18px; z-index: 50; }
.pt-modal { background: #fff; border-radius: 18px; padding: 22px; width: min(420px, 95vw); max-height: 90vh; overflow: auto; }
.pt-modal h3 { margin: 0 0 14px; font-size: 18px; }
.pt-modal label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pt-modal input { font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; }
.pt-slots { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.pt-slot { font: 600 14px/1 inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px 13px; cursor: pointer; }
.pt-slot:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.pt-modal-act { display: flex; justify-content: flex-end; margin-top: 8px; }

/* toast */
.pt-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 11px; z-index: 90; font-size: 14px; max-width: 90vw; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
