@font-face {
    font-family: "Geist";
    src: url("/admin-next/assets/geist-latin-wght-normal-BgDaEnEv.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;
    --portal-ink: #071a3c;
    --portal-muted: #60718a;
    --portal-line: #d8e5f2;
    --portal-blue: #0768ed;
    --portal-blue-dark: #0454c7;
    --portal-cyan: #12c9ec;
    --portal-success: #08b862;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
button, input { font: inherit; }

body.apex-login-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 28px;
    color: var(--portal-ink);
    font-family: "Geist", "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at 7% 8%, rgba(35, 162, 255, .18), transparent 31rem),
        radial-gradient(circle at 94% 91%, rgba(5, 105, 237, .12), transparent 34rem),
        linear-gradient(135deg, #edf8ff 0%, #fbfdff 48%, #eef7ff 100%);
}

body.apex-login-page::before,
body.apex-login-page::after {
    content: "";
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    border: 1px solid rgba(74, 158, 231, .14);
}

body.apex-login-page::before { width: 520px; height: 520px; left: -235px; bottom: -315px; }
body.apex-login-page::after { width: 660px; height: 660px; right: -365px; top: -385px; }

.portal-login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(330px, .94fr) minmax(410px, 1.06fr);
    width: min(920px, 100%);
    min-height: 572px;
    overflow: hidden;
    border: 1px solid rgba(116, 172, 221, .48);
    border-radius: 24px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 28px 80px rgba(28, 87, 137, .20), 0 4px 16px rgba(28, 87, 137, .08);
}

.portal-brand-panel {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: 42px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(154deg, #071c45 0%, #063f98 54%, #047bee 100%);
}

.portal-brand-panel::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .66;
    background:
        radial-gradient(circle at 78% 20%, rgba(22, 216, 255, .58), transparent 30%),
        linear-gradient(122deg, transparent 0 46%, rgba(255,255,255,.08) 46.2% 46.6%, transparent 46.8%),
        linear-gradient(35deg, transparent 0 62%, rgba(255,255,255,.08) 62.2% 62.6%, transparent 62.8%);
}

.portal-brand-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 340px;
    height: 340px;
    right: -170px;
    bottom: -155px;
    border: 56px solid rgba(255,255,255,.08);
    border-radius: 50%;
}

.portal-brand-lockup,
.portal-mobile-brand { display: flex; align-items: center; gap: 15px; }
.portal-apex-mark { width: 52px; height: 52px; flex: 0 0 auto; filter: drop-shadow(0 7px 16px rgba(0,0,0,.14)); }
.portal-brand-name strong { display: block; font-size: 25px; line-height: 1; letter-spacing: .055em; font-weight: 790; }
.portal-brand-name span { display: block; margin-top: 7px; color: rgba(255,255,255,.78); font-size: 11px; font-weight: 570; letter-spacing: .18em; }

.portal-brand-message { max-width: 310px; margin: 54px 0 68px; }
.portal-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 17px; color: #a4edff; font-size: 11px; font-weight: 690; letter-spacing: .16em; text-transform: uppercase; }
.portal-eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: #39dcff; }
.portal-brand-message h2 { margin: 0; font-size: clamp(30px, 3.15vw, 41px); line-height: 1.08; letter-spacing: -.035em; font-weight: 720; }
.portal-brand-message p { margin: 19px 0 0; color: rgba(235,247,255,.77); font-size: 14px; line-height: 1.68; }
.portal-security-note { display: flex; align-items: center; gap: 11px; color: rgba(244,250,255,.84); font-size: 12px; font-weight: 510; }
.portal-security-note svg { width: 18px; height: 18px; color: #6ee7ff; }

.portal-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 64px;
    background: linear-gradient(rgba(255,255,255,.90), rgba(255,255,255,.97)), radial-gradient(circle at 100% 0%, rgba(55,164,255,.18), transparent 45%);
}

.portal-mobile-brand { display: none; }
.portal-form-heading { margin-bottom: 27px; }
.portal-role-chip { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px; padding: 7px 10px; border: 1px solid #dbe8f5; border-radius: 999px; color: #3a5879; background: #f7fbff; font-size: 11px; font-weight: 650; }
.portal-role-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--portal-success); box-shadow: 0 0 0 4px rgba(8,184,98,.10); }
.portal-form-heading h1 { margin: 0; color: #081a38; font-size: 31px; line-height: 1.15; letter-spacing: -.035em; font-weight: 720; }
.portal-form-heading p { margin: 10px 0 0; color: var(--portal-muted); font-size: 14px; line-height: 1.55; }

.portal-alert { display: flex; align-items: flex-start; gap: 10px; margin: -7px 0 19px; padding: 12px 13px; border-radius: 11px; font-size: 13px; line-height: 1.4; }
.portal-alert svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; }
.portal-alert-error { border: 1px solid #fecaca; color: #b42336; background: #fff4f4; }
.portal-alert-success { border: 1px solid #bcebd1; color: #08723e; background: #f0fcf5; }

.portal-field { margin-bottom: 18px; }
.portal-field label { display: block; margin: 0 0 8px; color: #172c4b; font-size: 12px; font-weight: 650; }
.portal-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.portal-field-heading label { margin: 0; }
.portal-field-heading a { color: var(--portal-blue); font-size: 12px; font-weight: 650; text-decoration: none; }
.portal-field-heading a:hover { text-decoration: underline; text-underline-offset: 3px; }
.portal-reset-copy { margin: -7px 0 20px; color: var(--portal-muted); font-size: 13px; line-height: 1.6; }
.portal-reset-actions { display: flex; justify-content: center; margin-top: 18px; }
.portal-reset-actions a { color: var(--portal-blue); font-size: 12px; font-weight: 650; text-decoration: none; }
.portal-reset-actions a:hover { text-decoration: underline; text-underline-offset: 3px; }
.portal-input-wrap { position: relative; }
.portal-input-icon { position: absolute; top: 50%; left: 15px; width: 18px; height: 18px; color: #7e91aa; pointer-events: none; transform: translateY(-50%); }
.portal-input { width: 100%; height: 48px; padding: 0 46px 0 44px; border: 1px solid #d4e1ee; border-radius: 11px; outline: none; color: #0e2342; background: #fbfdff; font-size: 14px; font-weight: 510; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.portal-input::placeholder { color: #97a7ba; font-weight: 430; }
.portal-input:hover { border-color: #b5cce1; background: #fff; }
.portal-input:focus { border-color: #1886ef; background: #fff; box-shadow: 0 0 0 4px rgba(6,104,238,.10); }

.portal-password-toggle { position: absolute; top: 50%; right: 8px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; color: #71849d; background: transparent; cursor: pointer; transform: translateY(-50%); }
.portal-password-toggle:hover { color: var(--portal-blue); background: #edf6ff; }
.portal-password-toggle:focus-visible { outline: 2px solid var(--portal-blue); outline-offset: 1px; }
.portal-password-toggle svg { width: 18px; height: 18px; }

.portal-submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 49px; margin-top: 4px; border: 1px solid #0057d6; border-radius: 11px; color: #fff; background: linear-gradient(180deg, #078df5 0%, #0566e8 100%); box-shadow: 0 9px 20px rgba(4,101,222,.20), inset 0 1px 0 rgba(255,255,255,.28); font-size: 14px; font-weight: 680; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.portal-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(4,101,222,.27), inset 0 1px 0 rgba(255,255,255,.28); filter: saturate(1.05); }
.portal-submit:active { transform: translateY(0); }
.portal-submit:focus-visible { outline: 3px solid rgba(6,104,238,.22); outline-offset: 3px; }
.portal-submit svg { width: 17px; height: 17px; }
.portal-submit[aria-busy="true"] { cursor: wait; opacity: .82; }

.portal-login-footer { display: flex; flex-direction: column; align-items: center; gap: 11px; margin-top: 23px; padding-top: 20px; border-top: 1px solid #e5edf5; color: #7a8aa0; font-size: 12px; }
.portal-login-footer a { color: var(--portal-blue); font-weight: 650; text-decoration: none; }
.portal-login-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.portal-secure-inline { display: flex; align-items: center; gap: 7px; color: #7a8aa0; font-size: 11px; font-weight: 520; }
.portal-secure-inline svg { width: 14px; height: 14px; color: #66809d; }

/* Switch before the two minimum columns plus page gutters collide. */
@media (max-width: 840px) {
    body.apex-login-page { padding: 18px; place-items: start center; }
    .portal-login-shell { display: block; width: min(460px, 100%); min-height: 0; border-radius: 20px; }
    .portal-brand-panel { display: none; }
    .portal-form-panel { padding: 35px 30px 29px; }
    .portal-mobile-brand { display: flex; margin-bottom: 30px; }
    .portal-mobile-brand .portal-apex-mark { width: 42px; height: 42px; }
    .portal-mobile-brand .portal-brand-name strong { color: #071a3c; font-size: 22px; }
    .portal-mobile-brand .portal-brand-name span { color: #49729f; font-size: 9px; }
}

@media (max-width: 420px) {
    body.apex-login-page { padding: 10px; }
    .portal-login-shell { border-radius: 17px; }
    .portal-form-panel { padding: 28px 22px 23px; }
    .portal-form-heading h1 { font-size: 27px; }
}

/* Preserve readable controls on short laptops and browser windows. */
@media (max-height: 680px) and (min-width: 841px) {
    body.apex-login-page { place-items: start center; padding: 12px; }
    .portal-login-shell { min-height: calc(100dvh - 24px); }
    .portal-brand-panel { padding: 28px 34px; }
    .portal-brand-message { margin: 28px 0 34px; }
    .portal-form-panel { padding: 28px 52px; }
    .portal-form-heading { margin-bottom: 18px; }
    .portal-role-chip { margin-bottom: 12px; }
    .portal-field { margin-bottom: 13px; }
    .portal-login-footer { margin-top: 18px; padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
