/* ============================================
   HOST STYLE — Overrides & Legacy Support
   Extends host-design-system.css
   ============================================ */

/* Legacy variable aliases — keep JS compatibility */
:root {
    --primary:       var(--color-brand-accent);
    --primary-dark:  var(--color-brand-accent-hover);
    --secondary:     #7C3AED;
    --bg-body:       var(--color-bg-body);
    --bg-card:       var(--color-bg-card);
    --text-main:     var(--color-text-primary);
    --text-muted:    var(--color-text-muted);
    --text-light:    var(--color-text-secondary);
    --border:        var(--color-border);
    --sidebar-width: var(--sidebar-width-expanded);
    --header-height: var(--header-height);
    --green:         var(--color-success);
    --green-light:   var(--color-success-bg);
    --blue:          var(--color-info);
    --blue-light:    var(--color-info-bg);
    --purple:        #7C3AED;
    --purple-light:  #EDE9FE;
    --orange:        var(--color-brand-accent);
}

/* WIZARD GUIDE MODAL */
.guide-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.guide-step {
    display: none;
    padding: 40px 30px 10px 30px;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.guide-step.active {
    display: block;
}

.guide-emoji {
    font-size: 4rem;
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.guide-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.guide-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.guide-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 20px 0;
}

.guide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.3s;
}

.guide-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

.guide-nav {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    align-items: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* LOGO AREA (legacy, kept for backward compat) */
.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding: 0 12px;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* USER PROFILE (legacy sidebar footer) */
.user-info {
    display: flex;
    flex-direction: column;
}

.user-info span {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Fix for Chart.js infinite resizing */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    overflow: hidden;
}

/* Notification Toast (legacy backward compat) */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-left: 4px solid var(--color-brand-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    align-items: center;
    animation: slideIn 0.3s ease;
    z-index: 10000;
    min-width: 300px;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-icon {
    font-size: 1.5rem;
}

.notification-content strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-main);
}

.notification-content p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-badge:hover {
    background: #dc2626;
}

/* --- TOUR SPOTLIGHT (legacy — superseded by tour v2 below) --- */
#tour-overlay {
    /* Defer all display logic to .tour-overlay class rules */
}

.tour-highlight {
    position: fixed !important;
    z-index: 2147483647 !important;
    box-shadow: 0 0 0 4px var(--color-brand-accent), 0 0 0 5000px rgba(0, 0, 0, 0.75), 0 0 30px 5px rgba(255, 255, 255, 0.6) !important;
    border-radius: 8px;
    pointer-events: none;
    transition: box-shadow 0.3s ease;
}

#tour-popover {
    position: fixed;
    z-index: 2147483647 !important;
    background: white;
    padding: 24px;
    border-radius: 16px;
    width: 320px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    visibility: hidden;
}

#tour-popover.visible {
    opacity: 1;
    visibility: visible;
}

#tour-popover h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 1.25rem;
}

#tour-popover p {
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 20px;
}

#tour-popover .tour-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.tour-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.tour-btn-primary {
    background: var(--color-brand-accent);
    color: white;
    border: none;
}

.tour-btn-outline {
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

/* AUTOMATION CARD extra styles */
.automation-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.automation-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.auto-stats i {
    font-size: 1rem;
}

/* Responsive form layout (extra media queries) */
@media (max-width: 900px) {
    .responsive-grid-form {
        grid-template-columns: 1fr 1fr;
    }
    .responsive-grid-form button {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .responsive-grid-form {
        grid-template-columns: 1fr;
    }
    .responsive-grid-form button {
        grid-column: 1;
    }
}

/* badge-purple for legacy */
.badge-purple {
    background: var(--purple-light);
    color: var(--purple);
}

/* bg / text utility classes used in older HTML */
.bg-green-light { background: var(--green-light); }
.text-green     { color: var(--green); }
.bg-blue-light  { background: var(--blue-light); }
.text-blue      { color: var(--blue); }
.bg-purple-light{ background: var(--purple-light); }
.text-purple    { color: var(--purple); }

/* label base styles (used inline in forms) */
label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-main);
}

/* ============================================
   QR PROMO CARD (sidebar legacy)
   ============================================ */
.qr-promo-card {
    background: linear-gradient(135deg, var(--color-brand-accent), #FF9A6C);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    color: white;
    text-align: center;
    margin-bottom: var(--space-4);
}

.qr-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
    opacity: 0.9;
    max-width: 100px;
    margin-left: auto;
    margin-right: auto;
}

.qr-text h4 {
    margin-bottom: 2px;
    font-size: 0.85rem;
}

.qr-text p {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-bottom: 8px;
}

/* Icon Revenue (legacy class used in old stat cards) */
.icon-revenue {
    background: rgba(255, 107, 53, 0.1);
    color: var(--color-brand-accent);
}

/* Override notification-toast for backward compat */
.notification-toast {
    border-left-color: var(--color-brand-accent);
}

/* ════ CALENDARIO — REDESIGN ════════════════════════════ */

/* ① Header */
.cal-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.cal-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cal-page-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.cal-sync-status {
  font-size: 11px;
  color: #9ca3af;
  background: #f9fafb;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
}
.cal-top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-cal-sync {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  transition: border-color .15s;
}
.btn-cal-sync:hover { border-color: #FF6B35; color: #FF6B35; }
.sync-icon {
  font-size: 15px;
  display: inline-block;
  transition: transform .4s;
}
.btn-cal-sync.syncing .sync-icon { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-cal-add {
  padding: 9px 18px;
  background: #FF6B35;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.btn-cal-add:hover { background: #e55a26; }

/* ② Banner setup */
.cal-setup-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.csb-icon { font-size: 24px; flex-shrink: 0; }
.csb-text { flex: 1; min-width: 200px; }
.csb-text strong { font-size: 14px; font-weight: 700; color: #1e40af; }
.csb-text p { font-size: 12px; color: #3b82f6; margin: 3px 0 0; line-height: 1.4; }
.csb-cta {
  padding: 8px 16px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

/* ③ Nav mese */
.cal-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.cal-nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cal-nav-center {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cal-month-label {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  min-width: 140px;
  text-align: center;
}
.cal-nav-btn {
  width: 32px; height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  background: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #374151;
  transition: border-color .15s, color .15s;
}
.cal-nav-btn:hover { border-color: #FF6B35; color: #FF6B35; }
.cal-btn-today {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  color: #6b7280;
  transition: border-color .15s;
}
.cal-btn-today:hover { border-color: #FF6B35; color: #FF6B35; }

/* Legenda */
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #6b7280;
}
.cl-item { display: flex; align-items: center; gap: 5px; }
.cl-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ④ Griglia calendario */
.cal-grid-container {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  background: #fff;
}
.cal-week-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.cal-week-headers span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  padding: 8px 4px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.cal-week-headers .weekend { color: #d1d5db; }
.cal-cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-cell {
  min-height: 68px;
  padding: 5px 4px 3px;
  border-right: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background .12s;
  position: relative;
  background: #fff;
}
.cal-cell:hover { background: #fffbf9; }
.cal-cell.vuota { background: #fafafa; cursor: default; }
.cal-cell.oggi { background: #fff8f5; }
.cal-cell.oggi .cal-day-num { color: #FF6B35; font-weight: 800; }
.cal-day-num {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  display: block;
  margin-bottom: 2px;
  line-height: 1;
}
.cal-pill {
  display: block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-rs      { background: #dbeafe; color: #1e40af; }
.cp-airbnb  { background: #fee2e2; color: #991b1b; }
.cp-vrbo    { background: #e0e7ff; color: #3730a3; }
.cp-booking { background: #e0f2fe; color: #0369a1; }
.cp-multi   { background: #ede9fe; color: #4c1d95; }
.cp-test    { background: #fef9c3; color: #713f12; }

/* Skeleton loader */
.cal-loading-placeholder {
  grid-column: 1 / -1;
}
.cal-skeleton {
  height: 280px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ⑤ Lista prenotazioni */
.cal-bookings-section { margin-bottom: 16px; }
.cbs-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.cbs-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.cbs-badge {
  background: #f3f4f6;
  color: #374151;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.cbs-empty {
  text-align: center;
  padding: 20px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px dashed #e5e7eb;
}
.cbs-empty-icon { font-size: 28px; margin-bottom: 6px; }
.cbs-empty strong { font-size: 13px; color: #374151; display: block; }
.cbs-empty p { font-size: 12px; color: #9ca3af; margin: 4px 0 0; }
.bk-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 6px;
  background: #fff;
  transition: box-shadow .15s;
}
.bk-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.bk-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1e40af;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bk-info { flex: 1; min-width: 0; }
.bk-name { font-size: 13px; font-weight: 600; color: #111827; }
.bk-dates { font-size: 11px; color: #6b7280; margin-top: 2px; }
.bk-source {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.bs-rs      { background: #dbeafe; color: #1e40af; }
.bs-airbnb  { background: #fee2e2; color: #991b1b; }
.bs-vrbo    { background: #e0e7ff; color: #3730a3; }
.bs-booking { background: #e0f2fe; color: #0369a1; }
.bs-test    { background: #fef9c3; color: #713f12; }
.bk-actions { display: flex; gap: 5px; flex-shrink: 0; }
.bk-btn {
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  color: #6b7280;
}
.bk-btn.danger { color: #ef4444; border-color: #fca5a5; }
.bk-btn.danger:hover { background: #fee2e2; }

/* ⑥ Accordion piattaforme */
.cal-platforms-accordion {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.cpa-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f9fafb;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
}
.cpa-toggle:hover { background: #f3f4f6; }
.cpa-toggle-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cpa-icon { font-size: 18px; }
.cpa-title { font-size: 14px; font-weight: 600; color: #111827; display: block; }
.cpa-subtitle { font-size: 11px; color: #9ca3af; display: block; margin-top: 1px; }
.cpa-chevron {
  font-size: 14px; color: #9ca3af;
  transition: transform .25s;
  flex-shrink: 0;
}
.cpa-chevron.open { transform: rotate(180deg); }
.cpa-body {
  padding: 16px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cpa-body.hidden { display: none; }

/* Card piattaforma */
.platform-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.pc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fafafa;
  border-bottom: 1px solid #f3f4f6;
  flex-wrap: wrap;
}
.pc-avatar {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.pc-airbnb-color  { background: #FF5A5F; }
.pc-vrbo-color    { background: #1D3557; }
.pc-booking-color { background: #003580; }
.pc-info { flex: 1; }
.pc-info strong { font-size: 13px; font-weight: 600; display: block; }
.pc-status {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #6b7280;
  display: inline-block;
  margin-top: 2px;
}
.pc-status.ok      { background: #d1fae5; color: #065f46; }
.pc-status.error   { background: #fee2e2; color: #991b1b; }
.pc-status.pending { background: #fef3c7; color: #92400e; }
.pc-freq { font-size: 11px; color: #9ca3af; margin-left: auto; }
.pc-input-row {
  display: flex;
  gap: 7px;
  padding: 10px 14px;
  flex-wrap: wrap;
}
.pc-url-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 7px;
  font-size: 12px;
  font-family: monospace;
  color: #111827;
  background: #f9fafb;
  transition: border-color .15s;
}
.pc-url-input:focus {
  outline: none;
  border-color: #FF6B35;
  background: #fff;
}
.pc-btn-save {
  padding: 8px 14px;
  background: #FF6B35;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.pc-btn-remove {
  padding: 8px 10px;
  background: transparent;
  border: 1px solid #fca5a5;
  border-radius: 7px;
  color: #ef4444;
  cursor: pointer;
  font-size: 12px;
  flex-shrink: 0;
}
.pc-btn-remove.hidden { display: none; }
.pc-howto {
  border-top: 1px solid #f3f4f6;
  padding: 0 14px;
  font-size: 12px;
}
.pc-howto summary {
  padding: 8px 0;
  cursor: pointer;
  color: #3b82f6;
  font-weight: 500;
  list-style: none;
}
.pc-howto summary::-webkit-details-marker { display: none; }
.pc-howto ol {
  margin: 4px 0 10px 16px;
  color: #6b7280;
  line-height: 1.7;
}
.pc-howto code {
  background: #f3f4f6;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
}
.cpa-sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  color: #6b7280;
  flex-wrap: wrap;
  gap: 8px;
}
.cpa-sync-now {
  padding: 6px 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #374151;
  transition: border-color .15s;
}
.cpa-sync-now:hover:not(:disabled) { border-color: #FF6B35; color: #FF6B35; }
.cpa-sync-now:disabled { opacity: .5; cursor: not-allowed; }

/* ⑦ Modal nuova prenotazione */
.cal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.cal-modal-overlay.hidden { display: none; }
.cal-modal-box {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.cal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f3f4f6;
}
.cal-modal-header h3 { font-size: 16px; font-weight: 700; color: #111827; margin: 0; }
.cal-modal-close {
  width: 28px; height: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #6b7280;
}
.cal-modal-body { padding: 18px 20px; }
.cm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.cm-field { display: flex; flex-direction: column; gap: 4px; }
.cm-field label { font-size: 11px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .3px; }
.cm-field input {
  padding: 9px 11px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  color: #111827;
  transition: border-color .15s;
}
.cm-field input:focus { outline: none; border-color: #FF6B35; }
.cm-field-full { display: flex; flex-direction: column; gap: 4px; }
.cm-select {
  padding: 9px 11px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  color: #111827;
  background: #fff;
  transition: border-color .15s;
  cursor: pointer;
}
.cm-select:focus { outline: none; border-color: #FF6B35; }
.cm-select.error { border-color: #ef4444; background: #fef2f2; }
.cm-field-error {
  font-size: 11px;
  color: #ef4444;
  margin-top: 2px;
}
.cm-field-error.hidden { display: none; }
.req { color: #ef4444; }
.cm-conflict {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  font-size: 12px;
  color: #991b1b;
  margin-top: 8px;
}
.cm-conflict span:first-child { font-size: 16px; flex-shrink: 0; }
.cm-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  font-size: 12px;
  color: #166534;
  margin-top: 8px;
}
.cal-modal-footer {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid #f3f4f6;
}
.btn-save-prenot {
  flex: 1;
  padding: 10px;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-save-prenot:hover { background: #059669; }
.btn-save-prenot:disabled { opacity: .5; cursor: not-allowed; }
.btn-cancel-prenot {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 600px) {
  .cal-top-bar { flex-direction: column; align-items: flex-start; }
  .cal-top-actions { width: 100%; justify-content: flex-end; }
  .cal-nav-row { flex-direction: column; align-items: flex-start; }
  .cal-cell { min-height: 48px; padding: 3px 2px; }
  .cal-day-num { font-size: 10px; }
  .cal-pill { display: none; }
  .cal-cell.has-booking::after {
    content: '●';
    font-size: 6px;
    color: #FF6B35;
    display: block;
    text-align: center;
  }
  .cm-row { grid-template-columns: 1fr; }
  .cal-modal-footer { flex-direction: column; }
  .btn-save-prenot { order: -1; }
  .pc-input-row { flex-direction: column; }
  .pc-btn-save { width: 100%; }
}
/* ════ TOUR GUIDATO PRO v3 ════════════════════════════════ */
.tour-overlay {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.tour-overlay.hidden { display: none !important; }
.tour-backdrop {
  position: absolute; inset: 0;
  background: rgba(10,15,30,0.82);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.tour-card {
  position: relative; background: #fff; border-radius: 20px;
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 40px 80px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.1);
  display: flex; flex-direction: column;
  animation: tourCardIn .35s cubic-bezier(.175,.885,.32,1.275);
}
@keyframes tourCardIn {
  from { opacity:0; transform: scale(.94) translateY(12px); }
  to   { opacity:1; transform: scale(1) translateY(0); }
}
.tour-progress-bar {
  height: 4px; background: #f0f0f0;
  border-radius: 4px 4px 0 0; overflow: hidden; flex-shrink: 0;
}
.tour-progress-fill {
  height: 100%; background: linear-gradient(90deg, #FF6B35 0%, #FF8C5A 100%);
  border-radius: 4px; transition: width .5s cubic-bezier(.4,0,.2,1); width: 0%;
}
.tour-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px 0; flex-shrink: 0;
}
.tour-header-brand { display: flex; align-items: center; gap: 8px; }
.tour-header-title { font-size: 12px; font-weight: 600; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; }
.tour-header-step { font-size: 12px; font-weight: 600; color: #FF6B35; background: #fff3ee; padding: 3px 10px; border-radius: 20px; }
.tour-dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0 0; flex-shrink: 0; }
.tour-dot { width: 6px; height: 6px; border-radius: 50%; background: #e5e7eb; transition: all .3s ease; }
.tour-dot.active { background: #FF6B35; width: 20px; border-radius: 3px; }
.tour-dot.done { background: #10b981; }
.tour-body { padding: 20px 24px 16px; flex: 1; }
.tour-icon-wrap {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, #fff3ee, #fde8dc);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 16px;
}
.tour-step-title { font-size: 21px; font-weight: 800; color: #111827; text-align: center; margin-bottom: 8px; line-height: 1.2; }
.tour-step-desc { font-size: 14px; color: #6b7280; text-align: center; line-height: 1.6; margin-bottom: 20px; }
.tour-step-desc strong { color: #374151; }
.tour-import-wrap { border: 2px solid #FF6B35; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.tour-import-head {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  background: linear-gradient(135deg, #fff8f5, #fff3ee); border-bottom: 1px solid #fde8dc;
}
.tour-import-head strong { font-size: 13px; color: #111827; display: block; }
.tour-import-head > div > span { font-size: 11px; color: #9ca3af; display: block; }
.tour-import-body { padding: 12px 14px; }
.tour-import-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tour-url-input {
  flex: 1; min-width: 0; padding: 9px 12px;
  border: 1.5px solid #e5e7eb; border-radius: 8px;
  font-size: 12px; font-family: monospace; color: #111827; background: #f9fafb;
  transition: border-color .15s;
}
.tour-url-input:focus { outline: none; border-color: #FF6B35; background: #fff; }
.tour-btn-imp {
  padding: 9px 16px; background: #FF6B35; color: #fff;
  border: none; border-radius: 8px; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: background .15s;
}
.tour-btn-imp:hover { background: #e55a26; }
.tour-btn-imp:disabled { opacity: .5; cursor: not-allowed; }
.tour-or-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 10px 0; font-size: 12px; color: #9ca3af;
}
.tour-or-divider::before, .tour-or-divider::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }
.tour-manual { display: flex; flex-direction: column; gap: 10px; }
.tour-field { display: flex; flex-direction: column; gap: 4px; }
.tour-field label { font-size: 11px; font-weight: 700; color: #374151; text-transform: uppercase; letter-spacing: .4px; }
.tour-field label em { font-size: 10px; color: #9ca3af; font-weight: 400; font-style: normal; text-transform: none; letter-spacing: 0; margin-left: 4px; }
.tour-input {
  padding: 10px 12px; border: 1.5px solid #e5e7eb; border-radius: 8px;
  font-size: 13px; color: #111827; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.tour-input:focus { outline: none; border-color: #FF6B35; box-shadow: 0 0 0 3px rgba(255,107,53,.1); }
.tour-input.invalid { border-color: #ef4444; }
.tour-phone-wrap {
  display: flex; border: 1.5px solid #e5e7eb; border-radius: 8px;
  overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.tour-phone-wrap:focus-within { border-color: #FF6B35; box-shadow: 0 0 0 3px rgba(255,107,53,.1); }
.tour-phone-prefix {
  padding: 10px; border: none; border-right: 1.5px solid #e5e7eb;
  background: #f9fafb; font-size: 13px; color: #374151; cursor: pointer; min-width: 88px;
}
.tour-phone-prefix:focus { outline: none; }
.tour-phone-num { flex: 1; padding: 10px 12px; border: none; background: #fff; font-size: 13px; color: #111827; min-width: 0; }
.tour-phone-num:focus { outline: none; }
.tour-phone-num::placeholder { color: #9ca3af; }
.tour-field-hint { font-size: 11px; color: #9ca3af; display: block; }
.tour-save-btn {
  width: 100%; padding: 11px; background: #10b981; color: #fff;
  border: none; border-radius: 9px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .15s; margin-top: 4px;
}
.tour-save-btn:hover { background: #059669; }
.tour-save-btn:disabled { opacity: .5; cursor: not-allowed; }
.tour-verify {
  margin: 0 24px 12px; background: #f9fafb;
  border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; flex-shrink: 0;
}
.tour-verify-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6; font-size: 13px; color: #374151;
}
.tour-verify-row:last-child { border-bottom: none; }
.tvr-icon { font-size: 16px; width: 24px; text-align: center; flex-shrink: 0; }
.tvr-label { flex: 1; }
.tvr-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.tvr-badge.ok      { background: #d1fae5; color: #065f46; }
.tvr-badge.pending { background: #fef3c7; color: #92400e; }
.tour-loading { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f9fafb; border-radius: 8px; font-size: 12px; color: #6b7280; margin-top: 8px; }
.tour-spin { width: 18px; height: 18px; border: 2.5px solid #fde8dc; border-top-color: #FF6B35; border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0; }
.tour-import-ok { background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; padding: 8px 12px; font-size: 12px; color: #166534; margin-top: 8px; display: flex; gap: 6px; }
.tour-service-templates { display: flex; flex-direction: column; gap: 8px; }
.tour-svc-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1.5px solid #e5e7eb; border-radius: 10px; cursor: pointer; background: #fff; transition: all .15s;
}
.tour-svc-card:hover { border-color: #FF6B35; background: #fff8f5; }
.tour-svc-card.added { border-color: #10b981; background: #f0fdf4; }
.tour-svc-icon { width: 36px; height: 36px; border-radius: 8px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.tour-svc-info { flex: 1; }
.tour-svc-nome  { font-size: 13px; font-weight: 600; color: #111827; }
.tour-svc-prezzo{ font-size: 12px; color: #6b7280; }
.tour-svc-check { font-size: 16px; color: #10b981; flex-shrink: 0; display: none; }
.tour-svc-card.added .tour-svc-check { display: block; }
.tour-qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tour-qr-box { border: 1.5px solid #e5e7eb; border-radius: 12px; padding: 14px; text-align: center; }
.tour-qr-box.host-box  { border-color: #FF6B35; background: #fff8f5; }
.tour-qr-box.guest-box { border-color: #3b82f6; background: #eff6ff; }
.tqb-emoji { font-size: 26px; margin-bottom: 6px; display: block; }
.tqb-label { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.host-box  .tqb-label { color: #FF6B35; }
.guest-box .tqb-label { color: #3b82f6; }
.tqb-desc { font-size: 11px; color: #6b7280; line-height: 1.4; }
.tour-confirm-btn {
  display: block; width: 100%; padding: 12px; background: #FF6B35; color: #fff;
  border: none; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s;
}
.tour-confirm-btn:hover { background: #e55a26; }
.tour-complete-wrap { text-align: center; padding: 8px 0 4px; }
.tour-complete-emoji { font-size: 52px; margin-bottom: 12px; display: block; }
.tour-complete-title { font-size: 22px; font-weight: 800; color: #111827; margin-bottom: 8px; }
.tour-complete-sub { font-size: 14px; color: #6b7280; line-height: 1.6; margin-bottom: 18px; }
.tour-complete-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tcc-item { background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; padding: 10px; font-size: 12px; font-weight: 600; color: #166534; display: flex; align-items: center; gap: 6px; }
.tour-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; border-top: 1px solid #f3f4f6;
  background: #fafafa; border-radius: 0 0 20px 20px; flex-shrink: 0;
}
.tour-skip-btn { font-size: 13px; color: #9ca3af; background: transparent; border: none; cursor: pointer; text-decoration: underline; }
.tour-skip-btn.hidden { visibility: hidden; }
.tour-next-btn {
  display: flex; align-items: center; gap: 8px; padding: 11px 24px;
  background: #FF6B35; color: #fff; border: none; border-radius: 9px;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s, opacity .2s, transform .1s;
}
.tour-next-btn:not(:disabled):hover { background: #e55a26; transform: translateY(-1px); }
.tour-next-btn:disabled { opacity: .4; cursor: not-allowed; }
.tour-next-btn.green { background: #10b981; }
.tour-next-btn.green:hover { background: #059669; }
.tour-next-arrow { font-size: 16px; }
@keyframes tourShake {
  0%,100%{transform:translateX(0)} 15%{transform:translateX(-7px)}
  35%{transform:translateX(7px)} 55%{transform:translateX(-5px)} 75%{transform:translateX(5px)}
}
.tour-card.shake { animation: tourShake .4s ease; }
@keyframes confettiFall {
  0%{transform:translateY(-10px) rotate(0deg);opacity:1}
  100%{transform:translateY(120px) rotate(720deg);opacity:0}
}
.cft-piece {
  position: absolute; width: 8px; height: 8px; border-radius: 2px;
  pointer-events: none; animation: confettiFall 1.4s ease forwards;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media(max-width:480px){
  .tour-card { border-radius: 16px; max-height: 92vh; }
  .tour-body { padding: 16px 18px 12px; }
  .tour-step-title { font-size: 18px; }
  .tour-qr-grid { grid-template-columns: 1fr; }
  .tour-complete-checks { grid-template-columns: 1fr; }
}

/* ════ QR EDUCATION CARD ════════════════════════════════════ */
.qr-education-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.qec-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.qec-icon { font-size: 28px; flex-shrink: 0; }
.qec-header > div { flex: 1; }
.qec-header strong { font-size: 15px; font-weight: 700; color: #111827; }
.qec-header p { font-size: 12px; color: #6b7280; margin-top: 2px; }
.qec-close {
  background: transparent; border: none;
  font-size: 16px; color: #9ca3af; cursor: pointer; flex-shrink: 0;
}
.qec-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.qec-box {
  border-radius: 12px;
  padding: 14px;
  border: 1.5px solid;
}
.qec-host  { border-color: #FF6B35; background: #fff8f5; }
.qec-guest { border-color: #3b82f6; background: #eff6ff; }
.qec-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.qec-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 2px 7px;
  border-radius: 10px;
}
.qec-badge.host  { background: #FF6B35; color: #fff; }
.qec-badge.guest { background: #3b82f6; color: #fff; }
.qec-title { font-size: 13px; font-weight: 700; }
.qec-host  .qec-title { color: #FF6B35; }
.qec-guest .qec-title { color: #3b82f6; }
.qec-qr-placeholder {
  width: 80px; height: 80px;
  border: 2px solid;
  border-radius: 8px;
  margin: 0 auto 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qec-host  .qec-qr-placeholder { border-color: #FF6B35; }
.qec-guest .qec-qr-placeholder { border-color: #3b82f6; }
.qrp-inner { position: relative; width: 100%; height: 100%; }
.qrp-corner {
  position: absolute;
  width: 16px; height: 16px;
  border: 3px solid;
}
.qec-host  .qrp-corner { border-color: #FF6B35; }
.qec-guest .qrp-corner { border-color: #3b82f6; }
.qrp-corner.tl { top:4px;  left:4px;  border-right:0; border-bottom:0; }
.qrp-corner.tr { top:4px;  right:4px; border-left:0;  border-bottom:0; }
.qrp-corner.bl { bottom:4px; left:4px; border-right:0; border-top:0; }
.qrp-inner-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 20px;
}
.qec-list {
  list-style: none;
  font-size: 12px;
  color: #374151;
  margin-bottom: 8px;
}
.qec-list li {
  padding: 3px 0 3px 14px;
  position: relative;
}
.qec-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #9ca3af;
  font-size: 10px;
}
.qec-where {
  font-size: 11px;
  color: #6b7280;
  background: rgba(255,255,255,.7);
  padding: 5px 8px;
  border-radius: 6px;
  margin-top: 4px;
}
.qec-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.qec-confirm-btn {
  flex: 1;
  padding: 10px;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-width: 180px;
}
.qec-print-btn {
  padding: 10px 16px;
  background: transparent;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  color: #374151;
}
@media(max-width:600px) {
  .qec-split { grid-template-columns: 1fr; }
  .qec-footer { flex-direction: column; }
}
}

/* ── PROPERTY SELECTOR HEADER ── */
.property-selector-wrap { position: relative; }
.property-selector-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  max-width: 220px;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
  overflow: hidden;
}
.property-selector-btn:hover { background: #e5e7eb; border-color: #d1d5db; }
.ps-icon { font-size: 14px; flex-shrink: 0; }
.ps-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ps-arrow { font-size: 11px; color: #9ca3af; flex-shrink: 0; transition: transform .2s; }
.ps-arrow.open { transform: rotate(180deg); }
.property-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  max-width: 320px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 5000;
  overflow: hidden;
}
.property-dropdown.hidden { display: none; }
.pd-list { padding: 6px; }
.pd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s;
  font-size: 13px;
  color: #111827;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.pd-item:hover { background: #f9fafb; }
.pd-item.active { background: #fff8f5; color: #FF6B35; font-weight: 600; }
.pd-item-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: #f3f4f6;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.pd-item.active .pd-item-icon { background: #fde8dc; }
.pd-item-info { flex: 1; min-width: 0; }
.pd-item-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-item-sub { font-size: 11px; color: #9ca3af; margin-top: 1px; }
.pd-check { color: #FF6B35; font-size: 14px; flex-shrink: 0; }
.pd-divider { height: 1px; background: #f3f4f6; margin: 4px 0; }
.pd-add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  font-size: 13px;
  color: #FF6B35;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background .12s;
}
.pd-add-btn:hover { background: #fff8f5; }
.pd-add-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #FF6B35;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; flex-shrink: 0;
}
/* ── MODALE NUOVA PROPRIETA ── */
.modal-overlay.hidden { display: none !important; }
.mnp-card {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
}
.mnp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 14px;
  border-bottom: 1px solid #f3f4f6;
  gap: 12px;
}
.mnp-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.mnp-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  color: #6b7280; flex-shrink: 0;
}
.mnp-progress {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid #f3f4f6;
}
.mnp-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.mnp-dot-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background .3s, color .3s;
}
.mnp-step-dot.active .mnp-dot-num { background: #FF6B35; color: #fff; }
.mnp-step-dot.done   .mnp-dot-num { background: #10b981; color: #fff; }
.mnp-dot-label { font-size: 10px; color: #9ca3af; white-space: nowrap; font-weight: 500; }
.mnp-step-dot.active .mnp-dot-label { color: #FF6B35; font-weight: 700; }
.mnp-step-dot.done   .mnp-dot-label { color: #10b981; }
.mnp-step-line {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  margin: 0 6px;
  margin-bottom: 14px;
  transition: background .3s;
}
.mnp-step-line.done { background: #10b981; }
.mnp-body { padding: 20px 24px; flex: 1; }
.mnp-section-sub { font-size: 13px; color: #6b7280; line-height: 1.5; margin-bottom: 16px; }
.mnp-import-box { border: 2px solid #FF6B35; border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.mnp-import-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff8f5;
}
.mnp-import-header strong { font-size: 14px; color: #111827; }
.mnp-import-header span   { font-size: 12px; color: #6b7280; }
.mnp-import-body { padding: 14px 16px; }
.mnp-import-row  { display: flex; gap: 8px; margin-bottom: 8px; }
.mnp-url-input {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  font-family: monospace;
  background: #f9fafb;
  transition: border-color .15s;
}
.mnp-url-input:focus { outline: none; border-color: #FF6B35; background: #fff; }
.mnp-btn-import {
  padding: 10px 18px;
  background: #FF6B35;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.mnp-btn-import:disabled { opacity: .5; cursor: not-allowed; }
.mnp-platforms { font-size: 11px; color: #9ca3af; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mnp-pl-badge { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 8px; color: #fff; }
.mnp-pl-badge.air { background: #FF5A5F; }
.mnp-pl-badge.bkg { background: #003580; }
.mnp-pl-badge.vrb { background: #1D3557; }
.mnp-loading {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; background: #f9fafb; border-radius: 8px;
  font-size: 13px; color: #374151;
}
.mnp-spin {
  width: 20px; height: 20px;
  border: 2.5px solid #fde8dc;
  border-top-color: #FF6B35;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.mnp-error {
  background: #fef2f2; border: 1px solid #fca5a5;
  border-radius: 8px; padding: 10px 14px;
  font-size: 12px; color: #991b1b;
  display: flex; gap: 8px; align-items: flex-start;
}
.mnp-preview { background: #f0fdf4; border: 1px solid #86efac; border-radius: 10px; overflow: hidden; }
.mnp-preview-header {
  padding: 10px 14px; background: #dcfce7;
  border-bottom: 1px solid #86efac;
  font-size: 13px; font-weight: 600; color: #166534;
  display: flex; align-items: center; gap: 8px;
}
.mnp-preview-grid { display: grid; grid-template-columns: 1fr 1fr; }
.mnp-pv-field { padding: 9px 14px; border-bottom: 1px solid #f0fdf4; border-right: 1px solid #f0fdf4; font-size: 12px; }
.mnp-pv-field label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #9ca3af; margin-bottom: 2px; }
.mnp-pv-val { color: #111827; }
.mnp-pv-null { color: #d1d5db; font-style: italic; }
.mnp-fields { display: flex; flex-direction: column; gap: 12px; }
.mnp-field { display: flex; flex-direction: column; gap: 4px; }
.mnp-field label { font-size: 12px; font-weight: 600; color: #374151; text-transform: uppercase; letter-spacing: .3px; }
.mnp-field input {
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px; color: #111827;
  transition: border-color .15s;
}
.mnp-field input:focus { outline: none; border-color: #FF6B35; }
.mnp-field input.invalid { border-color: #ef4444; }
.mnp-field .mnp-err { font-size: 11px; color: #ef4444; font-weight: 500; }
.mnp-footer {
  display: flex; justify-content: space-between;
  align-items: center; padding: 14px 24px;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
  border-radius: 0 0 18px 18px;
}
.mnp-btn-back {
  padding: 9px 18px;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px; cursor: pointer; color: #6b7280;
}
.mnp-btn-back.hidden { visibility: hidden; }
.mnp-btn-next {
  padding: 10px 24px;
  background: #FF6B35; color: #fff;
  border: none; border-radius: 9px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background .15s;
}
.mnp-btn-next:hover { background: #e55a26; }
.mnp-btn-next:disabled { opacity: .45; cursor: not-allowed; }
.mnp-btn-next.green { background: #10b981; }
.mnp-btn-next.green:hover { background: #059669; }
@media(max-width:500px){
  .mnp-card { border-radius: 14px; max-height: 95vh; }
  .mnp-body { padding: 16px; }
  .mnp-preview-grid { grid-template-columns: 1fr; }
  .mnp-import-row { flex-direction: column; }
  .mnp-btn-import { width: 100%; }
}

/* ═══════════════════════════════════════════════════
   PHONE FIELD — shared across forms
   ═══════════════════════════════════════════════════ */
.mnp-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #111827;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.mnp-input:focus {
  outline: none;
  border-color: #FF6B35;
  box-shadow: 0 0 0 3px rgba(255,107,53,.12);
}
.mnp-input.invalid { border-color: #ef4444; }

.mnp-phone-wrap {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.mnp-phone-wrap:focus-within {
  border-color: #FF6B35;
  box-shadow: 0 0 0 3px rgba(255,107,53,.12);
}
.mnp-phone-wrap.invalid { border-color: #ef4444; }

.mnp-phone-prefix {
  padding: 10px 10px 10px 12px;
  border: none;
  border-right: 1.5px solid #e5e7eb;
  background: #f9fafb;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  flex: 0 0 104px !important;
  width: 104px !important;
  max-width: 104px !important;
  min-width: 104px !important;
  appearance: auto;
  -webkit-appearance: auto;
}
.mnp-phone-prefix:focus { outline: none; }

.mnp-phone-number {
  flex: 1 1 auto !important;
  width: auto !important;
  padding: 10px 12px;
  border: none;
  background: #fff;
  font-size: 14px;
  color: #111827;
  min-width: 140px !important;
  display: block;
}
.mnp-phone-number:focus { outline: none; }
.mnp-phone-number::placeholder { color: #9ca3af; }

.mnp-label-note {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 400;
  font-style: normal;
  margin-left: 4px;
  text-transform: none;
  letter-spacing: 0;
}
.mnp-field-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 3px;
  display: block;
}

/* ════ TIPS MODAL ════════════════════════════════════ */
.tips-modal-card {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 28px 64px rgba(15, 23, 42, 0.22);
}

.tips-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid #eef2f7;
  background:
    radial-gradient(circle at top right, rgba(255, 107, 53, 0.12), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.tips-modal-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 107, 53, 0.1);
  color: #ff6b35;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tips-modal-header h2 {
  margin: 10px 0 6px;
  font-size: 24px;
  font-weight: 800;
  color: #111827;
}

.tips-modal-header p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
  max-width: 500px;
}

.tips-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.tips-modal-body {
  padding: 22px 28px 18px;
  overflow-y: auto;
}

.tips-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tips-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tips-field-full {
  grid-column: 1 / -1;
}

.tips-field label {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tips-field input,
.tips-field select,
.tips-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.tips-field textarea {
  min-height: 92px;
  resize: vertical;
}

.tips-field input:focus,
.tips-field select:focus,
.tips-field textarea:focus {
  outline: none;
  border-color: #ff6b35;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12);
  background: #fffdfb;
}

.tips-field small {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.45;
}

.tips-modal-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.tips-modal-status.info {
  background: #eff6ff;
  color: #1d4ed8;
}

.tips-modal-status.error {
  background: #fff1f2;
  color: #be123c;
}

.tips-modal-status.success {
  background: #ecfdf5;
  color: #047857;
}

.tips-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 28px 24px;
  border-top: 1px solid #eef2f7;
  background: #fff;
}

@media (max-width: 640px) {
  .tips-modal-card {
    border-radius: 18px;
    max-height: 94vh;
  }

  .tips-modal-header,
  .tips-modal-body,
  .tips-modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .tips-modal-grid {
    grid-template-columns: 1fr;
  }

  .tips-modal-footer {
    flex-direction: column-reverse;
  }

  .tips-modal-footer .btn {
    width: 100%;
  }
}
.mnp-err {
  font-size: 12px;
  color: #ef4444;
  font-weight: 500;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.mnp-err.hidden { display: none !important; }


/* modal-hidden utility */
.modal-hidden { display: none !important; }

/* Alex bubble z-index — non deve sovrastare i modali */
#alex-fab,
#alex-bubble,
.alex-widget-wrap {
  z-index: 8000;
}
body.modal-open #alex-fab,
body.modal-open .alex-widget-wrap {
  z-index: 100;
}
