:root {
    --blue: #0B3D91;
    --blue-dark: #061E45;
    --blue-mid: #123B73;
    --blue-soft: #EAF1FF;
    --gold: #D4AF37;
    --gold-soft: #FFF6D8;
    --white: #FFFFFF;
    --bg: #F4F7FB;
    --text: #172033;
    --muted: #667085;
    --border: #DFE7F2;
    --success: #16A34A;
    --danger: #DC2626;
    --warning: #F59E0B;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 34px 90px rgba(15, 23, 42, 0.18);
    --radius: 28px;
}

/* =========================
   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;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

    button:disabled {
        cursor: not-allowed;
        opacity: 0.72;
        transform: none !important;
    }

input,
select,
textarea {
    min-width: 0;
}

/* =========================
   GOV BAR
========================= */

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.gov-bar {
    min-height: 46px;
    background: #611232;
    color: var(--white);
    display: flex;
    align-items: center;
}

.gov-content {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.gov-brand {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

    .gov-brand img {
        height: 30px;
        width: auto;
        display: block;
    }

.gov-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

    .gov-links a {
        color: rgba(255, 255, 255, 0.88);
        font-size: 14px;
        font-weight: 750;
    }

        .gov-links a:hover {
            color: var(--white);
            text-decoration: underline;
            text-underline-offset: 4px;
        }

.icon-button {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    display: grid;
    place-items: center;
    transition: 0.2s ease;
}

    .icon-button:hover {
        background: rgba(255, 255, 255, 0.20);
    }

/* =========================
   PAGE
========================= */

.login-page {
    min-height: calc(100vh - 46px);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    overflow: hidden;
}

/* =========================
   VISUAL PANEL
========================= */

.visual-panel {
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - 46px);
    background: radial-gradient(circle at top left, rgba(212, 175, 55, 0.22), transparent 32%), linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
    color: var(--white);
    padding: 42px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.grid-glow {
    position: absolute;
    inset: 0;
    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%);
    z-index: -3;
}

.orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(4px);
    z-index: -2;
}

.orb-one {
    width: 340px;
    height: 340px;
    background: rgba(212, 175, 55, 0.18);
    top: -120px;
    right: 10%;
}

.orb-two {
    width: 420px;
    height: 420px;
    background: rgba(255, 255, 255, 0.08);
    bottom: -170px;
    left: -130px;
}

.visual-content {
    width: min(800px, 100%);
}

.back-link {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #D8E2F0;
    font-weight: 850;
    margin-bottom: 42px;
    transition: 0.2s ease;
}

    .back-link:hover {
        color: var(--gold);
        transform: translateX(-3px);
    }

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 58px;
}

.brand-badge {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: var(--gold);
    color: var(--blue-dark);
    display: grid;
    place-items: center;
    font-weight: 950;
    box-shadow: 0 14px 34px rgba(212, 175, 55, 0.24);
    flex: 0 0 auto;
}

.brand-block strong,
.brand-block span {
    display: block;
}

.brand-block strong {
    font-size: 20px;
    line-height: 1.2;
}

.brand-block span {
    color: #CBD5E1;
    margin-top: 3px;
    line-height: 1.35;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--gold);
    padding: 10px 15px;
    border-radius: 999px;
    font-weight: 950;
    margin-bottom: 22px;
}

.hero-copy h1 {
    font-size: clamp(42px, 5.6vw, 74px);
    line-height: 0.96;
    letter-spacing: -0.065em;
    max-width: 860px;
}

.hero-copy p {
    color: #D8E2F0;
    font-size: 18px;
    line-height: 1.75;
    max-width: 700px;
    margin-top: 24px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 42px;
}

    .feature-grid article {
        background: rgba(255, 255, 255, 0.105);
        border: 1px solid rgba(255, 255, 255, 0.135);
        border-radius: 24px;
        padding: 22px;
        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 {
        color: #D8E2F0;
        line-height: 1.55;
        margin-top: 6px;
    }

/* =========================
   FORM PANEL
========================= */

.form-panel {
    min-height: calc(100vh - 46px);
    background: radial-gradient(circle at top right, rgba(11, 61, 145, 0.12), transparent 30%), linear-gradient(135deg, #FFFFFF, #EEF4FF);
    display: grid;
    align-content: center;
    gap: 18px;
    padding: 42px;
}

.login-card,
.support-card {
    width: min(540px, 100%);
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(223, 231, 242, 0.9);
    box-shadow: var(--shadow-strong);
}

.login-card {
    border-radius: 34px;
    padding: 34px;
}

.card-heading {
    margin-bottom: 26px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

    .card-heading > span {
        width: 58px;
        height: 58px;
        border-radius: 20px;
        background: var(--blue-soft);
        color: var(--blue);
        display: grid;
        place-items: center;
        font-size: 34px;
        flex: 0 0 auto;
    }

    .card-heading h2 {
        color: var(--blue-dark);
        font-size: 38px;
        letter-spacing: -0.045em;
        line-height: 1.05;
    }

    .card-heading p {
        color: var(--muted);
        line-height: 1.65;
        margin-top: 8px;
    }

/* =========================
   FORM
========================= */

.login-form {
    display: grid;
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 9px;
}

    .form-group label {
        color: var(--blue-dark);
        font-weight: 950;
    }

.input-shell {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0 15px;
    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 {
        color: var(--blue);
        flex: 0 0 auto;
    }

    .input-shell input {
        width: 100%;
        border: none;
        outline: none;
        background: transparent;
        color: var(--text);
    }

        .input-shell input::placeholder {
            color: #98A2B3;
        }

.password-toggle,
.toggle-password {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: transparent;
    color: var(--blue);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    transition: 0.2s ease;
}

    .password-toggle:hover,
    .toggle-password:hover {
        background: var(--blue-soft);
    }

.form-group small {
    color: var(--muted);
    line-height: 1.5;
}

/* =========================
   ROLE SELECTOR
========================= */

.type-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.type-card {
    position: relative;
    min-height: 126px;
    padding: 16px;
    border-radius: 22px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: grid;
    gap: 7px;
    align-content: start;
    cursor: pointer;
    transition: 0.22s ease;
    overflow: hidden;
}

    .type-card::after {
        content: "";
        position: absolute;
        inset: auto 14px 14px auto;
        width: 42px;
        height: 42px;
        border-radius: 999px;
        background: rgba(11, 61, 145, 0.08);
        transform: scale(0);
        transition: 0.22s ease;
    }

    .type-card:hover {
        transform: translateY(-3px);
        border-color: rgba(11, 61, 145, 0.28);
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    }

    .type-card input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .type-card > span {
        width: 46px;
        height: 46px;
        border-radius: 16px;
        background: var(--blue-soft);
        color: var(--blue);
        display: grid;
        place-items: center;
        font-size: 30px;
        transition: 0.22s ease;
    }

    .type-card strong {
        color: var(--blue-dark);
        font-size: 17px;
        line-height: 1.15;
    }

    .type-card small {
        color: var(--muted);
        line-height: 1.4;
        font-weight: 750;
    }

    .type-card:has(input:checked) {
        background: linear-gradient(180deg, #FFFFFF, var(--blue-soft));
        border-color: rgba(11, 61, 145, 0.42);
        box-shadow: 0 16px 34px rgba(11, 61, 145, 0.14);
    }

        .type-card:has(input:checked)::after {
            transform: scale(1);
        }

        .type-card:has(input:checked) > span {
            background: var(--blue);
            color: var(--white);
        }

.role-help {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 15px;
    border-radius: 18px;
    background: var(--gold-soft);
    border: 1px solid rgba(212, 175, 55, 0.28);
    color: #7C4A03;
}

    .role-help > span {
        color: #92400E;
        flex: 0 0 auto;
    }

    .role-help p {
        line-height: 1.55;
        font-weight: 800;
    }

/* =========================
   REMEMBER / BUTTONS
========================= */

.remember-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--blue-dark);
    font-weight: 850;
    cursor: pointer;
}

    .remember-row input {
        width: 18px;
        height: 18px;
        accent-color: var(--blue);
    }

.primary-button {
    min-height: 56px;
    border-radius: 18px;
    background: var(--blue);
    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 {
        background: var(--blue-dark);
        transform: translateY(-3px);
    }

/* =========================
   ALERTS
========================= */

.login-alert {
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 850;
    line-height: 1.6;
}

    .login-alert.error {
        background: #FEE2E2;
        color: #991B1B;
        border: 1px solid rgba(220, 38, 38, 0.18);
    }

    .login-alert.success {
        background: #DCFCE7;
        color: #166534;
        border: 1px solid rgba(22, 163, 74, 0.18);
    }

    .login-alert.info {
        background: var(--blue-soft);
        color: var(--blue);
        border: 1px solid rgba(11, 61, 145, 0.14);
    }

    .login-alert.warning {
        background: #FEF3C7;
        color: #92400E;
        border: 1px solid rgba(245, 158, 11, 0.22);
    }

/* =========================
   DIVIDER / LINKS
========================= */

.divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin: 26px 0 18px;
}

    .divider span {
        height: 1px;
        background: var(--border);
    }

    .divider small {
        color: var(--muted);
        font-weight: 850;
    }

.quick-links {
    display: grid;
    gap: 10px;
}

    .quick-links a {
        min-height: 48px;
        border-radius: 16px;
        background: var(--bg);
        border: 1px solid var(--border);
        color: var(--blue-dark);
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 14px;
        font-weight: 900;
        transition: 0.2s ease;
    }

        .quick-links a:hover {
            background: var(--blue-soft);
            transform: translateX(4px);
        }

    .quick-links span {
        color: var(--blue);
    }

/* =========================
   SUPPORT CARD
========================= */

.support-card {
    border-radius: 26px;
    padding: 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

    .support-card > span {
        color: var(--gold);
        font-size: 34px;
        flex: 0 0 auto;
    }

    .support-card strong {
        color: var(--blue-dark);
    }

    .support-card p {
        color: var(--muted);
        line-height: 1.6;
        margin-top: 4px;
    }

/* =========================
   TEMP KEY
========================= */

.temporary-key {
    display: block;
    margin: 10px 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    color: #061E45;
    font-weight: 950;
    letter-spacing: 0.08em;
    word-break: break-word;
}

/* =========================
   UTILITIES
========================= */

.hidden {
    display: none !important;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .visual-panel {
        min-height: auto;
        padding: 32px;
    }

    .brand-block {
        margin-bottom: 38px;
    }

    .form-panel {
        min-height: auto;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .gov-links a {
        display: none;
    }

    .visual-panel,
    .form-panel {
        padding: 22px;
    }

    .hero-copy h1 {
        font-size: clamp(38px, 13vw, 56px);
    }

    .hero-copy p {
        font-size: 16px;
    }

    .feature-grid,
    .type-selector {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 24px;
        border-radius: 26px;
    }

    .card-heading {
        display: grid;
        gap: 14px;
    }

        .card-heading h2 {
            font-size: 32px;
        }

    .support-card {
        border-radius: 22px;
    }
}

@media (max-width: 460px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .visual-panel,
    .form-panel {
        padding: 16px;
    }

    .login-card {
        padding: 20px;
    }

    .brand-block {
        align-items: flex-start;
    }

    .brand-badge {
        width: 52px;
        height: 52px;
        border-radius: 18px;
    }

    .hero-copy h1 {
        font-size: 36px;
    }

    .feature-grid article {
        padding: 18px;
        border-radius: 20px;
    }

    .type-card {
        min-height: auto;
    }
}
