:root {
    --primary: #002b6c;
    --primary-dark: #001b46;
    --primary-soft: #eaf1fb;
    --accent: #00a9e0;
    --accent-hover: #008fc0;
    --background: #f5f8fc;
    --white: #ffffff;
    --text: #152033;
    --muted: #667085;
    --border: #dce5f0;
    --danger: #dc2626;
    --success: #16a34a;

    --radius-lg: 28px;
    --radius-md: 16px;
    --radius-sm: 12px;

    --shadow-card: 0 24px 70px rgba(15, 36, 64, 0.16);
    --shadow-button: 0 14px 28px rgba(0, 169, 224, 0.24);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font-family: inherit;
}

.recover-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(380px, 42%) 1fr;
    overflow: hidden;
}

/* =========================
   Panel institucional
========================= */

.brand-panel {
    position: relative;
    overflow: hidden;
    padding: 64px;
    background: radial-gradient(circle at 18% 18%, rgba(0, 169, 224, 0.22), transparent 36%),
    linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: var(--white);
    display: flex;
    align-items: center;
}

.brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent);
    pointer-events: none;
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    left: -180px;
    bottom: -180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.brand-watermark {
    position: absolute;
    right: -160px;
    bottom: -80px;
    width: 620px;
    max-width: none;
    opacity: 0.055;
    pointer-events: none;
    user-select: none;
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 520px;
}

.brand-logo {
    width: min(320px, 100%);
    height: auto;
    margin-bottom: 72px;
}

.brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.brand-text h1 {
    margin: 0;
    font-size: clamp(56px, 7vw, 96px);
    line-height: 0.92;
    letter-spacing: -0.055em;
}

.brand-text p {
    max-width: 430px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.6;
}

.brand-message {
    margin-top: 64px;
    padding-left: 22px;
    border-left: 4px solid var(--accent);
}

.brand-message p {
    max-width: 420px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
    line-height: 1.7;
}

/* =========================
   Panel recuperación
========================= */

.recover-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: radial-gradient(circle at 85% 15%, rgba(0, 169, 224, 0.12), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--background) 100%);
}

.recover-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 43, 108, 0.035) 25%, transparent 25%) -24px 0 / 48px 48px,
    linear-gradient(225deg, rgba(0, 43, 108, 0.035) 25%, transparent 25%) -24px 0 / 48px 48px;
    opacity: 0.55;
    pointer-events: none;
}

.page-watermark {
    position: absolute;
    right: -110px;
    bottom: -140px;
    width: min(620px, 70vw);
    opacity: 0.045;
    pointer-events: none;
    user-select: none;
}

.recover-card {
    position: relative;
    z-index: 2;
    width: min(100%, 460px);
    padding: 42px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(220, 229, 240, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
}

.recover-header {
    margin-bottom: 30px;
    text-align: center;
}

.recover-logo {
    width: 190px;
    max-width: 80%;
    height: auto;
    margin-bottom: 24px;
}

.recover-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 18px;
    background: var(--primary-soft);
    color: var(--primary);
}

.recover-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.recover-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.recover-header p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

/* =========================
   Formulario
========================= */

.recover-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #98a2b3;
}

.input-wrapper input:focus {
    border-color: rgba(0, 169, 224, 0.72);
    box-shadow: 0 0 0 4px rgba(0, 169, 224, 0.14);
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    color: #8a98aa;
    pointer-events: none;
}

.input-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.field-message {
    min-height: 16px;
    color: var(--danger);
    font-size: 12px;
}

.form-group.has-error input {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.10);
}

.form-group.has-success input {
    border-color: rgba(22, 163, 74, 0.45);
}

/* =========================
   Nota de seguridad
========================= */

.security-note {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: var(--radius-sm);
    background: #eff6ff;
}

.security-note-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #ffffff;
    color: var(--primary);
}

.security-note-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.security-note p {
    margin: 0;
    color: #344054;
    font-size: 13px;
    line-height: 1.55;
}

/* =========================
   Botón
========================= */

.recover-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    margin-top: 2px;
    padding: 0 24px;
    border: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent), #007fc4);
    color: var(--white);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-button);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.recover-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 18px 34px rgba(0, 169, 224, 0.30);
}

.recover-button:active {
    transform: translateY(0);
}

.recover-button[disabled],
.recover-button.is-loading {
    pointer-events: none;
    opacity: 0.90;
    cursor: default;
}

.recover-button.is-loading .button-text {
    opacity: 0;
}

.button-loader {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.40);
    border-top-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.7s linear infinite;
}

.recover-button.is-loading .button-loader {
    opacity: 1;
}

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

.back-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.back-login:hover {
    color: var(--accent-hover);
}

/* =========================
   Mensaje de éxito
========================= */

.success-message {
    display: none;
    justify-items: center;
    gap: 14px;
    padding: 8px 0 0;
    text-align: center;
}

.success-icon {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: #ecfdf3;
    color: var(--success);
}

.success-icon svg {
    width: 38px;
    height: 38px;
    fill: currentColor;
}

.success-message h3 {
    margin: 4px 0 0;
    color: var(--text);
    font-size: 24px;
    line-height: 1.2;
}

.success-message p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.success-link {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: var(--white);
    font-size: 15px;
    font-weight: 800;
    transition: background 0.2s ease, transform 0.2s ease;
}

.success-link:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* =========================
   Footer
========================= */

.recover-footer {
    display: grid;
    gap: 10px;
    margin-top: 30px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.recover-footer a {
    color: var(--primary);
    font-weight: 700;
}

.recover-footer a:hover {
    color: var(--accent-hover);
}

/* =========================
   Responsive
========================= */

@media (max-width: 1100px) {
    .recover-page {
        grid-template-columns: 38% 1fr;
    }

    .brand-panel {
        padding: 44px;
    }

    .brand-logo {
        margin-bottom: 52px;
    }
}

@media (max-width: 900px) {
    .recover-page {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        display: none;
    }

    .recover-panel {
        min-height: 100vh;
        padding: 32px 20px;
    }

    .recover-card {
        padding: 34px 26px;
    }

    .page-watermark {
        right: -180px;
        bottom: -90px;
        width: 520px;
        opacity: 0.04;
    }
}

@media (max-width: 480px) {
    .recover-card {
        padding: 28px 20px;
        border-radius: 22px;
    }

    .recover-header h2 {
        font-size: 26px;
    }

    .recover-header p,
    .success-message p {
        font-size: 14px;
    }

    .input-wrapper input {
        height: 50px;
        font-size: 14px;
    }
}