/* Guestix — stile dell'app. I colori vengono dal logo: blu notte #012F55 e turchese #00B1BA. */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #012f55;          /* colore principale del logo */
  --navy-hover: #0a416f;
  --teal: #00b1ba;          /* accento del logo: per bordi, icone, dettagli */
  --teal-ink: #00777e;      /* turchese scurito, leggibile come testo */
  --teal-tint: #e5f7f8;
  --bg: #f4f7fa;
  --card: #ffffff;
  --ink: #0f2338;
  --muted: #5b6b7b;
  --line: #e1e7ee;
  --field: #c9d3dd;
  --ok: #157f55;
  --ok-tint: #e3f5ec;
  --warn: #8a5300;
  --warn-tint: #fff4dc;
  --err: #b42318;
  --err-tint: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(1, 47, 85, .05), 0 8px 24px rgba(1, 47, 85, .06);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); font-size: 16px; }
a { color: var(--teal-ink); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, .h3 { color: var(--navy); letter-spacing: -.015em; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .4rem; font-weight: 750; }
h2 { font-size: 1.2rem; margin: 0 0 .75rem; font-weight: 700; }
.h3 { font-size: 1.05rem; margin: 0 0 .4rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 1.75rem 16px 3.5rem; }

/* barra superiore */
.topbar { background: rgba(255, 255, 255, .94); border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .topbar { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(1.4) blur(8px); } }
@media (max-width: 859px) { .mainnav { gap: .1rem; } .mainnav a, .mainnav .linklike { padding: .35rem .55rem; font-size: .88rem; } }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: .7rem 16px; display: flex; gap: .75rem 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 36px; width: auto; display: block; }
.mainnav { display: flex; gap: .25rem; align-items: center; flex-wrap: wrap; }
.mainnav a, .mainnav .linklike { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 600; padding: .45rem .7rem; border-radius: 9px; }
.mainnav a:hover, .mainnav .linklike:hover { color: var(--navy); background: var(--bg); }
.mainnav a[aria-current="page"] { color: var(--navy); background: var(--teal-tint); box-shadow: inset 0 -2px 0 var(--teal); }
.banner { background: var(--warn-tint); color: var(--warn); border-bottom: 1px solid #f3dfae; font-size: .9rem; }
.banner .wrap { padding-top: .6rem; padding-bottom: .6rem; }

/* blocchi */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow); margin: 0 0 1.1rem; }
.card.narrow, .narrow { max-width: 660px; }
.empty { text-align: center; padding: 2.5rem 1.4rem; }
.callout { border-left: 4px solid var(--teal); }
.page-head, .section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.section-head { margin-bottom: .6rem; }
.grid-2, .grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
@media (min-width: 860px) {
  .grid-2 { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.cards { list-style: none; margin: 0; padding: 0; }
.plain { list-style: none; margin: 0 0 1rem; padding: 0; }
.plain li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: 0; }
.actions form { margin: 0; }
.auth { max-width: 430px; margin: 1rem auto 2rem; }
.auth-logo { display: block; width: 210px; max-width: 70%; margin: 2.5rem auto 1rem; }
.danger-zone { border-color: #f3d3cf; box-shadow: none; }

/* moduli */
.stack { display: flex; flex-direction: column; gap: 1rem; }
label { display: flex; flex-direction: column; gap: .35rem; font-weight: 650; font-size: .92rem; color: var(--ink); }
label.choice { flex-direction: row; align-items: center; gap: .55rem; font-weight: 500; padding: .25rem 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: .45rem; color: var(--navy); }
fieldset.card > legend { float: left; width: 100%; margin-bottom: .7rem; }
fieldset.card > legend ~ * { clear: both; }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea {
  font: inherit; font-weight: 450; width: 100%; padding: .65rem .8rem; border: 1px solid var(--field); border-radius: 10px;
  background: #fff; color: var(--ink); min-height: 46px; transition: border-color .15s, box-shadow .15s;
}
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):hover, select:hover, textarea:hover { border-color: #a9b7c5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(0, 177, 186, .18); }
button:focus-visible, a:focus-visible, input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 3px solid rgba(0, 177, 186, .55); outline-offset: 2px; }
input[type=file] { font: inherit; font-size: .9rem; font-weight: 450; }
input[type=checkbox], input[type=radio] { width: 1.15rem; height: 1.15rem; accent-color: var(--navy); }
[aria-invalid="true"] { border-color: var(--err) !important; background: #fffafa !important; }
.hint { font-weight: 450; font-size: .84rem; color: var(--muted); }
.field-error { font-weight: 650; font-size: .85rem; color: var(--err); }
.row-2, .row-3 { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1rem; }
.row-2:last-child, .row-3:last-child { margin-bottom: 0; }
@media (min-width: 560px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
  .row-3 { grid-template-columns: 2fr 1fr 1fr; }
}
.inline-choices { display: flex; flex-direction: column; }
.inline-choices .choice { display: inline-flex; }
.filters { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.filters label { flex: 1 1 180px; }
.linkbox { display: flex; gap: .5rem; margin-bottom: .8rem; }
.linkbox input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem !important; background: var(--bg) !important; }
.rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
@media (min-width: 560px) { .rates { grid-template-columns: repeat(6, 1fr); } }
.rates label { font-size: .82rem; text-transform: capitalize; color: var(--muted); }

/* pulsanti */
.btn { font: inherit; font-weight: 650; font-size: .95rem; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .55rem 1.1rem; border-radius: 10px; border: 1px solid var(--field); background: #fff; color: var(--navy); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn:hover { border-color: var(--navy); color: var(--navy); box-shadow: 0 2px 8px rgba(1, 47, 85, .08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 2px 10px rgba(1, 47, 85, .18); }
.btn-primary:hover { background: var(--navy-hover); border-color: var(--navy-hover); color: #fff; }
.btn-ghost { background: transparent; border-style: dashed; border-color: #9fb0c0; }
.btn-ghost:hover { background: var(--teal-tint); border-color: var(--teal); }
.btn-danger { color: var(--err); border-color: #eebdb7; }
.btn-danger:hover { background: var(--err-tint); color: var(--err); border-color: var(--err); }
.btn-small { min-height: 36px; padding: .35rem .85rem; font-size: .88rem; }
.btn-block { width: 100%; min-height: 52px; font-size: 1.02rem; }
.linklike { font: inherit; background: none; border: 0; padding: 0; color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
form.inline { display: inline; margin: 0; }

/* stati e messaggi */
.badge { display: inline-block; font-size: .76rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: #edf1f5; color: var(--muted); white-space: nowrap; letter-spacing: .01em; }
.badge-lg { font-size: .88rem; padding: .35rem .85rem; }
.badge-pending { background: var(--warn-tint); color: var(--warn); }
.badge-submitted { background: var(--ok-tint); color: var(--ok); }
.badge-purged { background: #edf1f5; color: var(--muted); }
.badge-sent { background: var(--teal-tint); color: var(--teal-ink); }
.flash { border-radius: 12px; padding: .8rem 1rem; margin: 0 0 1.1rem; border: 1px solid; }
.flash p:last-child { margin: 0; }
.flash-ok { background: var(--ok-tint); color: var(--ok); border-color: #b8e2cc; }
.flash-warn { background: var(--warn-tint); color: var(--warn); border-color: #f3dfae; }
.flash-error { background: var(--err-tint); color: var(--err); border-color: #f2c3bd; }

/* tabelle */
.table-wrap { overflow-x: auto; border-radius: 12px; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); }
.list th, .list td { text-align: left; padding: .75rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .94rem; }
.list th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: #f8fafc; font-weight: 700; }
.list tbody tr:hover { background: #fafcfd; }
@media (max-width: 700px) {
  .list thead { display: none; }
  .list tr { display: block; border-bottom: 1px solid var(--line); padding: .5rem 0; }
  .list td { display: flex; gap: .75rem; border: 0; padding: .25rem .6rem; }
  .list td::before { content: attr(data-label); flex: 0 0 7.5rem; font-size: .78rem; color: var(--muted); font-weight: 650; }
}
details.photo { margin: 1rem 0; }
details.photo summary { cursor: pointer; font-weight: 650; color: var(--navy); }
details.photo img { max-width: 100%; max-height: 520px; border-radius: 10px; border: 1px solid var(--line); margin-top: .6rem; }
.howto { padding-left: 1.2rem; }
.howto li { margin-bottom: .25rem; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: 1rem 0 .6rem; }
.totals div { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; display: flex; flex-direction: column; }
.totals div:first-child { background: var(--navy); border-color: var(--navy); color: #fff; }
.totals span { font-size: .78rem; font-weight: 600; opacity: .8; }
.totals strong { font-size: 1.45rem; letter-spacing: -.02em; }

/* modulo ospiti */
.guest-ui { background: radial-gradient(1200px 380px at 50% -120px, var(--teal-tint), transparent 70%), var(--bg); }
.guest-wrap { max-width: 680px; margin: 0 auto; padding: 1.5rem 16px 3.5rem; }
.guest-head { margin-bottom: 1.4rem; }
.guest-head-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.guest-head-top img { height: 34px; width: auto; display: block; }
.lang-switch { font-weight: 650; font-size: .88rem; text-decoration: none; color: var(--navy); border: 1px solid var(--field); background: #fff; border-radius: 999px; padding: .3rem .9rem; }
.lang-switch:hover { border-color: var(--navy); }
.stay { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: .75rem 0 1rem; padding: .9rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.stay div { display: flex; flex-direction: column; }
.stay dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; }
.stay dd { margin: 0; font-weight: 700; color: var(--navy); }
.intro { color: var(--muted); }
.guest { position: relative; }
.guest-title { font-size: 1.12rem; }
.guest-title-n { color: var(--teal-ink); }
.guest-leader { border-top: 3px solid var(--teal); }
.remove-guest { position: absolute; top: 1.3rem; right: 1.4rem; font-size: .88rem; }
.doc { border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 1.1rem; display: flex; flex-direction: column; gap: 1rem; }
.guest > label { margin-bottom: 1rem; }
.privacy { background: #fbfcfd; }
.message { text-align: center; padding: 2.75rem 1.5rem; margin-top: 3rem; }
.message img { height: 64px; width: auto; margin: 0 auto 1rem; display: block; }
.message-ok h1 { color: var(--ok); }
.powered { text-align: center; font-size: .78rem; color: var(--muted); margin-top: 2rem; }
.powered img { height: 16px; vertical-align: -3px; margin-left: .25rem; }

@media print { .topbar, .banner, .actions, .danger-zone { display: none; } }

/* Unicom */
.badge-error { background: var(--err-tint); color: var(--err); }
details.log-entry { border-top: 1px solid var(--line); padding: .7rem 0; }
details.log-entry summary { cursor: pointer; line-height: 1.7; }
details.log-entry summary .badge { margin-right: .4rem; }
pre.code {
  background: #0f2338; color: #e6edf3; border-radius: 10px; padding: .8rem 1rem;
  font-size: .78rem; line-height: 1.45; overflow-x: auto; white-space: pre; max-height: 420px;
}
.break { overflow-wrap: anywhere; }
.actions + .hint { margin-top: .8rem; }
.stack + .actions { margin-top: .8rem; }
.lead { font-size: 1.15rem; font-weight: 650; color: var(--navy); margin: .2rem 0 .6rem; }

/* Primi passi */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
ol.steps { list-style: none; margin: .8rem 0 1rem; padding: 0; display: grid; gap: .7rem; }
ol.steps li { display: flex; gap: .75rem; align-items: flex-start; }
ol.steps .tick {
  flex: 0 0 1.75rem; height: 1.75rem; border-radius: 50%; display: grid; place-items: center;
  font-size: .85rem; font-weight: 700; color: var(--navy); background: var(--bg); border: 1px solid var(--line);
}
ol.steps li.done .tick { background: var(--ok-tint); color: var(--ok); border-color: transparent; }
ol.steps li.done .step-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
ol.steps .step-title { font-weight: 650; }
ol.steps .hint { display: block; margin-top: .15rem; }
.inline-form { margin-top: .4rem; }
.declaration { margin: 1.2rem 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--teal-tint); }
.declaration .list { background: var(--card); }
.choice-top { align-items: flex-start !important; } .choice-top input { margin-top: .2rem; }
.privacy-full summary { cursor: pointer; color: var(--teal-ink); font-weight: 600; margin: .3rem 0 .5rem; } .privacy-full p { margin: .4rem 0; }
