:root {
    --navy-deep: #061A3E;
    --navy: #0B2A5E;
    --blue: #1B4F91;
    --blue-bright: #2E7DE1;
    --sky: #7FB2F0;
    --ink: #10203A;
    --slate: #5B6B84;
    --slate-light: #8FA0B8;
    --line: #E4E9F1;
    --white: #FFFFFF;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--ink);
    background: var(--navy-deep);
    -webkit-font-smoothing: antialiased;
}

.screen {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 40% 60%;
}

/* ---------- LEFT: BRAND PANEL ---------- */
.brand {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 140% at 15% 0%, #103a7c 0%, transparent 55%),
        linear-gradient(155deg, var(--navy-deep) 0%, var(--navy) 45%, var(--blue) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px 64px;
    color: var(--white);
}

.chevrons {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.5;
}

    .chevrons svg {
        position: absolute;
    }

.brand > * {
    position: relative;
    z-index: 2;
}

.brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 100px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #CFE0FA;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ADE80;
    box-shadow: 0 0 0 3px rgba(74,222,128,0.2);
}

.brand-mid {
    max-width: 460px;
    margin-top: auto;
    margin-bottom: auto;
    padding-top: 40px;
}

.logo-mark {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 44px;
}

.logo-mark img {
    max-width: 64px;
    max-height: 64px;
    height: auto;
    width: auto;
    flex-shrink: 0;
    border-radius: 8px;
    background: rgba(255,255,255,0.92);
    padding: 6px;
}

.logo-word {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.06em;
    line-height: 1;
}

.logo-sub {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--sky);
    margin-top: 5px;
}

.brand-headline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 38px;
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin-bottom: 20px;
}

    .brand-headline em {
        font-style: normal;
        color: var(--sky);
    }

.brand-copy {
    font-size: 15.5px;
    line-height: 1.65;
    color: #B9CBE6;
    max-width: 400px;
}

.brand-stats {
    display: flex;
    gap: 36px;
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.14);
}

.stat-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 600;
}

.stat-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.05em;
    color: var(--slate-light);
    margin-top: 4px;
}

.brand-bottom {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11.5px;
    color: #7E93B8;
    display: flex;
    justify-content: space-between;
    letter-spacing: 0.02em;
}

/* ---------- RIGHT: FORM PANEL ---------- */
.panel {
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.form-wrap {
    width: 100%;
    max-width: 380px;
}

.form-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--slate-light);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.form-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 27px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 8px;
}

.form-desc {
    font-size: 14px;
    color: var(--slate);
    margin-bottom: 26px;
    line-height: 1.5;
}

/* ---------- alerts / errors ---------- */
.alert {
    border-radius: 10px;
    margin-bottom: 20px;
    border: none;
    font-size: 13.5px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background-color: #FCE8E8;
    color: #A32B2B;
}

.alert-success {
    background-color: #E3F6EA;
    color: #1F7A43;
    border: 1px solid #C5EAD3;
}

.form-errors {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .form-errors li {
        padding: 6px 0;
        padding-left: 22px;
        position: relative;
    }

        .form-errors li::before {
            content: "\25CF";
            position: absolute;
            left: 0;
            font-size: 8px;
            top: 10px;
        }

.text-danger {
    font-size: 12.5px;
    margin-top: 5px;
    display: block;
}

/* ---------- fields ---------- */
.field {
    margin-bottom: 20px;
}

    .field label {
        display: block;
        font-size: 12.5px;
        font-weight: 600;
        color: var(--ink);
        margin-bottom: 8px;
        letter-spacing: 0.01em;
    }

.field-input {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--line);
    border-radius: 11px;
    background: #FAFBFD;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

    .field-input:focus-within {
        border-color: var(--blue-bright);
        background: var(--white);
        box-shadow: 0 0 0 4px rgba(46,125,225,0.12);
    }

    .field-input.is-invalid {
        border-color: #DC3545;
    }

        .field-input.is-invalid:focus-within {
            box-shadow: 0 0 0 4px rgba(220,53,69,0.12);
        }

    .field-input svg {
        flex-shrink: 0;
        margin-left: 14px;
        color: var(--slate-light);
        transition: color .15s ease;
    }

    .field-input:focus-within svg {
        color: var(--blue-bright);
    }

    .field-input input {
        width: 100%;
        border: none;
        background: transparent;
        outline: none;
        padding: 13px 12px;
        font-size: 14.5px;
        font-family: 'Inter', sans-serif;
        color: var(--ink);
    }

        .field-input input::placeholder {
            color: #AEBACB;
        }

.eye-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 12px;
    color: var(--slate-light);
    display: flex;
    align-items: center;
    font-size: 16px;
}

    .eye-btn:hover {
        color: var(--blue-bright);
    }

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

.switch {
    width: 34px;
    height: 20px;
    border-radius: 100px;
    background: var(--line);
    position: relative;
    transition: background .18s ease;
    flex-shrink: 0;
}

    .switch::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: var(--white);
        box-shadow: 0 1px 3px rgba(0,0,0,0.25);
        transition: transform .18s ease;
    }

.remember input {
    display: none;
}

    .remember input:checked + .switch {
        background: var(--blue-bright);
    }

        .remember input:checked + .switch::after {
            transform: translateX(14px);
        }

.remember span.txt {
    font-size: 13px;
    color: var(--slate);
}

.forgot {
    font-size: 13px;
    color: var(--blue-bright);
    text-decoration: none;
    font-weight: 500;
}

    .forgot:hover {
        text-decoration: underline;
    }

/* ---------- buttons ---------- */
.btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 8px 20px -6px rgba(11,42,94,0.55);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

    .btn-primary:hover:not(:disabled) {
        filter: brightness(1.08);
        transform: translateY(-1px);
        color: var(--white);
    }

    .btn-primary:active:not(:disabled) {
        transform: translateY(0);
    }

    .btn-primary:disabled {
        opacity: 0.75;
        cursor: not-allowed;
    }

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
}

    .divider::before, .divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--line);
    }

    .divider span {
        font-size: 11.5px;
        color: var(--slate-light);
        font-family: 'IBM Plex Mono', monospace;
        letter-spacing: 0.04em;
    }

.btn-secondary {
    width: 100%;
    padding: 13px;
    border: 1.5px solid var(--line);
    border-radius: 11px;
    background: var(--white);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: border-color .15s ease, background .15s ease;
}

    .btn-secondary:hover:not(:disabled) {
        border-color: var(--blue-bright);
        background: #F5F9FF;
    }

    .btn-secondary:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

    .btn-secondary i {
        color: var(--blue);
        font-size: 16px;
    }

.hint {
    font-size: 12px;
    color: var(--slate-light);
    text-align: center;
    line-height: 1.5;
    margin-top: 12px;
}

.secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    font-size: 11.5px;
    color: var(--slate-light);
    font-family: 'IBM Plex Mono', monospace;
}

    .secure-badge svg {
        color: #4ADE80;
    }

/* ---------- loader ---------- */
.loader {
    display: none;
    text-align: center;
    margin-top: 14px;
}

    .loader p {
        margin-top: 8px;
        color: var(--blue-bright);
        font-size: 13px;
    }

.spinner-border {
    color: var(--blue-bright);
}

/* ---------- responsive ---------- */
@media (max-width: 880px) {
    .screen {
        grid-template-columns: 1fr;
    }

    .brand {
        display: none;
    }

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

@keyframes drift {
    0% {
        transform: translate(0,0);
    }

    100% {
        transform: translate(-40px,-30px);
    }
}
