/* Servizio stampe — grafica della Maugeri Suite (scuro e oro, titoli in corsivo elegante). Stesse classi di prima. */
@font-face { font-family: "Cormorant"; src: url("font/CormorantGaramond-VariableFont_wght.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("font/SourceSans3-Regular.otf") format("opentype"); font-weight: 300 450; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("font/SourceSans3-Semibold.otf") format("opentype"); font-weight: 451 900; font-display: swap; }

:root {
  --nero: #0f0f0f; --sfondo: #121212; --pannello: #1d1d1d; --pannello2: #191919; --linea: #2c2c2c; --forte: #3d3d3d;
  --testo: #ede9e3; --secondario: #b5b0a8; --spento: #857f78; --avorio: #f5f3ef; --oro: #c6a76b; --oro2: #d6b97f; --oro-scuro: #8a7246;
  --ok: #6fbf73; --errore: #ff8a80; --avviso: #e8a85c;
  --serif: "Cormorant", Georgia, serif; --sans: "Source Sans 3", -apple-system, Helvetica, Arial, sans-serif;
  --sa-t: env(safe-area-inset-top, 0px); --sicuro-basso: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--sfondo); color: var(--testo); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: var(--sa-t); background: var(--sfondo); z-index: 40; }
button, input, select, textarea { font-family: inherit; }
img { -webkit-user-drag: none; }
.caricamento { text-align: center; padding: 60px 20px; color: var(--secondario); }
[hidden] { display: none !important; }

/* ---------- struttura ---------- */
.contenitore { width: min(880px, 100%); margin: 0 auto; padding: 4px 18px calc(48px + var(--sicuro-basso)); }
.testata { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(18px + var(--sa-t)) 18px 18px; max-width: 880px; margin: 0 auto; }
.testata .logo { height: 40px; max-width: 60%; object-fit: contain; object-position: left center; }
.testata .utente { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--secondario); text-align: right; line-height: 1.35; }
.testata .utente b { color: var(--testo); font-weight: 600; }
.testata .utente a { color: var(--oro2); text-decoration: none; cursor: pointer; font-size: 12.5px; }
.testata .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--oro); color: #141414; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }
h1, h2, h3 { color: var(--avorio); margin: 0; }
h1 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(34px, 7vw, 46px); line-height: 1.05; }
h2 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
h3 { font-size: 17px; font-weight: 600; }
.sopra { color: var(--oro2); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 6px; }
p { line-height: 1.6; }
.piccolo { font-size: 13.5px; color: var(--secondario); }
.carta { background: var(--pannello); border: 0; border-radius: 18px; padding: 22px; box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 30px rgba(0,0,0,.25); }
.carta + .carta { margin-top: 14px; }
.riga { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spazio { flex: 1; }
.centro { text-align: center; }
.mt { margin-top: 18px; } .mt2 { margin-top: 28px; } .mb { margin-bottom: 18px; }

/* ---------- pulsanti e campi ---------- */
.btn { background: transparent; border: 1.5px solid var(--forte); color: var(--testo); font-size: 15px; font-weight: 600; padding: 12px 20px; border-radius: 12px;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s; min-height: 46px; }
.btn:hover { border-color: #5a5448; }
.btn.pieno { background: var(--oro); border-color: var(--oro); color: #141414; }
.btn.pieno:hover { background: #d4b77e; border-color: #d4b77e; }
.btn.neutro { border-color: var(--forte); color: var(--testo); font-weight: 500; }
.btn.piccolo { padding: 7px 12px; min-height: 36px; font-size: 13px; border-radius: 10px; }
.btn.largo { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.link { color: var(--oro2); background: none; border: 0; cursor: pointer; font-size: 14px; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
label.campo { display: block; margin-bottom: 14px; }
label.campo > span { display: block; font-size: 12.5px; color: var(--secondario); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=tel], input[type=password], select, textarea {
  width: 100%; background: var(--nero); border: 1.5px solid var(--forte); color: var(--avorio); font-size: 16px; padding: 11px 12px; border-radius: 10px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--oro); box-shadow: 0 0 0 3px rgba(198,167,107,.18); }
textarea { min-height: 80px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--oro) 50%), linear-gradient(135deg, var(--oro) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.due { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.messaggio { font-size: 14px; min-height: 22px; margin: 10px 0; }
.messaggio.errore { color: var(--errore); } .messaggio.ok { color: var(--ok); }
.spunta { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.55; cursor: pointer; }
.spunta input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--oro); flex: none; }

/* ---------- accesso ---------- */
.accesso { display: grid; place-items: start center; padding: calc(48px + var(--sa-t)) 18px 0; background: radial-gradient(ellipse at 50% 0%, #2a2419 0%, var(--sfondo) 62%); }
.accesso .box { width: min(460px, 100%); }
.accesso .logo { width: 250px; max-width: 75%; display: block; margin: 0 auto 26px; }
.accesso h1 { text-align: center; margin-bottom: 6px; }
.accesso .sotto { text-align: center; margin-bottom: 22px; color: var(--secondario); letter-spacing: 0; text-transform: none; font-size: 15px; }
.schede { display: flex; gap: 6px; background: var(--nero); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.schede button { flex: 1; background: none; border: 0; border-radius: 9px; color: var(--secondario); font-size: 14.5px; font-weight: 600; padding: 10px 6px; cursor: pointer; }
.schede button.attiva { background: var(--pannello2); color: var(--oro2); box-shadow: 0 0 0 1px var(--forte); }

/* ---------- passi dell'ordine ---------- */
.passi { display: flex; gap: 6px; margin: 4px 0 22px; flex-wrap: wrap; }
.passi div { flex: 1; min-width: 0; font-size: 13px; line-height: 1.25; color: var(--spento); border-top: 3px solid var(--linea); padding-top: 8px; }
.passi div.fatto { border-top-color: var(--oro-scuro); color: var(--secondario); }
.passi div.attivo { border-top-color: var(--oro); color: var(--testo); font-weight: 600; }

.zona { border: 2px dashed var(--forte); border-radius: 18px; padding: 34px 18px; text-align: center; background: var(--pannello); transition: border-color .15s, background .15s; }
.zona.sopra-file { border-color: var(--oro); background: rgba(198,167,107,.08); }
.zona h3 { margin-bottom: 6px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 26px; }

.griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.foto { background: var(--pannello); border-radius: 14px; padding: 8px; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.foto .anteprima { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: #0b0b0b; border-radius: 10px; overflow: hidden; }
.foto .anteprima img, .foto .anteprima canvas { max-width: 100%; max-height: 100%; display: block; }
.foto .nome { font-size: 12px; color: var(--secondario); margin: 6px 2px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foto .togli { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.avv { display: inline-block; font-size: 12px; background: var(--avviso); color: #1a1208; padding: 2px 9px; border-radius: 10px; margin-top: 4px; }

.elenco-foto .voce { display: grid; grid-template-columns: 110px 1fr; gap: 14px; background: var(--pannello); border-radius: 16px; padding: 12px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.elenco-foto .voce .anteprima { width: 110px; height: 110px; display: grid; place-items: center; background: #0b0b0b; border-radius: 10px; overflow: hidden; cursor: pointer; }
.elenco-foto .voce canvas { max-width: 100%; max-height: 100%; }
.elenco-foto .campi { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.contatore { display: inline-flex; align-items: center; border: 1.5px solid var(--forte); border-radius: 10px; overflow: hidden; }
.contatore button { background: var(--pannello2); border: 0; color: var(--oro2); font-size: 20px; width: 40px; height: 40px; cursor: pointer; }
.contatore span { min-width: 36px; text-align: center; font-size: 16px; }

.scelte { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scelta { border: 1.5px solid var(--forte); border-radius: 16px; padding: 18px; background: var(--nero); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.scelta:hover { border-color: #5a5448; }
.scelta.attiva { border-color: var(--oro); box-shadow: 0 0 0 2px var(--oro); background: #1c1914; }
.scelta h3 { font-size: 16.5px; }
.scelta .prezzo { font-family: var(--serif); font-size: 38px; color: var(--avorio); margin: 8px 0 2px; }
.scelta.non-disp { opacity: .5; cursor: default; }
.scelta ul { margin: 10px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.7; color: var(--secondario); }

.tabella { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabella td, .tabella th { padding: 10px 4px; border-bottom: 1px solid var(--linea); text-align: left; }
.tabella td:last-child, .tabella th:last-child { text-align: right; }
.tabella tr.totale td { border-bottom: 0; font-size: 19px; font-weight: 700; color: var(--avorio); padding-top: 14px; }
.avviso-box { border: 1px solid rgba(198,167,107,.4); background: rgba(198,167,107,.09); border-radius: 12px; padding: 14px 16px; font-size: 14px; line-height: 1.6; color: var(--oro2); }

.avviso-ritiro { display: flex; flex-direction: column; gap: 3px; text-align: left; font-size: 14px; line-height: 1.5; background: rgba(198,167,107,.09); border: 1px solid rgba(198,167,107,.35); border-radius: 12px; padding: 12px 14px; margin: 0 0 18px; color: var(--testo); }
.avviso-ritiro strong { color: var(--oro2); font-weight: 600; font-size: 13px; }
.barra-progresso { height: 8px; background: #2a2723; border-radius: 4px; overflow: hidden; margin: 10px 0; }
.barra-progresso div { height: 100%; width: 0; background: var(--oro); transition: width .2s; }

/* ---------- ordini ---------- */
.stato { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; background: #2a2a2a; color: var(--secondario); }
.stato.nuovo, .stato.in_revisione, .stato.approvato { background: rgba(198,167,107,.16); color: var(--oro2); }
.stato.inviato_lab, .stato.stampato { background: rgba(127,178,255,.15); color: #9cc4ff; }
.stato.pronto { background: rgba(111,191,115,.16); color: var(--ok); }
.stato.annullato { background: rgba(255,138,128,.12); color: var(--errore); }
.ordine-riga { cursor: pointer; transition: transform .12s; }
.ordine-riga:hover { transform: translateY(-1px); }
.ordine-riga strong { color: var(--avorio); font-size: 16px; }
.avanzamento { display: flex; margin: 18px 0 6px; }
.avanzamento div { flex: 1; text-align: center; font-size: 12.5px; color: var(--spento); position: relative; padding-top: 26px; }
.avanzamento div::before { content: ''; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--forte); z-index: 1; }
.avanzamento div::after { content: ''; position: absolute; top: 11px; left: calc(50% + 9px); right: calc(-50% + 9px); height: 2px; background: var(--forte); }
.avanzamento div:last-child::after { display: none; }
.avanzamento div.ok { color: var(--testo); } .avanzamento div.ok::before { background: var(--oro); } .avanzamento div.ok::after { background: var(--oro-scuro); }
.avanzamento div.ora { color: var(--oro2); font-weight: 600; }

/* ---------- finestre (ritaglio, i miei dati) ---------- */
.velo { position: fixed; inset: 0; background: rgba(0,0,0,.78); z-index: 50; display: grid; place-items: center; padding: 16px; }
.finestra { background: var(--pannello); border-radius: 18px; width: min(560px, 100%); max-height: 100%; overflow: auto; padding: 20px; box-shadow: 0 0 0 1px #333, 0 12px 40px rgba(0,0,0,.6); }
.area-ritaglio { background: #0b0b0b; border-radius: 12px; padding: 10px; display: grid; place-items: center; touch-action: none; }
.area-ritaglio canvas { max-width: 100%; max-height: 52vh; cursor: grab; border: 1px solid #444; }
.area-ritaglio canvas:active { cursor: grabbing; }
input[type=range] { width: 100%; accent-color: var(--oro); }
.segmenti { display: inline-flex; border: 1.5px solid var(--forte); border-radius: 10px; overflow: hidden; }
.segmenti button { background: none; border: 0; color: var(--secondario); padding: 9px 14px; font-size: 13.5px; cursor: pointer; }
.segmenti button.attiva { background: rgba(198,167,107,.16); color: var(--oro2); font-weight: 600; }

@media (max-width: 620px) {
  .scelte { grid-template-columns: 1fr; }
  .due { grid-template-columns: 1fr; }
  .elenco-foto .voce { grid-template-columns: 86px 1fr; }
  .elenco-foto .voce .anteprima { width: 86px; height: 86px; }
  .griglia { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .testata .logo { height: 32px; }
  .testata .utente span { display: none; }
  .passi { gap: 4px; } .passi div { font-size: 11.5px; }
}
h1 + .avviso-ritiro, h2 + .avviso-ritiro { margin-top: 18px; }

/* Fondo della pagina: solo ritiro in studio e dati dello studio */
.piede { max-width: 880px; margin: 38px auto 0; padding: 0 18px calc(30px + var(--sicuro-basso)); text-align: center; color: var(--spento); font-size: 13px; line-height: 1.7; }
.piede .ritiro { display: flex; flex-direction: column; gap: 2px; width: min(460px, 100%); margin-left: auto; margin-right: auto; box-sizing: border-box; background: rgba(198,167,107,.07); border: 1px solid rgba(198,167,107,.28); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; color: var(--secondario); font-size: 13.5px; line-height: 1.5; }
.piede .ritiro strong { color: var(--oro2); font-weight: 600; }
.piede p { margin: 0; }
.piede b { color: var(--secondario); font-weight: 600; }
.piede a { color: var(--spento); }

/* link con l'aspetto di pulsante (Paga ora online) */
a.btn { display: block; text-align: center; text-decoration: none; box-sizing: border-box; width: 100%; }
