/* Area clienti Urban: stesso marchio del sito (Anton + Archivo, rosso Urban).
   Famiglie su fondo scuro come il sito; segreteria su fondo chiaro, più calmo per lavorarci a lungo. */
:root {
  --nero: #09090a; --carbone: #141416; --grafite: #202024; --gesso: #f4f2ee; --carta: #e9e6e0;
  --fumo: #9a9aa3; --rosso: #f8152c; --rosso-scuro: #c50c20;
  --f-titolo: "Anton", "Impact", "Arial Narrow", sans-serif;
  --f-testo: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --taglio: 12px;
  --batto: cubic-bezier(0.2, 0.9, 0.1, 1);
  /* tema scuro (famiglie) */
  --fondo: var(--nero); --superficie: var(--carbone); --superficie-2: var(--grafite);
  --testo: var(--gesso); --tenue: #a6a6ae; --linea: rgba(244, 242, 238, .14); --campo: #1a1a1d;
}
body.chiaro {
  --fondo: #f1efea; --superficie: #ffffff; --superficie-2: #f7f6f2;
  --testo: #121214; --tenue: #66666e; --linea: #dedbd4; --campo: #ffffff;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--testo); font: 16px/1.5 var(--f-testo); }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rosso); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--f-titolo); font-weight: 400; line-height: 1.02; margin: 0; letter-spacing: .005em; }
h1 { font-size: clamp(40px, 7vw, 72px); }
h2 { font-size: clamp(28px, 4vw, 38px); }
h3 { font-size: 24px; }
.tenue { color: var(--tenue); }
.piccolo { font-size: 14px; }

/* ---- pulsanti (angolo tagliato come sul sito) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 20px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--superficie-2); color: var(--testo); font-weight: 700; font-size: 15px;
  clip-path: polygon(0 0, calc(100% - var(--taglio)) 0, 100% var(--taglio), 100% 100%, 0 100%);
  transition: background .2s, transform .15s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn--rosso { background: var(--rosso); color: #fff; }
.btn--rosso:hover { background: #ff2a40; }
.btn--bordo { background: transparent; box-shadow: inset 0 0 0 1.5px var(--linea); }
.btn--bordo:hover { box-shadow: inset 0 0 0 1.5px var(--testo); }
.btn--piccolo { min-height: 36px; padding: 0 14px; font-size: 14px; }
.link { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: inherit; font-size: inherit; }

/* ---- campi ---- */
.campi { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.campi .pieno { grid-column: 1 / -1; }
@media (max-width: 560px) { .campi { grid-template-columns: 1fr; } }
label.campo { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
label.campo small { font-weight: 400; color: var(--tenue); }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; background: var(--campo); color: var(--testo);
  border: 1.5px solid var(--linea); border-radius: 0; font-size: 16px; font-weight: 400;
}
.campo textarea { min-height: 84px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--rosso); }
.errore { color: #ff5a6a; font-size: 14px; font-weight: 600; margin: 0; min-height: 1.5em; }
body.chiaro .errore { color: var(--rosso-scuro); }

/* ---- testata ---- */
.testata { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--linea); }
.testata__marchio { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.testata__marchio img { height: 34px; width: auto; }
.testata__marchio span { font-size: 14px; color: var(--tenue); border-left: 1px solid var(--linea); padding-left: 14px; }
.testata__dx { display: flex; align-items: center; gap: 14px; font-size: 14px; }
@media (max-width: 520px) { .testata__marchio span, .testata__dx .chi { display: none; } }
.pagina { max-width: 1180px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) clamp(16px, 4vw, 40px) 80px; }

/* ---- timbri dei mesi: il segno di riconoscimento dell'area ---- */
.mesi { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.mese {
  display: grid; place-items: center; aspect-ratio: 1 / 1.1; min-width: 0;
  font-size: 12px; font-weight: 700; text-transform: lowercase; letter-spacing: .01em;
  border: 1.5px solid var(--linea); color: var(--tenue); background: transparent; padding: 0;
}
.mese--pagato { background: var(--testo); border-color: var(--testo); color: var(--fondo); }
.mese--scaduto { border-color: var(--rosso); color: var(--rosso); background: rgba(248, 21, 44, .08); }
.mese--escluso { border-style: dashed; opacity: .4; text-decoration: line-through; }
button.mese { cursor: pointer; transition: transform .15s; }
button.mese:hover { transform: translateY(-2px); }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--tenue); margin: 0; padding: 0; list-style: none; }
.legenda li { display: flex; align-items: center; gap: 7px; }
.legenda i { width: 12px; height: 12px; border: 1.5px solid var(--linea); display: inline-block; }
.legenda .p { background: var(--testo); border-color: var(--testo); }
.legenda .s { border-color: var(--rosso); background: rgba(248, 21, 44, .12); }
.legenda .e { border-style: dashed; opacity: .55; }

/* ---- avvisi ---- */
.avviso { padding: 12px 14px; border-left: 3px solid var(--rosso); background: rgba(248, 21, 44, .08); font-size: 14px; }
.ok { border-left-color: #3ad07a; background: rgba(58, 208, 122, .08); }
.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 100; transform: translate(-50%, 20px); opacity: 0;
  width: min(560px, calc(100% - 32px)); padding: 14px 18px; background: var(--testo); color: var(--fondo);
  font-size: 15px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); transition: opacity .25s, transform .35s var(--batto);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast a { color: inherit; font-weight: 700; }

/* ---- finestre ---- */
dialog {
  width: min(640px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0;
  background: var(--superficie); color: var(--testo); box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
dialog::backdrop { background: rgba(9, 9, 10, .7); }
dialog[open] { animation: entra .3s var(--batto); }
@keyframes entra { from { opacity: 0; transform: translateY(14px); } }
.finestra__testa { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 22px 0; }
.finestra__corpo { padding: 18px 22px 22px; display: grid; gap: 16px; }
.finestra__piede { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.chiudi { width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; font-size: 26px; line-height: 1; color: var(--tenue); }
.chiudi:hover { color: var(--testo); }

/* ---- tabella ---- */
.tabella { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabella th { text-align: left; font-size: 13px; font-weight: 600; color: var(--tenue); padding: 10px 12px; border-bottom: 1.5px solid var(--testo); white-space: nowrap; }
.tabella td { padding: 12px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.tabella tr:hover td { background: var(--superficie-2); }
.tabella .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scorre { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
