/* ── Nidèra · design system della suite appartamenti ─────────────────
   Stessa identita' di Nidèra Costi (marchio Nidèra Studio, linguaggio
   visivo Alba Studio), ma con i nomi delle variabili che dicono il ruolo
   e non un colore sbagliato: qui --accent E' corallo, --brand E' navy.

     #172B38 navy     struttura, barra laterale, testo forte
     #E9684D corallo  UNICO colore caldo: azione primaria e stato attivo
     #F4F0E9 crema    fondo pagina; #FFFDFA la carta delle schede
     #73A37B salvia   conferme, stati positivi
   Font: DM Sans (testi), DM Serif Display (titoli), JetBrains Mono (numeri).
   ────────────────────────────────────────────────────────────────── */
:root {
  --brand:        #172B38;
  --brand-deep:   #0F1F29;
  --brand-soft:   #E7E2D8;
  --accent:       #E9684D;
  --accent-ink:   #C4553C;
  --accent-soft:  #F8EAE4;
  --ardesia:      #4C6C7C;
  --salvia:       #73A37B;
  --ocra:         #C08A3E;

  --ok:     #5E8C68;  --ok-soft:     #EDF2EA;
  --warn:   #B8792C;  --warn-soft:   #F7EFE2;
  --danger: #A8412C;  --danger-soft: #F9EDE8;
  --info:   #4C6C7C;  --info-soft:   #EFF3F4;

  --paper:   #FFFDFA;
  --bg:      #F4F0E9;
  --bg-2:    #F5F1EA;
  --border:  #DDD9D1;
  --text:    #1F2D34;
  --muted:   #788287;
  --muted-2: #8A887F;

  --radius: 11px; --radius-md: 9px; --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(23,43,56,.04), 0 1px 3px rgba(23,43,56,.06);
  --shadow:    0 6px 18px rgba(23,43,56,.08), 0 2px 6px rgba(23,43,56,.05);

  --font:        'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-titolo: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-mono:   'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  --grad:      linear-gradient(135deg, #172B38 0%, #0F1F29 100%);
  --grad-warm: linear-gradient(135deg, #E9684D 0%, #CE5239 100%);
  --rail:      linear-gradient(90deg, #172B38, #4C6C7C 55%, #E9684D);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 14.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ardesia); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .titolo { font-family: var(--font-titolo); font-weight: 400; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 17px; }
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.eyebrow {
  font-size: 11px; letter-spacing: .9px; text-transform: uppercase; font-weight: 600;
  color: var(--muted); margin-bottom: 4px;
}

/* ── Shell: sidebar navy + header + rail ─────────────────────────── */
.layout { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.side {
  background: var(--brand); color: #DCE3E8; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 18px 14px;
  /* su schermi bassi le voci sono piu' della finestra: la barra scorre, con una barra sottile chiara */
  overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent;
}
.side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.3); border-radius: 3px; }
.side::-webkit-scrollbar-track { background: transparent; }
.sbnav { flex: none; }
.side .foot { padding-top: 16px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.side .brand img { height: 30px; max-width: 150px; }
.side .brand .tag {
  font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; font-weight: 600;
  background: rgba(255,255,255,.1); color: #fff; padding: 3px 8px; border-radius: 999px;
}
.side .sect {
  font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.42);
  padding: 14px 10px 6px; font-weight: 600;
}
.sbnav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm);
  color: #C9D3DA; font-weight: 500; font-size: 14px; transition: background .12s, color .12s;
}
.sbnav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sbnav a.attivo { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(233,104,77,.28); }
.sbnav a .ico { width: 18px; height: 18px; flex: none; }
.sbnav a .ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sbnav a .pill {
  margin-left: auto; font-family: var(--font-mono); font-size: 11px; background: rgba(255,255,255,.14);
  color: #fff; padding: 1px 7px; border-radius: 999px;
}
.sbnav a.attivo .pill { background: rgba(255,255,255,.28); }
.side .foot { margin-top: auto; padding: 12px 10px 0; font-size: 12px; color: rgba(255,255,255,.5); }
.side .foot b { color: #fff; font-weight: 600; display: block; }
.side .foot a { color: rgba(255,255,255,.7); }

.main { min-width: 0; display: flex; flex-direction: column; }
.app-header {
  background: var(--paper); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; padding: 0 28px; min-height: 64px;
}
.app-header .h-tit { font-family: var(--font-titolo); font-size: 21px; }
.app-header .h-sub { color: var(--muted); font-size: 13px; }
.app-header .h-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.rail { height: 4px; background: var(--rail); }
.content { padding: 24px 28px 48px; max-width: 1380px; width: 100%; }

/* ── Schede e griglie ───────────────────────────────────────────── */
.card {
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 18px 20px; margin-bottom: 18px;
}
.card-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.card-title h2 { font-size: 18px; }
.card-title .ct-sub { color: var(--muted); font-size: 13px; }
.card-title .ct-tools { margin-left: auto; display: flex; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
@media (max-width: 1100px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card {
  position: relative; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px 14px 20px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.kpi-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.kpi-card.c-accent::before { background: var(--accent); }
.kpi-card.c-salvia::before { background: var(--salvia); }
.kpi-card.c-ocra::before { background: var(--ocra); }
.kpi-card.c-ardesia::before { background: var(--ardesia); }
.kpi-card.c-danger::before { background: var(--danger); }
.kpi-label { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi-value { font-family: var(--font-mono); font-size: 25px; font-weight: 700; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12.5px; color: var(--muted); }
.kpi-delta { font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.kpi-delta.up { color: var(--ok); } .kpi-delta.down { color: var(--danger); }

/* ── Bottoni ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px; font: 600 13.5px var(--font); cursor: pointer;
  border: 1px solid var(--border); background: var(--paper); color: var(--text);
  padding: 8px 14px; border-radius: var(--radius-sm); transition: all .12s; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--bg-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(233,104,77,.22); }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-deep); }
.btn-outline { background: transparent; }
.btn-danger { color: var(--danger); border-color: #E4C5BD; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Tabelle ────────────────────────────────────────────────────── */
.tavola { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tavola th {
  text-align: left; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted);
  font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--border); background: #EFEAE2;
}
.tavola td { padding: 10px; border-bottom: 1px solid #ECE8E0; vertical-align: middle; }
.tavola tr:last-child td { border-bottom: 0; }
.tavola tr:hover td { background: #FBF9F5; }
.tavola td.num, .tavola th.num { text-align: right; }
.tavola-wrap { overflow-x: auto; }

/* ── Badge, pill, chip ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand); white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge.neutro { background: #EEEBE4; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.canale { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.canale .dot.booking { background: #1A4FA3; } .canale .dot.airbnb { background: #E0565B; }
.canale .dot.diretto { background: var(--salvia); } .canale .dot.vrbo { background: #2F6FBF; }
.canale .dot.expedia { background: #F2B01E; } .canale .dot.google { background: #5A8DEE; }

/* ── Form ───────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 16px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.form-group .hint { font-size: 12px; color: var(--muted-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=tel], select, textarea {
  font: 14px var(--font); color: var(--text); background: var(--paper); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px; width: 100%; outline: none; transition: border .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { border-color: var(--ardesia); box-shadow: 0 0 0 3px rgba(76,108,124,.14); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.form-actions { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; }

/* ── Note, avvisi, stati vuoti ──────────────────────────────────── */
.nota {
  border-left: 3px solid var(--info); background: var(--info-soft); padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; margin-bottom: 14px;
}
.nota.ok { border-color: var(--ok); background: var(--ok-soft); }
.nota.warn { border-color: var(--warn); background: var(--warn-soft); }
.nota.danger { border-color: var(--danger); background: var(--danger-soft); }
.nota.accent { border-color: var(--accent); background: var(--accent-soft); }
.nota b { font-weight: 600; }
.vuoto { text-align: center; padding: 42px 20px; color: var(--muted); }
.vuoto .mark {
  width: 72px; height: 72px; border-radius: 22px; background: var(--brand-soft); margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; color: var(--brand);
}
.vuoto .mark svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.vuoto h3 { color: var(--text); margin-bottom: 6px; }

/* ── Passi guidati (per chi non e' del mestiere) ────────────────── */
.passi { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.passo { display: flex; gap: 12px; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; }
.passo .n {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font: 700 13px var(--font-mono);
}
.passo.fatto .n { background: var(--salvia); }
.passo.ora .n { background: var(--accent); }
.passo b { display: block; font-weight: 600; margin-bottom: 2px; }
.passo p { margin: 0; font-size: 13px; color: var(--muted); }

/* ── Semaforo di salute ─────────────────────────────────────────── */
.salute {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--border); margin-bottom: 18px;
}
.salute .sb-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.salute.verde .sb-dot { background: var(--salvia); box-shadow: 0 0 0 5px rgba(115,163,123,.18); }
.salute.giallo .sb-dot { background: var(--ocra); box-shadow: 0 0 0 5px rgba(192,138,62,.18); }
.salute.rosso .sb-dot { background: var(--danger); box-shadow: 0 0 0 5px rgba(168,65,44,.18); }
.salute h2 { font-size: 19px; }
.salute p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

/* ── Azioni consigliate ─────────────────────────────────────────── */
.azioni { display: grid; gap: 10px; }
.azione { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--paper); }
.azione .a-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font: 700 12px var(--font-mono); }
.azione b { font-weight: 600; }
.azione p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.azione .btn { margin-left: auto; flex: none; }

/* ── Calendario a righe (strutture × giorni) ────────────────────── */
.cal-wrap { overflow-x: auto; padding-bottom: 6px; }
.cal { display: grid; grid-auto-rows: 44px; align-items: stretch; min-width: 900px; position: relative; }
.cal .cal-head { position: sticky; top: 0; background: var(--paper); z-index: 2; }
.cal .c-lab {
  display: flex; align-items: center; gap: 8px; padding: 0 10px; border-bottom: 1px solid #ECE8E0; border-right: 1px solid var(--border);
  background: var(--paper); position: sticky; left: 0; z-index: 3; font-weight: 600; font-size: 13px;
}
.cal .c-lab .sw { width: 10px; height: 10px; border-radius: 3px; }
.cal .c-day {
  border-bottom: 1px solid #ECE8E0; border-right: 1px solid #F1EDE5; font-size: 11px; text-align: center; color: var(--muted);
  display: flex; flex-direction: column; justify-content: center; line-height: 1.15;
}
.cal .c-day b { font-family: var(--font-mono); font-size: 12.5px; color: var(--text); font-weight: 600; }
.cal .c-day.we { background: #F8F5EE; }
.cal .c-day.oggi b { color: var(--accent); }
.cal .c-cell { border-bottom: 1px solid #ECE8E0; border-right: 1px solid #F1EDE5; }
.cal .c-cell.we { background: #FAF8F3; }
.cal .c-cell.oggi { background: var(--accent-soft); }
.cal .c-cell:not(.passato) { cursor: pointer; }
.cal .c-cell:not(.passato):hover { background: #EEE9DF; }
.cal .c-cell.scelto { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
.cal .pren.chiuso { cursor: pointer; }
.cal .pren {
  position: absolute; height: 30px; margin-top: 7px; border-radius: 15px; color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; padding: 0 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  box-shadow: var(--shadow-sm); cursor: pointer; z-index: 1;
}
.pren.booking { background: #1A4FA3; } .pren.airbnb { background: #C94A50; } .pren.diretto { background: var(--salvia); }
.pren.vrbo { background: #2F6FBF; } .pren.expedia { background: #B98511; }
.pren.cancellata { background: #C7C2B8; text-decoration: line-through; }
/* giorni chiusi (disponibilita' zero su Beds24, blocchi, chiusure di Nidera): tratteggio grigio a tutta giornata */
.pren.chiuso, .pren.blocco {
  background: repeating-linear-gradient(135deg, #B8B2A6 0 4px, #E6E1D8 4px 8px); color: #5C5A55; border-radius: 4px;
  box-shadow: none; font-weight: 600; font-size: 11px; letter-spacing: .4px; text-transform: uppercase; justify-content: center; z-index: 0;
}
.pren.checkin { outline: 2px solid var(--accent); outline-offset: -2px; }
.legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legenda span { display: inline-flex; align-items: center; gap: 6px; }

/* ── Barre e mini grafici ───────────────────────────────────────── */
.barra { height: 8px; background: #E3DED5; border-radius: 4px; overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--ardesia); border-radius: 4px; }
.barra i.ok { background: var(--salvia); } .barra i.accent { background: var(--accent); } .barra i.ocra { background: var(--ocra); }
.colonne { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 8px; }
.colonne .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.colonne .col .pila { width: 100%; display: flex; flex-direction: column-reverse; gap: 2px; }
.colonne .col i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: #6E8E9B; min-height: 2px; }
.colonne .col i.uscita { background: #C0BCB2; border-radius: 0 0 4px 4px; }
.colonne .col i.prev { background: repeating-linear-gradient(135deg, #B7C6CC 0 4px, #DCE4E7 4px 8px); }
.colonne .col .lab { font-size: 11px; color: var(--muted); font-family: var(--font-mono); }

/* ── Modale e toast ─────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(23,43,56,.45); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-overlay.aperta { display: flex; }
.modal { background: var(--paper); border-radius: var(--radius); width: min(720px, 100%); max-height: 92vh; overflow: auto; padding: 22px 24px; box-shadow: var(--shadow); }
.modal-title { display: flex; align-items: center; margin-bottom: 14px; }
.modal-title h2 { font-size: 20px; }
.modal-close { margin-left: auto; border: 0; background: transparent; font-size: 22px; cursor: pointer; color: var(--muted); }
.toast {
  position: fixed; right: 22px; bottom: 22px; background: var(--brand); color: #fff; padding: 12px 16px; border-radius: var(--radius-md);
  box-shadow: var(--shadow); font-size: 13.5px; z-index: 200; opacity: 0; transform: translateY(8px); transition: all .2s; pointer-events: none;
}
.toast.on { opacity: 1; transform: none; }
.toast.err { background: var(--danger); }

/* ── Flash (messaggi server) ────────────────────────────────────── */
.flash { padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 13.5px; border-left: 3px solid var(--ok); background: var(--ok-soft); }
.flash.err { border-color: var(--danger); background: var(--danger-soft); }
.flash.warn { border-color: var(--warn); background: var(--warn-soft); }

/* ── Login ─────────────────────────────────────────────────────── */
.login { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login .lato { background: var(--grad); color: #fff; padding: 48px; display: flex; flex-direction: column; }
.login .lato img { height: 40px; align-self: flex-start; }
.login .lato h1 { font-size: 40px; margin-top: auto; line-height: 1.1; }
.login .lato p { color: rgba(255,255,255,.72); font-size: 16px; max-width: 460px; }
.login .modulo { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login .modulo form { width: min(380px, 100%); }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; } .login .lato { display: none; }
  .layout { grid-template-columns: 64px 1fr; }
  .side { padding: 14px 8px; } .side .brand img { content: url("/static/nidera_mark.svg"); height: 34px; }
  .side .brand .tag, .side .sect, .sbnav a span.txt, .sbnav a .pill, .side .foot { display: none; }
  .sbnav a { justify-content: center; padding: 11px; }
  .content { padding: 16px; } .app-header { padding: 0 16px; }
}

/* ── Utility ───────────────────────────────────────────────────── */
.riga { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spazio { flex: 1; }
.mt { margin-top: 14px; } .mb0 { margin-bottom: 0; }
.destra { text-align: right; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.link-tab { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.link-tab a { padding: 8px 14px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.link-tab a.attivo { color: var(--brand); border-bottom: 2px solid var(--accent); }
.link-tab a:hover { text-decoration: none; color: var(--text); }
.fonte {
  font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; font-weight: 600; padding: 2px 7px; border-radius: 4px;
  background: #EEEBE4; color: var(--muted);
}
.fonte.pms { background: var(--info-soft); color: var(--info); } .fonte.mock { background: var(--warn-soft); color: var(--warn); }
.fonte.foto { background: var(--ok-soft); color: var(--ok); } .fonte.calcolo { background: var(--brand-soft); color: var(--brand); }
/* Filtro a spunte (calendario): un bottone che apre una tendina con le strutture */
details.scelta { position: relative; }
details.scelta > summary { list-style: none; cursor: pointer; }
details.scelta > summary::-webkit-details-marker { display: none; }
details.scelta[open] > summary { background: var(--brand-soft); }
.scelta-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 240px; background: var(--paper);
  border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow); padding: 12px 14px;
}
.scelta-pop label { cursor: pointer; font-weight: 500; }
.prezzo-inline { width: 74px; text-align: right; padding: 3px 6px; font-family: var(--font-mono); font-size: 13px; }
details.spiega { border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 8px 12px; margin-top: 10px; font-size: 13px; color: var(--muted); }
details.spiega summary { cursor: pointer; font-weight: 600; color: var(--ardesia); }
