/* VirtualCast — stile comune a tutte le pagine */
:root {
  --bg: #060b17; --panel: #0d1626; --panel-2: #101d33; --panel-3: #16253d;
  --line: #1b2a44; --line-2: #24395c;
  --text: #e7f1fb; --soft: #a9bbd3; --muted: #7c93b3;
  --accent: #22d3ee; --accent-ink: #060b17; --accent-bg: #10293a;
  --ok: #4ade80; --ok-bg: #0f3a2a; --warn: #fbbf24; --warn-bg: #3d2a0c; --bad: #f87171; --bad-bg: #3a1418;
  --r: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Inter', system-ui, sans-serif; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #7ee8f7; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
section[id] { scroll-margin-top: 84px; }

/* barra in alto, sempre ferma */
.top { position: sticky; top: 0; z-index: 50; background: rgba(6,11,23,0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; }
.logo:hover { color: var(--text); }
.logo-v { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.tag-admin { padding: 3px 8px; border-radius: 6px; background: var(--warn-bg); color: var(--warn); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.menu { display: flex; gap: 6px; flex: 1 1 auto; flex-wrap: wrap; }
.menu a, .menu button { padding: 8px 12px; border-radius: 8px; color: var(--soft); font-size: 15px; background: none; border: 0; cursor: pointer; }
.menu a:hover, .menu button:hover { color: var(--text); }
.menu .on { background: var(--panel-2); color: var(--text); font-weight: 600; }
.top-azioni { display: flex; gap: 10px; align-items: center; }
.conta { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; }
.top .burger { display: none; }
@media (max-width: 760px) {
  .top-in { gap: 12px; }
  .top .burger { display: inline-flex; margin-left: auto; }
  .menu { order: 3; flex-basis: 100%; display: none; flex-direction: column; }
  .top.aperto .menu { display: flex; }
  .top-azioni { order: 2; }
  .top .solo-largo { display: none; }
}

/* bottoni */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font-weight: 600; font-size: 15px; cursor: pointer; text-align: center; }
.btn:hover { color: var(--text); border-color: var(--muted); }
.btn-p { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn-p:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn-pic { min-height: 36px; padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-rosso { color: var(--bad); }
.btn-largo { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }

/* blocchi */
.pannello { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.titolo-sez { font-size: 36px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 8px; }
.sotto { color: var(--soft); font-size: 17px; }
.piccolo { font-size: 14px; color: var(--muted); }
.griglia { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.b-off { background: var(--panel-3); color: var(--soft); }
.b-acc { background: var(--accent-bg); color: var(--accent); }

/* schede pacchetto */
.scheda { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.scheda.top-pick { border-color: var(--accent); }
.foto { height: 160px; background: var(--panel-2); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; overflow: hidden; }
.foto img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.scheda-in { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; }
.scheda h3 { font-size: 21px; font-weight: 700; }
.scheda .descr { color: var(--soft); font-size: 15px; flex: 1 1 auto; }
.prezzo { color: var(--muted); font-size: 15px; }
.prezzo strong { color: var(--text); font-size: 22px; }

/* elenco (quando i pacchetti sono tanti) */
.riga { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.riga:last-child { border-bottom: 1px solid var(--line); }
.riga .num { font-size: 28px; font-weight: 800; color: var(--line-2); width: 44px; }
.riga .foto { flex: 0 0 150px; height: 92px; border-radius: 10px; border: 1px solid var(--line); }
.riga .info { flex: 1 1 300px; min-width: 0; }
.riga h3 { font-size: 20px; display: inline; margin-right: 8px; }
.riga .prezzo { flex: 0 0 150px; }

/* moduli */
.campo { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--soft); }
.campo input, .campo select, .campo textarea, .inp { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 400; font-size: 15px; width: 100%; }
.campo textarea { min-height: 110px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus, .inp:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.spunta { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--soft); }
.spunta input { margin-top: 4px; }
.modulo { display: flex; flex-direction: column; gap: 14px; }
.due { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.errore { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.okmsg { background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* scelte a pulsanti (mesi, pacchetti) */
.scelte { display: flex; flex-wrap: wrap; gap: 8px; }
.scelta { padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--soft); font-weight: 600; cursor: pointer; min-height: 44px; }
.scelta.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* barra della scadenza */
.barra { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.barra span { display: block; height: 100%; background: var(--accent); }

/* tabelle */
.tab-box { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 8px; font-weight: 700; white-space: nowrap; }
td { padding: 12px 8px; border-top: 1px solid var(--line); vertical-align: middle; }

/* avviso in basso */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel-3); border: 1px solid var(--line-2); color: var(--text); padding: 12px 18px; border-radius: 12px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100% - 32px); }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r); padding: 24px; width: min(460px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.6); }

.piede { border-top: 1px solid var(--line); margin-top: 40px; }
.piede-in { max-width: 1200px; margin: 0 auto; padding: 28px 24px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; color: var(--muted); font-size: 14px; }
.piede-in a { color: var(--soft); }
