/* ══════════════════════════════════════════════════════
   AttivaTV — Foglio di stile condiviso
   Tutti i file HTML statici importano questo file.
   Dashboard mantiene il suo tema scuro separato.
══════════════════════════════════════════════════════ */

/* ── Variabili ── */
:root {
  --navy:      #1e3a5f;
  --navy-dark: #162d4a;
}

/* ── Base ── */
body {
  background: #f0f4f8;
}

/* Layout colonna con footer incollato in fondo */
body.page-flex {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ══════════════════════════════════════════════════════
   NAVBAR PUBBLICA (.site-nav)  — index, change-room,
   success, instructions
══════════════════════════════════════════════════════ */
.site-nav {
  background: var(--navy);
  padding: 10px 20px;
}
.site-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}
.site-nav .brand img {
  height: 40px;
  border-radius: 4px;
}
.site-nav .nav-links a {
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
  font-size: .9rem;
  padding: 6px 12px;
  border-radius: 5px;
  transition: background .15s, color .15s;
}
.site-nav .nav-links a:hover {
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

/* ══════════════════════════════════════════════════════
   PAGE HEADER semplice (.page-header)
   — change-room, success, instructions
══════════════════════════════════════════════════════ */
.page-header {
  background: var(--navy);
  color: white;
  padding: 16px 24px;
  margin-bottom: 32px;
}
.page-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}
.page-header a {
  color: rgba(255, 255, 255, .75);
  text-decoration: none;
  font-size: .9rem;
}
.page-header a:hover {
  color: #fff;
}

/* ══════════════════════════════════════════════════════
   HERO  — index
══════════════════════════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2d5a8e 100%);
  color: white;
  padding: 40px 20px 36px;
  text-align: center;
}
.hero img.hero-logo {
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 16px;
}
.hero h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 6px;
}
.hero p {
  opacity: .8;
  font-size: .95rem;
  margin: 0;
}

/* ══════════════════════════════════════════════════════
   CARD PRINCIPALE (.main-card)
   — index, change-room, success
══════════════════════════════════════════════════════ */
.main-card {
  max-width: 500px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════
   INPUT CODICE TV (.tv-input-wrap)  — index
══════════════════════════════════════════════════════ */
.tv-input-wrap {
  position: relative;
}
.tv-input-wrap input {
  font-size: 2rem;
  font-weight: 700;
  font-family: monospace;
  letter-spacing: 10px;
  text-align: center;
  padding: 14px 20px;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  width: 100%;
  transition: border-color .15s;
}
.tv-input-wrap input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, .12);
}
.tv-input-wrap input.is-valid-tv {
  border-color: #22c55e;
}

/* ══════════════════════════════════════════════════════
   TABELLA PREZZI  — index
══════════════════════════════════════════════════════ */
.pricing-table {
  font-size: .875rem;
}
.pricing-table td {
  padding: 5px 10px;
}
.pricing-table .active-tier {
  background: #e8f0fe;
  font-weight: 600;
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════════
   BOX TOTALE  — index
══════════════════════════════════════════════════════ */
.total-box {
  background: var(--navy);
  color: white;
  border-radius: 10px;
  padding: 16px 20px;
}
.total-box .total-amount {
  font-size: 2rem;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════
   FOOTER NAVY (.footer-site)  — index
══════════════════════════════════════════════════════ */
.footer-site {
  margin-top: auto;
  background: var(--navy);
  color: rgba(255, 255, 255, .75);
  padding: 20px 24px;
  font-size: .85rem;
}
.footer-site a {
  color: rgba(255, 255, 255, .6);
  text-decoration: none;
}
.footer-site a:hover {
  color: #fff;
}
.footer-site .footer-brand {
  font-weight: 600;
  color: #fff;
  font-size: .95rem;
}

/* ══════════════════════════════════════════════════════
   PALLINO DI CONNESSIONE (.conn-dot)
   — admin, dashboard
══════════════════════════════════════════════════════ */
.conn-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════
   BADGE TV (.tv-badge)  — admin
══════════════════════════════════════════════════════ */
.tv-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}
.tv-badge.tv-warning {
  animation: blink 1.2s infinite;
}
.tv-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ══════════════════════════════════════════════════════
   ADMIN — Login screen
══════════════════════════════════════════════════════ */
#loginScreen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
#loginInner {
  width: 100%;
  max-width: 360px;
  padding: 0 16px;
}
#adminContent {
  display: none;
}

/* ── Admin Navbar ── */
.admin-nav {
  background: var(--navy);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.admin-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}
.admin-nav .brand img {
  height: 34px;
  border-radius: 3px;
}
.admin-nav .actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.admin-nav .actions a,
.admin-nav .actions button {
  color: rgba(255, 255, 255, .8);
  font-size: .85rem;
  background: none;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 5px;
  padding: 5px 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.admin-nav .actions a:hover,
.admin-nav .actions button:hover {
  background: rgba(255, 255, 255, .15);
  color: #fff;
}

/* ── Admin ESP Banner ── */
.esp-banner {
  border-radius: 8px;
  padding: 10px 16px;
  font-size: .9rem;
}

/* ── Admin Tabs ── */
.admin-tabs-wrap {
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  padding: 0 16px;
}
.nav-tabs {
  border-bottom: none;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.nav-tabs .nav-link {
  color: #64748b;
  font-size: .9rem;
  font-weight: 500;
  padding: 12px 16px;
  border: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  border-radius: 0;
}
.nav-tabs .nav-link:hover {
  color: var(--navy);
  background: #f8faff;
}
.nav-tabs .nav-link.active {
  color: var(--navy);
  font-weight: 700;
  border-bottom-color: var(--navy);
  background: transparent;
}

/* ── Admin TV States ── */
.gettoniera-row {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 16px;
}
.gettoniera-row:last-child {
  border-bottom: none;
}
.gettoniera-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: .85rem;
}
.gettoniera-title {
  font-weight: 600;
  font-size: .95rem;
  min-width: 90px;
}

/* ── Admin Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}

/* ══════════════════════════════════════════════════════
   CAMBIA STANZA — OTP input e result card
══════════════════════════════════════════════════════ */
.otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.otp-inputs input {
  width: 48px;
  height: 56px;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  font-family: monospace;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  outline: none;
  transition: border-color .15s;
}
.otp-inputs input:focus {
  border-color: var(--navy);
}
.result-card {
  background: var(--navy);
  color: white;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
}
.step-divider {
  border-left: 3px solid var(--navy);
  padding-left: 14px;
  margin-bottom: 18px;
}

/* ══════════════════════════════════════════════════════
   SUCCESS PAGE — box OTP
══════════════════════════════════════════════════════ */
.otp-box {
  background: var(--navy);
  color: white;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
}
.otp-code {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 10px;
  font-family: monospace;
}

/* ══════════════════════════════════════════════════════
   ISTRUZIONI — blocchi colorati
══════════════════════════════════════════════════════ */
.block-blue   { background-color: #b4c6e7; padding: 14px; margin-bottom: 10px; border-radius: 4px; }
.block-green  { background-color: #c5e0b3; padding: 14px; margin-bottom: 10px; border-radius: 4px; }
.block-orange { background-color: #f8caac; padding: 14px; border-radius: 4px; }
.block-border { border: 1px solid #000; padding: 18px 20px; border-radius: 4px; }
.block-phone  {
  background-color: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}
img.brand-img  { max-width: 100%; height: auto; }
.phone-number  { font-size: 2.2rem; font-weight: bold; color: #333; }
.btn-call {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  padding: 10px 36px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1.1rem;
  text-decoration: none;
}
.btn-call:hover {
  background: var(--navy-dark);
  color: #fff;
}
