/* AJN Reference Portal — sign in */

:root {
    --navy: #314b63;
    --navy-dark: #22384c;
    --navy-900: #1a2b3b;
    --gold: #f1b240;
    --bg: #f5f6f8;
    --text: #1a2433;
    --text-2: #3d4a5c;
    --muted: #6b7686;
    --subtle: #98a2b3;
    --border: #e4e7ec;
    --red: #b42318;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

.icon {
    flex-shrink: 0;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

/* =========================
   BRAND PANEL
========================= */

.login-brand {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
    color: #fff;
    padding: 48px 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Soft hexagon motif echoing the AJN mark */
.brand-pattern {
    position: absolute;
    right: -120px;
    top: -80px;
    width: 520px;
    height: 455px;
    background: var(--gold);
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
    opacity: .08;
}

.brand-pattern::after {
    content: "";
    position: absolute;
    inset: 60px 110px 140px;
    background: #fff;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    opacity: .6;
}

.brand-copy {
    position: relative;
    margin: auto 0;
    max-width: 460px;
}

.brand-kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}

.brand-copy h1 {
    font-size: 36px;
    font-weight: 650;
    line-height: 1.18;
    letter-spacing: -.8px;
}

.brand-copy p {
    color: rgba(255, 255, 255, .72);
    font-size: 16px;
    margin-top: 14px;
}

.brand-points {
    list-style: none;
    margin-top: 34px;
    display: grid;
    gap: 16px;
}

.brand-points li {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 15px;
    color: rgba(255, 255, 255, .88);
}

.point-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(241, 178, 64, .14);
    border: 1px solid rgba(241, 178, 64, .28);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-footer {
    position: relative;
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
}

/* =========================
   FORM PANEL
========================= */

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.login-card {
    width: 100%;
    max-width: 380px;
}

.login-logo {
    display: block;
    width: 220px;
    height: auto;
    margin-bottom: 36px;
}

.login-card h2 {
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -.5px;
}

.login-subtitle {
    color: var(--muted);
    font-size: 15px;
    margin-top: 4px;
    margin-bottom: 28px;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

.alert .icon {
    margin-top: 1px;
}

.alert-error {
    background: #fef2f1;
    border: 1px solid #fbcfca;
    color: #8f1d14;
}

.alert-success {
    background: #ebf7f1;
    border: 1px solid #bfe6d3;
    color: #0b5c3d;
}

.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 6px;
}

.form-field input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--text);
    background: #fff;
    outline: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
    transition: .15s ease;
}

.form-field input::placeholder {
    color: var(--subtle);
}

.form-field input:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(49, 75, 99, .12);
}

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

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.toggle-password:hover {
    color: var(--navy);
    background: #eef2f6;
}

.toggle-password .icon-hide,
.toggle-password.is-visible .icon-show {
    display: none;
}

.toggle-password.is-visible .icon-hide {
    display: block;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: var(--text-2);
    cursor: pointer;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--navy);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

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

.field-hint {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

.remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--navy);
}

.login-btn {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 8px;
    background: var(--navy);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

.login-btn:hover {
    background: var(--navy-dark);
}

.login-help {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 960px) {

    .login-page {
        grid-template-columns: minmax(0, 1fr);
        background: var(--bg);
    }

    .login-panel {
        padding: 32px 16px;
    }

    .login-brand {
        display: none;
    }

    .login-card {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 32px 28px;
        box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
    }

    .login-logo {
        width: 190px;
        max-width: 100%;
        margin-bottom: 28px;
    }
}
