/* ==========================================================================
   N2O - Sedación Consciente | Sistema de Diseño e Identidad Visual Premium
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables de Diseño (Tokens)
   -------------------------------------------------------------------------- */
:root {
    /* Paleta de Colores Corporativa */
    --bg-color: #FFFFFF;
    --bg-card: #FFFFFF;
    --primary-color: #4C8B7E;      /* Verde Sabio / Calma */
    --primary-light: #79A79F;     /* Verde Acento / Hover */
    --primary-dark: #36635A;      /* Verde Bosque / Títulos */
    --primary-ultra-light: #EBF3F1;
    --primary-glow: rgba(76, 139, 126, 0.22);
    
    /* Colores de Alerta y Soporte */
    --success-color: #2E7D32;
    --success-bg: #E8F5E9;
    --warning-color: #EF6C00;
    --warning-bg: #FFF3E0;
    --danger-color: #C62828;
    --danger-bg: #FFEBEE;
    --info-color: #0277BD;
    --info-bg: #E1F5FE;
    
    /* Neutros Lujosos */
    --text-main: #2C3E3A;          /* Texto cuerpo */
    --text-muted: #5F7A75;         /* Texto secundario */
    --bg-secondary: #FAF7F2;       /* Fondo de contenedores (Warm Ivory / Sand) */
    --border-color: rgba(76, 139, 126, 0.12); /* Bordes glassmorphism */
    --border-focus: rgba(76, 139, 126, 0.45);
    
    /* Sombras Multicapa (Depth) */
    --shadow-sm: 0 4px 8px rgba(54, 99, 90, 0.03);
    --shadow-md: 0 10px 24px -2px rgba(54, 99, 90, 0.05), 0 3px 8px -1px rgba(54, 99, 90, 0.03);
    --shadow-lg: 0 24px 38px -4px rgba(54, 99, 90, 0.07), 0 6px 16px -2px rgba(54, 99, 90, 0.02);
    --shadow-inset: inset 0 2px 4px rgba(54, 99, 90, 0.05);
    
    /* Tipografía */
    --font-title: 'Playfair Display', Georgia, serif;
    --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    
    /* Curvaturas Premium Amistosas */
    --radius-sm: 0.75rem;          /* 12px for small details */
    --radius-md: 1.25rem;          /* 20px for inputs/buttons/small cards */
    --radius-lg: 2rem;            /* 32px for main panels and large cards */
    --radius-full: 9999px;
    
    /* Tiempos de Transición */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. Reseteo y Estilos Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-ui);
    color: var(--text-main);
    background: linear-gradient(150deg, #FFFFFF 0%, #FAF8F5 50%, #F3EFEA 100%) no-repeat fixed;
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 2rem;
}

/* Scrollbar Personalizado Premium */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Iconos SVG Lineales Unificados (.ui-icon / .ui-icon-lg) */
.ui-icon {
    width: 1.05em;
    height: 1.05em;
    display: inline-block;
    vertical-align: -0.15em;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ui-icon-lg {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   3. Estructura y Contenedores (Layout)
   -------------------------------------------------------------------------- */
.app-container {
    width: 100%;
    max-width: 520px; /* Mobile-First óptimo, centrado como app nativa */
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Responsive para Pantallas Grandes (Tablet / Desktop) */
@media (min-width: 992px) {
    .app-container {
        max-width: 1000px; /* Expandir a doble columna en desktop */
    }
    
    .app-main-content {
        min-height: 580px;
    }
}

/* Header de la Aplicación */
.app-header {
    padding: 1.5rem 0 1rem 0;
    border-bottom: 1px solid rgba(76, 139, 126, 0.1);
    margin-bottom: 1.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Botón Ajustes */
.settings-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.settings-btn:hover {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    transform: rotate(30deg);
}

.settings-btn:active {
    transform: scale(0.95);
}

/* --------------------------------------------------------------------------
   4. Stepper (Indicador de Progreso)
   -------------------------------------------------------------------------- */
.stepper-nav {
    margin-bottom: 2.25rem;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.5rem;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.stepper-list {
    display: flex;
    justify-content: space-between;
    list-style: none;
    position: relative;
    padding: 0;
}

/* Línea de fondo del Stepper */
.stepper-list::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: hsla(169, 29%, 42%, 0.12);
    z-index: 1;
    border-radius: var(--radius-full);
}

.step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    text-align: center;
}

.step-num {
    width: 36px;
    height: 36px;
    background: var(--bg-color);
    color: var(--text-muted);
    border: 2px solid rgba(76, 139, 126, 0.25);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow: 0 2px 5px rgba(54, 99, 90, 0.04);
}

.step-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: all 0.35s ease;
    letter-spacing: -0.01em;
}

/* Pasos Activos */
.step-item.active .step-num {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-color);
    border-color: var(--primary-color);
    box-shadow: 0 8px 16px var(--primary-glow);
    transform: scale(1.12);
}

.step-item.active .step-label {
    color: var(--primary-dark);
    font-weight: 800;
    transform: translateY(1px);
}

/* Pasos Completados */
.step-item.completed .step-num {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: transparent; /* Ocultar el número */
    box-shadow: 0 4px 10px rgba(54, 99, 90, 0.15);
    transform: scale(1.0);
}

.step-item.completed .step-num::after {
    content: '✓';
    position: absolute;
    color: var(--bg-color);
    font-size: 1.1rem;
    font-weight: 900;
    animation: popScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.step-item.completed .step-label {
    color: var(--primary-color);
    font-weight: 700;
}

/* Efecto hover suave solo en pasos completados (retroceso permitido) */
.step-item.completed:hover .step-num {
    transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   5. Tarjetas Glassmorphism Premium
   -------------------------------------------------------------------------- */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg); /* rounded-2xl */
    padding: 1.75rem;
    transition: var(--transition-normal);
}

/* Tarjeta de Cita Emocional (Dra. Nico) */
.dra-quote-card {
    background: linear-gradient(135deg, hsla(169, 29%, 97%, 0.9) 0%, hsla(169, 29%, 93%, 0.7) 100%);
    border: 1.5px solid rgba(76, 139, 126, 0.15);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: var(--transition-normal);
}

.dra-quote-card::before {
    content: '“';
    position: absolute;
    top: -15px;
    left: 15px;
    font-family: var(--font-title);
    font-size: 5rem;
    color: rgba(76, 139, 126, 0.12);
    line-height: 1;
    pointer-events: none;
}

.dra-quote-card:hover {
    transform: translateY(-2px);
    border-color: rgba(76, 139, 126, 0.3);
    box-shadow: var(--shadow-md);
}

.dra-quote-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.dra-quote {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 500;
    color: var(--primary-dark);
    line-height: 1.4;
    position: relative;
    z-index: 2;
}

.dra-signature {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    align-self: flex-end;
}

/* Tarjeta de Bienvenida Empática de la Dra. Nico (PWA Facelift) */
.dra-welcome-card {
    background: linear-gradient(135deg, #FAF7F2 0%, #FAF6F0 40%, #EBF1EF 100%);
    border: 1.5px dashed rgba(76, 139, 126, 0.25);
    border-radius: var(--radius-md);
    padding: 1.6rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.dra-welcome-card:hover {
    transform: translateY(-3px);
    border-style: solid;
    border-color: rgba(76, 139, 126, 0.4);
    box-shadow: var(--shadow-lg);
}

.dra-welcome-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dra-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    animation: pulseGlow 3s infinite ease-out;
}

.dra-welcome-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dra-welcome-title {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
}

.dra-welcome-subtitle {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dra-welcome-text {
    font-family: var(--font-title);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 0.85rem;
}

.dra-welcome-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background-color: var(--primary-light);
    border-radius: var(--radius-full);
}

.dra-features-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    border-top: 1px dashed rgba(76, 139, 126, 0.2);
    padding-top: 1.25rem;
}

.dra-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.feat-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.feat-text {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.5;
}

.feat-text strong {
    color: var(--primary-dark);
}

.panel-card {
    position: relative;
    overflow: hidden;
}

/* Titulares y Textos Generales en Paneles */
.section-title {
    font-family: var(--font-title);
    font-size: 1.75rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.section-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   6. Elementos del Formulario (Inputs, Labels, Helpers)
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border-color);
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-inset);
}

.form-input:focus {
    border-color: var(--primary-color);
    background: var(--bg-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-input::placeholder {
    color: #A0B2AF;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-light);
    pointer-events: none;
}

.input-with-icon .form-input {
    padding-left: 2.75rem;
}

.input-helper {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Fila de Formulario Flotante */
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
    min-width: 220px;
}

.input-with-prefix {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-inset);
    overflow: hidden;
    transition: var(--transition-fast);
}

.input-with-prefix:focus-within {
    border-color: var(--primary-color);
    background: var(--bg-color);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-with-prefix .phone-prefix {
    padding: 0.85rem 0.5rem 0.85rem 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.95rem;
    border-right: 1px solid var(--border-color);
    background: rgba(76, 139, 126, 0.05);
}

.input-with-prefix .form-input {
    border: none;
    background: transparent;
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   7. Botones Estilizados
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    border: none;
    outline: none;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #FFFFFF;
    box-shadow: 0 8px 24px rgba(54, 99, 90, 0.24);
}

.btn-primary:hover:not(:disabled) {
    color: #FFFFFF;
    transform: translateY(-1.5px);
    box-shadow: 0 12px 26px rgba(54, 99, 90, 0.30);
    filter: brightness(0.94);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #C4D3D0;
    color: rgba(255, 255, 255, 0.8);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--primary-dark);
    border: 1.5px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary-ultra-light);
    border-color: var(--primary-color);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.panel-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Ajuste de Botones en Pasos */
.btn-prev {
    flex: 1;
}

.btn-next {
    flex: 2;
}

/* --------------------------------------------------------------------------
   8. Cotizador (Paso 1) - Mapa e Info
   -------------------------------------------------------------------------- */
.map-container-wrapper {
    display: none !important;
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.map-canvas {
    width: 100%;
    height: 100%;
}

.map-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(76, 139, 126, 0.05) 0%, rgba(121, 167, 159, 0.1) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    gap: 0.5rem;
    transition: var(--transition-slow);
    z-index: 10;
}

.map-placeholder.hidden {
    opacity: 0;
    pointer-events: none;
}

.map-ph-icon {
    font-size: 2.25rem;
    animation: bounce 2s infinite;
}

.map-ph-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Desglose de Tarifas */
.pricing-breakdown-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.pricing-title {
    font-size: 0.9rem;
    color: var(--primary-dark);
    font-weight: 800;
    margin-bottom: 0.75rem;
    border-bottom: 1px dashed rgba(76, 139, 126, 0.25);
    padding-bottom: 0.5rem;
}

.pricing-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pricing-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.price-val {
    font-weight: 700;
    color: var(--text-main);
}

.text-accent {
    color: var(--primary-color) !important;
}

.pricing-total-row {
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    font-size: 1rem !important;
    font-weight: 700;
    color: var(--primary-dark);
}

.price-total-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* --------------------------------------------------------------------------
   9. Agendamiento (Paso 2) - Calendario y Bloques
   -------------------------------------------------------------------------- */
.blocks-info-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: var(--primary-ultra-light);
    border: 1px solid rgba(76, 139, 126, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    font-weight: 700;
}

.info-val {
    font-size: 0.85rem;
    color: var(--primary-dark);
}

.font-semibold {
    font-weight: 600;
}

.calendar-wrapper {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.calendar-header-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Grilla de Bloques de 30 minutos */
.blocks-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.time-section-wrapper {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(54, 99, 90, 0.12);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    box-shadow: 0 4px 10px rgba(54, 99, 90, 0.02);
}

.time-section-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-section-subtitle {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-muted);
}

.time-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 0.6rem;
}

.block-item {
    background: var(--bg-color);
    border: 1.5px solid var(--border-color);
    color: var(--primary-dark);
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    box-shadow: 0 4px 6px rgba(54, 99, 90, 0.02);
    position: relative;
    overflow: hidden;
}

.block-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: var(--transition-fast);
}

.block-item:hover:not(.busy):not(.selected) {
    border-color: var(--primary-light);
    background: hsla(169, 29%, 96%, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(54, 99, 90, 0.06);
}

.block-item.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: var(--bg-color) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 8px 18px rgba(76, 139, 126, 0.25);
    transform: translateY(-2px) scale(1.02);
}

.block-item.selected::before {
    opacity: 1;
}

.block-item:active:not(.busy) {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 4px rgba(54, 99, 90, 0.04);
}

.block-item.busy {
    background: #F0F2F2;
    border-color: #E2E6E5;
    color: #A5B3B1;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

.grid-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

/* Leyenda */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-available {
    background: var(--bg-color);
    border: 1.5px solid var(--border-color);
}

.dot-selected {
    background: var(--primary-color);
}

.dot-busy {
    background: #EAEAEA;
    border: 1.5px solid #D6D6D6;
}

/* --------------------------------------------------------------------------
   10. Cuestionario de Salud (Paso 3)
   -------------------------------------------------------------------------- */
.survey-questions {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.survey-question-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: var(--transition-normal);
}

.question-header {
    display: flex;
    gap: 0.75rem;
}

.q-num {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.q-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.4;
}

/* Botones Segmentados Horizontales */
.radio-group-segmented {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    width: fit-content;
}

.segmented-option {
    cursor: pointer;
}

.segmented-option input[type="radio"] {
    display: none;
}

.segmented-option .option-btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: calc(var(--radius-sm) - 0.1rem);
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    text-align: center;
}

.segmented-option .option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(76, 139, 126, 0.08);
    color: var(--primary-dark);
}

.segmented-option input[type="radio"]:checked + .option-btn {
    background: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Radio containers Paso 1 */
.radio-container {
    border: 1px solid rgba(54, 99, 90, 0.18);
    border-radius: 10px;
    padding: 0.5rem 0.9rem;
    background: #FFFFFF;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.radio-container:hover {
    border-color: var(--primary-color) !important;
    background: rgba(76, 139, 126, 0.05) !important;
}

.radio-container:has(input:checked) {
    border-color: var(--primary-color) !important;
    background: rgba(76, 139, 126, 0.05) !important;
    box-shadow: 0 2px 8px rgba(76, 139, 126, 0.12);
}

/* Variaciones de opción activa */
.segmented-option input[type="radio"]:checked + .option-btn.opt-danger {
    background: var(--danger-color);
}

.segmented-option input[type="radio"]:checked + .option-btn.opt-warning {
    background: var(--warning-color);
}

.question-alert {
    background: var(--warning-bg);
    border: 1px solid rgba(239, 108, 0, 0.2);
    color: var(--warning-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.4;
}

.text-subquestion {
    animation: slideDown 0.3s ease;
}

.label-small {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.textarea-small {
    height: 70px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    resize: none;
}

.text-area-large {
    height: 100px;
    font-size: 0.9rem;
    resize: none;
}

.hidden {
    display: none !important;
}

/* Consentimiento Checkbox */
.consent-checkbox-card {
    background: rgba(76, 139, 126, 0.04);
    border: 1.5px solid rgba(76, 139, 126, 0.25);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.checkbox-container {
    display: flex;
    position: relative;
    padding-left: 2.25rem;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    user-select: none;
    color: var(--text-main);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--bg-color);
    border: 1.5px solid rgba(54, 99, 90, 0.35);
    border-radius: 5px;
    transition: var(--transition-fast);
}

#arriendoBoxCheck + .checkmark,
.checkbox-container .checkmark {
    border-radius: 5px;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary-color);
    background-color: rgba(76, 139, 126, 0.06);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark::after {
    display: block;
}

.checkbox-container .checkmark::after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   11. Confirmación de Cita / Éxito (Paso 4)
   -------------------------------------------------------------------------- */
.text-center {
    text-align: center;
}

.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-4 { margin-top: 1rem; }

/* Animación de Pulso de Éxito */
.success-icon-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 1.5rem auto 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-pulse-ring {
    border: 3px solid var(--primary-light);
    border-radius: 50%;
    position: absolute;
    width: 100%;
    height: 100%;
    animation: pulseGlow 2s infinite ease-out;
}

.success-icon-badge {
    width: 72px;
    height: 72px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(76, 139, 126, 0.4);
    z-index: 5;
    animation: popScale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Ticket de Agendamiento Estilo Voucher de Lujo */
.ticket-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(54, 99, 90, 0.08);
    text-align: left;
    overflow: hidden;
    position: relative;
    transition: var(--transition-normal);
}

.ticket-card:hover {
    box-shadow: 0 24px 48px rgba(54, 99, 90, 0.12);
}

.ticket-header {
    background: linear-gradient(135deg, rgba(76, 139, 126, 0.12) 0%, rgba(54, 99, 90, 0.04) 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(76, 139, 126, 0.15);
}

.ticket-brand {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 0.08em;
    font-family: var(--font-ui);
}

.ticket-status-tag {
    background: linear-gradient(135deg, var(--success-color) 0%, #1b5e20 100%);
    color: var(--bg-color);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.25);
    letter-spacing: 0.03em;
}

/* Divisor Físico de Ticket con Círculos */
.ticket-divider {
    position: relative;
    height: 24px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    overflow: visible;
}

.divider-line {
    width: 100%;
    height: 0;
    border-top: 2px dashed rgba(76, 139, 126, 0.25);
}

.divider-circle-left, .divider-circle-right {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #FAF8F5; /* Matches the new warm ivory background of the app wrapper to look like a punch out */
    border: 1px solid var(--border-color);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.divider-circle-left {
    left: -13px;
    box-shadow: inset -4px 0 6px rgba(54, 99, 90, 0.05);
}

.divider-circle-right {
    right: -13px;
    box-shadow: inset 4px 0 6px rgba(54, 99, 90, 0.05);
}

.ticket-body {
    padding: 1.5rem;
    background: radial-gradient(circle at 50% 100%, rgba(76, 139, 126, 0.02) 0%, rgba(255, 255, 255, 0) 70%);
}

.ticket-row {
    display: flex;
    gap: 1rem;
}

.ticket-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.col-full {
    flex: 0 0 100%;
}

.t-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.t-val {
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 700;
}

.font-bold { font-weight: 800; }

/* --------------------------------------------------------------------------
   12. Simulador de WhatsApp Chats
   -------------------------------------------------------------------------- */
.whatsapp-simulation-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.whatsapp-title {
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.whatsapp-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.whatsapp-chats-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-mockup {
    border: 1px solid rgba(76, 139, 126, 0.2);
    border-radius: var(--radius-md);
    background: rgba(230, 239, 237, 0.4);
    box-shadow: var(--shadow-sm);
    text-align: left;
    overflow: hidden;
}

.chat-header {
    background: #075E54; /* Verde WhatsApp */
    color: var(--bg-color);
    padding: 0.6rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--bg-color);
}

.avatar-dr { background: var(--primary-light); }
.avatar-client { background: var(--primary-dark); }

.chat-meta {
    display: flex;
    flex-direction: column;
}

.chat-name {
    font-size: 0.8rem;
    font-weight: 700;
}

.chat-status {
    font-size: 0.6rem;
    opacity: 0.8;
}

.chat-body {
    padding: 1rem;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><path d="M0 0h60v60H0z" fill="none"/><path d="M12 24c0-2.2 1.8-4 4-4s4 1.8 4 4-1.8 4-4 4-4-1.8-4-4zm24 0c0-2.2 1.8-4 4-4s4 1.8 4 4-1.8 4-4 4-4-1.8-4-4z" fill="rgba(76,139,126,0.025)"/></svg>');
    background-color: #efeae2; /* Fondo de chat original */
    min-height: 80px;
}

.chat-bubble {
    background: #FFFFFF;
    color: #111b21;
    padding: 0.7rem 0.95rem;
    border-radius: 0 12px 12px 12px;
    font-size: 0.82rem;
    max-width: 90%;
    line-height: 1.45;
    box-shadow: 0 1.5px 2px rgba(11, 20, 26, 0.13);
    position: relative;
    white-space: pre-wrap;
}

.chat-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 10px 10px 0;
    border-color: transparent #FFFFFF transparent transparent;
}

.chat-bubble::after {
    content: 'Justo ahora  ✓✓';
    display: block;
    font-size: 0.62rem;
    color: #53bdeb; /* Modern WhatsApp double-blue check */
    text-align: right;
    margin-top: 0.35rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.chat-footer {
    background: #F0F2F5;
    padding: 0.5rem 0.85rem;
    display: flex;
    justify-content: flex-end;
}

.btn-wa-demo {
    width: auto;
    padding: 0.4rem 0.85rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    background: #25D366; /* Verde Brillante WA */
    color: var(--bg-color);
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}

.btn-wa-demo:hover {
    background: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
}

/* Instrucciones de Ayuno */
.instructions-card {
    background: var(--danger-bg);
    border: 1px solid rgba(198, 40, 40, 0.25);
    color: var(--danger-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: left;
}

.instructions-title {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.instructions-text {
    font-size: 0.78rem;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   13. Footer General
   -------------------------------------------------------------------------- */
.app-footer {
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    border-top: 1px solid rgba(76, 139, 126, 0.08);
    margin-top: auto;
}

.footer-note {
    margin-top: 0.25rem;
    font-style: italic;
    opacity: 0.8;
}

/* --------------------------------------------------------------------------
   14. Modales (Webpay y Configuración)
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(54, 99, 90, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity var(--transition-normal);
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-container {
    width: 90%;
    max-width: 440px;
    animation: modalPop var(--transition-normal);
}

/* Cabecera y Estructura Ajustes */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
}

.close-modal-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #F1F5F9;
    border: none;
    font-size: 1.15rem;
    color: var(--text-main);
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-intro-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.text-small-code {
    font-family: monospace !important;
    font-size: 0.8rem !important;
}

.instructions-steps-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.instructions-steps-card h5 {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.instructions-steps-card ol {
    margin-left: 1rem;
}

.text-xs { font-size: 0.7rem; color: var(--text-muted); }

.modal-footer-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* BANNER ALERTA API */
.api-alert-banner {
    background: var(--warning-bg);
    border: 1.5px solid rgba(239, 108, 0, 0.25);
    color: var(--warning-color);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    animation: slideDown 0.3s ease;
}

.banner-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.banner-text {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ==========================================================================
   15. Simulador Webpay (Estilo Transbank Corporativo)
   ========================================================================== */
/* ==========================================================================
   15. Simulador Mercado Pago (Estilo Corporativo Premium)
   ========================================================================== */
.mercadopago-modal-container {
    max-width: 420px;
    padding: 0 !important;
    overflow: hidden;
    background: #FFFFFF !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.25);
    border-radius: var(--radius-md) !important;
}

.mercadopago-header {
    background: #009EE3; /* Azul Mercado Pago */
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #FFFFFF;
}

.mercadopago-logo {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.mp-mercado { font-weight: 300; color: #FFFFFF; }
.mp-pago { font-weight: 800; color: #FFFFFF; }

.mp-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
}

.mercadopago-summary {
    background: #F5F5F7;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #EAEAEA;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mp-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
}

.mp-summary-label {
    color: #666666;
}

.mp-summary-val {
    color: #222222;
}

.mercadopago-card-form {
    padding: 1.5rem;
    border-bottom: 1px solid #EAEAEA;
}

.mp-form-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 1rem;
}

/* Grilla de Métodos de Pago */
.mp-methods-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.mp-method-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1.5px solid #EAEAEA;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.mp-method-item:hover, .mp-method-item.active {
    border-color: #009EE3;
    background: rgba(0, 158, 227, 0.03);
}

.mp-method-icon {
    font-size: 1.2rem;
}

.mp-method-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #333333;
}

#paymentCardBrick_container {
    width: 100%;
    transition: all 0.3s ease;
}

.mp-simulation-controls {
    border-top: 1px solid #F0F0F0;
    padding-top: 1rem;
}

.mp-simulation-desc {
    font-size: 0.7rem;
    color: #777777;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.mp-segmented {
    width: 100%;
}

.mp-segmented .segmented-option {
    flex: 1;
}

.mp-segmented .option-btn {
    width: 100%;
    padding: 0.5rem 0.25rem !important;
    font-size: 0.75rem !important;
}

.mp-btn-opt-success {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.mp-btn-opt-fail {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Acciones Mercado Pago */
.mercadopago-actions {
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 1rem;
    background: #FAFAFA;
}

.mp-btn {
    flex: 1;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
    text-align: center;
}

.mp-btn-cancel {
    background: #FFFFFF;
    color: #666666;
    border: 1px solid #CCCCCC;
}

.mp-btn-cancel:hover {
    background: #F5F5F5;
    border-color: #BBBBBB;
}

.mp-btn-pay {
    background: #009EE3;
    color: #FFFFFF;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 158, 227, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mp-btn-pay:hover {
    background: #008CD0;
    box-shadow: 0 6px 14px rgba(0, 158, 227, 0.35);
}

.mp-btn-pay:active {
    transform: translateY(1px);
}

.mercadopago-footer {
    padding: 0.85rem;
    background: #ECEFF1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #78909C;
    font-size: 0.65rem;
    font-weight: 700;
}

/* Spinner animado */
.mp-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #FFFFFF;
    animation: spin 0.8s linear infinite;
}

/* --------------------------------------------------------------------------
   16. Animaciones Keyframes
   ========================================================================== */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(76, 139, 126, 0.4); }
    70% { transform: scale(1.15); opacity: 0; box-shadow: 0 0 0 15px rgba(76, 139, 126, 0); }
    100% { transform: scale(0.95); opacity: 0; }
}

@keyframes popScale {
    0% { transform: scale(0.6); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes modalPop {
    0% { transform: scale(0.9) translateY(20px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes slideDown {
    0% { transform: translateY(-10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Paneles Dinámicos Ocultar/Mostrar */
.step-panel {
    display: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.step-panel.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Nominatim Suggestions Dropdown (PWA Premium Style) */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 220px;
    overflow-y: auto;
    margin-top: -2px;
    box-sizing: border-box;
    animation: slideDown var(--transition-fast);
}

.suggestions-dropdown.hidden {
    display: none;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid rgba(76, 139, 126, 0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    padding-left: 1.25rem;
}

/* Custom Leaflet overrides to fit luxury theme */
.leaflet-container {
    font-family: var(--font-ui) !important;
}

.leaflet-bar {
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
    border-radius: var(--radius-sm) !important;
    overflow: hidden;
}

.leaflet-bar a {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: var(--primary-dark) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.leaflet-bar a:hover {
    background-color: var(--primary-ultra-light) !important;
    color: var(--primary-color) !important;
}

/* Custom Map Pins for Leaflet - N2O Corporate Sage Theme */
.custom-map-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pin-core {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4C8B7E; /* N2O Primary */
    border: 2.5px solid #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    z-index: 2;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-map-pin:hover .pin-core {
    transform: scale(1.15);
}

.clinic-core {
    background: #36635A; /* N2O Titles */
}

.patient-core {
    background: #79A79F; /* N2O Accents */
}

.pin-pulse {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(76, 139, 126, 0.25);
    animation: pinPulse 2s infinite cubic-bezier(0.25, 0, 0, 1);
    z-index: 1;
    pointer-events: none;
}

@keyframes pinPulse {
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* ==========================================================================
   SISTEMA DE DISEÑO DISRUPTIVO ESTILO APPLE (Visual Facelift)
   ========================================================================== */

:root {
    /* Curvaturas Orgánicas Suaves y Amigables */
    --radius-sm: 0.85rem;          /* 14px */
    --radius-md: 1.5rem;           /* 24px */
    --radius-lg: 2.25rem;          /* 36px */
    
    /* Sombras Multicapa Apple-Style */
    --shadow-md: 0 12px 30px -4px rgba(54, 99, 90, 0.06), 0 4px 12px -2px rgba(54, 99, 90, 0.03);
    --shadow-lg: 0 35px 70px -15px rgba(54, 99, 90, 0.1), 0 15px 30px -5px rgba(54, 99, 90, 0.05);
    
    /* Gradiente Base Lujoso */
    --bg-secondary: rgba(250, 247, 242, 0.7);
    --border-color: rgba(76, 139, 126, 0.15);
}

/* 1. Fondo de Burbujas en Paralaje (Drifting Calming Blobs) */
.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: -10;
    pointer-events: none;
    background: #FCFBF9;
}

.parallax-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(110px);
    -webkit-backdrop-filter: blur(110px);
    background: rgba(252, 251, 249, 0.4);
    z-index: 1;
}

.blob-bubble {
    position: absolute;
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.55;
    mix-blend-mode: multiply;
    transition: transform 0.8s cubic-bezier(0.1, 0.8, 0.2, 1);
    will-change: transform;
}

.blob-bubble-1 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(121, 167, 159, 0.6) 0%, rgba(76, 139, 126, 0.1) 80%);
    top: -50px;
    left: -50px;
    animation: floatBubble1 22s infinite ease-in-out alternate;
}

.blob-bubble-2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(243, 239, 234, 0.8) 0%, rgba(218, 210, 199, 0.2) 80%);
    bottom: -100px;
    right: -100px;
    animation: floatBubble2 28s infinite ease-in-out alternate-reverse;
}

.blob-bubble-3 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(76, 139, 126, 0.45) 0%, rgba(54, 99, 90, 0.05) 80%);
    top: 40%;
    right: -50px;
    animation: floatBubble3 25s infinite ease-in-out alternate;
}

.blob-bubble-4 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(235, 241, 239, 0.75) 0%, rgba(121, 167, 159, 0.15) 80%);
    bottom: 35%;
    left: -80px;
    animation: floatBubble4 32s infinite ease-in-out alternate-reverse;
}

@keyframes floatBubble1 {
    0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    100% { transform: translate3d(50px, 80px, 0) scale(1.15) rotate(15deg); }
}

@keyframes floatBubble2 {
    0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    100% { transform: translate3d(-70px, -60px, 0) scale(0.9) rotate(-20deg); }
}

@keyframes floatBubble3 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-40px, 90px, 0) scale(1.2); }
}

@keyframes floatBubble4 {
    0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    100% { transform: translate3d(60px, -70px, 0) scale(1.1) rotate(10deg); }
}

/* 2. Glassmorphic layered panels (stacked cards) */
.glass-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.panel-card:hover {
    box-shadow: var(--shadow-lg), 0 1px 3px rgba(0,0,0,0.02);
}

/* 3. Stepper Dynamic Island Capsule (Apple Style) */
.stepper-nav {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(76, 139, 126, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-full);
    padding: 0.5rem;
    box-shadow: var(--shadow-md);
    margin: 1rem auto 0.75rem auto;
    max-width: 580px;
    position: sticky;
    top: 1rem;
    z-index: 100;
}

.stepper-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.25rem;
}

.stepper-list::before {
    display: none;
}

.step-item {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-full);
    background: transparent;
    transition: background-color 0.3s ease, transform 0.25s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: default;
}

.step-item .step-num {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 50%;
    background: rgba(76, 139, 126, 0.15);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    transition: background-color 0.3s ease, color 0.2s ease, transform 0.25s ease;
}

.step-item .step-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    transition: color 0.3s ease;
}

/* Pasos Activos y Completados */
.step-item.active {
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(76, 139, 126, 0.25);
    cursor: default;
}

.step-item.active .step-num {
    background: #FFFFFF;
    color: var(--primary-color);
    transform: none;
}

.step-item.active .step-label {
    color: #FFFFFF;
    font-weight: 800;
}

.step-item.completed {
    background: rgba(76, 139, 126, 0.1);
    cursor: pointer;
}

.step-item.completed:hover {
    background: rgba(76, 139, 126, 0.18);
    transform: translateY(-1px);
}

.step-item.completed .step-num {
    background: var(--primary-color);
    color: transparent;
}

.step-item.completed .step-num::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 0.85rem;
    line-height: 1;
    font-weight: 900;
}

.step-item.completed .step-label {
    color: var(--primary-color);
}

.stepper-locked .step-item.completed,
.step-item.completed.step-locked {
    cursor: default;
    pointer-events: none;
}

.stepper-locked .step-item.completed:hover,
.step-item.completed.step-locked:hover {
    transform: none;
    background: rgba(76, 139, 126, 0.1);
}

@media (max-width: 520px) {
    .step-item {
        flex-direction: column;
        padding: 0.5rem 0.35rem;
        gap: 0.25rem;
    }
}

/* Ocultar etiquetas en pantallas ultra pequeñas */
@media (max-width: 400px) {
    .step-item .step-label {
        display: none;
    }
    .step-item {
        padding: 0.6rem;
    }
}

/* 4. Widget de Respiración Consciente (Pausa de Calma) */
.breathing-coach-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(247, 245, 241, 0.65) 100%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition-normal);
}

.breathing-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.breathing-coach-icon {
    font-size: 1.75rem;
    animation: breathingLeaf 4s infinite ease-in-out;
}

@keyframes breathingLeaf {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-4px) rotate(8deg); }
}

.breathing-coach-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    text-align: left;
}

.breathing-coach-title {
    font-family: var(--font-title);
    font-size: 1.15rem;
    color: var(--primary-dark);
    font-weight: 800;
}

.breathing-coach-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Widget Círculo Interactivo */
.breathing-widget-interactive {
    position: relative;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0;
}

.breathing-circle-outer {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(76, 139, 126, 0.1);
    border: 1px solid rgba(76, 139, 126, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.breathing-circle-inner {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(121, 167, 159, 0.55) 0%, rgba(76, 139, 126, 0.8) 100%);
    box-shadow: 0 8px 24px rgba(76, 139, 126, 0.35);
    z-index: 1;
    transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.breathing-state-text {
    font-size: 0.85rem;
    font-weight: 800;
    color: #FFFFFF;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 3;
    pointer-events: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.breathing-progress-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    z-index: 0;
}

.breathing-progress-bg {
    fill: none;
    stroke: rgba(76, 139, 126, 0.06);
    stroke-width: 3.5;
}

.breathing-progress-bar {
    fill: none;
    stroke: var(--primary-light);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 283; /* 2 * PI * r (r=45) */
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.1s linear;
}

.btn-breathing-control {
    background: var(--primary-dark);
    color: #FFFFFF;
    padding: 0.55rem 1.35rem;
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: var(--radius-full);
    border: none;
    box-shadow: 0 4px 12px rgba(54, 99, 90, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-breathing-control:hover {
    background: var(--primary-color);
    transform: scale(1.03);
}

.btn-breathing-control:active {
    transform: scale(0.97);
}

/* Clases de Animación de Respiración Sincronizadas por JS */
.breathing-widget-interactive.inhaling .breathing-circle-outer {
    transform: scale(1.22);
}

.breathing-widget-interactive.inhaling .breathing-circle-inner {
    transform: scale(1.35);
    background: radial-gradient(circle, rgba(167, 203, 197, 0.7) 0%, rgba(121, 167, 159, 0.95) 100%);
}

.breathing-widget-interactive.exhaling .breathing-circle-outer {
    transform: scale(0.92);
}

.breathing-widget-interactive.exhaling .breathing-circle-inner {
    transform: scale(0.85);
}

/* 5. Inputs y Formularios Apple Style */
.form-input {
    border: 1px solid rgba(76, 139, 126, 0.2);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.2rem;
    font-size: 0.92rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-inset);
}

.form-input:focus {
    border-color: var(--primary-color);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(76, 139, 126, 0.16);
    transform: translateY(-1px);
}

.input-with-prefix {
    border: 1px solid rgba(76, 139, 126, 0.2);
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-with-prefix:focus-within {
    border-color: var(--primary-color);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(76, 139, 126, 0.16);
    transform: translateY(-1px);
}

/* 6. Botonera Segmentada Animada (Radio Segmented) */
.radio-group-segmented {
    background: rgba(76, 139, 126, 0.07);
    padding: 0.35rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(76, 139, 126, 0.08);
}

.segmented-option .option-btn {
    border-radius: calc(var(--radius-md) - 0.2rem);
    border: 1px solid transparent;
    padding: 0.65rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 700;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.segmented-option .option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(76, 139, 126, 0.08);
    color: var(--primary-dark);
}

.segmented-option input[type="radio"]:checked + .option-btn {
    background: #FFFFFF;
    color: var(--primary-dark);
    border-color: rgba(76, 139, 126, 0.28);
    box-shadow: 0 4px 12px rgba(54, 99, 90, 0.08);
    transform: scale(1.02);
}

.segmented-option input[type="radio"]:checked + .option-btn.opt-danger {
    background: #FFFFFF;
    color: var(--danger-color);
}

.segmented-option input[type="radio"]:checked + .option-btn.opt-warning {
    background: #FFFFFF;
    color: var(--warning-color);
}

/* 7. Bloques del Calendario Touch Premium */
.block-item {
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.65);
    border: 1.5px solid rgba(76, 139, 126, 0.12);
    padding: 0.85rem 0.5rem;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.block-item .clock-emoji {
    font-size: 1.05rem;
    transition: transform 0.25s ease;
}

.block-item:not(.busy):not(.selected):hover .clock-emoji {
    transform: rotate(15deg) scale(1.15);
}

.block-item:not(.busy):not(.selected):hover {
    background: #FFFFFF;
    border-color: var(--primary-light);
    transform: scale(1.04) translateY(-2px);
    box-shadow: var(--shadow-md);
}

.block-item.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    border-color: var(--primary-dark) !important;
    box-shadow: 0 6px 16px rgba(54, 99, 90, 0.22);
    transform: scale(0.98);
}

.block-item.busy {
    background: rgba(54, 99, 90, 0.05);
    border-color: rgba(54, 99, 90, 0.05);
}

/* 8. Botones Principales con Brillo de Lujo (Pills) */
.btn {
    border-radius: var(--radius-full);
    padding: 0.85rem 1.6rem;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    box-shadow: 0 8px 24px rgba(54, 99, 90, 0.24);
    color: #FFFFFF;
}

.btn-primary:hover:not(:disabled),
.btn-primary:not(:disabled):hover {
    color: #FFFFFF;
    transform: translateY(-1.5px);
    box-shadow: 0 12px 26px rgba(54, 99, 90, 0.30);
    filter: brightness(0.94);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.97) translateY(0);
}

.btn-secondary {
    border-radius: var(--radius-full);
    border: 1px solid rgba(76, 139, 126, 0.3);
    background: rgba(255, 255, 255, 0.5);
    color: var(--primary-dark);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary-ultra-light);
    border-color: var(--primary-color);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-small {
    width: auto;
    padding: 0.45rem 0.95rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

.btn-inline-cta {
    width: auto !important;
    display: inline-flex;
}

.btn-step3-outline {
    background: rgba(54, 99, 90, 0.06);
    color: var(--primary-dark);
    border: 1.5px solid rgba(54, 99, 90, 0.28);
    font-weight: 700;
}

.btn-step3-outline:hover:not(:disabled) {
    background: rgba(54, 99, 90, 0.14);
    border-color: var(--primary-color);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-paciente-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #FFFFFF !important;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(54, 99, 90, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-paciente-primary:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 12px 26px rgba(54, 99, 90, 0.30);
    filter: brightness(0.94);
    color: #FFFFFF !important;
}

.btn-paciente-wa-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(37, 211, 102, 0.12);
    color: #1E7E34 !important;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
    border: 1px solid rgba(37, 211, 102, 0.3);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-paciente-wa-soft:hover {
    background: rgba(37, 211, 102, 0.2);
    border-color: rgba(37, 211, 102, 0.5);
    transform: translateY(-1px);
    color: #166534 !important;
}

.btn-glass-experience {
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.btn-glass-experience:hover {
    background: rgba(76, 139, 126, 0.38) !important;
    border-color: rgba(255, 255, 255, 0.65) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35) !important;
}

/* 9. Deslizamiento Horizontal en Pasos (Carrusel de Pistas) */
.app-main-content {
    perspective: 1000px;
    overflow-x: clip;
    overflow-y: visible;
    max-width: 100%;
}

.step-panel {
    transform-origin: top center;
    backface-visibility: hidden;
}

.step-panel.active {
    animation: appleCardReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes appleCardReveal {
    0% {
        opacity: 0;
        transform: scale(0.96) translate3d(0, 15px, 0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translate3d(0, 0, 0);
    }
}

/* 10. Pasarela Webpay Premium */
.webpay-modal-container {
    border-radius: var(--radius-lg) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 45px 90px rgba(0,0,0,0.2) !important;
}

.credit-card-mockup {
    border-radius: var(--radius-md) !important;
    background: linear-gradient(135deg, #1C1C1E 0%, #2C2C2E 100%) !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25) !important;
}

/* 11. Optimización Mobile First */
@media (max-width: 480px) {
    body {
        padding-bottom: 5rem; /* Asegurar espacio para botones inferiores flotantes */
    }
    .panel-card {
        padding: 1.35rem 1.15rem;
    }
    .stepper-nav {
        margin: 0.5rem auto 0.75rem auto;
    }
}

/* ==========================================================================
   N2O ULTRA-PREMIUM FACELIFT - DISRUPTIVE ESTILO APPLE & DYNAMIC INTERACTION
   ========================================================================== */

/* Paso 3: Disposición vertical centrada (máx 820px) + fila superior 2 tarjetas */
.step-3-grid-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

.step-3-top-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    width: 100%;
}

@media (min-width: 768px) {
    .step-3-top-row {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }
    .step-3-top-row.guest-mode {
        grid-template-columns: 1fr;
    }
}

.step-3-card,
.step-3-grid-layout .survey-question-card,
.step-3-grid-layout .pricing-breakdown-card,
.step-3-grid-layout .consent-checkbox-card {
    background: #FFFFFF;
    border: 1px solid rgba(54, 99, 90, 0.16);
    border-radius: 16px;
    padding: 1.35rem;
    box-shadow: 0 2px 10px rgba(14, 40, 36, 0.04);
}

.step-3-form-grid-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .step-3-form-grid-2col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.step-3-panel-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 820px;
    margin: 1.5rem auto 0;
}

.step-3-panel-actions .btn-prev {
    width: auto;
    min-width: 130px;
}

.step-3-panel-actions .btn-next {
    width: auto;
    flex: 1;
    min-width: 220px;
}

/* 1. Double Column Grid Layouts for Desktop/Tablets */
@media (min-width: 992px) {
    .step-1-grid-layout {
        display: grid;
        grid-template-columns: 1.15fr 0.85fr;
        gap: 2.5rem;
        align-items: start;
    }
    .step-2-grid-layout {
        display: grid;
        grid-template-columns: 0.85fr 1.15fr;
        gap: 2.5rem;
        align-items: start;
    }
    .step-4-grid-layout {
        display: grid;
        grid-template-columns: 0.95fr 1.05fr;
        gap: 2.5rem;
        align-items: start;
    }
    .app-container {
        max-width: 1120px !important;
    }
    .panel-card {
        padding: 2.75rem !important;
    }
}

/* 2. Floating Background Blob Animations (Calming Organic Motion) */
@keyframes bubbleFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
        border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    }
    33% {
        transform: translate3d(30px, -50px, 0) scale(1.06) rotate(120deg);
        border-radius: 70% 30% 52% 48% / 60% 40% 60% 40%;
    }
    66% {
        transform: translate3d(-20px, 40px, 0) scale(0.95) rotate(240deg);
        border-radius: 48% 52% 30% 70% / 40% 60% 30% 70%;
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1) rotate(360deg);
        border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    }
}

.blob-bubble {
    animation: bubbleFloat 25s infinite alternate ease-in-out;
}
.blob-bubble-1 {
    animation-duration: 32s;
    background: radial-gradient(circle, rgba(121, 167, 159, 0.28) 0%, rgba(76, 139, 126, 0.08) 100%);
}
.blob-bubble-2 {
    animation-duration: 26s;
    animation-delay: -5s;
    background: radial-gradient(circle, rgba(245, 235, 230, 0.4) 0%, rgba(215, 230, 227, 0.1) 100%);
}
.blob-bubble-3 {
    animation-duration: 38s;
    animation-delay: -12s;
    background: radial-gradient(circle, rgba(76, 139, 126, 0.22) 0%, rgba(54, 99, 90, 0.04) 100%);
}
.blob-bubble-4 {
    animation-duration: 22s;
    animation-delay: -8s;
    background: radial-gradient(circle, rgba(235, 241, 239, 0.35) 0%, rgba(121, 167, 159, 0.06) 100%);
}

/* 3. Welcome Hero Card and Bento Grid */
.dra-welcome-hero {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(76, 139, 126, 0.15);
    background: #FFFFFF;
    position: relative;
}

.dra-hero-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.dra-welcome-card:hover .dra-hero-img {
    transform: scale(1.04);
}

/* 4. Apple watch breathe concentric ripples & overlapping petals */
.breathing-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(76, 139, 126, 0.15);
    background: rgba(76, 139, 126, 0.02);
    width: 130px;
    height: 130px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transform: scale(1);
    transition: all 4s cubic-bezier(0.4, 0, 0.2, 1);
}

.breathing-ring-1 {
    transition-delay: 0.15s;
}

.breathing-ring-2 {
    transition-delay: 0.3s;
}

/* Breathing Ring expansion on inhale */
.breathing-widget-interactive.inhaling .breathing-ring-1 {
    opacity: 0.45;
    transform: scale(1.65);
    border-color: rgba(121, 167, 159, 0.45);
    background: rgba(121, 167, 159, 0.04);
}

.breathing-widget-interactive.inhaling .breathing-ring-2 {
    opacity: 0.25;
    transform: scale(2.1);
    border-color: rgba(76, 139, 126, 0.25);
    background: rgba(76, 139, 126, 0.02);
}

/* Shrink on exhale */
.breathing-widget-interactive.exhaling .breathing-ring-1,
.breathing-widget-interactive.exhaling .breathing-ring-2 {
    opacity: 0;
    transform: scale(0.85);
}

/* Overlapping Petals (Apple Watch Breathe Overhaul) */
.breathing-petals-container {
    position: absolute;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1);
}

.breathing-petal {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(121, 167, 159, 0.45) 0%, rgba(76, 139, 126, 0.15) 100%);
    mix-blend-mode: multiply;
    opacity: 0.55;
    transform: scale(0.65) translate(0, 0);
    transition: all 4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
}

/* Position 6 petals in a circle with rotation */
.petal-1 { transform: rotate(0deg) translate(0, -8px); }
.petal-2 { transform: rotate(60deg) translate(0, -8px); }
.petal-3 { transform: rotate(120deg) translate(0, -8px); }
.petal-4 { transform: rotate(180deg) translate(0, -8px); }
.petal-5 { transform: rotate(240deg) translate(0, -8px); }
.petal-6 { transform: rotate(300deg) translate(0, -8px); }

/* Inhale Phase: Petals expand, rotate, shift opacity, and blend */
.breathing-widget-interactive.inhaling .breathing-petals-container {
    transform: rotate(120deg);
}

.breathing-widget-interactive.inhaling .breathing-petal {
    opacity: 0.85;
    background: radial-gradient(circle, rgba(121, 167, 159, 0.65) 0%, rgba(76, 139, 126, 0.35) 100%);
}

.breathing-widget-interactive.inhaling .petal-1 { transform: rotate(0deg) translate(0, -30px) scale(1.2); }
.breathing-widget-interactive.inhaling .petal-2 { transform: rotate(60deg) translate(0, -30px) scale(1.2); }
.breathing-widget-interactive.inhaling .petal-3 { transform: rotate(120deg) translate(0, -30px) scale(1.2); }
.breathing-widget-interactive.inhaling .petal-4 { transform: rotate(180deg) translate(0, -30px) scale(1.2); }
.breathing-widget-interactive.inhaling .petal-5 { transform: rotate(240deg) translate(0, -30px) scale(1.2); }
.breathing-widget-interactive.inhaling .petal-6 { transform: rotate(300deg) translate(0, -30px) scale(1.2); }

/* Exhale Phase: petals shrink back and fade */
.breathing-widget-interactive.exhaling .breathing-petals-container {
    transform: rotate(0deg);
}

.breathing-widget-interactive.exhaling .breathing-petal {
    opacity: 0.35;
    transform: scale(0.6) translate(0, -5px);
}

/* Breathing coach card background smooth shifting */
.breathing-coach-card {
    transition: background 1.5s cubic-bezier(0.4, 0, 0.2, 1), border-color 1.5s ease, box-shadow 1.5s ease !important;
}

.breathing-coach-card.inhaling {
    background: linear-gradient(135deg, rgba(235, 243, 241, 0.95) 0%, rgba(215, 230, 227, 0.85) 100%) !important;
    border-color: rgba(76, 139, 126, 0.35) !important;
    box-shadow: 0 15px 35px rgba(76, 139, 126, 0.12) !important;
}

.breathing-coach-card.holding {
    background: linear-gradient(135deg, rgba(210, 225, 222, 0.95) 0%, rgba(185, 205, 201, 0.85) 100%) !important;
    border-color: rgba(54, 99, 90, 0.45) !important;
    box-shadow: 0 20px 40px rgba(54, 99, 90, 0.18) !important;
}

.breathing-coach-card.exhaling {
    background: linear-gradient(135deg, rgba(253, 252, 250, 0.95) 0%, rgba(247, 245, 241, 0.85) 100%) !important;
    border-color: rgba(121, 167, 159, 0.25) !important;
    box-shadow: 0 10px 25px rgba(121, 167, 159, 0.08) !important;
}

/* 5. iOS Widget Leaflet Map Dashboard Overlay */
.map-dashboard-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(0);
    max-width: calc(100% - 30px);
}

.map-dashboard-overlay.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.map-dashboard-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
}

.stat-val {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.map-dashboard-divider {
    width: 1px;
    height: 28px;
    background: rgba(76, 139, 126, 0.2);
}

/* 6. Apple Wallet Pass Refinements & Holographic reflection */
.ticket-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 248, 245, 0.9) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 30px 60px rgba(54, 99, 90, 0.12), inset 0 0 20px rgba(255, 255, 255, 0.6) !important;
    border-radius: 24px !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.ticket-card:hover {
    box-shadow: 0 32px 68px rgba(54, 99, 90, 0.16), inset 0 0 24px rgba(255, 255, 255, 0.7) !important;
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 300%;
    height: 100%;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.18) 45%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0.18) 55%, rgba(255, 255, 255, 0) 70%);
    transform: skewX(-20deg);
    transition: all 0.75s ease;
    z-index: 5;
    pointer-events: none;
}

.ticket-card:hover::before {
    left: 150%;
    transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Physical cuts in Apple Wallet Pass */
.ticket-divider {
    position: relative;
}

.divider-circle-left, .divider-circle-right {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #FAF8F5; /* Matches layout background */
    border-radius: 50%;
    z-index: 10;
    top: -10px;
    box-shadow: inset 0 2px 4px rgba(54, 99, 90, 0.06);
}
.divider-circle-left {
    left: -10px;
    border-right: 1px solid rgba(76, 139, 126, 0.08);
}
.divider-circle-right {
    right: -10px;
    border-left: 1px solid rgba(76, 139, 126, 0.08);
}

.ticket-barcode-wrapper {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.ticket-barcode {
    display: flex;
    align-items: stretch;
    height: 48px;
    gap: 2px;
    background: transparent;
    padding: 0;
}

.barcode-line {
    background-color: #1c1c1e;
    border-radius: 1px;
}
.barcode-line.w-1 { width: 1px; }
.barcode-line.w-2 { width: 2px; }
.barcode-line.w-3 { width: 3px; }
.barcode-line.w-4 { width: 4px; }

.barcode-number {
    font-family: monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    font-weight: 700;
}

/* Suggestions Dropdown iOS-style redesign */
.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(76, 139, 126, 0.15);
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(54, 99, 90, 0.12);
    z-index: 1000;
    max-height: 240px;
    overflow-y: auto;
    padding: 0.4rem;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    color: var(--text-main);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease, color 0.2s ease;
    border-bottom: 1px solid rgba(76, 139, 126, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: var(--primary-color);
    color: #FFFFFF;
}

/* Polishing form buttons, segmented controls & inputs */
.form-input {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 139, 126, 0.12);
}

.segmented-option .option-btn {
    border-radius: var(--radius-full) !important;
    border: 1px solid transparent;
    padding: 0.6rem 1.2rem;
    font-weight: 700;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.segmented-option .option-btn:hover {
    border-color: var(--primary-color);
    background: rgba(76, 139, 126, 0.08);
    color: var(--primary-dark);
}

.segmented-option input[type="radio"]:checked + .option-btn {
    border-color: rgba(76, 139, 126, 0.28);
    box-shadow: 0 4px 10px rgba(76, 139, 126, 0.15);
}

/* WhatsApp Mockup Beautification */
.chat-mockup {
    border-radius: 20px !important;
    overflow: hidden;
    border: 1px solid rgba(76, 139, 126, 0.15) !important;
    box-shadow: var(--shadow-md) !important;
}

.chat-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(76, 139, 126, 0.08);
}

.chat-bubble {
    border-radius: 16px !important;
    font-size: 0.82rem !important;
    line-height: 1.45 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.bubble-received {
    background: #FFFFFF !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
}

.btn-wa-demo {
    border-radius: var(--radius-full) !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.78rem !important;
    background: #25D366;
    color: #FFFFFF;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.2);
}

.btn-wa-demo:hover {
    background: #128C7E;
    box-shadow: 0 6px 14px rgba(37, 211, 102, 0.3);
}

/* ==========================================================================
   N2O APPLE FACELIFT 2.0 - NEXT LEVEL PREMIUM & FRIENDLY INTERACTIONS
   ========================================================================== */

/* 1. Header Sticky Glassmorphic */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(76, 139, 126, 0.12);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

/* 2. Scroll Reveal System */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(35px) scale(0.97);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Delay gradual en cascada para elementos contiguos */
.reveal-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.reveal-on-scroll:nth-child(2) { transition-delay: 0.15s; }
.reveal-on-scroll:nth-child(3) { transition-delay: 0.25s; }

/* 3. Tipografía Clamped Premium & Fluid */
.section-title {
    font-size: clamp(1.5rem, 4.5vw, 2.2rem) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em;
    color: var(--primary-dark) !important;
}

.section-desc {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem) !important;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

/* Modales de Confort Bento */
.bento-modal-container {
    max-width: 480px !important;
    width: 92% !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(30px) !important;
    -webkit-backdrop-filter: blur(30px) !important;
    border: 1.5px solid rgba(54, 99, 90, 0.16) !important;
    box-shadow: 0 30px 70px rgba(54, 99, 90, 0.22) !important;
    border-radius: 20px !important;
    animation: bentoModalEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bento-modal-container .modal-header,
.bento-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    border-bottom: none !important;
    padding-bottom: 0.25rem !important;
    margin-bottom: 0.9rem;
}

@media (max-width: 600px) {
    .bento-modal-container {
        width: calc(100% - 1rem) !important;
        max-width: 480px !important;
        border-radius: 20px !important;
        padding: 1.35rem 1.25rem !important;
    }
}

@keyframes bentoModalEntrance {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(15px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.bento-modal-icon {
    font-size: 2.2rem;
    margin-right: 0.5rem;
    display: inline-block;
    vertical-align: middle;
    animation: waveEmoji 2.5s infinite ease-in-out;
}

@keyframes waveEmoji {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.1); }
}

.bento-modal-desc {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-main);
}

.bento-modal-list {
    list-style: none;
    padding: 0;
}

.bento-modal-list li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.75rem;
    font-size: 0.86rem;
    color: var(--text-main);
    line-height: 1.5;
}

.bento-modal-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* 5. Apple Watch Breathe Coach - Dark Mode Glow Overhaul */
.breathing-coach-card {
    background: linear-gradient(135deg, #182e2a 0%, #0b1a16 100%) !important;
    border: 1.5px solid rgba(76, 139, 126, 0.3) !important;
    color: #FFFFFF !important;
    box-shadow: 0 25px 60px rgba(11, 26, 22, 0.45) !important;
}

.breathing-coach-card .breathing-coach-title {
    color: #FFFFFF !important;
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 800;
}

.breathing-coach-card .breathing-coach-desc {
    color: rgba(255, 255, 255, 0.65) !important;
}

.breathing-coach-card .breathing-circle-outer {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 0 40px rgba(76, 139, 126, 0.2) !important;
}

.breathing-coach-card .breathing-circle-inner {
    background: radial-gradient(circle, rgba(121, 167, 159, 0.85) 0%, rgba(76, 139, 126, 0.65) 100%) !important;
    box-shadow: 0 0 30px rgba(121, 167, 159, 0.6) !important;
}

.breathing-coach-card .breathing-state-text {
    color: #FFFFFF !important;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.breathing-coach-card .breathing-petal {
    background: radial-gradient(circle, rgba(121, 167, 159, 0.75) 0%, rgba(76, 139, 126, 0.4) 100%) !important;
    mix-blend-mode: screen !important;
    filter: drop-shadow(0 0 6px rgba(121, 167, 159, 0.45)) !important;
    opacity: 0.65;
}

/* Sincronización cromática de fondo en modo oscuro */
.breathing-coach-card.inhaling {
    background: linear-gradient(135deg, #1f4037 0%, #152d27 100%) !important;
    border-color: rgba(121, 167, 159, 0.5) !important;
    box-shadow: 0 30px 70px rgba(31, 64, 55, 0.4) !important;
}

.breathing-coach-card.holding {
    background: linear-gradient(135deg, #112d26 0%, #0b1a16 100%) !important;
    border-color: rgba(76, 139, 126, 0.6) !important;
    box-shadow: 0 35px 80px rgba(11, 26, 22, 0.55) !important;
}

.breathing-coach-card.exhaling {
    background: linear-gradient(135deg, #12211e 0%, #0a1412 100%) !important;
    border-color: rgba(76, 139, 126, 0.25) !important;
    box-shadow: 0 20px 50px rgba(10, 20, 18, 0.3) !important;
}

.breathing-coach-card .btn-breathing-control {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

.breathing-coach-card .btn-breathing-control:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px);
}

/* 6. Apple Wallet Pass - 3D Rotación & Sweep Metálico */
.ticket-card {
    perspective: 1000px;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Sweep de luz metálica reflectante */
.ticket-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.28) 45%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(255, 255, 255, 0.28) 55%,
        rgba(255, 255, 255, 0) 70%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    animation: metallicSweep 6s infinite ease-in-out;
    pointer-events: none;
    z-index: 5;
}

@keyframes metallicSweep {
    0% { left: -150%; }
    50%, 100% { left: 150%; }
}

/* 7. Barra Inferior Flotante de Acción para Smartphones (iOS Safe Area) */
.floating-mobile-action-bar {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border: 1px solid rgba(76, 139, 126, 0.18);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    box-shadow: 0 20px 45px rgba(54, 99, 90, 0.15);
    animation: slideUpActionBar 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.floating-mobile-action-bar.hidden {
    opacity: 0;
    transform: translateY(100px);
    pointer-events: none;
}

@keyframes slideUpActionBar {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-action-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.mobile-action-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1 1 auto;
    min-width: 0;
}

.mobile-action-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
}

.mobile-action-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.btn-mobile-action {
    width: auto !important;
    padding: 0.65rem 1.35rem !important;
    font-size: 0.85rem !important;
    border-radius: var(--radius-full) !important;
    box-shadow: 0 6px 15px rgba(76, 139, 126, 0.22) !important;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .floating-mobile-action-bar {
        left: 12px;
        right: 12px;
        padding: 0.75rem 0.95rem;
    }
    .mobile-action-price {
        font-size: 1.05rem;
        white-space: nowrap;
    }
    .btn-mobile-action {
        width: auto !important;
        padding: 0.6rem 1rem !important;
        font-size: 0.82rem !important;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Ocultar barra flotante en pantallas grandes */
@media (min-width: 992px) {
    .floating-mobile-action-bar {
        display: none !important;
    }
}

/* 8. Estilo de Mapa Leaflet iOS Bezel */
.map-container-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(76, 139, 126, 0.18);
    box-shadow: var(--shadow-md);
}

.map-canvas {
    border-radius: 24px;
}

/* 9. Botón flotante pulso amigable en dra-avatar */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(121, 167, 159, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(121, 167, 159, 0); }
    100% { box-shadow: 0 0 0 0 rgba(121, 167, 159, 0); }
}

/* ==========================================================================
   10. Estilos y Estructura de la Landing Page Premium
   ========================================================================== */

/* Contenedores y Secciones Landing */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-widget {
    max-width: 900px;
}

section {
    padding: 90px 0;
    position: relative;
    width: 100%;
    clear: both;
}

#cotizar,
#booking-widget-container,
#step3ValidationBanner,
#seccionPaciente,
#seccionClinico {
    scroll-margin-top: 96px;
}

/* Menú de Navegación Fijo Glassmorphic (Navbar) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1500;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border-bottom: 1px solid rgba(76, 139, 126, 0.08);
    padding: 0.85rem 0;
    box-shadow: 0 4px 30px rgba(54, 99, 90, 0.02);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.nav-logo-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
}

.nav-brand-title {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.nav-brand-subtitle {
    font-size: 0.62rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.25rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-dark);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2.5px;
    background: var(--primary-color);
    transition: var(--transition-normal);
    border-radius: var(--radius-full);
}

.nav-link.active::after, .nav-link:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.btn-nav-cta {
    background: var(--primary-color);
    color: var(--bg-color);
    border-radius: var(--radius-full);
    padding: 0.65rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 16px var(--primary-glow);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-nav-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-glow);
    color: #FFFFFF;
}

/* Hamburguesa para móviles */
.nav-toggle-btn {
    display: none;
    background: transparent;
    border: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    width: 26px;
    height: 24px;
    justify-content: center;
    outline: none;
}

.hamburger-bar {
    width: 100%;
    height: 2px;
    background: var(--primary-dark);
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-toggle-btn.open .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle-btn.open .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle-btn.open .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
    min-height: 95vh;
    display: flex;
    align-items: center;
    padding-top: 140px;
    padding-bottom: 60px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(250,247,242,0.5) 100%);
    position: relative;
    z-index: 10;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-text-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    text-align: left;
}

.badge-premium {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(76, 139, 126, 0.2);
    box-shadow: var(--shadow-sm);
    display: inline-block;
}

.hero-title {
    font-family: var(--font-title);
    font-size: clamp(2.4rem, 5.5vw, 3.6rem);
    font-weight: 900;
    color: var(--primary-dark);
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.highlight-text {
    background: linear-gradient(120deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--text-muted);
    line-height: 1.7;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.btn-hero-primary {
    width: auto;
    font-size: 0.95rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 22px var(--primary-glow);
}

.btn-hero-secondary {
    width: auto;
    font-size: 0.95rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 139, 126, 0.15);
    color: var(--primary-dark);
}

.btn-hero-secondary:hover {
    background: var(--primary-ultra-light);
    border-color: var(--primary-color);
}

.hero-visual-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-visual-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    transform: rotate(1.5deg);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.hero-visual-card:hover {
    transform: scale(1.04) rotate(-0.5deg);
    box-shadow: 0 30px 60px rgba(54, 99, 90, 0.12);
}

.hero-visual-img {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--shadow-md);
    display: block;
    border: 1px solid var(--border-color);
}

.hero-visual-badge {
    position: absolute;
    bottom: 30px;
    left: -24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: floatBadge 4s infinite ease-in-out;
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.badge-icon {
    font-size: 1.5rem;
}

.badge-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.badge-lbl {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary-dark);
    display: block;
    line-height: 1.2;
}

.badge-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   Beneficios Bento Section
   -------------------------------------------------------------------------- */
.beneficios-section {
    background: var(--bg-color);
}

.section-header-centered {
    max-width: 700px;
    margin: 0 auto 3.5rem auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-badge {
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.section-header-centered .section-title {
    margin-bottom: 0.85rem;
    font-size: clamp(2rem, 4vw, 2.5rem);
    text-align: center;
}

.section-header-centered .section-desc {
    font-size: 1rem;
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
}

.dra-welcome-quote {
    max-width: 800px;
    margin: 4.5rem auto 3.5rem auto; /* Aumentamos el margen superior para acomodar el avatar flotante */
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2.75rem 2.25rem 2.75rem; /* Ajustamos paddings */
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.dra-quote-avatar {
    width: 90px;
    height: 90px;
    margin: -6rem auto 1.25rem auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--bg-color);
    box-shadow: 0 8px 24px rgba(76, 139, 126, 0.2);
    background: var(--bg-secondary);
    position: relative;
    z-index: 5;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dra-quote-avatar:hover {
    transform: scale(1.08) rotate(3deg);
}

.dra-quote-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dra-welcome-quote .dra-welcome-text {
    font-family: var(--font-title);
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    font-style: italic;
    color: var(--primary-dark);
    line-height: 1.6;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

.dra-welcome-quote .dra-signature {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1rem;
}

.dra-welcome-quote::before {
    content: '“';
    position: absolute;
    top: -12px;
    left: 40px;
    font-family: var(--font-title);
    font-size: 8rem;
    color: rgba(76, 139, 126, 0.08);
    line-height: 1;
    pointer-events: none;
}

.dra-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
    margin-top: 1.5rem;
}

@media (max-width: 992px) {
    .dra-bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.9rem;
    }
}

@media (max-width: 576px) {
    .dra-bento-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.bento-card {
    cursor: default;
    padding: 1.35rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: #FFFFFF;
    border: 1px solid rgba(54, 99, 90, 0.16);
    border-radius: 22px;
    box-shadow: 0 6px 20px rgba(54, 99, 90, 0.05);
    position: relative;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
    height: 100%;
    justify-content: flex-start;
    text-align: left;
}

@media (max-width: 768px) {
    .bento-card {
        padding: 1.15rem 1rem;
    }
}

.bento-card-title {
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.3;
}

.bento-card-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

.bento-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-top: auto;
    padding: 0.55rem 1rem;
    background: rgba(54, 99, 90, 0.08);
    border: none;
    border-radius: 9999px;
    letter-spacing: 0.01em;
    align-self: flex-start;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    min-height: 38px;
}

.bento-more-link:hover {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(54, 99, 90, 0.12);
}

/* --------------------------------------------------------------------------
   Experiencia Calma Section
   -------------------------------------------------------------------------- */
.calma-section {
    background: linear-gradient(135deg, #18302b 0%, #0a1b18 100%);
    color: var(--bg-color);
    overflow: hidden;
}

.calma-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.calma-info-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
    text-align: left;
}

.text-light {
    color: #FFFFFF !important;
}

.text-light-muted {
    color: rgba(255, 255, 255, 0.72) !important;
}

.calma-features-pills {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.calma-pill {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.pill-dot {
    width: 6px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 50%;
    display: inline-block;
}

.calma-widget-wrapper {
    display: flex;
    justify-content: center;
}

.calma-widget-wrapper .breathing-coach-card {
    width: 100%;
    max-width: 400px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    margin: 0;
    background: linear-gradient(135deg, #182e29 0%, #0d1e1b 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   Widget Cotizar Section
   -------------------------------------------------------------------------- */
.cotizar-section {
    background: var(--bg-secondary);
}

.booking-widget-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(76, 139, 126, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.widget-main-content {
    padding: 0;
}

.widget-main-content .panel-card {
    border: none;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    padding: 1.25rem 2.25rem 2.25rem;
    border-radius: 0;
}

@media (min-width: 992px) {
    .widget-main-content .panel-card {
        padding: 1.35rem 2.5rem 2.5rem !important;
    }
}

.widget-step-title {
    font-family: var(--font-title);
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-top: 0;
    margin-bottom: 0.35rem;
}

.widget-step-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   Footer Visual B2B Ampliado
   -------------------------------------------------------------------------- */
.app-footer {
    background: var(--bg-color);
    border-top: 1px solid rgba(76, 139, 126, 0.1);
    padding: 4.5rem 0 2.5rem 0;
    width: 100%;
    margin-bottom: 0 !important;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.25rem;
}

.footer-brand-col {
    max-width: 480px;
    text-align: center;
}

.footer-slogan {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-divider-line {
    width: 100%;
    max-width: 250px;
    height: 1px;
    background: rgba(76, 139, 126, 0.12);
}

.footer-bottom-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-note {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(76, 139, 126, 0.6);
}

/* --------------------------------------------------------------------------
   Responsive Media Queries for Landing Page
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .container {
        padding: 0 1.25rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-text-content {
        align-items: center;
        text-align: center;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .btn-hero-primary, .btn-hero-secondary {
        width: 100%;
        max-width: 320px;
    }
    
    .hero-visual-card {
        max-width: 380px;
        transform: rotate(0deg);
    }
    
    .hero-visual-card:hover {
        transform: scale(1.02);
    }
    
    .calma-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .calma-info-content {
        align-items: center;
        text-align: center;
    }
    
    .calma-features-pills {
        justify-content: center;
    }
    
    section {
        padding: 70px 0;
    }

    #cotizar {
        padding-top: 96px;
    }
    
    /* Navbar móvil slider */
    .nav-toggle-btn {
        display: flex;
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: var(--shadow-lg);
        text-align: center;
        z-index: 1400;
        animation: slideDownMenu 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    @keyframes slideDownMenu {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .btn-nav-cta {
        display: none; /* Se mantiene en el widget o se oculta */
    }
    
    .nav-right {
        gap: 0.85rem;
    }
    
    .widget-main-content .panel-card {
        padding: 1.15rem 1rem 1.5rem !important;
    }
    
    .step-2-grid-layout, .step-3-grid-layout, .step-4-grid-layout {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Estilos de Acciones del Ticket y Cancelación de Cita (Petición de Usuario)
   ========================================================================== */

/* Grupo de botones para acciones de la boleta */
.ticket-actions-group {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1.5rem;
}

.btn-ticket-action {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    font-family: var(--font-ui);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, filter 0.2s ease;
    border: 1px solid transparent;
}

.btn-ticket-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(54, 99, 90, 0.14);
    filter: brightness(0.96);
}

/* Botón Descargar (Estilo Neutro/Sabio) */
.btn-download {
    background: var(--bg-secondary);
    color: var(--primary-dark);
    border: 1px solid var(--border-color);
}
.btn-download:hover {
    background: var(--primary-ultra-light);
    border-color: var(--primary-color);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

/* Botón Correo (Estilo Primario Suave) */
.btn-email {
    background: var(--primary-color);
    color: #FFFFFF;
}
.btn-email:hover {
    background: var(--primary-dark);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Botón WhatsApp (Estilo WhatsApp Brand Lujoso) */
.btn-wa {
    background: #25D366;
    color: #FFFFFF;
}
.btn-wa:hover {
    background: #20BA5A;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

/* Estilos específicos para el link de cancelar cita en el navbar */
.nav-cancel-link {
    color: var(--danger-color) !important;
    font-weight: 600 !important;
}
.nav-cancel-link::after {
    background-color: var(--danger-color) !important;
}

/* Modal de Cancelación y Correo Premium (Estética Blanca Amena con Animaciones Fluidas) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(54, 99, 90, 0.45); /* Soft Salvia overlay tint */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1rem;
    opacity: 1;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

/* Animaciones fluidas para modales */
@keyframes modalScaleIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content-premium {
    width: 90%;
    max-width: 500px;
    max-height: calc(100dvh - 2.5rem);
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    margin: auto;
    background: #FFFFFF !important; /* Pure pure white */
    border: 1px solid rgba(54, 99, 90, 0.14) !important; /* Premium brand border */
    border-radius: 20px !important; /* Elegant rounded corners */
    box-shadow: 0 20px 45px rgba(54, 99, 90, 0.10), 0 2px 10px rgba(54, 99, 90, 0.04) !important; /* Highly polished soft brand shadow */
    padding: 2.25rem;
    position: relative;
    color: var(--text-main);
}

/* Bloqueo de scroll en body para evitar scroll fantasma en móviles/Safari al tener modales abiertos */
body.modal-scroll-locked {
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none;
}

/* Aplicación de la animación fluida en modal abierto */
.modal-overlay:not(.hidden) .modal-content-premium {
    animation: modalScaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.modal-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title-premium {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--primary-dark);
    font-weight: 700;
}

/* Unificación de botones de cierre en modales y drawer */
.modal-close-btn,
.btn-close-modal,
.close-modal-btn,
.close-premium-btn,
.btn-close-aviso,
.btn-close-drawer {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #F1F5F9;
    border: none;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.modal-close-btn:hover,
.btn-close-modal:hover,
.close-modal-btn:hover,
.close-premium-btn:hover,
.btn-close-aviso:hover,
.btn-close-drawer:hover {
    background: #E2E8F0 !important;
    color: var(--primary-dark) !important;
    transform: scale(1.06);
}

#mercadopagoModal .close-premium-btn,
.mercadopago-header .close-premium-btn,
#modalFinalizarCita .modal-close-btn {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #FFFFFF !important;
}

#mercadopagoModal .close-premium-btn:hover,
.mercadopago-header .close-premium-btn:hover,
#modalFinalizarCita .modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.28) !important;
    color: #FFFFFF !important;
}

.modal-desc-premium {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.modal-form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.modal-label-premium {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.modal-input-premium {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-family: var(--font-ui);
    font-size: 1rem;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    box-sizing: border-box;
}
select.modal-input-premium {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
    cursor: pointer;
    box-sizing: border-box;
}
.modal-input-premium:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Alerta de Reembolso */
.refund-info-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--warning-bg);
    border: 1px solid rgba(239, 108, 0, 0.15);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.refund-info-icon {
    font-size: 1.25rem;
    line-height: 1.2;
}

.refund-info-text {
    font-size: 0.88rem;
    color: #A04C00;
    line-height: 1.4;
}

.refund-info-text strong {
    color: var(--warning-color);
}

.modal-actions-premium {
    display: flex;
    gap: 0.75rem;
}

.btn-premium-action {
    flex: 1;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
    text-align: center;
}

.btn-action-cancel {
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.btn-action-cancel:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-main);
}

.btn-action-submit-danger {
    background: var(--danger-color);
    color: #FFFFFF;
}
.btn-action-submit-danger:hover {
    background: #B71C1C;
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.25);
}

.btn-action-submit-primary {
    background: var(--primary-color);
    color: #FFFFFF;
}
.btn-action-submit-primary:hover {
    background: var(--primary-dark);
    color: #FFFFFF;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Estado de carga animado premium */
.premium-loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.premium-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(76, 139, 126, 0.15);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: premiumSpin 1s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
    margin-bottom: 1.5rem;
}

@keyframes premiumSpin {
    to { transform: rotate(360deg); }
}

.loader-text-premium {
    font-size: 1rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.loader-subtext-premium {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================
   10. Estilos de Exportación de PDF Premium
   ========================================== */
.ticket-card.exporting-pdf {
    transform: none !important;
    box-shadow: none !important;
    border: 1px solid #d1d5db !important;
    background: #ffffff !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    color: #111827 !important;
    box-sizing: border-box !important;
}

.ticket-card.exporting-pdf .ticket-header {
    background: #f3f4f6 !important;
    border-bottom: 1px dashed #d1d5db !important;
}

.ticket-card.exporting-pdf .ticket-brand {
    color: var(--primary-dark) !important;
}

.ticket-card.exporting-pdf .ticket-status-tag {
    background: #def7ec !important;
    color: #03543f !important;
}

.ticket-card.exporting-pdf .ticket-body {
    padding: 1.5rem !important;
    background: #ffffff !important;
}

.ticket-card.exporting-pdf .t-label {
    color: #6b7280 !important;
}

.ticket-card.exporting-pdf .t-val {
    color: #111827 !important;
}

.ticket-card.exporting-pdf .text-primary {
    color: var(--primary-dark) !important;
}

.ticket-card.exporting-pdf .text-accent {
    color: #d97706 !important;
}

.ticket-card.exporting-pdf .barcode-number {
    color: #111827 !important;
    font-weight: 700 !important;
}

/* Spinner pequeño para los botones de carga */
@keyframes spin {
    to { transform: rotate(360deg); }
}
.premium-spinner-small {
    animation: spin 1s linear infinite !important;
}

/* ==========================================================================
   11. Estilos de Autenticación de Usuarios y Admin Panel (Usuarios y Boletas)
   ========================================================================== */

/* Pestañas de Autenticación */
.auth-tabs {
    display: flex;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.auth-tab-btn {
    transition: all 0.3s ease;
    outline: none;
}

.auth-tab-btn:hover {
    color: var(--primary-color) !important;
    opacity: 0.9;
}

.auth-tab-btn.active {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color) !important;
}

.btn-toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.btn-toggle-pass:hover {
    color: var(--primary-dark) !important;
    background: rgba(54, 99, 90, 0.08) !important;
    border-radius: 6px;
}

/* Pestañas Administrativas */
.admin-tabs {
    display: flex;
    gap: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.admin-tab-btn {
    transition: all 0.3s ease;
    outline: none;
    font-family: var(--font-ui);
}

.admin-tab-btn:hover {
    color: var(--primary-color) !important;
    opacity: 0.9;
}

.admin-tab-btn.active {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color) !important;
}

/* Badges de Roles */
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.role-badge.role-admin {
    background: rgba(76, 139, 126, 0.14) !important;
    color: var(--primary-dark) !important;
    border: 1px solid rgba(76, 139, 126, 0.32) !important;
}

.role-badge.role-normal {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #3B82F6 !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

.role-badge.role-sedador {
    background: rgba(54, 99, 90, 0.14) !important;
    color: var(--primary-dark) !important;
    border: 1px solid rgba(54, 99, 90, 0.3) !important;
}

/* Controles de Formulario de Usuarios en Admin */
.admin-role-select {
    background: rgba(76, 139, 126, 0.08) !important;
    border: 1px solid rgba(76, 139, 126, 0.25) !important;
    color: var(--primary-dark) !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.admin-role-select:hover:not(:disabled) {
    border-color: var(--primary-color) !important;
    background: rgba(76, 139, 126, 0.15) !important;
}

.admin-role-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Visor de Boletas / Recibos Pagados */
.paid-receipt-card {
    background: rgba(76, 139, 126, 0.06);
    border: 1px solid rgba(76, 139, 126, 0.18);
    border-radius: 12px;
    padding: 14px 18px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
}

.paid-receipt-card:hover {
    background: rgba(76, 139, 126, 0.1);
    border-color: rgba(76, 139, 126, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 139, 126, 0.1);
}

.receipt-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(76, 139, 126, 0.2);
    padding-bottom: 8px;
}

.receipt-id-tag {
    font-family: monospace;
    font-size: 11px;
    color: var(--text-muted);
}

.receipt-amount-badge {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 14px;
    color: var(--primary-color);
}

.receipt-body-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 12px;
}

.receipt-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.receipt-lbl {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.receipt-val {
    font-weight: 600;
    color: var(--primary-dark);
}

.receipt-survey-details {
    margin-top: 6px;
    background: rgba(76, 139, 126, 0.06);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 11px;
    border: 1px solid rgba(76, 139, 126, 0.15);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.survey-detail-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(76, 139, 126, 0.08);
    padding-bottom: 4px;
}

.survey-detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.survey-lbl {
    color: var(--text-muted);
}

.survey-val {
    font-weight: 700;
    color: var(--text-main);
}

.survey-val.yes {
    color: var(--danger-color);
}

.survey-val.no {
    color: var(--primary-color);
}

/* Formulario de login animado banner de Paso 3 */
.auth-booking-banner {
    transition: all 0.3s ease;
}

/* ================= 9. DASHBOARD Y HISTORIAL DE CLIENTES PREMIUM ================= */
.profile-tabs .profile-tab-btn {
    transition: all var(--transition-fast) ease;
}
.profile-tabs .profile-tab-btn:hover {
    color: var(--primary-color) !important;
}

.booking-history-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(54, 99, 90, 0.12);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 10px rgba(54, 99, 90, 0.02);
}
.booking-history-card:hover {
    background: #FFFFFF;
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.booking-card-code {
    font-size: 0.8rem;
    font-family: var(--font-title);
    font-weight: 800;
    color: var(--primary-dark);
    text-transform: uppercase;
    background: rgba(54, 99, 90, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
}
.booking-card-date {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 0.4rem;
}

.booking-card-details {
    margin-top: 0.8rem;
    background: rgba(54, 99, 90, 0.03);
    border-radius: var(--radius-sm);
    padding: 0.65rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    border-left: 3px solid var(--primary-light);
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-block;
}
.status-badge.status-confirmado {
    background: rgba(76, 139, 126, 0.14);
    color: var(--primary-dark);
}
.status-badge.status-pendiente {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
}

.btn-cancelar-reserva-dashboard {
    margin-top: 0.85rem;
    width: 100%;
    background: none;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
    padding: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-cancelar-reserva-dashboard:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: #EF4444;
}

/* ================= 10. ESTILOS DE TABLAS DE RESERVAS Y BOLETAS PREMIUM ================= */
.premium-table-container {
    margin-top: 1rem;
    max-height: 380px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid rgba(54, 99, 90, 0.14);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.82rem;
    color: var(--text-main);
    font-family: var(--font-ui);
}

.premium-table thead tr {
    border-bottom: 2px solid rgba(54, 99, 90, 0.15);
    position: sticky;
    top: 0;
    z-index: 10;
}

.premium-table th {
    padding: 12px 10px;
    font-weight: 800;
    color: var(--primary-dark);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    background: #FAF7F2; /* Matches the Warm Ivory container theme background */
}

.premium-table tbody tr {
    border-bottom: 1px solid rgba(54, 99, 90, 0.08);
    transition: background 0.2s ease;
}

.premium-table tbody tr:hover {
    background: rgba(54, 99, 90, 0.03);
}

.premium-table td {
    padding: 12px 10px;
    vertical-align: middle;
    line-height: 1.4;
}

/* Expandable clinical details container */
.clinical-details-row {
    background: rgba(54, 99, 90, 0.03);
}

.clinical-details-cell {
    padding: 10px 15px !important;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(54, 99, 90, 0.12) !important;
}

.btn-toggle-details-premium {
    background: rgba(54, 99, 90, 0.08);
    color: var(--primary-dark);
    border: 1px solid rgba(54, 99, 90, 0.18);
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

/* ==========================================================================
   FLUJO DE RESERVA HORIZONTAL Y BLOQUES UNIFICADOS (PASO 2 - SALVIA MÉDICO)
   ========================================================================== */

/* 1. Selector Horizontal de Fechas */
.date-selector-container {
    background: var(--primary-ultra-light);
    border: 1px solid rgba(54, 99, 90, 0.14);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.horizontal-date-scroll {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
}

.date-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    flex: 1 1 0%;
    min-width: 0;
    padding: 10px 2px;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.date-carousel::-webkit-scrollbar {
    display: none;
}

.date-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 calc((100% - 84px) / 8);
    min-width: 0;
    scroll-snap-align: start;
    height: 75px;
    background: #FFFFFF;
    border-radius: 35px; /* Bordes muy redondeados (cápsula vertical) */
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.date-bubble:hover {
    border-color: rgba(54, 99, 90, 0.45);
    transform: translateY(-2px);
}

.date-bubble.selected {
    background: #FFFFFF;
    border: 2px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(54, 99, 90, 0.16);
}

.date-bubble .day-week {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
}

.date-bubble .day-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.date-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid var(--primary-ultra-light);
}

/* Si no hay cupos */
.date-bubble.no-slots {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}
.date-bubble.no-slots:hover {
    transform: none;
    border-color: transparent;
}

.nav-btn {
    flex-shrink: 0;
    background: #FFFFFF;
    border: 1px solid rgba(54, 99, 90, 0.18);
    width: 38px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 12px;
    color: var(--primary-dark);
    box-shadow: 0 2px 6px rgba(54, 99, 90, 0.08);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 10;
}
.nav-btn:hover {
    background: var(--primary-ultra-light);
    border-color: var(--primary-color);
    color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(54, 99, 90, 0.14);
}

/* 2. Contenedor Unificado de Horarios (Paso 2) */
.sedadores-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.slots-grid-rs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.slot-btn-rs {
    background: #FFFFFF;
    color: var(--primary-dark);
    border: 1.5px solid rgba(54, 99, 90, 0.22);
    border-radius: 12px;
    padding: 10px 4px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.slot-btn-rs:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(54, 99, 90, 0.16);
    border-color: var(--primary-color);
    background: rgba(76, 139, 126, 0.06);
}

.slot-btn-rs.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: #FFFFFF !important;
    border-color: var(--primary-dark) !important;
    box-shadow: 0 4px 12px rgba(54, 99, 90, 0.25) !important;
}

.slot-btn-rs:disabled, .slot-btn-rs.invalid-start {
    background: #F8FAF9;
    color: #A0B2AF;
    border: 1px dashed rgba(160, 178, 175, 0.35);
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ========================================================
   MEJORAS PASO 2 Y PASO 3 (MINUTA N2O SEDACIÓN)
   ======================================================== */
.date-month-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 calc((100% - 84px) / 8);
    min-width: 0;
    scroll-snap-align: start;
    height: 75px;
    background: rgba(54, 99, 90, 0.08);
    border: 1px dashed rgba(54, 99, 90, 0.35);
    border-radius: 20px;
    padding: 6px 4px;
    overflow: hidden;
    pointer-events: none;
    box-sizing: border-box;
    user-select: none;
    text-align: center;
}

.date-month-divider .month-title {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--primary-color);
    line-height: 1.1;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.date-month-divider .month-year {
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748B;
    margin-top: 2px;
}

@media (max-width: 991px) {
    .date-bubble,
    .date-month-divider {
        flex: 0 0 calc((100% - 48px) / 5);
    }
}

@media (max-width: 480px) {
    .date-selector-container {
        padding: 14px 10px;
    }
    .horizontal-date-scroll {
        gap: 6px;
        padding: 0;
    }
    .nav-btn {
        width: 32px;
        height: 40px;
        border-radius: 10px;
    }
    .date-carousel {
        gap: 8px;
        padding: 8px 2px;
        scroll-padding-inline: 2px;
    }
    .date-bubble,
    .date-month-divider {
        flex: 0 0 calc((100% - 16px) / 3);
        min-width: 0;
        height: 70px;
    }
    .date-month-divider .month-title {
        font-size: 0.56rem;
        letter-spacing: 0.01em;
    }
}

.field-error-highlight {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
    background-color: #FFFDFD !important;
    transition: all 0.2s ease-in-out;
}

.medical-validation-banner {
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    border-left: 5px solid #D97706;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
    animation: fadeInDown 0.3s ease;
}

.medical-validation-banner h4 {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #92400E;
    display: flex;
    align-items: center;
    gap: 8px;
}

.medical-validation-banner ul {
    margin: 6px 0 0 18px;
    padding: 0;
    font-size: 0.85rem;
    color: #78350F;
    line-height: 1.5;
}

.cancellation-policies-card {
    background: rgba(54, 99, 90, 0.04);
    border: 1px solid rgba(54, 99, 90, 0.16);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.cancellation-policies-card .policy-badge {
    background: #FFFFFF;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #334155;
    line-height: 1.4;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* ==========================================
   MATRIZ SEMANAL DE 15 MINUTOS CON DRAG & SELECT
   ========================================== */
.weekly-matrix-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(76, 139, 126, 0.25);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 32px rgba(54, 99, 90, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-top: 1.5rem;
}

.weekly-matrix-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(76, 139, 126, 0.15);
}

.weekly-matrix-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weekly-matrix-nav-btn {
    background: #FFFFFF;
    border: 1px solid rgba(76, 139, 126, 0.3);
    color: var(--primary-dark);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.weekly-matrix-nav-btn:hover {
    background: rgba(76, 139, 126, 0.1);
    border-color: var(--primary-color);
}

.weekly-matrix-range-title {
    font-weight: 800;
    font-size: 14px;
    color: var(--primary-dark);
    margin: 0 4px;
}

.weekly-matrix-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.weekly-matrix-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11.5px;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 8px 14px;
    background: rgba(241, 245, 249, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(203, 213, 225, 0.5);
    flex-wrap: wrap;
}

.weekly-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.weekly-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.weekly-legend-dot.available {
    background: var(--primary-color);
    box-shadow: 0 0 6px var(--primary-glow);
}

.weekly-legend-dot.unavailable {
    background: #E2E8F0;
    border: 1px solid #CBD5E1;
}

.weekly-legend-dot.occupied {
    background: #3B82F6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.5);
}

.weekly-matrix-status {
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.weekly-matrix-status.saving {
    background: rgba(245, 158, 11, 0.15);
    color: #B45309;
}

.weekly-matrix-status.saved {
    background: rgba(76, 139, 126, 0.14);
    color: var(--primary-dark);
}

.weekly-matrix-table-container {
    overflow-x: auto;
    max-height: 560px;
    border-radius: 12px;
    border: 1px solid rgba(76, 139, 126, 0.2);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.02);
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    background: #FFFFFF;
}

.weekly-matrix-table {
    width: 100%;
    min-width: 670px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.weekly-matrix-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #F8FAFC;
    padding: 10px 6px;
    text-align: center;
    border-bottom: 2px solid rgba(76, 139, 126, 0.25);
    border-right: 1px solid #E2E8F0;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-dark);
}

.weekly-matrix-table th.time-header {
    width: 104px;
    min-width: 104px;
    background: #F1F5F9;
    font-size: 11px;
    text-align: center;
    box-sizing: border-box;
    position: sticky;
    left: 0;
    top: 0;
    z-index: 15;
    border-right: 2px solid rgba(76, 139, 126, 0.25);
}

.weekly-day-header-title {
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.weekly-day-header-date {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.weekly-day-toggle-btn {
    margin-top: 4px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    background: rgba(54, 99, 90, 0.08);
    color: var(--primary-dark);
    border: 1px solid rgba(54, 99, 90, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.weekly-day-toggle-btn:hover {
    background: var(--primary-color);
    color: #FFFFFF;
}

.weekly-matrix-table td {
    padding: 0;
    border-bottom: 1px solid #F1F5F9;
    border-right: 1px solid #F1F5F9;
    height: 24px;
    vertical-align: middle;
}

.weekly-matrix-table td.time-cell {
    background: #F8FAFC;
    font-size: 10.5px;
    font-weight: 700;
    color: #475569;
    text-align: center;
    padding: 0 6px;
    border-right: 2px solid rgba(76, 139, 126, 0.25);
    user-select: none;
    white-space: nowrap;
    width: 104px;
    min-width: 104px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.1px;
    box-sizing: border-box;
    position: sticky;
    left: 0;
    z-index: 5;
}

.weekly-matrix-table tr.hour-separator td {
    border-top: 1px solid #CBD5E1;
}

.weekly-slot-btn {
    width: 100%;
    height: 100%;
    min-height: 24px;
    border: none;
    margin: 0;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
    box-sizing: border-box;
}

.weekly-slot-btn.slot-available {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary-light);
}

.weekly-slot-btn.slot-available:hover {
    background: #D7E8E4;
    border-color: var(--primary-color);
}

.weekly-slot-btn.slot-unavailable {
    background: #FFFFFF;
    color: #94A3B8;
    border: 1px solid #F1F5F9;
}

.weekly-slot-btn.slot-unavailable:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

.weekly-slot-btn.slot-occupied {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #60A5FA;
    font-weight: 700;
    cursor: not-allowed;
}

.weekly-slot-btn.slot-drag-hover {
    outline: 2px dashed var(--primary-dark);
    outline-offset: -2px;
}

/* ==========================================================================
   VISTA MOBILE: SELECTOR DE DÍAS Y MATRIZ SEMANAL VERTICAL EN CELULARES (<= 768px)
   ========================================================================== */

/* Píldoras de selección de día en celular */
.sedador-mobile-day-tabs {
    display: none;
}

@media (max-width: 768px) {
    .weekly-slot-btn {
        touch-action: manipulation !important;
    }

    .weekly-slot-btn.slot-longpress-active {
        transform: scale(0.96);
        box-shadow: 0 0 0 3px rgba(54, 99, 90, 0.45) !important;
        z-index: 5;
        position: relative;
    }

    .sedador-mobile-day-tabs {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 4px 2px 10px 2px;
        margin-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .sedador-mobile-day-tabs::-webkit-scrollbar {
        display: none;
    }

    .sedador-mobile-day-tab {
        flex: 1 1 0;
        min-width: 48px;
        padding: 8px 4px;
        border-radius: 12px;
        background: #FFFFFF;
        border: 1.5px solid #E2E8F0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }

    .sedador-mobile-day-tab .day-short {
        font-size: 11.5px;
        font-weight: 800;
        color: #475569;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }

    .sedador-mobile-day-tab .day-num {
        font-size: 10.5px;
        font-weight: 600;
        color: #64748B;
    }

    .sedador-mobile-day-tab .day-badge-dots {
        font-size: 9.5px;
        font-weight: 700;
        padding: 1px 4px;
        border-radius: 9999px;
        background: rgba(54, 99, 90, 0.08);
        color: var(--primary-dark);
        margin-top: 2px;
    }

    .sedador-mobile-day-tab.active {
        background: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
        box-shadow: 0 4px 14px rgba(54, 99, 90, 0.35);
        transform: translateY(-2px);
    }

    .sedador-mobile-day-tab.active .day-short {
        color: #FFFFFF !important;
    }

    .sedador-mobile-day-tab.active .day-num {
        color: var(--primary-ultra-light) !important;
    }

    .sedador-mobile-day-tab.active .day-badge-dots {
        background: rgba(255, 255, 255, 0.25) !important;
        color: #FFFFFF !important;
    }

    .sedador-mobile-view-toggle {
        min-width: 52px;
        background: #F8FAFC;
        border-color: #CBD5E1;
    }

    .sedador-mobile-view-toggle.active {
        background: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
    }

    /* Adaptar la tabla de Sedador y Admin a 1 solo día en vista vertical móvil por defecto */
    .weekly-matrix-table-container {
        max-height: 70vh;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .weekly-matrix-table-container.mobile-week-scroll {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    #sedadorWeeklyMatrixTable,
    #adminWeeklyMatrixTable {
        min-width: 100% !important;
        width: 100% !important;
        table-layout: fixed;
    }

    #sedadorWeeklyMatrixTable[data-mobile-view-mode="week"],
    #adminWeeklyMatrixTable[data-mobile-view-mode="week"] {
        min-width: 670px !important;
        width: 100% !important;
        table-layout: auto;
    }

    #sedadorWeeklyMatrixTable th.time-header,
    #adminWeeklyMatrixTable th.time-header {
        width: 104px !important;
        min-width: 104px !important;
    }

    #sedadorWeeklyMatrixTable td.time-cell,
    #adminWeeklyMatrixTable td.time-cell {
        width: 104px !important;
        min-width: 104px !important;
        font-size: 10.5px !important;
        padding: 0 6px !important;
        box-sizing: border-box;
    }

    /* Ocultar columnas de días inactivos en celular cuando NO se está en modo semana */
    #sedadorWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="0"] .weekly-day-col:not([data-day-col="0"]),
    #sedadorWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="1"] .weekly-day-col:not([data-day-col="1"]),
    #sedadorWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="2"] .weekly-day-col:not([data-day-col="2"]),
    #sedadorWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="3"] .weekly-day-col:not([data-day-col="3"]),
    #sedadorWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="4"] .weekly-day-col:not([data-day-col="4"]),
    #sedadorWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="5"] .weekly-day-col:not([data-day-col="5"]),
    #adminWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="0"] .weekly-day-col:not([data-day-col="0"]),
    #adminWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="1"] .weekly-day-col:not([data-day-col="1"]),
    #adminWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="2"] .weekly-day-col:not([data-day-col="2"]),
    #adminWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="3"] .weekly-day-col:not([data-day-col="3"]),
    #adminWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="4"] .weekly-day-col:not([data-day-col="4"]),
    #adminWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="5"] .weekly-day-col:not([data-day-col="5"]) {
        display: none !important;
    }

    /* Mostrar la columna del día activo ocupando todo el ancho restante */
    #sedadorWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="0"] .weekly-day-col[data-day-col="0"],
    #sedadorWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="1"] .weekly-day-col[data-day-col="1"],
    #sedadorWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="2"] .weekly-day-col[data-day-col="2"],
    #sedadorWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="3"] .weekly-day-col[data-day-col="3"],
    #sedadorWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="4"] .weekly-day-col[data-day-col="4"],
    #sedadorWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="5"] .weekly-day-col[data-day-col="5"],
    #adminWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="0"] .weekly-day-col[data-day-col="0"],
    #adminWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="1"] .weekly-day-col[data-day-col="1"],
    #adminWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="2"] .weekly-day-col[data-day-col="2"],
    #adminWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="3"] .weekly-day-col[data-day-col="3"],
    #adminWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="4"] .weekly-day-col[data-day-col="4"],
    #adminWeeklyMatrixTable:not([data-mobile-view-mode="week"])[data-mobile-active-day="5"] .weekly-day-col[data-day-col="5"] {
        display: table-cell !important;
        width: calc(100% - 96px) !important;
    }

    /* En modo semana completa móvil, mostrar todas las columnas */
    #sedadorWeeklyMatrixTable[data-mobile-view-mode="week"] .weekly-day-col,
    #adminWeeklyMatrixTable[data-mobile-view-mode="week"] .weekly-day-col {
        display: table-cell !important;
        width: auto !important;
        min-width: 95px !important;
    }

    #sedadorWeeklyMatrixTable td,
    #adminWeeklyMatrixTable td {
        height: 38px !important;
    }

    #sedadorWeeklyMatrixTable .weekly-slot-btn,
    #adminWeeklyMatrixTable .weekly-slot-btn {
        min-height: 36px !important;
        font-size: 12.5px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        touch-action: manipulation !important;
        padding: 4px 8px !important;
    }

    #sedadorWeeklyMatrixTable .weekly-day-toggle-btn,
    #adminWeeklyMatrixTable .weekly-day-toggle-btn {
        padding: 5px 12px !important;
        font-size: 11px !important;
        border-radius: 6px !important;
        margin-top: 5px !important;
    }

    .weekly-matrix-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .weekly-matrix-nav {
        justify-content: space-between;
        width: 100%;
    }
    .weekly-matrix-range-title {
        font-size: 12.5px;
        text-align: center;
    }
    .weekly-matrix-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .weekly-matrix-actions .btn {
        flex: 1 1 calc(50% - 6px);
        text-align: center;
        justify-content: center;
        padding: 8px 6px;
        font-size: 11px;
    }
    .weekly-matrix-legend {
        font-size: 10.5px;
        gap: 8px;
        padding: 6px 10px;
    }
}

/* En orientación horizontal (landscape) o escritorio, mantener semana completa sin tabs */
@media (max-width: 768px) and (orientation: landscape) {
    .sedador-mobile-day-tabs {
        display: none !important;
    }
    .weekly-matrix-table-container {
        overflow-x: auto !important;
        max-height: 560px;
    }
    #sedadorWeeklyMatrixTable,
    #adminWeeklyMatrixTable {
        min-width: 670px !important;
        width: 100% !important;
    }
    #sedadorWeeklyMatrixTable .weekly-day-col,
    #adminWeeklyMatrixTable .weekly-day-col {
        display: table-cell !important;
        width: auto !important;
    }
    #sedadorWeeklyMatrixTable th.time-header,
    #adminWeeklyMatrixTable th.time-header,
    #sedadorWeeklyMatrixTable td.time-cell,
    #adminWeeklyMatrixTable td.time-cell {
        width: 104px !important;
        min-width: 104px !important;
    }
    #sedadorWeeklyMatrixTable td,
    #adminWeeklyMatrixTable td {
        height: 24px !important;
    }
    #sedadorWeeklyMatrixTable .weekly-slot-btn,
    #adminWeeklyMatrixTable .weekly-slot-btn {
        min-height: 24px !important;
        font-size: 10px !important;
        touch-action: manipulation !important;
        padding: 0 4px !important;
    }
}

/* ==========================================
   Google Identity SSO & Auth Divider
   ========================================== */
.btn-google-sso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 46px;
    padding: 0 16px;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    background: #FFFFFF;
    border: 1px solid #DADCE0;
    border-radius: 10px;
    color: #3C4043;
    font-family: var(--font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    box-sizing: border-box;
}

.btn-google-sso:hover {
    background: #F8F9FA;
    border-color: #C2E7FF;
    box-shadow: 0 2px 6px rgba(60, 64, 67, 0.15);
}

.btn-google-sso:active {
    background: #EEEEEE;
    transform: scale(0.99);
}

.btn-google-sso .google-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.25rem 0 1rem 0;
    color: var(--text-muted, #747775);
    font-size: 0.82rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(54, 99, 90, 0.16);
}

.auth-divider span {
    padding: 0 12px;
    color: var(--text-muted, #666);
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

/* ==========================================================================
   FASE 1: HEADER CON ROLES, DRAWER LATERAL Y HERO CON BIFURCACIÓN EMPÁTICA
   ========================================================================== */

/* 1. Navbar Reestructurado */
.navbar-container-fase1 {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    position: relative;
}

.nav-left-drawer-trigger {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
    padding: 0.35rem 0.6rem;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.nav-left-drawer-trigger:hover {
    background: rgba(54, 99, 90, 0.07);
}

.navbar-container-fase1 .nav-toggle-btn {
    display: flex !important;
}

.nav-menu-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-logo-centered {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.nav-logo-centered:hover {
    transform: scale(1.02);
}

.nav-right-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Botón Express "Agendar hora" — unificado con verde institucional primario */
.btn-nav-express {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(54, 99, 90, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-nav-express:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 12px 26px rgba(54, 99, 90, 0.30);
    filter: brightness(0.94);
    color: #FFFFFF !important;
}

.express-bolt {
    font-size: 1rem;
}

/* Botón Mi Cuenta */
.nav-account-container {
    position: relative;
}

.btn-nav-account {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    border-radius: 9999px;
    background: rgba(54, 99, 90, 0.08);
    border: 1px solid rgba(54, 99, 90, 0.2);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-nav-account:hover {
    background: var(--primary-ultra-light);
    border-color: var(--primary-color);
}

.account-user-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-chevron {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Menú Dropdown Flotante de Usuario */
.account-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    background: #FFFFFF;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(54, 99, 90, 0.16);
    border: 1px solid rgba(54, 99, 90, 0.14);
    padding: 0.85rem;
    z-index: 2100;
    animation: dropdownPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dropdownPop {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-user-header {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.4rem 0.5rem 0.6rem;
}

.user-greeting-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-display-name {
    font-size: 0.95rem;
    color: #0F172A;
    font-weight: 700;
}

.user-display-email {
    font-size: 0.75rem;
    color: #64748B;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background: rgba(54, 99, 90, 0.12);
    margin: 0.4rem 0;
}

.dropdown-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dropdown-action-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-action-link:hover {
    background: #F1F5F9;
    color: var(--primary-dark);
}

.dropdown-action-link.item-highlight {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    font-weight: 700;
}

.dropdown-action-link.item-highlight:hover {
    background: #DCEBE8;
}

.dropdown-action-link.text-danger {
    color: #DC2626;
}

.dropdown-action-link.text-danger:hover {
    background: #FEF2F2;
    color: #B91C1C;
}

/* 2. Drawer Lateral de Navegación */
.nav-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 40, 36, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2900;
    transition: opacity 0.3s ease;
}

.nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 86vw;
    background: #FFFFFF;
    z-index: 3000;
    box-shadow: 6px 0 35px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(54, 99, 90, 0.12);
}

.drawer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary-dark);
}

.drawer-logo {
    height: 32px;
    width: auto;
    filter: brightness(0) saturate(100%) invert(39%) sepia(25%) saturate(550%) hue-rotate(118deg) brightness(85%);
}

.drawer-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-dark);
    display: block;
}

.drawer-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.drawer-group {
    margin-bottom: 1.4rem;
}

.drawer-group-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94A3B8;
    margin-bottom: 0.5rem;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1E293B;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    margin-bottom: 0.2rem;
}

.drawer-link .d-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary-dark);
}

.drawer-link:hover {
    background: #F8FAFC;
    color: var(--primary-dark);
}

.drawer-link-highlight {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    font-weight: 700;
}

.drawer-footer {
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid rgba(54, 99, 90, 0.12);
}

.drawer-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    border-radius: 14px;
    background: #25D366;
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
    transition: transform 0.2s ease;
}

.drawer-whatsapp-btn:hover {
    transform: translateY(-1px);
    color: #FFFFFF !important;
}

/* 3. Hero con Bienvenida Cálida y Bifurcación */
.hero-bifurcado {
    padding: 100px 0 50px !important;
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
    text-align: center;
}

.hero-container-fase1 {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.hero-header-welcome {
    max-width: 780px;
    margin: 0 auto;
}

.hero-badge-warm {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(54, 99, 90, 0.16);
}

.badge-dot-live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-glow);
}

.hero-title-welcome {
    font-family: var(--font-title);
    font-size: 2.65rem;
    font-weight: 800;
    color: #0F172A;
    line-height: 1.2;
    margin-bottom: 1.1rem;
    letter-spacing: -0.02em;
}

.highlight-green {
    color: var(--primary-dark);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc-welcome {
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.65;
    margin-bottom: 2rem;
}

/* Grilla del Bifurcador */
.hero-bifurcation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 1.75rem;
    margin: 2.5rem 0 2rem;
}

.bifurcation-card {
    background: #FFFFFF;
    border: 2px solid rgba(54, 99, 90, 0.16);
    border-radius: 24px;
    padding: 2.2rem 1.8rem;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(54, 99, 90, 0.06);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.bifurcation-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 45px rgba(54, 99, 90, 0.16);
}

.card-role-tag,
.card-role-tag.tag-clinico {
    display: inline-block;
    align-self: flex-start;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
}

.card-icon-badge,
.card-icon-badge.badge-clinico {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.card-bifurc-title {
    font-family: var(--font-title);
    font-size: 1.55rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 0.6rem;
}

.card-bifurc-desc {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.55;
    flex: 1;
    margin-bottom: 1.5rem;
}

.card-bifurc-action {
    margin-top: auto;
}

.btn-bifurc {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.65rem 1.25rem;
    border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-bifurc-paciente,
.btn-bifurc-clinico {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #FFFFFF;
    box-shadow: 0 8px 24px rgba(54, 99, 90, 0.24);
}

.bifurcation-card:hover .btn-bifurc-paciente,
.bifurcation-card:hover .btn-bifurc-clinico {
    transform: translateY(-1.5px);
    box-shadow: 0 12px 26px rgba(54, 99, 90, 0.30);
    filter: brightness(0.94);
    color: #FFFFFF;
}

/* Margen superior equilibrado bajo navbar sticky en vista Paciente y vista Clínico */
.seccion-paciente-flujo,
.seccion-clinico-flujo {
    padding: 7.5rem 0 4.5rem;
}

.paciente-benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    margin-bottom: 3.5rem;
}

@media (min-width: 768px) {
    .paciente-benefits-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .seccion-paciente-flujo,
    .seccion-clinico-flujo {
        padding: 6.85rem 0 3.5rem;
    }
}

.hero-quick-reserve-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.85rem 1.4rem;
    border-radius: 16px;
    background: rgba(54, 99, 90, 0.06);
    margin-top: 1rem;
}

.quick-hint {
    font-size: 0.9rem;
    color: #64748B;
}

.quick-reserve-link {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease, text-underline-offset 0.2s ease;
}

.quick-reserve-link:hover {
    color: var(--primary-color);
    text-underline-offset: 4px;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    .navbar-container-fase1 {
        padding: 0.45rem 0.85rem;
    }
    .btn-nav-express {
        display: none !important;
    }
    .btn-nav-account {
        padding: 0.45rem 0.65rem;
        border-radius: 9999px;
        min-width: 38px;
        min-height: 38px;
        justify-content: center;
    }
    .account-user-name {
        display: none !important;
    }
    .hero-title-welcome {
        font-size: 1.85rem;
    }
    .hero-bifurcation-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .bifurcation-card {
        padding: 1.5rem 1.25rem;
    }
}

/* Eliminación definitiva de la barra flotante rota (Pills Bar) */
.mode-switcher-bar, #modeSwitcherBar {
    display: none !important;
}

/* ==========================================================================
   SEGREGACIÓN DEFINITIVA DE VISTAS (SPA VIEW SWITCHING) Y GESTIÓN DE ROLES
   ========================================================================== */

/* 1. Contenedores de Vistas SPA */
.spa-view {
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.spa-view.hidden {
    display: none !important;
}

.spa-view.active {
    display: block !important;
    animation: fadeInSpaView 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInSpaView {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* 3. Barra Switcher Superior (Modo Paciente / Modo Clínico) - Eliminada */
.mode-switcher-bar {
    display: none !important;
}

.switcher-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.switcher-badge-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.switcher-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.25rem 0.7rem;
    border-radius: 9999px;
}

.tag-paciente {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    border: 1px solid rgba(54, 99, 90, 0.22);
}

.tag-clinico {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    border: 1px solid rgba(54, 99, 90, 0.22);
}

.switcher-text {
    font-size: 0.88rem;
    color: #475569;
    font-weight: 600;
}

.switcher-actions-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.btn-switcher-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.95rem;
    border-radius: 9999px;
    background: var(--primary-dark);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.82rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(54, 99, 90, 0.25);
    transition: all 0.2s ease;
}

.btn-switcher-toggle:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
}

.btn-switcher-home {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.38rem 0.85rem;
    border-radius: 9999px;
    background: #F1F5F9;
    color: #64748B;
    font-weight: 700;
    font-size: 0.82rem;
    border: 1px solid #E2E8F0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-switcher-home:hover {
    background: #E2E8F0;
    color: #0F172A;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    .mode-switcher-bar {
        top: 60px;
        padding: 0.45rem 0;
    }
    .switcher-bar-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
    }
    .switcher-badge-group {
        justify-content: center;
    }
    .switcher-text {
        display: none;
    }
    .switcher-actions-group {
        justify-content: center;
        width: 100%;
    }
    .btn-switcher-toggle, .btn-switcher-home {
        flex: 1;
        justify-content: center;
        font-size: 0.76rem;
        padding: 0.4rem 0.6rem;
    }
}



/* ==========================================================================
   REFINAMIENTO UX/UI: SWITCHER MINIMALISTA, FAQS Y FOOTER MÉDICO 4 COLUMNAS
   ========================================================================== */

/* 1. Barra Switcher Flotante Ultracompacta (1 Sola Línea / Segmented Control iOS) */
.mode-switcher-pill-wrapper {
    position: sticky;
    top: 68px;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1390;
    pointer-events: none;
    padding: 6px 12px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.mode-switcher-pill-wrapper.hidden {
    display: none !important;
}

.mode-switcher-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    max-height: 36px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(54, 99, 90, 0.2);
    border-radius: 9999px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    pointer-events: auto;
    transition: all 0.25s ease;
}

.segmented-control {
    display: inline-flex;
    align-items: center;
    background: rgba(54, 99, 90, 0.08);
    padding: 2px;
    border-radius: 9999px;
}

.segment-btn {
    border: none;
    background: transparent;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.2;
}

.segment-btn:hover {
    color: var(--primary-dark);
}

.segment-btn.active {
    background: var(--primary-dark);
    color: #FFFFFF !important;
    box-shadow: 0 2px 6px rgba(54, 99, 90, 0.3);
}

.pill-divider {
    color: rgba(54, 99, 90, 0.3);
    font-size: 0.75rem;
    line-height: 1;
}

.btn-pill-exit {
    border: none;
    background: transparent;
    color: #64748B;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    line-height: 1.2;
}

.btn-pill-exit:hover {
    color: #0F172A;
    background: rgba(0, 0, 0, 0.05);
}

/* 2. Estilos para Enlaces de Cambio de Modo en Drawer */
.drawer-mode-switch-hint {
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: rgba(54, 99, 90, 0.06);
    border: 1px solid rgba(54, 99, 90, 0.14);
    text-align: center;
}
.drawer-switch-mode-link {
    font-size: 0.82rem;
    color: var(--primary-dark);
    text-decoration: none;
    line-height: 1.4;
    display: block;
}
.drawer-switch-mode-link:hover {
    text-decoration: underline;
}

/* 3. Sección de Preguntas Frecuentes (FAQS Paciente) */
.faq-section {
    padding: 5rem 0;
    background: #F8FAFC;
    border-top: 1px solid rgba(54, 99, 90, 0.08);
}
.faq-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.25rem;
}
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.faq-item {
    background: #FFFFFF;
    border: 1.5px solid rgba(54, 99, 90, 0.14);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.faq-item[open] {
    border-color: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(54, 99, 90, 0.08);
}
.faq-question {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    font-size: 1.02rem;
    font-weight: 700;
    color: #0F172A;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}
.faq-question::-webkit-details-marker {
    display: none;
}
.faq-question:hover {
    color: var(--primary-dark);
}
.faq-item[open] .faq-question {
    color: var(--primary-dark);
    border-bottom: 1px solid rgba(54, 99, 90, 0.08);
}
.faq-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.25s ease;
}
.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}
.faq-answer {
    padding: 1.25rem 1.5rem;
    font-size: 0.94rem;
    line-height: 1.65;
    color: #475569;
}
.faq-answer p {
    margin: 0;
}

/* 4. Footer Médico Institucional de 4 Columnas */
.app-footer-medical {
    background: #0B1E1C;
    color: #E2E8F0;
    padding: 4.5rem 0 2rem;
    border-top: 2px solid rgba(76, 139, 126, 0.25);
    font-size: 0.9rem;
}
.footer-medical-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
    margin-bottom: 3.5rem;
}
.footer-col-title {
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 1.25rem;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-brand-summary {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #94A3B8;
    margin: 1rem 0;
}
.footer-accreditation-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(76, 139, 126, 0.15);
    border: 1px solid rgba(76, 139, 126, 0.3);
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--primary-ultra-light);
}
.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.footer-link-item a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
}
.footer-link-item a:hover {
    color: #A7CFC6;
    transform: translateX(3px);
}
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1rem;
    color: #94A3B8;
    font-size: 0.88rem;
    line-height: 1.5;
}
.footer-contact-item a {
    color: #A7CFC6;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}
.footer-contact-item a:hover {
    color: var(--primary-ultra-light);
    text-decoration: underline;
}
.footer-contact-icon {
    font-size: 1.1rem;
    color: var(--primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.footer-legal-callout {
    margin-top: 1.25rem;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    line-height: 1.45;
    color: #64748B;
}
.footer-bottom-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: #64748B;
}

@media (max-width: 992px) {
    .footer-medical-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}
@media (max-width: 600px) {
    .footer-medical-grid {
        grid-template-columns: 1fr;
        gap: 2.2rem;
    }
    .footer-bottom-bar {
        flex-direction: column;
        text-align: center;
    }
    .mode-switcher-pill {
        height: 34px;
        padding: 2px 6px;
        gap: 5px;
    }
    .segment-btn {
        padding: 3px 8px;
        font-size: 0.72rem;
    }
    .btn-pill-exit {
        padding: 3px 6px;
        font-size: 0.72rem;
    }
    .ai-float-btn {
        bottom: 14px !important;
        right: 14px !important;
        transform: scale(0.88) !important;
    }
}

/* ==========================================================================
   MODAL DE AVISO PÚBLICO / POP-UP MARCHA BLANCA
   ========================================================================== */
#modalAvisoPublico {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.72) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 3000 !important;
}

#modalAvisoPublico.hidden {
    display: none !important;
}

.modal-content-aviso {
    background: #FFFFFF;
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(54, 99, 90, 0.08);
    animation: modalAvisoFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalAvisoFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.93) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.btn-close-aviso {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content-aviso .aviso-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(54, 99, 90, 0.1);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.modal-content-aviso .aviso-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.3;
    margin: 10px 0 8px 0;
}

.modal-content-aviso .aviso-body {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.6;
    white-space: pre-line;
    margin-bottom: 1.5rem;
}

.modal-content-aviso .aviso-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-content-aviso .btn-aviso-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #FFFFFF !important;
    padding: 13px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: none;
    cursor: pointer;
}

.modal-content-aviso .btn-aviso-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.modal-content-aviso .btn-aviso-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #64748B;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.modal-content-aviso .btn-aviso-secondary:hover {
    color: var(--primary-dark);
}

.modal-content-aviso .aviso-flyer-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Blindaje de opacidad y contraste en selector de duración web */
#bookingDurationSelect,
#bookingDurationSelect option {
    background-color: #FFFFFF !important;
    color: #0F172A !important;
    font-weight: 600;
}

