:root {
    --login-navy: #102e50;
    --login-navy-light: #1d527b;
    --login-red: #a3172d;
    --login-red-dark: #841225;
    --login-ink: #1d3554;
    --login-muted: #70849a;
    --login-line: #e1e8f0;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.login-page {
    min-height: 100vh;
    padding: 34px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    color: var(--login-ink);
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at 8% 12%, rgba(255,255,255,.11), transparent 23%),
        linear-gradient(135deg, #0b2746 0%, #123b60 48%, #28708b 100%);
}
button, input { font: inherit; }
button { cursor: pointer; }
.login-orb { position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; pointer-events: none; }
.login-orb-one { width: 520px; height: 520px; right: -220px; top: -180px; box-shadow: 0 0 0 42px rgba(255,255,255,.025), 0 0 0 84px rgba(255,255,255,.02); }
.login-orb-two { width: 360px; height: 360px; left: -170px; bottom: -200px; box-shadow: 0 0 0 28px rgba(255,255,255,.025), 0 0 0 56px rgba(255,255,255,.018); }
.login-layout { width: min(1050px, 100%); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr); min-height: 650px; position: relative; z-index: 1; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 80px rgba(4, 22, 41, .32); }
.login-intro { position: relative; display: flex; flex-direction: column; padding: 52px 54px 36px; color: #fff; background: linear-gradient(150deg, rgba(9,37,67,.98), rgba(21,78,111,.94)); }
.login-intro:after { content: ""; position: absolute; width: 320px; height: 320px; right: -130px; bottom: -150px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 26px rgba(255,255,255,.025), 0 0 0 52px rgba(255,255,255,.02); }
.intro-topline { display: flex; align-items: center; gap: 9px; color: #abc9dc; font-size: 10px; font-weight: 750; letter-spacing: .14em; }
.intro-dot { width: 7px; height: 7px; border-radius: 50%; background: #db566a; box-shadow: 0 0 0 5px rgba(219,86,106,.15); }
.login-emblem { width: 82px; height: 94px; margin: 76px 0 24px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.88); border-radius: 16px 16px 34px 34px; color: #fff; background: #ae1931; font-size: 43px; font-weight: 850; box-shadow: 0 13px 25px rgba(0,0,0,.16); }
.school-kicker { margin: 0 0 8px; color: #b9d0e1; font-size: 13px; font-weight: 750; letter-spacing: .18em; }
.login-intro h1 { margin: 0; font-size: clamp(27px, 3.6vw, 42px); line-height: 1.12; letter-spacing: .02em; }
.intro-text { max-width: 410px; margin: 21px 0 0; color: #d0e0eb; font-size: 14px; line-height: 1.75; }
.intro-features { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 12px 24px; margin-top: 34px; color: #d7e6ef; font-size: 12px; }
.intro-features span { display: inline-flex; align-items: center; gap: 8px; }
.intro-features i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(178,34,57,.9); font-size: 11px; font-style: normal; }
.intro-footer { margin-top: auto; color: #95b3c8; font-size: 10px; letter-spacing: .13em; }
.login-card { display: flex; flex-direction: column; padding: 46px 50px 30px; background: #fff; }
.card-brand { display: flex; align-items: center; gap: 10px; color: var(--login-navy); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--login-red); font-size: 18px; font-weight: 800; }
.card-brand strong, .card-brand small { display: block; }
.card-brand strong { font-size: 15px; letter-spacing: .08em; }
.card-brand small { margin-top: 3px; color: #8c9aaa; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.login-heading { margin: 57px 0 25px; }
.eyebrow { margin: 0 0 8px; color: var(--login-red); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.login-heading h2 { margin: 0; color: var(--login-navy); font-size: 28px; line-height: 1.2; }
.login-heading p:last-child { margin: 9px 0 0; color: var(--login-muted); font-size: 12px; }
.login-alert { display: flex; align-items: center; gap: 9px; margin: -7px 0 17px; padding: 10px 12px; border: 1px solid #f0c7cf; border-radius: 7px; color: #8d1c31; background: #fff2f4; font-size: 12px; line-height: 1.35; }
.login-alert span { width: 18px; height: 18px; display: grid; place-items: center; flex: 0 0 18px; border-radius: 50%; color: #fff; background: var(--login-red); font-size: 11px; font-weight: 800; }
.login-success { display: flex; align-items: center; gap: 9px; margin: -7px 0 17px; padding: 10px 12px; border: 1px solid #bfe8cd; border-radius: 7px; color: #176b3e; background: #edfbf1; font-size: 12px; line-height: 1.35; }
.login-success span { width: 18px; height: 18px; display: grid; place-items: center; flex: 0 0 18px; border-radius: 50%; color: #fff; background: #159447; font-size: 11px; font-weight: 800; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 23px; padding: 5px; border-radius: 10px; background: #f2f6fa; }
.role-option { min-height: 59px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; color: #68809a; text-align: left; background: transparent; transition: .16s ease; }
.role-option:hover { color: var(--login-navy); background: #fff; }
.role-option.active { color: var(--login-navy); border-color: #dbe5ee; background: #fff; box-shadow: 0 3px 10px rgba(28,61,92,.08); }
.role-icon { width: 29px; height: 29px; display: grid; place-items: center; flex: 0 0 29px; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 800; }
.teacher-icon { background: #28679c; }
.student-icon { background: #2b9670; }
.role-option strong, .role-option small { display: block; }
.role-option strong { font-size: 11px; }
.role-option small { margin-top: 3px; color: #8b9aaa; font-size: 9px; white-space: nowrap; }
.login-form { display: grid; gap: 17px; }
.form-field { display: grid; gap: 7px; }
.form-field label { color: #4e6782; font-size: 11px; font-weight: 750; }
.input-wrap { position: relative; }
.input-symbol { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8ba1b5; font-size: 16px; font-weight: 700; pointer-events: none; }
.lock-symbol { width: 14px; height: 14px; display: grid; place-items: center; border: 2px solid #8ba1b5; border-radius: 4px; font-size: 0; }
.lock-symbol:after { content: ""; position: absolute; width: 7px; height: 6px; top: -7px; border: 2px solid #8ba1b5; border-bottom: 0; border-radius: 7px 7px 0 0; }
.input-wrap input { width: 100%; min-height: 46px; padding: 11px 14px 11px 40px; border: 1px solid var(--login-line); border-radius: 7px; outline: none; color: var(--login-ink); background: #fbfcfe; font-size: 13px; transition: .16s ease; }
.input-wrap input::placeholder { color: #a6b3c1; }
.input-wrap input:focus { border-color: #7396b7; background: #fff; box-shadow: 0 0 0 3px #edf4fa; }
.password-toggle { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); padding: 4px 5px; border: 0; color: #4f789a; background: transparent; font-size: 10px; font-weight: 750; }
.password-toggle:hover { color: var(--login-red); }
.remember-row { display: inline-flex; align-items: center; gap: 7px; margin-top: -5px; color: #7c8e9f; font-size: 10px; cursor: pointer; }
.remember-row input { width: 14px; height: 14px; margin: 0; accent-color: var(--login-red); }
.login-submit { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 2px; border: 0; border-radius: 7px; color: #fff; background: linear-gradient(100deg, var(--login-red), #bd2944); box-shadow: 0 8px 16px rgba(163,23,45,.18); font-size: 12px; font-weight: 750; transition: .16s ease; }
.login-submit:hover { background: linear-gradient(100deg, var(--login-red-dark), #a91f39); transform: translateY(-1px); box-shadow: 0 10px 20px rgba(163,23,45,.23); }
.submit-arrow { font-size: 18px; line-height: 1; }
.login-help { margin: auto 0 17px; padding-top: 30px; color: #92a0ae; font-size: 10px; line-height: 1.55; text-align: center; }
.login-card-footer { display: flex; justify-content: center; gap: 8px; padding-top: 17px; border-top: 1px solid #edf1f5; color: #a3afbb; font-size: 9px; letter-spacing: .04em; }
.footer-separator { color: #d0d8df; }

@media (max-width: 820px) {
    body.login-page { padding: 18px; overflow: auto; }
    .login-layout { grid-template-columns: 1fr; min-height: auto; max-width: 510px; }
    .login-intro { min-height: 300px; padding: 30px 30px 24px; }
    .login-emblem { width: 62px; height: 72px; margin: 32px 0 16px; font-size: 31px; }
    .login-intro h1 { font-size: 27px; }
    .intro-text { margin-top: 13px; font-size: 12px; }
    .intro-features { margin-top: 20px; gap: 9px 18px; font-size: 10px; }
    .intro-footer { margin-top: 26px; font-size: 8px; }
    .login-card { padding: 31px 29px 25px; }
    .login-heading { margin-top: 35px; }
}
@media (max-width: 420px) {
    body.login-page { padding: 0; }
    .login-layout { border-radius: 0; }
    .login-intro { min-height: 285px; }
    .login-card { padding: 28px 21px 23px; }
    .role-option { padding-left: 7px; padding-right: 7px; }
    .role-option small { font-size: 8px; }
}
