:root {
    --blue: #0B3D91;
    --blue-dark: #061E45;
    --blue-mid: #123B73;
    --blue-soft: #EAF1FF;
    --burgundy: #611232;
    --gold: #D4AF37;
    --gold-soft: #FFF6D8;
    --white: #FFFFFF;
    --bg: #F4F7FB;
    --text: #172033;
    --muted: #667085;
    --border: #DFE7F2;
    --success: #16A34A;
    --success-bg: #DCFCE7;
    --success-text: #166534;
    --danger: #DC2626;
    --danger-bg: #FEE2E2;
    --danger-text: #991B1B;
    --warning: #F59E0B;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 34px 90px rgba(15, 23, 42, 0.18);
    --radius-sm: 16px;
    --radius-md: 22px;
    --radius-lg: 34px;
    --gov-height: 62px;
}

/* RESET */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

    button:disabled {
        cursor: not-allowed;
        opacity: 0.72;
    }

img {
    max-width: 100%;
    display: block;
}

.material-symbols-rounded {
    font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.hidden {
    display: none !important;
}

.container {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

/* GOV BAR */

.gov-bar {
    min-height: var(--gov-height);
    background: var(--burgundy);
    color: var(--white);
}

.gov-content {
    min-height: var(--gov-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.gov-brand {
    display: inline-flex;
    align-items: center;
}

    .gov-brand img {
        height: 42px;
        width: auto;
        object-fit: contain;
    }

.gov-links {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 850;
}

    .gov-links a {
        color: var(--white);
        opacity: 0.96;
        transition: 0.2s ease;
    }

        .gov-links a:hover {
            opacity: 1;
            text-decoration: underline;
            text-underline-offset: 4px;
        }

.icon-button {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    display: grid;
    place-items: center;
    transition: 0.2s ease;
}

    .icon-button:hover {
        background: rgba(255, 255, 255, 0.24);
        transform: translateY(-1px);
    }

/* PAGE LAYOUT */

.login-page {
    min-height: calc(100vh - var(--gov-height));
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    overflow: hidden;
}

/* VISUAL PANEL */

.visual-panel {
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - var(--gov-height));
    padding: clamp(30px, 4vw, 48px);
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(circle at top left, rgba(212, 175, 55, 0.22), transparent 32%), linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
}

.grid-glow {
    position: absolute;
    inset: 0;
    z-index: -3;
    background-image: linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom right, black, transparent 82%);
}

.orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(5px);
    z-index: -2;
    pointer-events: none;
}

.orb-one {
    width: 340px;
    height: 340px;
    top: -120px;
    right: 8%;
    background: rgba(212, 175, 55, 0.18);
}

.orb-two {
    width: 420px;
    height: 420px;
    bottom: -170px;
    left: -130px;
    background: rgba(255, 255, 255, 0.08);
}

.visual-content {
    width: min(780px, 100%);
}

.back-link {
    width: fit-content;
    margin-bottom: clamp(30px, 4vw, 46px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #D8E2F0;
    font-weight: 850;
    transition: 0.2s ease;
}

    .back-link:hover {
        color: var(--gold);
        transform: translateX(-3px);
    }

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: clamp(34px, 5vw, 58px);
}

.brand-badge {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: var(--gold);
    color: var(--blue-dark);
    font-weight: 950;
    box-shadow: 0 14px 34px rgba(212, 175, 55, 0.24);
}

.brand-block strong,
.brand-block span {
    display: block;
}

.brand-block strong {
    font-size: 20px;
}

.brand-block span {
    margin-top: 3px;
    color: #CBD5E1;
    line-height: 1.45;
}

.pill {
    width: fit-content;
    margin-bottom: 22px;
    padding: 10px 15px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--gold);
    font-weight: 950;
}

.hero-copy h1 {
    max-width: 860px;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.96;
    letter-spacing: -0.065em;
}

.hero-copy p {
    max-width: 700px;
    margin-top: 24px;
    color: #D8E2F0;
    font-size: 18px;
    line-height: 1.75;
}

.feature-grid {
    margin-top: 42px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

    .feature-grid article {
        min-width: 0;
        padding: 22px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.105);
        border: 1px solid rgba(255, 255, 255, 0.135);
        backdrop-filter: blur(16px);
        transition: 0.22s ease;
    }

        .feature-grid article:hover {
            transform: translateY(-4px);
            background: rgba(255, 255, 255, 0.15);
        }

    .feature-grid span {
        color: var(--gold);
        font-size: 38px;
    }

    .feature-grid strong,
    .feature-grid small {
        display: block;
    }

    .feature-grid strong {
        margin-top: 12px;
        font-size: 18px;
    }

    .feature-grid small {
        margin-top: 6px;
        color: #D8E2F0;
        line-height: 1.55;
    }

/* FORM PANEL */

.form-panel {
    min-height: calc(100vh - var(--gov-height));
    padding: clamp(28px, 4vw, 46px);
    display: grid;
    align-content: center;
    gap: 18px;
    background: radial-gradient(circle at top right, rgba(11, 61, 145, 0.12), transparent 30%), linear-gradient(135deg, #FFFFFF, #EEF4FF);
}

.login-card,
.support-card {
    width: min(520px, 100%);
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(223, 231, 242, 0.92);
    box-shadow: var(--shadow-strong);
}

.login-card {
    padding: clamp(26px, 4vw, 36px);
    border-radius: var(--radius-lg);
}

.card-heading {
    margin-bottom: 26px;
}

    .card-heading > span {
        width: 58px;
        height: 58px;
        margin-bottom: 18px;
        border-radius: 20px;
        display: grid;
        place-items: center;
        background: var(--blue-soft);
        color: var(--blue);
        font-size: 34px;
    }

    .card-heading h2 {
        color: var(--blue-dark);
        font-size: clamp(32px, 4vw, 40px);
        line-height: 1.05;
        letter-spacing: -0.045em;
    }

    .card-heading p {
        margin-top: 10px;
        color: var(--muted);
        line-height: 1.65;
    }

/* FORM */

.login-form {
    display: grid;
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 9px;
}

    .form-group label {
        color: var(--blue-dark);
        font-weight: 950;
    }

    .form-group small {
        color: var(--muted);
        line-height: 1.5;
    }

.input-shell {
    min-height: 58px;
    padding: 0 14px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    transition: 0.2s ease;
}

    .input-shell:focus-within {
        border-color: var(--blue);
        box-shadow: 0 0 0 4px rgba(11, 61, 145, 0.12);
        background: var(--white);
    }

    .input-shell > span {
        flex: 0 0 auto;
        color: var(--blue);
    }

    .input-shell input {
        min-width: 0;
        width: 100%;
        border: none;
        outline: none;
        background: transparent;
        color: var(--text);
        font-weight: 700;
    }

        .input-shell input::placeholder {
            color: #98A2B3;
        }

.password-toggle {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--blue-dark);
    background: rgba(11, 61, 145, 0.08);
    transition: 0.22s ease;
}

    .password-toggle:hover {
        transform: scale(1.04);
        background: rgba(11, 61, 145, 0.14);
    }

    .password-toggle span {
        font-size: 22px;
    }

.remember-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 760;
    cursor: pointer;
    user-select: none;
}

    .remember-row input {
        width: 17px;
        height: 17px;
        accent-color: var(--blue);
    }

/* BUTTONS */

.primary-button {
    min-height: 58px;
    padding: 0 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 950;
    box-shadow: 0 16px 34px rgba(11, 61, 145, 0.24);
    transition: 0.22s ease;
}

    .primary-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 22px 44px rgba(11, 61, 145, 0.30);
    }

    .primary-button:disabled {
        transform: none;
        box-shadow: none;
    }

.secondary-register-button {
    min-height: 50px;
    margin-top: 6px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    font-weight: 950;
    transition: 0.2s ease;
}

    .secondary-register-button:hover {
        transform: translateY(-2px);
        background: #DDEAFF;
    }

/* ALERTS */

.login-alert {
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 850;
    line-height: 1.6;
    border: 1px solid transparent;
}

    .login-alert.error {
        background: var(--danger-bg);
        color: var(--danger-text);
        border-color: rgba(220, 38, 38, 0.14);
    }

    .login-alert.success {
        background: var(--success-bg);
        color: var(--success-text);
        border-color: rgba(22, 163, 74, 0.14);
    }

    .login-alert.info {
        background: var(--blue-soft);
        color: var(--blue);
        border-color: rgba(11, 61, 145, 0.14);
    }

/* SUPPORT CARD */

.support-card {
    padding: 20px;
    border-radius: 26px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

    .support-card > span {
        flex: 0 0 auto;
        color: var(--gold);
        font-size: 34px;
    }

    .support-card strong {
        color: var(--blue-dark);
    }

    .support-card p {
        margin-top: 4px;
        color: var(--muted);
        line-height: 1.6;
    }


/* ==========================================================
   FOOTER GOBIERNO DE MÉXICO
   ========================================================== */

.gov-footer {
    background-color: var(--burgundy);
    color: var(--white);
    padding: 48px 0 64px 0;
    font-size: 14px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.gov-footer .footer-grid {
    display: grid;
    grid-template-columns: 240px 1fr 1.2fr 1fr;
    gap: 40px;
}

.gov-footer .footer-brand img {
    width: 100%;
    max-width: 200px;
    height: auto;
}

.gov-footer h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 20px;
}

.gov-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gov-footer a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.gov-footer a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

.gov-footer p {
    line-height: 1.5;
    margin-bottom: 14px;
}

.gov-footer p a {
    font-weight: bold;
}

.gov-footer .denuncia-link {
    font-weight: bold;
    text-decoration: underline;
    text-underline-offset: 4px;
    margin-bottom: 24px;
    display: inline-block;
}

.gov-footer .social-section {
    margin-bottom: 28px;
}

.gov-footer .social-icons {
    display: flex;
    gap: 14px;
    align-items: center;
}

.gov-footer .social-icons a {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    font-size: 24px;
    font-weight: bold;
}

.gov-footer .social-icons span {
    font-size: 26px;
}

.gov-footer .phone-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gov-footer .asterisk {
    font-size: 26px;
    line-height: 1;
}

.gov-footer .number {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.gov-footer .phone-text {
    font-size: 13px;
    line-height: 1.2;
}


/* RESPONSIVE */

@media (max-width: 1120px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .visual-panel,
    .form-panel {
        min-height: auto;
    }

    .visual-panel {
        padding: 34px;
    }

    .brand-block {
        margin-bottom: 38px;
    }

    .hero-copy h1 {
        max-width: 900px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-panel {
        padding: 34px;
    }
    
    /* Footer Tablets */
    .gov-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 760px) {
    .gov-content {
        min-height: auto;
        padding: 10px 0;
        display: grid;
        justify-items: center;
        gap: 10px;
    }

    .gov-links {
        gap: 16px;
        font-size: 0.88rem;
    }

    .gov-brand img {
        height: 36px;
    }

    .visual-panel,
    .form-panel {
        padding: 24px;
    }

    .back-link {
        margin-bottom: 30px;
    }

    .brand-block {
        align-items: flex-start;
    }

    .brand-badge {
        width: 52px;
        height: 52px;
        border-radius: 18px;
    }

    .hero-copy h1 {
        font-size: clamp(38px, 11vw, 58px);
    }

    .hero-copy p {
        font-size: 16px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        border-radius: 28px;
    }
    
    /* Footer Móvil */
    .gov-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .visual-panel,
    .form-panel {
        padding: 18px;
    }

    .brand-block {
        gap: 12px;
    }

        .brand-block strong {
            font-size: 17px;
        }

        .brand-block span {
            font-size: 0.88rem;
        }

    .pill {
        padding: 9px 12px;
        font-size: 0.88rem;
    }

    .feature-grid article {
        padding: 18px;
    }

    .login-card {
        padding: 22px;
        border-radius: 24px;
    }

    .card-heading > span {
        width: 52px;
        height: 52px;
        border-radius: 18px;
        font-size: 30px;
    }

    .card-heading h2 {
        font-size: 31px;
    }

    .input-shell {
        min-height: 56px;
        border-radius: 16px;
    }

    .primary-button {
        min-height: 56px;
        border-radius: 16px;
    }

    .support-card {
        border-radius: 22px;
        display: grid;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}