/* ============================================
   WEBCHAT LOGIN - Diseño App-Native Mobile & Professional Desktop
   ============================================ */

:root {
    /* Colores Lilac/Morado */
    --lilac-primary: #6a1b9a;
    --lilac-primary-dark: #4a148c;
    --lilac-primary-light: #9c27b0;
    --lilac-secondary: #8e24aa;
    --lilac-accent: #ab47bc;
    
    /* Gradientes */
    --lilac-gradient: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 50%, #ab47bc 100%);
    --lilac-gradient-strong: linear-gradient(135deg, #4a148c 0%, #6a1b9a 50%, #8e24aa 100%);
    
    /* Espaciado */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Bordes */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
}

/* ============================================
   BASE - MOBILE FIRST
   ============================================ */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    background: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.webchat-login {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.webchat-login input,
.webchat-login button {
    -webkit-user-select: text;
    user-select: text;
}

/* ============================================
   CONTAINER - MOBILE: 100% FULLSCREEN
   ============================================ */

.webchat-login-container {
    width: 100%;
    height: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
    margin: 0;
    background: #ffffff;
    overflow: hidden;
    box-sizing: border-box;
}

/* Background decorativo (oculto en mobile) */
.webchat-login-background {
    display: none;
}

.webchat-login-gradient,
.webchat-login-pattern,
.webchat-login-shapes {
    display: none;
}

/* ============================================
   CONTENT - MOBILE FULLSCREEN
   ============================================ */

.webchat-login-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.webchat-login-card {
    background: #ffffff;
    border: none;
    border-radius: 0;
    padding: 0;
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
    padding-left: 18px;
    padding-right: 18px;
    box-shadow: none;
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Contenedor interno para centrado perfecto */
.webchat-login-card > * {
    width: 100%;
    max-width: 100%;
}

/* Ajuste para formularios largos (registro) - mejor scroll */
body:has(#registerForm) .webchat-login-card {
    justify-content: flex-start;
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
}

body:has(#registerForm) .webchat-login-header {
    margin-top: 8px;
    margin-bottom: 18px;
    flex-shrink: 0;
}

body:has(#registerForm) .webchat-login-form {
    flex-shrink: 0;
    margin-bottom: 16px;
}

body:has(#registerForm) .webchat-login-footer {
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 16px;
}

/* Barra superior con gradiente */
.webchat-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--lilac-gradient);
    z-index: 10;
}

/* ============================================
   HEADER
   ============================================ */

.webchat-login-header {
    text-align: center;
    margin-bottom: 24px;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
}

.webchat-login-logo {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.webchat-login-logo-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: var(--lilac-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 
        0 10px 30px rgba(106, 27, 154, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    animation: logoFloat 3s ease-in-out infinite;
}

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

.webchat-login-logo-icon svg {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.webchat-login-logo-pulse {
    display: none;
}

.webchat-login-title {
    margin: 0 auto 8px;
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    line-height: 1.25;
    letter-spacing: -0.5px;
    text-align: center;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.webchat-login-subtitle {
    margin: 0 auto 4px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    font-weight: 500;
    text-align: center;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ocultar el badge de registro del header (se moverá al footer) */
.webchat-login-subtitle + p {
    display: none;
}

/* ============================================
   REGISTER BUTTON IN HEADER
   ============================================ */

.webchat-login-register-button-wrapper {
    margin-top: 16px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.webchat-login-register-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 12px;
    background: var(--lilac-gradient);
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 16px rgba(106, 27, 154, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(106, 27, 154, 0.3);
    min-height: 48px;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.webchat-login-register-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.webchat-login-register-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.webchat-login-register-button span {
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.webchat-login-register-button:active {
    transform: scale(0.96);
    box-shadow: 
        0 2px 10px rgba(106, 27, 154, 0.3),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.webchat-login-register-hint {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    font-weight: 500;
    line-height: 1.4;
    width: 100%;
}

/* ============================================
   DATE SELECTORS (Día/Mes/Año)
   ============================================ */

.webchat-date-selectors {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 10px;
    width: 100%;
}

.webchat-date-selector-wrapper {
    width: 100%;
    position: relative;
}

.webchat-date-select {
    width: 100%;
    padding: 15px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 600;
    background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
    color: #111827;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    min-height: 54px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.webchat-date-select::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.webchat-date-select:focus {
    border-color: var(--lilac-primary);
    box-shadow: 
        0 0 0 4px rgba(106, 27, 154, 0.12),
        0 2px 8px rgba(106, 27, 154, 0.15);
    background: #ffffff;
    transform: translateY(-1px);
}

.webchat-date-select:hover:not(:focus) {
    border-color: #d1d5db;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.webchat-date-select.error {
    border-color: #ef4444;
    box-shadow: 
        0 0 0 4px rgba(239, 68, 68, 0.12),
        0 2px 8px rgba(239, 68, 68, 0.15);
}

/* Icono de flecha para select */
.webchat-date-selector-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #6b7280;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1;
}

.webchat-date-selector-wrapper:focus-within::after {
    border-top-color: var(--lilac-primary);
}

/* ============================================
   ALERT
   ============================================ */

.webchat-login-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    margin: 0 auto 24px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

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

.webchat-login-alert svg {
    flex-shrink: 0;
    margin-top: 2px;
    width: 20px;
    height: 20px;
}

.webchat-login-alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.08) 100%);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.webchat-login-alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.3);
    color: #2563eb;
}

/* ============================================
   FORM
   ============================================ */

.webchat-login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.webchat-login-form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
}

.webchat-login-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0.1px;
}

.webchat-login-label-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lilac-primary);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.webchat-login-label-icon svg {
    filter: drop-shadow(0 1px 2px rgba(106, 27, 154, 0.15));
}

.webchat-login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.webchat-login-input {
    width: 100%;
    padding: 15px 18px;
    padding-right: 50px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 16px;
    font-family: inherit;
    font-weight: 500;
    background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
    color: #111827;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    min-height: 54px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.webchat-login-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.webchat-login-input:focus {
    border-color: var(--lilac-primary);
    box-shadow: 
        0 0 0 4px rgba(106, 27, 154, 0.12),
        0 2px 8px rgba(106, 27, 154, 0.15);
    background: #ffffff;
    transform: translateY(-1px);
}

.webchat-login-input-focus {
    display: none;
}

/* Toggle Password */
.webchat-login-toggle-password {
    position: absolute;
    right: 10px;
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    padding: 0;
}

.webchat-login-toggle-password:active {
    transform: scale(0.88);
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.12) 0%, rgba(142, 36, 170, 0.08) 100%);
    color: var(--lilac-primary);
}

.webchat-login-toggle-password svg {
    width: 22px;
    height: 22px;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */

.webchat-login-submit {
    width: 100%;
    padding: 17px 28px;
    border: none;
    border-radius: 14px;
    background: var(--lilac-gradient);
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 6px 20px rgba(106, 27, 154, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    margin-top: 24px;
    position: relative;
    overflow: hidden;
    min-height: 56px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.webchat-login-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.webchat-login-submit:active {
    transform: scale(0.97);
    box-shadow: 
        0 3px 12px rgba(106, 27, 154, 0.35),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.webchat-login-submit-icon {
    width: 20px;
    height: 20px;
}

.webchat-login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.webchat-login-submit-icon {
    flex-shrink: 0;
}

.webchat-login-submit .spinning {
    animation: spin 1s linear infinite;
}

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

.webchat-login-submit-shine,
.webchat-login-submit::before {
    display: none;
}

/* ============================================
   WHATSAPP SUPPORT BUTTON (Footer)
   ============================================ */

.webchat-login-footer-link-whatsapp {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.1) 0%, rgba(18, 140, 126, 0.08) 100%);
    border: 1.5px solid rgba(37, 211, 102, 0.3);
    position: relative;
    overflow: hidden;
}

.webchat-login-footer-link-whatsapp::before {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15) 0%, rgba(18, 140, 126, 0.1) 100%);
}

.webchat-login-footer-link-whatsapp:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.18) 0%, rgba(18, 140, 126, 0.12) 100%);
    border-color: rgba(37, 211, 102, 0.5);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(37, 211, 102, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

.webchat-login-footer-link-whatsapp:active {
    transform: translateY(0) scale(0.98);
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.12) 0%, rgba(18, 140, 126, 0.08) 100%);
}

.webchat-login-footer-link-whatsapp .webchat-login-footer-link-icon {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.webchat-login-footer-link-whatsapp .webchat-login-footer-link-icon svg {
    color: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.webchat-login-footer-link-whatsapp .webchat-login-footer-link-title {
    color: #128C7E;
    font-weight: 700;
}

.webchat-login-footer-link-whatsapp .webchat-login-footer-link-desc {
    color: rgba(18, 140, 126, 0.8);
}

.webchat-login-footer-link-whatsapp:hover .webchat-login-footer-link-title {
    color: #25D366;
}

.webchat-login-footer-link-whatsapp:hover .webchat-login-footer-link-desc {
    color: rgba(37, 211, 102, 0.9);
}

/* Dark mode WhatsApp button */
body.dark-mode .webchat-login-footer-link-whatsapp {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.12) 0%, rgba(18, 140, 126, 0.08) 100%);
    border-color: rgba(37, 211, 102, 0.25);
}

body.dark-mode .webchat-login-footer-link-whatsapp:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.2) 0%, rgba(18, 140, 126, 0.15) 100%);
    border-color: rgba(37, 211, 102, 0.4);
}

body.dark-mode .webchat-login-footer-link-whatsapp .webchat-login-footer-link-title {
    color: #25D366;
}

body.dark-mode .webchat-login-footer-link-whatsapp .webchat-login-footer-link-desc {
    color: rgba(37, 211, 102, 0.85);
}

/* ============================================
   FOOTER
   ============================================ */

.webchat-login-footer {
    margin-top: 28px;
    padding-top: 24px;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
}

.webchat-login-footer-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.webchat-login-footer-divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(106, 27, 154, 0.25) 50%, transparent);
}

.webchat-login-footer-divider-text {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 0 6px;
}

.webchat-login-footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

/* Botón principal "Regístrate" - Más destacado */
.webchat-login-footer-link.primary-action {
    background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 100%);
    border: 2.5px solid rgba(106, 27, 154, 0.4);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    min-height: 58px;
    box-shadow: 
        0 6px 20px rgba(106, 27, 154, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.webchat-login-footer-link.primary-action .webchat-login-footer-link-title,
.webchat-login-footer-link.primary-action .webchat-login-footer-link-desc {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.webchat-login-footer-link.primary-action::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
}

.webchat-login-footer-link.primary-action:hover {
    background: linear-gradient(135deg, #7a2baa 0%, #9e34ba 100%);
    box-shadow: 
        0 8px 28px rgba(106, 27, 154, 0.45),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.webchat-login-footer-link.primary-action:active {
    background: linear-gradient(135deg, #5a0b8a 0%, #7e149a 100%);
}

/* Botones secundarios */
.webchat-login-footer-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 14px 18px;
    border-radius: 12px;
    background: #f8f8fb;
    border: 2px solid rgba(106, 27, 154, 0.2);
    min-height: 54px;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.1px;
}

.webchat-login-footer-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, transparent 100%);
    pointer-events: none;
}

.webchat-login-footer-link:hover {
    background: #ffffff;
    border-color: rgba(106, 27, 154, 0.3);
    box-shadow: 0 4px 12px rgba(106, 27, 154, 0.15);
}

.webchat-login-footer-link:active {
    background: #f3f3f8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Descripción de los botones */
.webchat-login-footer-link-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
}

.webchat-login-footer-link-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--lilac-primary);
    line-height: 1.2;
}

.webchat-login-footer-link-desc {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.3;
}

.webchat-login-footer-link:active {
    transform: scale(0.97);
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.08) 0%, rgba(142, 36, 170, 0.05) 100%);
    border-color: rgba(106, 27, 154, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.webchat-login-footer-link.primary-action:active {
    transform: scale(0.97);
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.16) 0%, rgba(142, 36, 170, 0.12) 100%);
    border-color: rgba(106, 27, 154, 0.4);
}

.webchat-login-footer-link-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.12) 0%, rgba(142, 36, 170, 0.1) 100%);
    border: 1px solid rgba(106, 27, 154, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.webchat-login-footer-link-icon svg {
    width: 22px;
    height: 22px;
    color: var(--lilac-primary);
    filter: drop-shadow(0 1px 2px rgba(106, 27, 154, 0.2));
}

.webchat-login-footer-link.primary-action .webchat-login-footer-link-icon {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.webchat-login-footer-link.primary-action .webchat-login-footer-link-icon svg {
    color: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Mantener compatibilidad con SVG directo */
.webchat-login-footer-link svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 1px 2px rgba(106, 27, 154, 0.2));
}

.webchat-login-footer-bottom {
    margin-top: 20px;
    text-align: center;
    padding: 12px 0 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 100%;
}

.webchat-login-footer-bottom p {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.2px;
}

/* ============================================
   DESKTOP & TABLET RESPONSIVE
   ============================================ */

@media (min-width: 768px) {
    html, body {
        overflow: auto;
        position: relative;
        background: var(--lilac-gradient);
    }
    
    .webchat-login {
        position: relative;
        overflow: auto;
    }
    
    .webchat-login-container {
        position: relative;
        min-height: 100vh;
        height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 50px 30px;
        background: var(--lilac-gradient);
        overflow: auto;
    }
    
    /* Botones en 2 columnas en desktop */
    .webchat-login-footer-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
    
    /* Botón principal ocupa toda la primera fila */
    .webchat-login-footer-link.primary-action {
        grid-column: 1 / -1;
    }
    
    /* Mejorar efectos hover en desktop */
    .webchat-login-footer-link:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }
    
    .webchat-login-submit:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 
            0 8px 28px rgba(106, 27, 154, 0.45),
            0 4px 14px rgba(0, 0, 0, 0.15);
    }
    
    .webchat-login-input:hover:not(:focus) {
        border-color: #d1d5db;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }
    
    /* Activar efectos de fondo en desktop */
    .webchat-login-background {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 0;
        overflow: hidden;
        pointer-events: none;
        background: var(--lilac-gradient-strong);
        transition: background 0.4s ease;
    }
    
    .webchat-login-gradient {
        display: block;
        position: absolute;
        top: -50%;
        left: -50%;
        right: -50%;
        bottom: -50%;
        background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
                    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
        animation: gradientRotate 20s ease-in-out infinite;
        will-change: transform;
        opacity: 0.8;
    }
    
    @keyframes gradientRotate {
        0%, 100% { transform: rotate(0deg) scale(1); }
        50% { transform: rotate(180deg) scale(1.05); }
    }
    
    .webchat-login-pattern {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: 
            repeating-linear-gradient(45deg, transparent, transparent 50px, rgba(255, 255, 255, 0.02) 50px, rgba(255, 255, 255, 0.02) 51px);
        opacity: 0.6;
    }
    
    .webchat-login-shapes {
        display: block;
        opacity: 0.4;
    }
    
    .webchat-shape {
        position: absolute;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 50%, transparent 70%);
        animation: shapeFloat 25s ease-in-out infinite;
        backdrop-filter: blur(3px);
    }
    
    @keyframes shapeFloat {
        0%, 100% {
            transform: translate(0, 0) scale(1);
            opacity: 0.4;
        }
        33% {
            transform: translate(40px, -40px) scale(1.1);
            opacity: 0.6;
        }
        66% {
            transform: translate(-30px, 30px) scale(0.9);
            opacity: 0.5;
        }
    }

    .webchat-login-content {
        max-width: 480px;
        height: auto;
        position: relative;
    }
    
    /* Hacer el card más ancho cuando hay formulario de activación */
    #activateForm .webchat-login-content,
    body:has(#activateForm) .webchat-login-content {
        max-width: 680px;
    }

    .webchat-login-card {
        height: auto;
        overflow: visible;
        padding: 48px 44px;
        border-radius: var(--radius-xl);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.7);
        box-shadow: 
            0 24px 70px rgba(106, 27, 154, 0.3), 
            0 10px 35px rgba(0, 0, 0, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
        transition: all 0.3s ease;
    }
    
    .webchat-login-card::before {
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        height: 5px;
    }

    .webchat-login-logo-icon {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }
    
    .webchat-login-logo-icon svg {
        width: 38px;
        height: 38px;
    }

    .webchat-login-title {
        font-size: 30px;
    }

    .webchat-login-subtitle {
        font-size: 15px;
    }

    .webchat-login-footer-links {
        flex-direction: row;
        gap: 12px;
    }
    
    .webchat-login-footer-link:hover {
        background: rgba(106, 27, 154, 0.1);
        border-color: rgba(106, 27, 154, 0.25);
        transform: translateY(-1px);
    }
    
    .webchat-login-submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(106, 27, 154, 0.45);
    }
    
    .webchat-login-register-button:hover {
        transform: translateY(-2px);
        box-shadow: 
            0 6px 24px rgba(106, 27, 154, 0.45),
            0 3px 12px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        background: linear-gradient(135deg, #7a2baa 0%, #9e34ba 100%);
    }
    
    .webchat-date-select:hover:not(:focus) {
        border-color: #d1d5db;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }
}

@media (min-width: 1024px) {
    .webchat-login-content {
        max-width: 500px;
    }
    
    .webchat-login-card {
        padding: 56px 52px;
        box-shadow: 
            0 30px 90px rgba(106, 27, 154, 0.35), 
            0 15px 45px rgba(0, 0, 0, 0.25),
            inset 0 2px 0 rgba(255, 255, 255, 0.8);
    }
    
    .webchat-login-logo-icon {
        width: 88px;
        height: 88px;
        border-radius: 22px;
    }
    
    .webchat-login-logo-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .webchat-login-title {
        font-size: 32px;
        letter-spacing: -0.8px;
    }
    
    .webchat-login-subtitle {
        font-size: 16px;
    }
    
    .webchat-login-input {
        min-height: 56px;
        font-size: 16px;
    }
    
    .webchat-login-submit {
        min-height: 58px;
        font-size: 17px;
    }
    
    .webchat-login-footer-link {
        min-height: 56px;
        padding: 16px 22px;
    }
    
    .webchat-login-footer-link-icon {
        width: 44px;
        height: 44px;
    }
    
    .webchat-login-footer-link-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* Desktop XL - Aún más premium */
@media (min-width: 1440px) {
    .webchat-login-content {
        max-width: 520px;
    }
    
    .webchat-login-card {
        padding: 60px 56px;
        border-radius: 28px;
    }
    
    .webchat-login-logo-icon {
        width: 96px;
        height: 96px;
        border-radius: 24px;
    }
    
    .webchat-login-logo-icon svg {
        width: 44px;
        height: 44px;
    }
}

/* ============================================
   UTILIDADES
   ============================================ */

* {
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: rgba(106, 27, 154, 0.2);
    color: #1a1a1a;
}

/* Prevenir zoom en iOS */
@media screen and (max-width: 767px) {
    .webchat-login-input,
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
    
    /* Mejoras adicionales para centrado perfecto en mobile */
    .webchat-login-card {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* Asegurar que todo el contenido esté centrado */
    .webchat-login-header,
    .webchat-login-form,
    .webchat-login-footer {
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Optimizar spacing para mejor distribución */
    .webchat-login-header {
        margin-bottom: 0;
    }
    
    .webchat-login-form {
        margin-top: 0;
    }
    
    /* Ajustar márgenes del botón submit */
    .webchat-login-submit {
        margin-top: 22px;
    }
    
    /* Mejorar footer spacing */
    .webchat-login-footer {
        margin-top: 20px;
    }
    
    /* Mejoras para formularios largos (registro) */
    body:has(#registerForm) .webchat-login-card {
        justify-content: flex-start;
        padding-top: max(16px, env(safe-area-inset-top, 0px));
        padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
    }
    
    body:has(#registerForm) .webchat-login-header {
        margin-top: 8px;
        margin-bottom: 16px;
    }
    
    body:has(#registerForm) .webchat-login-form {
        margin-top: 0;
        margin-bottom: 16px;
    }
    
    body:has(#registerForm) .webchat-login-footer {
        margin-top: 16px;
        margin-bottom: 16px;
    }
    
    /* Asegurar que el hint del botón de registro sea visible */
    .webchat-login-register-hint {
        font-size: 11px;
        margin: 0;
    }
    
    .webchat-login-register-button-wrapper {
        gap: 6px;
    }
    
    .webchat-login-register-button {
        width: 100%;
    }
    
    /* Estilos responsive para selectores de fecha */
    .webchat-date-selectors {
        grid-template-columns: 1fr 1.5fr 1fr;
        gap: 8px;
    }
    
    .webchat-date-select {
        padding: 14px 12px;
        font-size: 15px;
        min-height: 52px;
    }
    
    .webchat-date-selector-wrapper::after {
        right: 12px;
    }
}

/* ============================================
   ELEMENTOS ADICIONALES
   ============================================ */

.webchat-activate-progress,
.webchat-login-field-feedback,
.webchat-password-strength {
    display: none;
}

.webchat-login-alert-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
    color: #059669;
}

/* ============================================
   DARK MODE TOGGLE BUTTON
   ============================================ */

.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(106, 27, 154, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
}

.dark-mode-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    border-color: rgba(106, 27, 154, 0.3);
}

.dark-mode-toggle:active {
    transform: scale(0.95);
}

.dark-mode-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--lilac-primary);
    transition: all 0.3s ease;
}

.dark-mode-toggle .moon-icon {
    display: none;
}

.dark-mode-toggle .sun-icon {
    display: block;
}

/* Móvil: botón más pequeño */
@media (max-width: 767px) {
    .dark-mode-toggle {
        width: 44px;
        height: 44px;
        top: 16px;
        right: 16px;
    }
    
    .dark-mode-toggle svg {
        width: 22px;
        height: 22px;
    }
}

/* ============================================
   DARK MODE STYLES - Ultra Oscuro y Profesional
   ============================================ */

body.dark-mode {
    background: #050510 !important;
}

body.dark-mode .webchat-login-container {
    background: #050510 !important;
}

body.dark-mode .webchat-login-background {
    background: #050510 !important;
}

body.dark-mode .webchat-login-gradient {
    background: radial-gradient(circle at 30% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(167, 139, 250, 0.05) 0%, transparent 50%);
    opacity: 0.6;
}

body.dark-mode .webchat-login-pattern {
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 50px, rgba(139, 92, 246, 0.02) 50px, rgba(139, 92, 246, 0.02) 51px);
    opacity: 0.4;
}

body.dark-mode .webchat-login-card {
    background: #0d0d1a !important;
    border-color: rgba(139, 92, 246, 0.25) !important;
    box-shadow: 
        0 24px 70px rgba(0, 0, 0, 0.8) !important,
        0 10px 35px rgba(0, 0, 0, 0.6) !important,
        inset 0 1px 0 rgba(139, 92, 246, 0.15) !important;
}

body.dark-mode .webchat-login-card::before {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.6);
}

body.dark-mode .webchat-login-logo-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    box-shadow: 
        0 10px 30px rgba(139, 92, 246, 0.6),
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.dark-mode .webchat-login-title {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

body.dark-mode .webchat-login-subtitle {
    color: #9090a0 !important;
}

body.dark-mode .webchat-login-register-button {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%) !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    box-shadow: 
        0 4px 16px rgba(139, 92, 246, 0.5) !important,
        0 2px 8px rgba(0, 0, 0, 0.5) !important,
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

body.dark-mode .webchat-login-register-button:hover {
    background: linear-gradient(135deg, #9b6cff 0%, #b89bff 100%) !important;
    box-shadow: 
        0 6px 24px rgba(139, 92, 246, 0.6) !important,
        0 3px 12px rgba(0, 0, 0, 0.6) !important,
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .webchat-login-register-button:active {
    box-shadow: 
        0 2px 10px rgba(139, 92, 246, 0.4) !important,
        inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .webchat-login-label {
    color: #ffffff !important;
}

body.dark-mode .webchat-login-label-icon {
    color: #8b5cf6 !important;
}

body.dark-mode .webchat-login-input {
    background: #16162a !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: #ffffff !important;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.5) !important,
        inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .webchat-login-input::placeholder {
    color: #6b6b80 !important;
}

body.dark-mode .webchat-login-input:hover:not(:focus) {
    border-color: rgba(139, 92, 246, 0.35) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .webchat-login-input:focus {
    background: #1a1a2e !important;
    border-color: #8b5cf6 !important;
    box-shadow: 
        0 0 0 4px rgba(139, 92, 246, 0.3) !important,
        0 4px 16px rgba(139, 92, 246, 0.5) !important;
}

body.dark-mode .webchat-login-toggle-password {
    color: #9090a0 !important;
}

body.dark-mode .webchat-login-toggle-password:active {
    background: rgba(139, 92, 246, 0.2) !important;
    color: #a78bfa !important;
}

body.dark-mode .webchat-login-submit {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%) !important;
    box-shadow: 
        0 8px 24px rgba(139, 92, 246, 0.6) !important,
        0 4px 12px rgba(0, 0, 0, 0.5) !important,
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .webchat-login-submit:hover:not(:disabled) {
    box-shadow: 
        0 10px 32px rgba(139, 92, 246, 0.7) !important,
        0 5px 16px rgba(0, 0, 0, 0.6) !important;
}

body.dark-mode .webchat-login-submit:active:not(:disabled) {
    box-shadow: 
        0 4px 16px rgba(139, 92, 246, 0.5) !important,
        inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .webchat-login-footer-divider-text {
    color: #9090a0 !important;
}

body.dark-mode .webchat-login-footer-divider-line {
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3) 50%, transparent) !important;
}

body.dark-mode .webchat-login-footer-link {
    background: #1a1a2e !important;
    border-color: rgba(139, 92, 246, 0.4) !important;
    color: #ffffff !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.6) !important,
        0 2px 6px rgba(139, 92, 246, 0.15) !important,
        inset 0 1px 0 rgba(139, 92, 246, 0.12) !important;
}

body.dark-mode .webchat-login-footer-link:hover {
    background: #20203a !important;
    border-color: rgba(139, 92, 246, 0.6) !important;
    box-shadow: 
        0 6px 18px rgba(0, 0, 0, 0.7) !important,
        0 3px 9px rgba(139, 92, 246, 0.3) !important;
}

body.dark-mode .webchat-login-footer-link:active {
    background: #1e1e34 !important;
    border-color: #8b5cf6 !important;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.6) !important,
        inset 0 2px 4px rgba(0, 0, 0, 0.7) !important;
}

body.dark-mode .webchat-login-footer-link-title {
    color: #ffffff !important;
}

body.dark-mode .webchat-login-footer-link-desc {
    color: #9090a0 !important;
}

body.dark-mode .webchat-login-footer-link.primary-action {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%) !important;
    border-color: #8b5cf6 !important;
    box-shadow: 
        0 6px 20px rgba(139, 92, 246, 0.5) !important,
        0 2px 8px rgba(0, 0, 0, 0.5) !important,
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

body.dark-mode .webchat-login-footer-link.primary-action .webchat-login-footer-link-title,
body.dark-mode .webchat-login-footer-link.primary-action .webchat-login-footer-link-desc {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.dark-mode .webchat-login-footer-link.primary-action:hover {
    background: linear-gradient(135deg, #9b6cff 0%, #b89bff 100%) !important;
    box-shadow: 
        0 8px 28px rgba(139, 92, 246, 0.6) !important,
        0 4px 14px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .webchat-login-footer-link.primary-action:active {
    background: linear-gradient(135deg, #7b4cd6 0%, #9778ea 100%) !important;
    box-shadow: 
        0 4px 16px rgba(139, 92, 246, 0.4) !important,
        inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .webchat-login-footer-link-icon {
    background: #24243e !important;
    border: 1.5px solid rgba(139, 92, 246, 0.4);
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(139, 92, 246, 0.15);
}

body.dark-mode .webchat-login-footer-link-icon svg {
    color: #b89bff !important;
    filter: drop-shadow(0 2px 4px rgba(184, 155, 255, 0.4));
}

body.dark-mode .webchat-login-footer-link.primary-action .webchat-login-footer-link-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.dark-mode .webchat-login-footer-link.primary-action .webchat-login-footer-link-icon svg {
    color: #ffffff !important;
    filter: drop-shadow(0 1px 3px rgba(255, 255, 255, 0.3));
}

body.dark-mode .webchat-login-footer-bottom {
    border-top-color: rgba(139, 92, 246, 0.2) !important;
}

body.dark-mode .webchat-login-footer-bottom p {
    color: #6b6b80 !important;
}

body.dark-mode .webchat-login-alert-error {
    background: #1a0a0a !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #fca5a5 !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2) !important;
}

body.dark-mode .webchat-login-alert-info {
    background: #0a0f1a !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    color: #93c5fd !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2) !important;
}

body.dark-mode .webchat-login-alert-success {
    background: #0a1a10 !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    color: #6ee7b7 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2) !important;
}

body.dark-mode .webchat-login-help-text {
    color: #9090a0 !important;
}

body.dark-mode .webchat-login-register-hint {
    color: #9090a0 !important;
}

body.dark-mode .webchat-date-select {
    background: #16162a !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: #ffffff !important;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.5) !important,
        inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .webchat-date-select:hover:not(:focus) {
    border-color: rgba(139, 92, 246, 0.35) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5) !important;
}

body.dark-mode .webchat-date-select:focus {
    background: #1a1a2e !important;
    border-color: #8b5cf6 !important;
    box-shadow: 
        0 0 0 4px rgba(139, 92, 246, 0.3) !important,
        0 4px 16px rgba(139, 92, 246, 0.5) !important;
}

body.dark-mode .webchat-date-select.error {
    border-color: #ef4444 !important;
    box-shadow: 
        0 0 0 4px rgba(239, 68, 68, 0.3) !important,
        0 4px 16px rgba(239, 68, 68, 0.3) !important;
}

body.dark-mode .webchat-date-selector-wrapper::after {
    border-top-color: #9090a0 !important;
}

body.dark-mode .webchat-date-selector-wrapper:focus-within::after {
    border-top-color: #8b5cf6 !important;
}

/* Ocultar el botón flotante del script webchat_dark_mode.js */
#webchatDarkModeToggle {
    display: none !important;
}

/* Estilos dark mode para elementos de activación */
body.dark-mode .webchat-activate-progress-step {
    background: #16162a !important;
    color: #9090a0 !important;
}

body.dark-mode .webchat-activate-progress-step-complete,
body.dark-mode .webchat-activate-progress-step-active {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5) !important;
}

body.dark-mode .webchat-activate-progress-line {
    background: #16162a !important;
}

body.dark-mode .webchat-activate-progress-line-active {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa) !important;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4) !important;
}

body.dark-mode .webchat-login-field-feedback-success {
    color: #6ee7b7 !important;
}

body.dark-mode .webchat-login-field-feedback-error {
    color: #fca5a5 !important;
}

body.dark-mode .webchat-password-strength-bar {
    background: #16162a !important;
}

body.dark-mode .webchat-password-strength-text {
    color: #9090a0 !important;
}

/* Mejorar espaciado del formulario de activación */
#activateForm .webchat-login-form-group {
    margin-bottom: 0;
}

#activateForm .webchat-login-form-group:last-of-type {
    margin-bottom: 0;
}

/* Layout de 2 columnas para campos de contraseña en desktop */
@media (min-width: 768px) {
    #activateForm {
        gap: 18px;
    }
    
    /* Reducir gap del formulario de activación para evitar scroll */
    body:has(#activateForm) .webchat-login-form {
        gap: 18px;
    }
    
    body:has(#activateForm) .webchat-login-header {
        margin-bottom: 20px;
    }
    
    body:has(#activateForm) .webchat-activate-welcome {
        margin-bottom: 18px;
    }
    
    /* Contenedor para campos de contraseña */
    .webchat-password-fields-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        width: 100%;
    }
    
    .webchat-password-fields-row .webchat-login-form-group {
        margin: 0;
    }
    
    /* Card más ancho para formulario de activación */
    body:has(#activateForm) .webchat-login-content {
        max-width: 720px !important;
    }
    
    /* Ajustar padding del card para mejor uso del espacio */
    body:has(#activateForm) .webchat-login-card {
        padding: 44px 50px;
    }
}

/* Desktop grande: Aún más ancho para formulario de activación */
@media (min-width: 1024px) {
    body:has(#activateForm) .webchat-login-content {
        max-width: 780px !important;
    }
    
    body:has(#activateForm) .webchat-login-card {
        padding: 48px 56px;
    }
    
    .webchat-password-fields-row {
        gap: 24px;
    }
}

/* ============================================
   ACTIVATE WELCOME BANNER - Diseño Profesional
   ============================================ */

.webchat-activate-welcome {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.12) 0%, rgba(142, 36, 170, 0.1) 100%);
    border: 2px solid rgba(106, 27, 154, 0.3);
    border-radius: 16px;
    margin-bottom: 10px;
    box-shadow: 
        0 4px 12px rgba(106, 27, 154, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.webchat-activate-welcome:hover {
    border-color: rgba(106, 27, 154, 0.3);
    box-shadow: 
        0 4px 12px rgba(106, 27, 154, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}

.webchat-activate-welcome-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 100%);
    border-radius: 12px;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 
        0 4px 12px rgba(106, 27, 154, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 10px;
}

.webchat-activate-welcome-icon svg {
    width: 20px;
    height: 20px;
}

.webchat-activate-welcome-icon svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.webchat-activate-welcome-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.webchat-activate-welcome-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.2px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.webchat-activate-welcome-text {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    line-height: 1.55;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.webchat-activate-welcome-expiry {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(106, 27, 154, 0.15);
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.webchat-activate-welcome-expiry strong {
    color: #6a1b9a;
    font-weight: 700;
}

/* Dark Mode - Activate Welcome */
body.dark-mode .webchat-activate-welcome {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.18) 0%, rgba(124, 58, 237, 0.15) 100%);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.dark-mode .webchat-activate-welcome:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.dark-mode .webchat-activate-welcome-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    box-shadow: 
        0 4px 12px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

body.dark-mode .webchat-activate-welcome-title {
    color: #f3f4f6;
}

body.dark-mode .webchat-activate-welcome-text {
    color: #d1d5db;
}

body.dark-mode .webchat-activate-welcome-expiry {
    border-top-color: rgba(139, 92, 246, 0.25);
    color: #a0a0b0;
}

body.dark-mode .webchat-activate-welcome-expiry strong {
    color: #b89bff;
}

/* Mobile: Contenedor de contraseñas en columna */
.webchat-password-fields-row {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

/* Responsive - Activate Welcome */
@media (max-width: 374px) {
    .webchat-activate-welcome {
        padding: 14px;
        gap: 12px;
    }
    
    .webchat-activate-welcome-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 8px;
    }
    
    .webchat-activate-welcome-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .webchat-activate-welcome-title {
        font-size: 15px;
    }
    
    .webchat-activate-welcome-text {
    font-size: 12px;
    }
    
    .webchat-activate-welcome-expiry {
        font-size: 11px;
    }
    
    .webchat-login-title {
        font-size: 22px;
    }
    
    .webchat-login-subtitle {
        font-size: 13px;
    }
    
    .webchat-login-card {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .webchat-login-header {
        margin-bottom: 20px;
    }
    
    .webchat-login-form {
        gap: 16px;
    }
    
    .webchat-password-fields-row {
        gap: 16px;
    }
}

/* Mobile: Mejorar visibilidad del banner */
@media (max-width: 767px) {
    .webchat-activate-welcome {
        background: linear-gradient(135deg, rgba(106, 27, 154, 0.15) 0%, rgba(142, 36, 170, 0.12) 100%);
        border: 2px solid rgba(106, 27, 154, 0.35);
        box-shadow: 
            0 4px 15px rgba(106, 27, 154, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
    }
    
    body.dark-mode .webchat-activate-welcome {
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.22) 0%, rgba(124, 58, 237, 0.18) 100%);
        border-color: rgba(139, 92, 246, 0.5);
        box-shadow: 
            0 4px 15px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(139, 92, 246, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    /* Ajustar el header para formulario de activación en mobile */
    body:has(#activateForm) .webchat-login-header {
        margin-bottom: 18px;
    }
    
    body:has(#activateForm) .webchat-login-form {
        gap: 16px;
    }
    
    body:has(#activateForm) .webchat-login-form-group {
        gap: 8px;
    }
}

@media (min-width: 768px) {
    .webchat-activate-welcome {
        padding: 24px;
        gap: 20px;
    }
    
    .webchat-activate-welcome-icon {
        width: 56px;
        height: 56px;
        min-width: 56px;
        padding: 14px;
    }
    
    .webchat-activate-welcome-title {
        font-size: 20px;
    }
    
    .webchat-activate-welcome-text {
        font-size: 15px;
    }
}

body.dark-mode .dark-mode-toggle {
    background: #0d0d18 !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.6) !important,
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .dark-mode-toggle:hover {
    border-color: #8b5cf6 !important;
    box-shadow: 
        0 6px 20px rgba(139, 92, 246, 0.4) !important,
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode .dark-mode-toggle .moon-icon {
    display: block;
}

body.dark-mode .dark-mode-toggle .sun-icon {
    display: none;
}

body.dark-mode .dark-mode-toggle svg {
    color: #fbbf24 !important;
    filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.5));
}

/* Shapes en dark mode */
body.dark-mode .webchat-shape {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.05) 0%, rgba(167, 139, 250, 0.02) 50%, transparent 70%);
    opacity: 0.3;
}

/* Transición suave para dark mode */
body,
.webchat-login-container,
.webchat-login-background,
.webchat-login-card,
.webchat-login-title,
.webchat-login-subtitle,
.webchat-login-label,
.webchat-login-input,
.webchat-login-footer-link,
.webchat-login-footer-divider-line,
.dark-mode-toggle {
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

