@import url("../../app/font.css");
:root {
    --auth-primary: #4f46e5;
    --auth-primary-dark: #4038c7;
    --auth-primary-soft: #eef0ff;
    --auth-ink: #121a2d;
    --auth-text: #344054;
    --auth-muted: #7b879f;
    --auth-border: #dfe4ee;
    --auth-border-strong: #cfd6e4;
    --auth-white: #ffffff;
    --auth-success: #119447;
    --auth-danger: #dc3545;
    --auth-bg: #f7f8fc;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    font-family: "Poppins", Arial, sans-serif;
    color: var(--auth-ink);
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(circle at 83% 11%, rgba(124, 91, 255, .11), transparent 30%),
        radial-gradient(circle at 13% 91%, rgba(54, 162, 255, .08), transparent 30%),
        linear-gradient(180deg, #fbfbfe 0%, #f4f6fb 100%);
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.sumo-auth-page {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.auth-orb {
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
}
.auth-orb-one {
    width: 420px;
    height: 420px;
    right: -170px;
    top: -170px;
    background: radial-gradient(circle, rgba(99, 76, 242, .12), rgba(99, 76, 242, 0) 68%);
}
.auth-orb-two {
    width: 390px;
    height: 390px;
    left: -170px;
    bottom: -170px;
    background: radial-gradient(circle, rgba(17, 151, 255, .09), rgba(17, 151, 255, 0) 68%);
}

.auth-topbar {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 44px));
    min-height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.auth-logo-link { display: inline-flex; align-items: center; }
.auth-logo-link img { display: block; width: auto; height: 49px; max-width: 220px; object-fit: contain; }
.auth-help-link {
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #5e6b82;
    font-size: 12px;
    font-weight: 600;
    transition: .18s ease;
}
.auth-help-link:hover { color: var(--auth-primary); border-color: #dcdff8; background: rgba(255,255,255,.7); }

.auth-stage {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    padding: 24px 20px 34px;
}

.auth-card {
    width: min(470px, 100%);
    border: 1px solid rgba(209, 216, 228, .9);
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 50px rgba(31, 42, 74, .10), 0 2px 7px rgba(31, 42, 74, .04);
    backdrop-filter: blur(14px);
}
.signin-card-modern { padding: 28px 34px 30px; }
.role-choice-card { width: min(680px, 100%); padding: 34px; }

.auth-eyebrow {
    margin-bottom: 7px;
    color: var(--auth-primary);
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .08em;
}
.auth-card h1 { margin: 0; font-size: 27px; line-height: 1.18; letter-spacing: -.03em; }
.auth-subtitle { margin: 8px 0 22px; color: var(--auth-muted); font-size: 13px; line-height: 1.7; }

.role-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.role-choice-item {
    min-height: 100px;
    display: grid;
    grid-template-columns: 48px 1fr 20px;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    background: #fff;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.role-choice-item:hover { transform: translateY(-2px); border-color: #c8cdfd; background: #fdfdff; box-shadow: 0 10px 24px rgba(74, 67, 173, .08); }
.role-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--auth-primary);
    background: var(--auth-primary-soft);
    border: 1px solid #d9dcff;
}
.role-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.role-icon.compact { width: 38px; height: 38px; border-radius: 10px; }
.role-icon.compact svg { width: 20px; height: 20px; }
.role-teacher .role-icon { color: #d7671b; background: #fff5ea; border-color: #ffe2c3; }
.role-student .role-icon { color: #0788b7; background: #effbff; border-color: #cef1fb; }
.role-staff .role-icon { color: #15824a; background: #effbf4; border-color: #ceefd9; }
.role-copy { min-width: 0; }
.role-copy b { display: block; margin-bottom: 5px; font-size: 13px; color: #1d2638; }
.role-copy small { display: block; color: #8792a7; font-size: 10px; line-height: 1.45; }
.role-arrow { color: #a4aec0; font-size: 18px; transition: transform .18s ease, color .18s ease; }
.role-choice-item:hover .role-arrow { color: var(--auth-primary); transform: translateX(3px); }
.auth-security-note { margin-top: 19px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #7b8797; font-size: 10px; }
.shield-dot, .secure-mark { display: inline-grid; place-items: center; color: #0d9f4d; font-weight: 800; }

.role-banner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 11px;
    border: 1px solid #d9dcff;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbfbff 0%, #f6f5ff 100%);
}
.role-banner-left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.role-banner-left small { display: block; margin-bottom: 2px; color: #98a2b7; font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.role-banner-left b { display: block; color: #172033; font-size: 13px; }
.change-role-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #cfd3fb;
    border-radius: 999px;
    background: #f2f1ff;
    color: #4d49b9;
    font-size: 10px;
    font-weight: 700;
    transition: .18s ease;
}
.change-role-btn:hover { border-color: #aeb4f9; background: #e9e8ff; }

.signin-heading { padding: 20px 0 18px; }
.signin-heading h1 { font-size: 26px; }
.signin-heading p { margin: 6px 0 0; color: var(--auth-muted); font-size: 12px; line-height: 1.55; }

.auth-alert { margin: 0 0 15px; padding: 11px 12px; border-radius: 10px; font-size: 11px; line-height: 1.5; }
.auth-alert-error { border: 1px solid #f5c4c8; background: #fff2f3; color: #b4232e; }
.auth-alert-success { border: 1px solid #bce8ce; background: #f0fbf4; color: #16723a; }

.signin-form-modern { display: grid; gap: 14px; }
.field-label { display: grid; gap: 7px; color: #20293b; font-size: 11px; font-weight: 700; }
.password-label-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.forgot-link { appearance: none; border: 0; padding: 0; background: transparent; color: var(--auth-primary); font-size: 10px; font-weight: 700; }
.forgot-link:hover { text-decoration: underline; }
.input-shell {
    min-height: 44px;
    display: flex;
    align-items: center;
    border: 1px solid var(--auth-border);
    border-radius: 11px;
    background: #fbfcfe;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.input-shell:focus-within { border-color: #8d8af5; background: #fff; box-shadow: 0 0 0 3px rgba(79, 70, 229, .09); }
.field-icon { width: 40px; display: grid; place-items: center; color: #9aa6bb; flex: 0 0 40px; }
.field-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.input-shell input {
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1d2638;
    font-size: 12px;
    font-weight: 500;
    padding: 0 12px 0 0;
}
.input-shell input::placeholder { color: #a8b1c1; font-weight: 400; }
.password-shell input { padding-right: 4px; }
.password-toggle { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border: 0; border-left: 1px solid #e5e9f0; background: transparent; color: #9ca8bb; }
.password-toggle:hover, .password-toggle.is-visible { color: var(--auth-primary); }
.password-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.remember-row { display: inline-flex; width: max-content; max-width: 100%; align-items: center; gap: 8px; color: #38445a; font-size: 10px; font-weight: 600; cursor: pointer; }
.remember-row input { width: 15px; height: 15px; margin: 0; accent-color: var(--auth-primary); }

.signin-primary-btn, .forgot-submit-btn {
    min-height: 44px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #5f57eb 0%, #8179f5 100%);
    box-shadow: 0 8px 18px rgba(79, 70, 229, .18);
    font-size: 11px;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.signin-primary-btn:hover, .forgot-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 11px 24px rgba(79, 70, 229, .23); filter: saturate(1.05); }
.signin-primary-btn span, .forgot-submit-btn span { margin-left: 6px; }
.auth-divider { margin: 20px 0 15px; display: flex; align-items: center; gap: 12px; color: #9ba6b9; font-size: 9px; font-weight: 700; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #e3e7ee; }
.demo-access-btn, .register-access-btn { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 11px; font-size: 10px; transition: .18s ease; }
.demo-access-btn { gap: 8px; border: 1px solid #9ed8b7; background: #f1fbf5; color: #087638; font-weight: 700; }
.demo-access-btn:hover { border-color: #62c189; background: #eaf8f0; }
.play-dot { font-size: 9px; }
.register-access-btn { margin-top: 12px; border: 1px solid #e0e5ed; background: #fff; color: #47546a; }
.register-access-btn b { margin-left: 3px; color: var(--auth-primary); }
.register-access-btn:hover { border-color: #cdd2f6; background: #fbfbff; }

.auth-footer { position: relative; z-index: 1; padding: 0 20px 22px; text-align: center; color: #8a95a8; font-size: 9px; }
.auth-footer > div { color: #4d8766; font-weight: 600; }
.auth-footer p { margin: 8px 0 0; }

body.modal-open { overflow: hidden; }
.forgot-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(18, 27, 48, .62);
    backdrop-filter: blur(6px);
}
.forgot-modal-backdrop[hidden] { display: none !important; }
.forgot-modal {
    position: relative;
    width: min(500px, 100%);
    padding: 28px 30px 30px;
    border: 1px solid rgba(219, 224, 233, .95);
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(12, 22, 44, .25);
    animation: forgotIn .18s ease-out;
}
@keyframes forgotIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.forgot-close {
    position: absolute;
    right: 17px;
    top: 17px;
    width: 37px;
    height: 37px;
    border: 1px solid #e3e7ed;
    border-radius: 10px;
    background: #fff;
    color: #7c879a;
    font-size: 23px;
    line-height: 1;
}
.forgot-close:hover { background: #f7f8fb; color: #3e4b62; }
.forgot-icon-wrap { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 13px; color: var(--auth-primary); background: var(--auth-primary-soft); border: 1px solid #d9dcff; }
.forgot-icon-wrap svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.forgot-heading { padding-right: 45px; }
.forgot-heading small { display: block; margin-bottom: 5px; color: var(--auth-primary); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.forgot-heading h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
.forgot-heading p { margin: 8px 0 20px; color: #6f7b90; font-size: 11px; line-height: 1.65; }
.forgot-form { display: grid; gap: 15px; }
.forgot-info-box { display: grid; grid-template-columns: 24px 1fr; gap: 9px; align-items: start; padding: 10px 11px; border: 1px solid #d9e4f4; border-radius: 10px; background: #f6f9fd; }
.forgot-info-box > span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #e5effd; color: #3773bd; font-size: 10px; font-weight: 800; }
.forgot-info-box p { margin: 1px 0 0; color: #637088; font-size: 9.5px; line-height: 1.55; }
.forgot-submit-btn { width: 100%; }

@media (max-width: 720px) {
    .auth-topbar { width: calc(100% - 28px); min-height: 72px; }
    .auth-logo-link img { height: 42px; max-width: 190px; }
    .auth-help-link { display: none; }
    .role-choice-card { padding: 25px 18px; }
    .role-choice-grid { grid-template-columns: 1fr; }
    .signin-card-modern { padding: 22px 18px 24px; }
    .role-banner { align-items: flex-start; }
    .change-role-btn { min-height: 32px; padding: 0 9px; }
    .forgot-modal { padding: 25px 18px 22px; }
    .forgot-heading { padding-right: 38px; }
}

@media (max-width: 390px) {
    .auth-stage { padding-inline: 12px; }
    .role-banner-left b { font-size: 12px; }
    .change-role-btn { font-size: 9px; }
    .signin-heading h1 { font-size: 24px; }
}
