* { box-sizing: border-box; }
body { margin: 0; background: #FCFCFA; font-family: Arial, Helvetica, sans-serif; color: #1F2A37; }
a { color: #2C3E52; }
a:hover { color: #C13B3B; }
input, select, textarea, button { font-family: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.topbar { background: #2C3E52; padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar img { height: 38px; object-fit: contain; }
.topbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lang-group { display: flex; gap: 4px; }
.lang-btn { padding: 5px 9px; border-radius: 3px; border: 1px solid #2C5470; background: transparent; color: #fff; font-size: 11px; font-weight: 700; }
.lang-btn.active { background: #C13B3B; }
.role-label { color: #CBD5DB; font-size: 13px; }
.notif-badge { position: absolute; top: -6px; right: -6px; background: #C13B3B; color: #fff; font-size: 10px; font-weight: 700; border-radius: 10px; padding: 1px 5px; min-width: 16px; text-align: center; }
.notif-dropdown { position: absolute; top: calc(100% + 8px); right: 0; background: #fff; border: 1px solid #EAE8E1; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); width: 320px; max-height: 400px; overflow-y: auto; z-index: 60; }
.notif-dropdown-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid #F0F1F2; font-weight: 700; color: #2C3E52; font-size: 13px; }
.notif-mark-all { background: none; border: none; color: #C13B3B; font-size: 11px; font-weight: 700; }
.notif-item { padding: 10px 14px; border-bottom: 1px solid #F0F1F2; cursor: pointer; color: #1F2A37; }
.notif-item.unread { background: #F5F8FA; }
.notif-item:hover { background: #EFF3F5; }
.notif-time { font-size: 11px; color: #6B7280; margin-top: 2px; }
.notif-empty { padding: 20px 14px; text-align: center; color: #6B7280; font-size: 13px; }
.parking-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.parking-row input { flex: 1; padding: 7px 10px; border: 1px solid #E0DED6; border-radius: 4px; font-size: 12px; }
.parking-set { font-size: 12px; font-weight: 700; color: #2C3E52; margin-top: 4px; }
.btn-outline { background: transparent; border: 1px solid #2C5470; color: #fff; padding: 7px 14px; border-radius: 4px; font-size: 13px; font-weight: 700; }
.btn-outline.danger { border-color: #C13B3B; }

.page { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
.page.narrow { max-width: 920px; }
.tabs { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.tab-btn { padding: 10px 18px; border-radius: 4px; border: 1px solid #E0DED6; background: #fff; color: #5B6573; font-weight: 700; font-size: 13px; }
.tab-btn.active { border: none; background: #2C3E52; color: #fff; }

.card { background: #fff; border: 1px solid #EAE8E1; border-radius: 6px; padding: 26px; margin-bottom: 20px; }
.card.narrow { max-width: 560px; }
.eyebrow { font-size: 12px; letter-spacing: 1px; color: #6B7280; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.section-title { font-size: 13px; font-weight: 700; color: #2C3E52; margin-bottom: 8px; }
.squares { display: flex; gap: 6px; flex-wrap: wrap; }
.square { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border: 1px solid #E0DED6; border-radius: 3px; background: #fff; color: #C13B3B; font-weight: 700; font-size: 13px; }
.square.used { border-color: #C13B3B; background: #FDEDEE; }

.car-row { padding: 14px 0; border-bottom: 1px solid #F0F1F2; }
.car-row-top { display: flex; justify-content: space-between; font-size: 14px; }
.car-plate { color: #6B7280; font-family: monospace; }
.itv-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 3px; background: #F0F1F2; color: #5B6573; }
.itv-badge.warn { background: #FDEDEE; color: #C13B3B; }
.itv-btn { background: none; border: 1px solid #C13B3B; color: #C13B3B; padding: 6px 12px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.itv-btn[disabled] { border-color: #E0DED6; color: #B3BAC0; cursor: not-allowed; }

label.field-label { display: block; font-size: 12px; font-weight: 700; color: #5B6573; margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; padding: 10px; border: 1px solid #E0DED6; border-radius: 4px; font-size: 14px; }
textarea.input { min-height: 70px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
.segmented { display: flex; border: 1px solid #EAE8E1; border-radius: 4px; overflow: hidden; margin-bottom: 18px; }
.segmented button { flex: 1; padding: 10px; border: none; background: #fff; color: #5B6573; font-weight: 700; font-size: 13px; }
.segmented button.active-arrival { background: #2C3E52; color: #fff; }
.segmented button.active-departure { background: #C13B3B; color: #fff; }

.notice { padding: 10px 14px; border-radius: 4px; font-size: 13px; margin-bottom: 16px; }
.notice.danger { background: #FDEDEE; color: #C13B3B; font-weight: 700; }

.btn-primary { width: 100%; padding: 13px; border: none; border-radius: 4px; font-weight: 700; font-size: 14px; background: #C13B3B; color: #fff; }
.btn-primary[disabled] { background: #EAE8E1; color: #B3BAC0; cursor: not-allowed; }
.btn-dark { background: #2C3E52; color: #fff; border: none; padding: 11px 20px; border-radius: 4px; font-weight: 700; cursor: pointer; font-size: 14px; }
.btn-ghost-dark { background: none; border: 1px solid #2C3E52; color: #2C3E52; padding: 11px 20px; border-radius: 4px; font-weight: 700; font-size: 14px; }
.btn-ghost-red { background: none; border: 1px dashed #C13B3B; color: #C13B3B; padding: 8px 12px; border-radius: 4px; font-size: 13px; }
.btn-red { background: #C13B3B; color: #fff; border: none; padding: 10px 18px; border-radius: 4px; font-weight: 700; font-size: 13px; }

.booking-item { background: #fff; border: 1px solid #EAE8E1; border-radius: 6px; padding: 16px 20px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 3px; color: #fff; }
.badge.arrival { background: #2C3E52; }
.badge.departure { background: #C13B3B; }
.muted { color: #6B7280; }
.small { font-size: 12px; }
.italic { font-style: italic; }

.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; background: #EAE8E1; border: 1px solid #EAE8E1; border-radius: 6px; overflow: hidden; }
.calendar-grid .weekday { background: #2C3E52; color: #fff; text-align: center; font-size: 11px; font-weight: 700; padding: 8px 4px; text-transform: uppercase; }
.calendar-grid .day-cell { background: #fff; min-height: 88px; padding: 6px; display: flex; flex-direction: column; }
.calendar-grid .day-cell.today { background: #FDEDEE; }
.calendar-grid .day-num { font-size: 12px; color: #C6CBCF; margin-bottom: 4px; }
.calendar-grid .day-num.in-month { font-weight: 700; color: #2C3E52; }
.day-chip { font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 3px; margin-bottom: 2px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-chip.arrival { background: #2C3E52; }
.day-chip.departure { background: #C13B3B; }
.cal-nav-btn { background: #fff; border: 1px solid #E0DED6; color: #2C3E52; width: 32px; height: 32px; border-radius: 4px; font-size: 14px; }
.cal-today-btn { background: #fff; border: 1px solid #E0DED6; color: #2C3E52; padding: 0 12px; height: 32px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.mode-toggle { display: flex; border: 1px solid #E0DED6; border-radius: 4px; overflow: hidden; }
.mode-toggle button { padding: 8px 14px; border: none; background: #fff; color: #5B6573; font-weight: 700; font-size: 12px; }
.mode-toggle button.active { background: #2C3E52; color: #fff; }

.week-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 10px; }
.week-day { background: #fff; border: 1px solid #EAE8E1; border-radius: 6px; padding: 10px; min-height: 160px; }
.week-day-header { font-size: 12px; font-weight: 700; color: #2C3E52; margin-bottom: 8px; text-transform: capitalize; }
.week-day-header.today { color: #C13B3B; }
.week-booking { background: #F5F6F7; border-radius: 4px; padding: 8px; margin-bottom: 6px; }

.overlay { position: fixed; inset: 0; background: rgba(18,59,84,0.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: 8px; padding: 28px; width: 100%; max-width: 420px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-close { background: none; border: none; color: #6B7280; font-size: 22px; }

.toast { position: fixed; bottom: 24px; right: 24px; background: #2C3E52; color: #fff; padding: 14px 20px; border-radius: 6px; font-size: 13px; max-width: 320px; box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { background: #fff; border-radius: 8px; box-shadow: 0 8px 30px rgba(18,59,84,0.12); padding: 40px 36px; width: 100%; max-width: 400px; }
.login-box img { height: 52px; object-fit: contain; display: block; margin: 0 auto 22px; }
.login-title { font-size: 16px; font-weight: 700; color: #2C3E52; margin-bottom: 8px; text-align: center; }

table.print-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.print-table th { padding: 8px; border-bottom: 2px solid #2C3E52; text-align: left; }
table.print-table td { padding: 8px; border-bottom: 1px solid #F0F1F2; }

.terms p { font-size: 13px; line-height: 1.7; color: #1F2A37; margin: 0 0 10px; }
.terms-section { margin-bottom: 22px; }
.terms-table-wrap { overflow-x: auto; margin: 6px 0 4px; }

.auth-langs { display: flex; justify-content: center; gap: 4px; margin: -8px 0 18px; }
.auth-lang { padding: 4px 9px; border-radius: 3px; border: 1px solid #E0DED6; background: #fff; color: #5B6573; font-size: 11px; font-weight: 700; }
.auth-lang.active { background: #2C3E52; border-color: #2C3E52; color: #fff; }
.login-box.wide { max-width: 560px; }
.login-box .section-title { margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pending-banner { display: flex; flex-direction: column; gap: 4px; background: #FEF6E0; border: 1px solid #F0D58A; color: #6B5313; border-radius: 6px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px; line-height: 1.5; }
.pending-banner strong { color: #5A4510; font-size: 14px; }
.pending-chip { display: inline-block; vertical-align: middle; margin-left: 6px; background: #FEF6E0; color: #8A6D1E; border: 1px solid #F0D58A; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 3px; }
.terms-modal { max-width: 760px; max-height: 85vh; overflow-y: auto; }
.terms-modal .card.terms { border: 0; padding: 0; margin: 0; }

.phone-row { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 8px; }
.phone-row select.input { padding-left: 6px; padding-right: 4px; }
.pkg-list { display: flex; flex-direction: column; gap: 8px; }
.pkg-option { display: flex; align-items: center; gap: 10px; border: 1px solid #E0DED6; border-radius: 6px; padding: 12px 14px; cursor: pointer; }
.pkg-option.selected { border-color: #2C3E52; background: #F5F8FA; }
.pkg-option input { width: 18px; height: 18px; accent-color: #2C3E52; margin: 0; }
.pkg-name { flex: 1; font-size: 14px; font-weight: 700; color: #2C3E52; }
.pkg-price { font-size: 14px; font-weight: 700; color: #1F2A37; white-space: nowrap; }
.car-edit { border-bottom: 1px solid #F0F1F2; margin-bottom: 14px; }
.car-edit .field-row { margin-bottom: 10px; }

.legal-footer { text-align: center; font-size: 11px; color: #6B7280; padding: 18px 16px 28px; line-height: 1.6; }
.legal-footer a { color: #5B6573; }
.login-wrap + .legal-footer { margin-top: -60px; }
.legal-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid #F0F1F2; font-size: 13px; }
.legal-row span { color: #6B7280; }
.legal-row strong { color: #1F2A37; text-align: right; overflow-wrap: anywhere; }

.cal-legend { display: flex; gap: 18px; margin: -6px 0 14px; font-size: 12px; color: #5B6573; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend-dot.arrival { background: #2C3E52; }
.legend-dot.departure { background: #C13B3B; }
.work-table { overflow-x: auto; }
.work-day { font-size: 14px; font-weight: 700; color: #2C3E52; margin: 18px 0 6px; }
.work-table .print-table td { vertical-align: top; }

.booking-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.booking-actions .btn-dark { padding: 7px 12px; font-size: 12px; }

@media (max-width: 700px) {
  html { -webkit-text-size-adjust: 100%; }

  .field-row, .field-row.three { grid-template-columns: 1fr; }
  .page { padding: 14px 10px 32px; }
  .page.narrow { max-width: 100%; }

  /* Evita lo zoom automatico di iOS Safari quando si tocca un campo (richiede font >=16px) */
  .input, select.input, textarea.input { font-size: 16px; }

  .topbar { padding: 10px 12px; gap: 10px; }
  .topbar img { height: 30px; }
  .topbar-right { width: 100%; gap: 8px; justify-content: flex-start; }
  .lang-group { order: 3; width: 100%; justify-content: flex-start; }
  .role-label { display: none; }
  .btn-outline { padding: 8px 10px; font-size: 12px; }

  .notif-dropdown { position: fixed; top: auto; left: 10px; right: 10px; width: auto; max-height: 70vh; }

  .tabs { gap: 6px; margin-bottom: 16px; }
  .tab-btn { padding: 9px 12px; font-size: 12px; flex: 1 1 auto; text-align: center; }

  .card, .card.narrow { padding: 16px; border-radius: 8px; }

  .booking-item { flex-direction: column; align-items: stretch; padding: 14px; }
  .booking-actions { width: 100%; }
  .booking-actions .itv-btn { flex: 1; padding: 10px 8px; }

  .square { width: 22px; height: 22px; font-size: 11px; }

  .calendar-grid .day-cell { min-height: 56px; padding: 4px; }
  .calendar-grid .weekday { font-size: 9px; padding: 6px 2px; }
  .day-chip { font-size: 8px; padding: 1px 3px; }

  .week-grid { grid-template-columns: 1fr; gap: 8px; }
  .week-day { min-height: auto; }

  .modal { padding: 20px; max-width: 100%; }
  .overlay { padding: 12px; }
  .login-box { padding: 28px 22px; }

  .segmented button, .mode-toggle button { padding: 12px 8px; font-size: 12px; }

  table.print-table { font-size: 11px; }
}

.rental-bulk-bar { background: #F5F8FA; border: 1px solid #EAE8E1; border-radius: 6px; padding: 12px 16px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.rental-bulk-bar .btn-dark[disabled] { background: #EAE8E1; color: #B3BAC0; cursor: not-allowed; }

/* Etichette contrassegno noleggio — griglia 2×3 su singolo foglio A4 */
.rental-print-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); gap: 4mm; width: 100%; }
.rental-label { border: 1px solid #999; padding: 8mm 7mm; box-sizing: border-box; display: flex; flex-direction: column; page-break-inside: avoid; break-inside: avoid; overflow: hidden; }
.rental-label-empty { border: 1px dashed #ddd; }
.rental-label-logo { height: 10mm; object-fit: contain; margin-bottom: 3mm; }
.rental-label-title { font-size: 10pt; font-weight: 700; color: #2C3E52; line-height: 1.3; margin-bottom: 3mm; }
.rental-label-table { font-size: 10pt; line-height: 1.7; color: #000; border-collapse: collapse; }
.rental-label-table td { padding: 0; }
.rental-label-table td:first-child { font-weight: 700; padding-right: 6mm; white-space: nowrap; }
.rental-label-legal { font-size: 7pt; line-height: 1.4; color: #333; margin-top: auto; padding-top: 3mm; }
.rental-label-legal > div { margin-top: 1.5mm; }

@media print {
  @page { size: A4; margin: 8mm; }
  html, body { height: auto; margin: 0; padding: 0; background: #fff; }
  /* display:none e non visibility:hidden: un'app solo invisibile occupa comunque spazio
     e spingeva il foglio da stampare a pagina 2, lasciando la prima bianca. */
  body > *:not(#print-area) { display: none !important; }
  #print-area { position: static; padding: 0; display: block !important; width: 100%; }
  .rental-print-grid { height: calc(297mm - 16mm); page-break-after: avoid; }
}

/* Storico arrivi/partenze nella scheda cliente (staff) */
.hist-box { margin-top: 22px; padding-top: 18px; border-top: 1px solid #EAE8E1; }
.hist-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid #F0F2F4; font-size: 14px; }
.hist-row .itv-btn { margin-left: auto; }

/* Contratto per auto: blocco contratto dentro ogni auto (staff) e auto multiple in registrazione */
.car-edit { padding-bottom: 6px; }
.car-contract-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5B6573; margin: 4px 0 8px; }
.reg-car + .reg-car { border-top: 1px solid #EAE8E1; padding-top: 14px; }
.link-btn { background: none; border: none; color: #C13B3B; font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; }

/* Invito ad aggiungere l'app alla schermata Home */
.install-banner { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #EAE8E1; border-left: 4px solid #C13B3B; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(18,59,84,0.06); }
.install-banner img { width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0; }
.install-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #5B6573; line-height: 1.4; }
.install-banner-text strong { font-size: 14px; color: #2C3E52; }
.install-banner-actions { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.install-banner-actions .btn-red { padding: 8px 16px; white-space: nowrap; }
@media (max-width: 420px) { .install-banner { flex-wrap: wrap; } .install-banner-actions { flex-direction: row; width: 100%; justify-content: flex-end; } }

/* =====================================================================
   Stile del nuovo sito menorcars360.com (tema WordPress): font Inter,
   palette rosso/navy/crema, header bianco "vetro", bottoni a pillola,
   card arrotondate con ombra morbida. Sovrascrive le regole sopra.
   ===================================================================== */
:root {
  --mc-bg: #FCFCFA; --mc-surface: #FFFFFF; --mc-muted: #F3F2EE; --mc-border: #EAE8E1;
  --mc-red: #C13B3B; --mc-red-dk: #9E2E2E; --mc-navy: #3F5570; --mc-navy-dk: #2C3E52;
  --mc-text: #1F2A37; --mc-text-muted: #6B7280;
  --mc-radius-sm: 10px; --mc-radius: 16px; --mc-radius-lg: 24px; --mc-pill: 999px;
  --mc-shadow-sm: 0 1px 2px rgba(63,85,112,0.06);
  --mc-shadow-card: 0 10px 30px -10px rgba(63,85,112,0.14);
  --mc-shadow-soft: 0 24px 60px -32px rgba(63,85,112,0.28);
}
body { background: var(--mc-bg); color: var(--mc-text); font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--mc-navy-dk); }
a:hover { color: var(--mc-red); }

/* Header bianco traslucido, come il sito */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,0.86); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid rgba(234,232,225,0.8); padding: 12px 28px; }
.topbar img { height: 44px; }
.role-label { color: var(--mc-text-muted); font-weight: 500; }
.lang-btn { border: 1px solid var(--mc-border); background: var(--mc-surface); color: var(--mc-navy-dk); border-radius: var(--mc-pill); padding: 6px 11px; font-weight: 600; }
.lang-btn.active { background: var(--mc-red); border-color: var(--mc-red); color: #fff; }
.btn-outline { background: var(--mc-surface); border: 1px solid var(--mc-border); color: var(--mc-navy-dk); border-radius: var(--mc-pill); padding: 9px 16px; font-weight: 600; box-shadow: var(--mc-shadow-sm); }
.btn-outline:hover { background: var(--mc-muted); }
.btn-outline.danger { border-color: var(--mc-red); color: var(--mc-red); }
.notif-badge { background: var(--mc-red); }

/* Bottoni a pillola */
.btn-primary, .btn-red, .btn-dark, .btn-ghost-dark, .btn-ghost-red, .itv-btn { border-radius: var(--mc-pill); font-weight: 600; transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease; }
.btn-primary { padding: 15px 22px; font-size: 15px; background: var(--mc-red); box-shadow: 0 6px 20px -8px rgba(193,59,59,0.55); }
.btn-primary:hover:not([disabled]), .btn-red:hover { background: var(--mc-red-dk); transform: translateY(-1px); }
.btn-primary[disabled] { background: var(--mc-muted); color: #B3B0A6; box-shadow: none; }
.btn-red { background: var(--mc-red); padding: 11px 20px; box-shadow: 0 6px 20px -8px rgba(193,59,59,0.55); }
.btn-dark { background: var(--mc-navy-dk); padding: 12px 22px; }
.btn-dark:hover { background: var(--mc-navy); }
.btn-ghost-dark { border: 1px solid var(--mc-border); color: var(--mc-navy-dk); background: var(--mc-surface); padding: 12px 22px; }
.btn-ghost-dark:hover { background: var(--mc-muted); }
.btn-ghost-red { border-style: solid; border-color: rgba(193,59,59,0.35); padding: 9px 16px; }
.itv-btn { padding: 7px 14px; }

/* Schede di navigazione a pillola */
.tab-btn { border-radius: var(--mc-pill); border: 1px solid var(--mc-border); background: var(--mc-surface); color: var(--mc-navy-dk); font-weight: 600; padding: 10px 20px; box-shadow: var(--mc-shadow-sm); }
.tab-btn:hover { background: var(--mc-muted); }
.tab-btn.active { background: var(--mc-navy-dk); color: #fff; border: 1px solid var(--mc-navy-dk); }

/* Card e liste */
.card { border: 1px solid var(--mc-border); border-radius: var(--mc-radius-lg); box-shadow: var(--mc-shadow-card); padding: 28px; }
.booking-item { border: 1px solid var(--mc-border); border-radius: var(--mc-radius); box-shadow: var(--mc-shadow-sm); }
.eyebrow { color: var(--mc-red); letter-spacing: .14em; font-weight: 700; }
.section-title { color: var(--mc-navy-dk); font-weight: 700; }
.badge { border-radius: var(--mc-pill); padding: 4px 11px; font-weight: 600; }
.badge.arrival, .day-chip.arrival, .legend-dot.arrival { background: var(--mc-navy-dk); }
.badge.departure, .day-chip.departure, .legend-dot.departure { background: var(--mc-red); }
.square { border-radius: 8px; border-color: var(--mc-border); }
.square.used { border-color: var(--mc-red); background: #FBEDED; color: var(--mc-red); }
.itv-badge { border-radius: var(--mc-pill); background: var(--mc-muted); }
.itv-badge.warn { background: #FBEDED; color: var(--mc-red); }

/* Campi */
label.field-label { color: var(--mc-navy-dk); font-weight: 600; }
.input, select.input, textarea.input { border: 1px solid var(--mc-border); border-radius: 12px; padding: 12px 14px; background: var(--mc-surface); color: var(--mc-text); transition: border-color .15s ease, box-shadow .15s ease; }
.input:focus, select.input:focus, textarea.input:focus { outline: none; border-color: rgba(193,59,59,0.55); box-shadow: 0 0 0 3px rgba(193,59,59,0.12); }
.segmented { border: 1px solid var(--mc-border); border-radius: var(--mc-pill); padding: 4px; gap: 4px; background: var(--mc-muted); }
.segmented button { border-radius: var(--mc-pill); background: transparent; color: var(--mc-navy-dk); font-weight: 600; }
.segmented button.active-arrival { background: var(--mc-navy-dk); color: #fff; }
.segmented button.active-departure { background: var(--mc-red); color: #fff; }
.mode-toggle { border-color: var(--mc-border); border-radius: var(--mc-pill); padding: 3px; background: var(--mc-muted); }
.mode-toggle button { border-radius: var(--mc-pill); background: transparent; }
.mode-toggle button.active { background: var(--mc-navy-dk); }
.cal-nav-btn, .cal-today-btn { border-color: var(--mc-border); border-radius: var(--mc-pill); }
.notice { border-radius: 12px; }
.notice.danger { background: #FBEDED; color: var(--mc-red-dk); }
.pending-banner, .install-banner { border-radius: var(--mc-radius); }
.pkg-option { border-color: var(--mc-border); border-radius: var(--mc-radius); }
.pkg-option.selected { border-color: var(--mc-navy-dk); background: var(--mc-muted); }

/* Calendario */
.calendar-grid { border-color: var(--mc-border); background: var(--mc-border); border-radius: var(--mc-radius); }
.calendar-grid .weekday { background: var(--mc-navy-dk); }
.calendar-grid .day-cell.today { background: #FBEDED; }
.day-chip { border-radius: 6px; }
.week-day { border-color: var(--mc-border); border-radius: var(--mc-radius); }

/* Finestre e avvisi */
.overlay { background: rgba(20,30,45,0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal { border-radius: var(--mc-radius-lg); box-shadow: var(--mc-shadow-soft); }
.toast { background: var(--mc-navy-dk); border-radius: var(--mc-radius); }
.notif-dropdown { border-color: var(--mc-border); border-radius: var(--mc-radius); box-shadow: var(--mc-shadow-card); }

/* Accesso e registrazione: foto di Menorca come la home del sito */
.login-wrap { background: linear-gradient(180deg, rgba(20,30,45,0.35) 0%, rgba(20,30,45,0.15) 45%, rgba(20,30,45,0.45) 100%), url("../assets/hero-menorca.jpg") center / cover no-repeat fixed; }
.login-box { border-radius: var(--mc-radius-lg); background: rgba(255,255,255,0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--mc-shadow-soft); border: 1px solid rgba(255,255,255,0.6); }
.login-title { font-size: 22px; font-weight: 800; color: var(--mc-navy-dk); letter-spacing: -0.01em; }
.auth-lang { border-radius: var(--mc-pill); border-color: var(--mc-border); padding: 5px 11px; font-weight: 600; }
.auth-lang.active { background: var(--mc-red); border-color: var(--mc-red); }
.login-wrap + .legal-footer { margin-top: 0; background: var(--mc-bg); }

@media (max-width: 700px) {
  .topbar { padding: 10px 12px; }
  .topbar img { height: 34px; }
  .card, .card.narrow { border-radius: var(--mc-radius); padding: 18px; }
  .tab-btn { padding: 9px 14px; }
  .login-wrap { background-attachment: scroll; }
}
.terms-list { margin: 0 0 10px; padding-left: 20px; }
.terms-list li { font-size: 13px; line-height: 1.7; color: #1F2A37; margin-bottom: 6px; }

/* Link alla guida PDF (scheda Condizioni) */
.guide-box { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--mc-border, #EAE8E1); border-left: 4px solid var(--mc-navy-dk, #2C3E52); border-radius: 16px; padding: 14px 18px; margin-bottom: 18px; text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(63,85,112,0.06); }
.guide-box:hover { background: #F3F2EE; color: inherit; }
.guide-box-icon { font-size: 26px; }
.guide-box-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: #5B6573; line-height: 1.4; }
.guide-box-text strong { font-size: 15px; color: #2C3E52; }
.guide-box-cta { font-weight: 700; color: #C13B3B; white-space: nowrap; }

/* Bottone WhatsApp per contattare il cliente (area staff) */
.wa-btn { display: inline-flex; align-items: center; gap: 4px; background: #25D366; color: #fff !important; border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 700; text-decoration: none; vertical-align: middle; line-height: 1.6; }
.wa-btn::before { content: "💬"; font-size: 11px; }
.wa-btn:hover { background: #1EBE5A; color: #fff; }
.box-soft { background: #F3F2EE; border-radius: 14px; padding: 12px 14px; margin-top: 8px; }
