: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;
    --warning-bg: #FEF3C7;
    --warning-text: #92400E;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 34px 90px rgba(15, 23, 42, 0.18);
    --radius-md: 22px;
    --radius-lg: 34px;
}

/* 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;
}

/* PAGE */

.password-page {
    min-height: 100vh;
    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: 100vh;
    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, 76px);
    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;
}

.security-grid {
    margin-top: 42px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

    .security-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;
    }

        .security-grid article:hover {
            transform: translateY(-4px);
            background: rgba(255, 255, 255, 0.15);
        }

    .security-grid span {
        color: var(--gold);
        font-size: 38px;
    }

    .security-grid strong,
    .security-grid small {
        display: block;
    }

    .security-grid strong {
        margin-top: 12px;
        font-size: 18px;
    }

    .security-grid small {
        margin-top: 6px;
        color: #D8E2F0;
        line-height: 1.55;
    }

/* FORM PANEL */

.form-panel {
    min-height: 100vh;
    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);
}

.password-card,
.support-card {
    width: min(540px, 100%);
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(223, 231, 242, 0.92);
    box-shadow: var(--shadow-strong);
}

.password-card {
    padding: clamp(26px, 4vw, 36px);
    border-radius: var(--radius-lg);
}

.card-heading {
    margin-bottom: 26px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

    .card-heading > span {
        width: 58px;
        height: 58px;
        flex: 0 0 auto;
        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(31px, 4vw, 39px);
        line-height: 1.05;
        letter-spacing: -0.045em;
    }

    .card-heading p {
        margin-top: 8px;
        color: var(--muted);
        line-height: 1.55;
    }

        .card-heading p strong {
            color: var(--blue);
        }

/* FORM */

.password-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: 750;
    }

        .input-shell input::placeholder {
            color: #98A2B3;
        }

.toggle-password {
    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;
}

    .toggle-password:hover {
        transform: scale(1.04);
        background: rgba(11, 61, 145, 0.14);
    }

    .toggle-password span {
        font-size: 22px;
    }

/* STRENGTH */

.strength-box {
    display: grid;
    gap: 8px;
}

.strength-track {
    width: 100%;
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    background: #E5E7EB;
}

.strength-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: var(--danger);
    transition: width 0.25s ease, background 0.25s ease;
}

    .strength-bar.weak {
        width: 28%;
        background: var(--danger);
    }

    .strength-bar.medium {
        width: 58%;
        background: var(--warning);
    }

    .strength-bar.strong {
        width: 100%;
        background: var(--success);
    }

/* RULES */

.rules-card {
    padding: 16px;
    border-radius: 18px;
    background: var(--bg);
    border: 1px solid var(--border);
}

    .rules-card strong {
        display: block;
        color: var(--blue-dark);
        margin-bottom: 10px;
    }

    .rules-card ul {
        list-style: none;
        display: grid;
        gap: 8px;
    }

    .rules-card li {
        color: var(--muted);
        font-size: 0.94rem;
        line-height: 1.45;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .rules-card li::before {
            content: "radio_button_unchecked";
            font-family: "Material Symbols Rounded";
            color: #98A2B3;
            font-size: 20px;
        }

        .rules-card li.valid {
            color: var(--success-text);
            font-weight: 800;
        }

            .rules-card li.valid::before {
                content: "check_circle";
                color: var(--success);
            }

/* ALERT */

.password-alert {
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 850;
    line-height: 1.6;
    border: 1px solid transparent;
}

    .password-alert.error {
        background: var(--danger-bg);
        color: var(--danger-text);
        border-color: rgba(220, 38, 38, 0.14);
    }

    .password-alert.success {
        background: var(--success-bg);
        color: var(--success-text);
        border-color: rgba(22, 163, 74, 0.14);
    }

    .password-alert.warning {
        background: var(--warning-bg);
        color: var(--warning-text);
        border-color: rgba(245, 158, 11, 0.22);
    }

    .password-alert.info {
        background: var(--blue-soft);
        color: var(--blue);
        border-color: rgba(11, 61, 145, 0.14);
    }

/* BUTTON */

.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;
    }

/* SUPPORT */

.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;
    }

/* RESPONSIVE */

@media (max-width: 1120px) {
    .password-page {
        grid-template-columns: 1fr;
    }

    .visual-panel,
    .form-panel {
        min-height: auto;
    }

    .visual-panel {
        padding: 34px;
    }

    .brand-block {
        margin-bottom: 38px;
    }

    .security-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-panel {
        padding: 34px;
    }
}

@media (max-width: 760px) {
    .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;
    }

    .security-grid {
        grid-template-columns: 1fr;
    }

    .password-card {
        border-radius: 28px;
    }
}

@media (max-width: 520px) {
    .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;
    }

    .security-grid article {
        padding: 18px;
    }

    .password-card {
        padding: 22px;
        border-radius: 24px;
    }

    .card-heading {
        display: grid;
    }

        .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;
    }
}

/* REDUCED MOTION */

@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;
    }
}
