/* home.css */
:root {
  --cw3-bg: #050816;
  --cw3-card: #101528;
  --cw3-border-subtle: #1c2135;
  --cw3-text: #f5f5f7;
  --cw3-text-muted: #a2a6b8;
  --cw3-accent: #ff7a1a;
  --cw3-radius-lg: 18px;
  --cw3-radius-md: 12px;
  --cw3-radius-pill: 999px;
  --cw3-shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);
  --cw3-transition: 0.18s ease-out;
}

/* Varianti colore per brand */
body.brand-callweb3 {
  --cw3-accent: #ff7a1a;
}
body.brand-bikeid {
  --cw3-accent: #22c55e; 
}
body.brand-boatid {
  --cw3-accent: #1ab0ff;
}

/* Reset base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;  /* 👈 blocca lo scroll orizzontale */
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #151932 0, #050816 50%, #020407 100%);
  color: var(--cw3-text);
}

/* Utility */
.hidden {
  display: none !important;
}

/* Layout principale */
.cw3-container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ACCESS GATE */
.cw3-access {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050509; /* sfondo pieno scuro */
  z-index: 3000;
}

.cw3-access-card {
  width: 100%;
  max-width: 400px;
  background:transparent;
  border-radius: 18px;
  padding: 22px 20px 20px;
 
  text-align: center;
}

.cw3-access-logo {
  width: 400px;
  height: 200px;
  margin-bottom: 10px;
}

.cw3-access-card h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.cw3-access-card p {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--cw3-text-muted);
}

.cw3-access-card input[type="password"] {
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--cw3-border-subtle);
  background: #050816;
  color: var(--cw3-text);
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.cw3-access-error {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #ff4b4b;
}

/* Buttons */
.cw3-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: 8px;
  padding: 8px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--cw3-transition), box-shadow var(--cw3-transition),
    background var(--cw3-transition), color var(--cw3-transition), border-color var(--cw3-transition);
    margin-top: 10px;
}

.cw3-btn-primary {
  background: linear-gradient(135deg, var(--cw3-accent), #ffd28a);
  color: #050816;
  font-weight: 600;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.cw3-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
}

.cw3-btn-ghost-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 999px;
  background: transparent;
  color: var(--cw3-text);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.cw3-btn-ghost-sm:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cw3-btn-full {
  width: 100%;
}

/* Home */
.cw3-home {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.cw3-home-inner {
  padding: 40px 0 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

/* Logo centrale */
.cw3-home-logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cw3-home-logo {
  width: 300px;
  height: 60px;
  margin-bottom: 8px;
}

.cw3-home-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cw3-home-title {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cw3-home-subbrand {
  font-size: 0.88rem;
  color: var(--cw3-text-muted);
}

/* Panel */
.cw3-home-panel {
  width: 100%;
  max-width: 720px;
}

.cw3-stat-label-date {
  margin-left: 4px;
  font-size: 0.78rem;
  color: var(--cw3-text-muted);
}

.cw3-hero-card {
  background: var(--cw3-card);
  border-radius: var(--cw3-radius-lg);
  box-shadow: var(--cw3-shadow-soft);
  border: 1px solid var(--cw3-border-subtle);
  padding: 18px 18px 20px;
}

.cw3-hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--cw3-text-muted);
  margin-bottom: 12px;
}

.cw3-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cw3-panel-title {
  font-weight: 500;
}

.cw3-panel-brand {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cw3-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #30e88f;
  box-shadow: 0 0 12px rgba(48, 232, 143, 0.7);
}

.cw3-hero-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Statistiche */
.cw3-stat-row {
  display: flex;
  gap: 10px;
}

.cw3-stat {
  flex: 1;
  font-size: 0.86rem;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(5, 8, 22, 0.9);
  border: 1px solid var(--cw3-border-subtle);
}

.cw3-stat-label {
  color: var(--cw3-text-muted);
  display: block;
  margin-bottom: 2px;
}

.cw3-stat-value {
  font-weight: 600;
}

/* Call preview */
.cw3-call-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(10, 15, 36, 0.9);
  border-radius: var(--cw3-radius-md);
  padding: 10px 10px;
  border: 1px solid var(--cw3-border-subtle);
}

.cw3-avatar-group {
  display: flex;
}

.cw3-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cw3-accent), #ffd28a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #050816;
}

.cw3-avatar + .cw3-avatar {
  margin-left: -10px;
}

.cw3-call-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cw3-call-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.cw3-call-sub {
  font-size: 0.78rem;
  color: var(--cw3-text-muted);
}

.cw3-actions-row {
  margin-top: 2px;
}

/* Toolbar icone funzioni */
.cw3-toolbar {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.cw3-tool-btn {
  flex: 1;
  border-radius: 999px;
  border: 1px solid var(--cw3-border-subtle);
  background: rgba(5, 8, 22, 0.9);
  color: var(--cw3-text-muted);
  font-size: 0.9rem;
  padding: 6px 0;
  cursor: default;
}

/* SCHEDULER */
.cw3-schedule {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cw3-schedule h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.cw3-schedule-grid {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.cw3-field {
  flex: 1;
}


.cw3-field label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 3px;
}

.cw3-field input[type="date"],
.cw3-field input[type="time"],
.cw3-field input[type="text"],
.cw3-field input[type="email"],
.cw3-field input[type="tel"] {
  width: 100%;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid var(--cw3-border-subtle);
  background: #050816;
  color: var(--cw3-text);
  font-family: inherit;
  font-size: 0.88rem;
}


.cw3-link-box {
  margin-top: 10px;
}
/* RIGA CONTATTI: email cliente / email operatore / telefono */
.cw3-contact-grid {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 15px;
}

.cw3-contact-grid .cw3-field {
  flex: 1;
}

.cw3-invite-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  margin-bottom: 4px;
}

.cw3-invite-title {
  font-size: 0.85rem;
  color: var(--cw3-text-muted);
}

/* contenitore lingua + bottone AI */
.cw3-invite-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* select lingua */
.cw3-select-lang {
  border-radius: 8px;
  border: 0px solid rgba(255, 255, 255, 0.25);
  background: #050816;
  color: var(--cw3-text);
  font-size: 0.8rem;
  padding: 4px 10px;
  font-family: inherit;
}
.cw3-invite-header-actions {
  display: flex;
  gap: 6px;
}

@media (max-width: 720px) {
  .cw3-contact-grid {
    flex-direction: column;
  }
}


/* textarea del testo email */
.cw3-field textarea {
  width: 100%;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid var(--cw3-border-subtle);
  background: #050816;
  color: var(--cw3-text);
  font-family: inherit;
  font-size: 0.88rem;
  resize: vertical;
  min-height: 180px;
}


/* Contenitore textarea + pulsanti invito */
.cw3-link-row-textarea {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

/* Contenitore dei bottoni "Copia" + "Calendario" */
.cw3-link-row-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Su schermi larghi mettiamo i bottoni in riga */
@media (min-width: 768px) {
  .cw3-link-row-buttons {
    flex-direction: row;
    align-items: flex-start;
  }
  .cw3-link-row-textarea textarea {
    min-height: 80px;
  }
}

.cw3-link-row-textarea textarea {
  flex: 1;
  border-radius: 10px;
  border: 1px solid var(--cw3-border-subtle);
  background: #050816;
  color: var(--cw3-text);
  font-family: inherit;
  font-size: 0.86rem;
  padding: 8px 9px;
}

/* Brand switch */
.cw3-brand-switch {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
  flex-wrap: wrap;
}

.cw3-brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 8, 22, 0.9);
  color: var(--cw3-text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--cw3-transition), transform var(--cw3-transition), box-shadow var(--cw3-transition);
}

.cw3-brand-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.cw3-brand-btn.active {
  border-color: var(--cw3-accent);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5);
}

.cw3-brand-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Footer */
.cw3-home-footer {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--cw3-text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.cw3-home-footer-sub {
  opacity: 0.75;
}

/* Responsive */
@media (max-width: 640px) {
  .cw3-schedule-grid {
    flex-direction: column;
  }
}
/* ===== ELENCO CALL DI OGGI ===== */

.cw3-today-list {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(5, 8, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cw3-today-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cw3-today-list-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.cw3-today-list-count {
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--cw3-text-muted);
}

/* contenitore righe */
.cw3-today-list-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 150px;
  overflow-y: auto;
}

/* messaggio "nessuna call" */
.cw3-today-list-empty {
  font-size: 0.8rem;
  color: var(--cw3-text-muted);
  font-style: italic;
}

/* singola riga call */
.cw3-today-list-row {
  display: grid;
  grid-template-columns: 60px 80px 90px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 10px;
  background: rgba(10, 15, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
}

.cw3-today-list-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* colonna orario */
.cw3-today-list-time {
  font-variant-numeric: tabular-nums;
  color: var(--cw3-text);
}

/* colonna brand */
.cw3-today-list-brand {
  font-weight: 500;
  color: var(--cw3-accent);
}

/* colonna nota */
.cw3-today-list-note {
  color: var(--cw3-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* bottone "Apri" nella lista */
.cw3-today-list-open-btn {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--cw3-text);
  cursor: pointer;
}

.cw3-today-list-open-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
/* colonna stato */
.cw3-today-list-status {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cw3-today-list-status-scheduled {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.6);
}

.cw3-today-list-status-finished {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.6);
  opacity: 0.85;
}
/* stato "In corso" */
.cw3-today-list-status-live {
  color: #f97373;
  border-color: rgba(248, 113, 113, 0.8);
}

/* riga evidenziata per call in corso */
.cw3-today-list-row-live {
  border-color: rgba(248, 113, 113, 0.9);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.6),
    0 8px 18px rgba(0, 0, 0, 0.5);
  background: radial-gradient(
    circle at left,
    rgba(248, 113, 113, 0.22),
    rgba(10, 15, 36, 0.95)
  );
}
/* Sezione manutenzione */
.cw3-maintenance {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 0px;
  background: transparent;
  border: 0px solid rgba(255, 255, 255, 0.08);
}

.cw3-maintenance-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.cw3-maintenance-btn {
  margin-top: 1px;
}

.cw3-maintenance-result {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--cw3-text-muted);
  min-height: 1em;
}

/* Link alla pagina di verifica report */
.cw3-verify-link {
  margin: 20px auto 0;
  max-width: 720px;
  text-align: center;
  padding: 12px 16px;
  border-radius: 0px;
  background: transparent;
  border: 0px solid rgba(255, 255, 255, 0.06);
  margin-top: -50px;
}

.cw3-verify-link-text {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--cw3-text-muted);
}
