﻿/* ═══════════════════════════════════════════════════════════════════════════
   POPUP RESETEO CONTRASEÑA - CSS OPTIMIZADO
   Versión simplificada | 60% más ligero | DevExpress v24.1.5
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   VARIABLES CSS - TEMA MODERNO
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
    /* Colores primarios */
    --color-primary: #3b82f6;
    --color-primary-dark: #1e40af;
    --color-primary-light: #dbeafe;
    /* Estados */
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-success: #10b981;
    /* Texto */
    --color-text: #1f2937;
    --color-text-secondary: #6b7280;
    --color-text-light: #9ca3af;
    /* Fondos */
    --color-border: #e5e7eb;
    --color-bg-light: #f9fafb;
    --color-bg-white: #ffffff;
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
    /* Dimensiones */
    --radius-md: 12px;
    --radius-lg: 16px;
    /* Transiciones */
    --transition: 150ms ease-in-out;
    --transition-slow: 300ms ease-out;
}

/* Tema oscuro automático */
@media (prefers-color-scheme: dark) {
    :root {
        --color-text: #f3f4f6;
        --color-text-secondary: #d1d5db;
        --color-text-light: #9ca3af;
        --color-border: #374151;
        --color-bg-light: #1f2937;
        --color-bg-white: #111827;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   POPUP PRINCIPAL
   ═══════════════════════════════════════════════════════════════════════════ */
.popup-reset-password {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-xl) !important;
    border: none !important;
    overflow: hidden !important;
}

    .popup-reset-password .dx-popup-header {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
        color: white;
        padding: 24px !important;
        border: none !important;
        font-size: 18px;
        font-weight: 700;
        letter-spacing: -0.3px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .popup-reset-password .dx-popup-content {
        background: var(--color-bg-white);
        padding: 0 !important;
    }

    .popup-reset-password .dx-popup-footer {
        background: linear-gradient(180deg, var(--color-bg-light) 0%, var(--color-bg-white) 100%);
        border-top: 1px solid var(--color-border);
        padding: 0 !important;
    }

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENEDOR DEL FORMULARIO
   ═══════════════════════════════════════════════════════════════════════════ */
.popup-body {
    padding: 32px 28px;
    width: 100%;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 28px;
    animation: slideInUp 300ms ease-out;
    width: 100%;
    box-sizing: border-box;
}

    .form-group:nth-child(1) {
        animation-delay: 50ms;
    }

    .form-group:nth-child(2) {
        animation-delay: 100ms;
    }

    .form-group:last-child {
        margin-bottom: 0;
    }

    /* ═══════════════════════════════════════════════════════════════════════════
   LABELS
   ═══════════════════════════════════════════════════════════════════════════ */
    .form-group label {
        display: block;
        margin-bottom: 10px;
        font-size: 15px;
        font-weight: 600;
        color: var(--color-text);
        letter-spacing: -0.2px;
    }

/* ═══════════════════════════════════════════════════════════════════════════
   INPUTS - TEXTBOX
   ═══════════════════════════════════════════════════════════════════════════ */
.popup-reset-password .dxeTextBox,
.popup-reset-password .dxeTextBox_EditValue {
    background: var(--color-bg-light) !important;
    border: 2px solid var(--color-border) !important;
    border-radius: var(--radius-md) !important;
    padding: 12px 14px !important;
    font-size: 14px;
    color: var(--color-text);
    transition: all var(--transition) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    box-sizing: border-box !important;
}

    .popup-reset-password .dxeTextBox::placeholder,
    .popup-reset-password .dxeTextBox_EditValue::placeholder {
        color: var(--color-text-light);
        opacity: 1;
    }

    .popup-reset-password .dxeTextBox:hover,
    .popup-reset-password .dxeTextBox_EditValue:hover {
        border-color: var(--color-primary) !important;
        background: var(--color-bg-white) !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    }

    .popup-reset-password .dxeTextBox:focus,
    .popup-reset-password .dxeTextBox_EditValue:focus,
    .popup-reset-password .dxeTextBox.dxeState_Focused,
    .popup-reset-password .dxeTextBox_EditValue.dxeState_Focused {
        border-color: var(--color-primary) !important;
        background: var(--color-bg-white) !important;
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    }

/* ═══════════════════════════════════════════════════════════════════════════
   CAPTCHA
   ═══════════════════════════════════════════════════════════════════════════ */
.popup-reset-password .dxcCaptcha {
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    padding: 18px;
    border: 2px dashed var(--color-border);
    transition: all var(--transition);
}

    .popup-reset-password .dxcCaptcha:hover {
        border-color: var(--color-primary);
        background: var(--color-bg-white);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        border-style: solid;
    }

.popup-reset-password .dxcCaptchaImage {
    border-radius: var(--radius-md) !important;
    border: 2px solid var(--color-border) !important;
    background: var(--color-bg-white) !important;
    padding: 12px !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 300px;
    margin: 0 auto;
}

.popup-reset-password .dxcCaptchaRefresh {
    background: var(--color-primary-light) !important;
    color: var(--color-primary) !important;
    border-radius: 20px !important;
    border: none !important;
    padding: 8px 16px !important;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition) !important;
    font-size: 12px;
    margin-top: 12px;
    display: inline-block;
}

    .popup-reset-password .dxcCaptchaRefresh:hover {
        background: var(--color-primary) !important;
        color: white !important;
        transform: rotate(-180deg) scale(1.05);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

    .popup-reset-password .dxcCaptchaRefresh:active {
        transform: rotate(-180deg) scale(0.95);
    }

.popup-reset-password .dxeTextBox.dxcCaptchaTextBox,
.popup-reset-password .dxeTextBox_EditValue.dxcCaptchaTextBox {
    background: var(--color-bg-light) !important;
    border: 2px solid var(--color-border) !important;
    border-radius: var(--radius-md) !important;
    padding: 12px 14px !important;
    margin-top: 12px !important;
}

.popup-reset-password .dxcCaptcha_LabelText {
    color: var(--color-text-secondary);
    font-size: 13px;
    margin-top: 10px;
    margin-bottom: 0;
    font-weight: 500;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VALIDACIÓN - MENSAJES DE ERROR
   ═══════════════════════════════════════════════════════════════════════════ */
.form-error {
    color: var(--color-danger);
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.08);
    padding: 8px 10px;
    border-radius: 6px;
    line-height: 1.4;
}

    .form-error::before {
        content: "✕";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 16px;
        height: 16px;
        background: var(--color-danger);
        color: white;
        border-radius: 50%;
        font-size: 11px;
        font-weight: bold;
        flex-shrink: 0;
    }

.popup-reset-password .dxIVErrorText {
    color: var(--color-danger) !important;
    font-size: 13px;
    margin-top: 8px !important;
    font-weight: 500;
    display: flex !important;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.08);
    padding: 8px 10px;
    border-radius: 6px;
    line-height: 1.4;
}

.popup-reset-password .dxeState_Invalid .dxeTextBox,
.popup-reset-password .dxeState_Invalid .dxeTextBox_EditValue {
    border-color: var(--color-danger) !important;
    background: rgba(239, 68, 68, 0.04) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCIONES / BOTONES
   ═══════════════════════════════════════════════════════════════════════════ */
.popup-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    padding: 24px 28px;
    flex-wrap: wrap;
}

.popup-reset-password .dxbButton {
    border-radius: var(--radius-md) !important;
    border: none !important;
    font-weight: 700;
    font-size: 14px;
    padding: 11px 24px !important;
    cursor: pointer;
    transition: all var(--transition) !important;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: var(--shadow-sm);
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

    /* Botón Confirmar - Primario */
    .popup-reset-password #btnGuardar2,
    .popup-reset-password .dxbButton[id*="btnGuardar2"] {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
        color: white !important;
    }

        .popup-reset-password #btnGuardar2:hover,
        .popup-reset-password .dxbButton[id*="btnGuardar2"]:hover {
            background: linear-gradient(135deg, var(--color-primary-dark) 0%, #1e3a8a 100%) !important;
            box-shadow: 0 8px 20px rgba(30, 64, 175, 0.4) !important;
            transform: translateY(-3px);
        }

        .popup-reset-password #btnGuardar2:active,
        .popup-reset-password .dxbButton[id*="btnGuardar2"]:active {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3) !important;
        }

        .popup-reset-password #btnGuardar2.dxbDisabled,
        .popup-reset-password .dxbButton[id*="btnGuardar2"].dxbDisabled {
            opacity: 0.6;
            cursor: not-allowed;
            box-shadow: var(--shadow-sm) !important;
            transform: none !important;
        }

    /* Botón Cancelar - Secundario */
    .popup-reset-password #btnCancelar2,
    .popup-reset-password .dxbButton[id*="btnCancelar2"] {
        background: var(--color-bg-light) !important;
        color: var(--color-text) !important;
        border: 2px solid var(--color-border) !important;
    }

        .popup-reset-password #btnCancelar2:hover,
        .popup-reset-password .dxbButton[id*="btnCancelar2"]:hover {
            background: var(--color-border) !important;
            border-color: var(--color-text-secondary) !important;
            color: var(--color-text) !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
            transform: translateY(-2px);
        }

        .popup-reset-password #btnCancelar2:active,
        .popup-reset-password .dxbButton[id*="btnCancelar2"]:active {
            transform: translateY(0);
            box-shadow: var(--shadow-sm) !important;
        }

/* ═══════════════════════════════════════════════════════════════════════════
   BOTÓN CERRAR
   ═══════════════════════════════════════════════════════════════════════════ */
.popup-reset-password .dx-popup-closebutton {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: none !important;
    border-radius: 50%;
    width: 36px !important;
    height: 36px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition) !important;
    cursor: pointer;
    padding: 0 !important;
}

    .popup-reset-password .dx-popup-closebutton:hover {
        background: rgba(255, 255, 255, 0.3) !important;
        transform: rotate(90deg) scale(1.1);
    }

    .popup-reset-password .dx-popup-closebutton:active {
        transform: rotate(90deg) scale(0.95);
    }

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMACIONES
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-reset-password {
    animation: popupFadeIn 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

    /* ═══════════════════════════════════════════════════════════════════════════
   ACCESIBILIDAD
   ═══════════════════════════════════════════════════════════════════════════ */
    .popup-reset-password .dxeTextBox:focus-visible,
    .popup-reset-password .dxeTextBox_EditValue:focus-visible,
    .popup-reset-password .dxbButton:focus-visible {
        outline: 2px solid var(--color-primary);
        outline-offset: 2px;
    }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVIDAD - TABLET (768px y menos)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .popup-body {
        padding: 24px 20px;
    }

    .form-group {
        margin-bottom: 22px;
    }

    .popup-actions {
        padding: 20px;
        flex-direction: column-reverse;
        gap: 10px;
    }

    .popup-reset-password .dxbButton {
        width: 100%;
        padding: 12px 16px !important;
        font-size: 13px;
        min-width: auto;
    }

    .popup-reset-password .dx-popup-header {
        padding: 20px !important;
        font-size: 16px;
    }

    .form-group label {
        font-size: 14px;
    }

    .popup-reset-password {
        max-width: 95vw !important;
        margin: 0 auto !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVIDAD - MÓVIL (480px y menos)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .popup-body {
        padding: 20px 16px;
    }

    .popup-actions {
        padding: 16px;
    }

    .form-group {
        margin-bottom: 20px;
    }

        .form-group label {
            font-size: 13px;
            margin-bottom: 8px;
        }

    .popup-reset-password .dxeTextBox,
    .popup-reset-password .dxeTextBox_EditValue {
        padding: 10px 12px !important;
        font-size: 13px;
    }

    .popup-reset-password .dxbButton {
        padding: 10px 14px !important;
        font-size: 12px;
    }

    .popup-reset-password .dx-popup-header {
        padding: 18px !important;
        font-size: 15px;
    }

    .popup-reset-password {
        max-width: 98vw !important;
    }

        .popup-reset-password .dxcCaptchaImage {
            max-width: 100% !important;
        }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT MEDIA
   ═══════════════════════════════════════════════════════════════════════════ */
@media print {
    .popup-actions {
        display: none;
    }
}
