:root {
    color-scheme: light;
    --navy: #0d2338;
    --teal: #1498a8;
    --teal-dark: #087485;
    --page: #edf3f5;
    --ink: #132536;
    --muted: #697b88;
    --line: #d9e4e8;
    --danger: #c53f4b;
    --success: #17775b;
}

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

body {
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(460px, 1.08fr) minmax(480px, .92fr);
}

.brand-panel {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(42px, 6vw, 88px);
    color: #fff;
    background:
        radial-gradient(circle at 82% 15%, rgba(55, 207, 203, .24), transparent 30%),
        linear-gradient(145deg, #081c30 0%, #0b4557 58%, #0e7b87 100%);
}

.brand-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: .13;
    background-image:
        linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom right, #000, transparent 72%);
}

.brand-content {
    position: relative;
    z-index: 2;
    width: min(100%, 720px);
    min-height: calc(100vh - clamp(84px, 12vw, 176px));
    display: flex;
    flex-direction: column;
}

.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-lockup > span:last-child { display: flex; flex-direction: column; }
.brand-lockup strong { font-size: 22px; letter-spacing: .11em; }
.brand-lockup small { margin-top: 3px; font-size: 10px; letter-spacing: .32em; opacity: .72; }

.brand-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 17px;
    background: rgba(255,255,255,.12);
    box-shadow: 0 14px 38px rgba(0,0,0,.14);
    backdrop-filter: blur(8px);
}

.brand-icon svg { width: 31px; fill: #fff; }
.brand-message { margin: auto 0; padding: 64px 0 54px; }
.eyebrow { margin: 0 0 14px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: .17em; }
.brand-message .eyebrow { color: #8ee8e3; }
.brand-message h1 { max-width: 680px; margin: 0; font-size: clamp(42px, 5.2vw, 70px); line-height: 1.05; letter-spacing: -.045em; }
.brand-copy { max-width: 620px; margin: 27px 0 0; color: rgba(255,255,255,.77); font-size: 18px; line-height: 1.7; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feature-item { min-height: 124px; padding: 18px; border: 1px solid rgba(255,255,255,.15); border-radius: 16px; background: rgba(255,255,255,.075); backdrop-filter: blur(8px); }
.feature-item > span { color: #8ee8e3; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.feature-item p { margin: 14px 0 0; color: rgba(255,255,255,.64); font-size: 12px; line-height: 1.5; }
.feature-item strong { display: block; margin-bottom: 4px; color: #fff; font-size: 14px; }

.decor { position: absolute; z-index: -1; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.decor-one { width: 390px; height: 390px; right: -160px; bottom: -130px; }
.decor-two { width: 220px; height: 220px; right: -65px; bottom: -48px; }

.form-panel {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: clamp(28px, 6vw, 84px);
    background: linear-gradient(135deg, #f7fafb, #e9f1f3);
}

.login-card { width: min(100%, 480px); padding: clamp(28px, 4.6vw, 54px); border: 1px solid rgba(255,255,255,.82); border-radius: 24px; background: rgba(255,255,255,.93); box-shadow: 0 30px 80px rgba(26,57,70,.12); }
.mobile-brand { display: none; }
.form-header { margin-bottom: 31px; }
.form-header h2 { margin: 0; font-size: clamp(30px, 3.2vw, 40px); line-height: 1.15; letter-spacing: -.035em; }
.form-header > p:last-child { margin: 13px 0 0; color: var(--muted); line-height: 1.6; }

.alert { display: flex; align-items: flex-start; gap: 11px; margin: 0 0 22px; padding: 13px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.alert span { flex: 0 0 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 800; }
.alert p { margin: 1px 0 0; }
.alert-error { color: #8f2932; background: #fff0f1; }
.alert-error span { background: var(--danger); }
.alert-success { color: #155f49; background: #eaf8f2; }
.alert-success span { background: var(--success); }

.field-group { margin-bottom: 21px; }
.field-group label, .label-row { color: var(--ink); font-size: 13px; font-weight: 750; }
.field-group > label, .label-row { display: flex; margin-bottom: 9px; }
.label-row { align-items: center; justify-content: space-between; gap: 16px; }
.label-row label { margin: 0; }
.label-row a { color: var(--teal-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.label-row a:hover { text-decoration: underline; }

.input-shell { position: relative; }
.input-shell input { width: 100%; height: 53px; padding: 0 15px 0 48px; border: 1px solid var(--line); border-radius: 11px; outline: none; color: var(--ink); background: #fbfdfe; font: inherit; transition: border-color .18s, box-shadow .18s, background .18s; }
.input-shell input::placeholder { color: #9aabb5; }
.input-shell input:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(20,152,168,.12); }
.input-icon { position: absolute; top: 50%; left: 16px; width: 20px; height: 20px; transform: translateY(-50%); pointer-events: none; }
.input-icon svg { width: 20px; fill: #80939e; }
.field-error, .validation-summary { display: block; color: var(--danger); font-size: 12px; line-height: 1.45; }
.field-error { margin-top: 6px; }
.validation-summary ul { margin: 0 0 17px; padding-left: 18px; }

.remember-control { position: relative; display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; cursor: pointer; user-select: none; }
.remember-control input { position: absolute; opacity: 0; pointer-events: none; }
.checkmark { position: relative; width: 19px; height: 19px; border: 1px solid #b9c8cf; border-radius: 5px; background: #fff; }
.remember-control input:checked + .checkmark { border-color: var(--teal); background: var(--teal); }
.remember-control input:checked + .checkmark::after { content: "✓"; position: absolute; left: 3px; top: -1px; color: #fff; font-size: 13px; font-weight: 800; }
.remember-control input:focus-visible + .checkmark { outline: 3px solid rgba(20,152,168,.2); }

.login-button { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 13px; margin-top: 25px; border: 0; border-radius: 11px; color: #fff; background: linear-gradient(100deg, var(--teal-dark), var(--teal)); box-shadow: 0 13px 28px rgba(8,116,133,.22); font: inherit; font-weight: 800; cursor: pointer; transition: transform .18s, box-shadow .18s; }
.login-button span:last-child { font-size: 20px; transition: transform .18s; }
.login-button:hover { transform: translateY(-1px); box-shadow: 0 16px 33px rgba(8,116,133,.3); }
.login-button:hover span:last-child { transform: translateX(3px); }
.login-button:active { transform: translateY(0); }

.login-footer { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 27px; padding-top: 22px; border-top: 1px solid #e7eef0; color: #84949d; font-size: 11px; text-align: center; }
.secure-dot { width: 7px; height: 7px; border-radius: 50%; background: #2eb68f; box-shadow: 0 0 0 4px rgba(46,182,143,.12); }

/* Keep both desktop panels inside the visible browser viewport. */
@media (min-width: 801px) {
    html,
    body {
        height: 100%;
        overflow: hidden;
    }

    .login-page {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .brand-panel,
    .form-panel {
        height: 100%;
        min-height: 0;
    }

    .brand-panel {
        padding: clamp(28px, 5vh, 60px) clamp(36px, 5vw, 88px);
    }

    .brand-content {
        height: 100%;
        min-height: 0;
    }

    .brand-message {
        padding: clamp(24px, 5vh, 64px) 0 clamp(22px, 4vh, 50px);
    }

    .brand-message h1 {
        font-size: clamp(40px, 4.35vw, 70px);
    }

    .brand-copy {
        margin-top: clamp(14px, 2.7vh, 27px);
        font-size: clamp(15px, 1.15vw, 18px);
        line-height: 1.55;
    }

    .feature-item {
        min-height: clamp(82px, 12.5vh, 124px);
    }

    .form-panel {
        padding: clamp(18px, 4vh, 52px) clamp(24px, 5vw, 84px);
    }

    .login-card {
        max-height: 100%;
        padding: clamp(24px, 4vh, 48px);
    }
}

/* Compact spacing for laptops, browser zoom, and shorter desktop screens. */
@media (min-width: 801px) and (max-height: 860px) {
    .brand-panel {
        padding-top: 26px;
        padding-bottom: 26px;
    }

    .brand-content {
        min-height: 0;
    }

    .brand-icon {
        width: 48px;
        height: 48px;
        border-radius: 15px;
    }

    .brand-icon svg { width: 27px; }
    .brand-message { padding: 22px 0 20px; }
    .brand-message h1 { font-size: clamp(38px, 4vw, 56px); line-height: 1.01; }
    .brand-copy { margin-top: 14px; font-size: 15px; line-height: 1.45; }
    .feature-item { min-height: 78px; padding: 12px 14px; }
    .feature-item p { margin-top: 8px; line-height: 1.35; }

    .form-panel { padding-top: 18px; padding-bottom: 18px; }
    .login-card { padding: 26px 32px; }
    .form-header { margin-bottom: 20px; }
    .form-header h2 { font-size: 34px; }
    .form-header > p:last-child { margin-top: 9px; line-height: 1.45; }
    .field-group { margin-bottom: 15px; }
    .field-group > label,
    .label-row { margin-bottom: 7px; }
    .input-shell input { height: 48px; }
    .login-button { min-height: 49px; margin-top: 18px; }
    .login-footer { margin-top: 18px; padding-top: 16px; }
}

/* Extremely short desktop windows still scroll as one page instead of clipping content. */
@media (min-width: 801px) and (max-height: 640px) {
    html,
    body {
        height: auto;
        overflow: auto;
    }

    .login-page {
        height: auto;
        min-height: 640px;
        overflow: visible;
    }

    .brand-panel,
    .form-panel {
        min-height: 640px;
    }
}

@media (max-width: 1040px) {
    .login-page { grid-template-columns: minmax(380px, .9fr) minmax(440px, 1.1fr); }
    .brand-message h1 { font-size: 46px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-item { min-height: 0; display: flex; align-items: flex-start; gap: 12px; }
    .feature-item p { margin: 0; }
}

@media (max-width: 800px) {
    .login-page { display: block; min-height: 100vh; padding: 22px 14px; background: linear-gradient(145deg, #092438, #0b6673); }
    .brand-panel { display: none; }
    .form-panel { min-height: calc(100vh - 44px); padding: 0; border-radius: 24px; background: transparent; }
    .login-card { padding: 30px 24px; }
    .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 35px; }
    .mobile-brand > span:last-child { display: flex; flex-direction: column; }
    .mobile-brand strong { text-transform: uppercase; letter-spacing: .08em; }
    .mobile-brand small { color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
    .mobile-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--teal); font-weight: 850; }
}

@media (max-width: 420px) {
    .login-page { padding: 0; background: #fff; }
    .form-panel { min-height: 100vh; }
    .login-card { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
    .form-header h2 { font-size: 30px; }
}
