:root {
    --auth-primary: #7546e8;
    --auth-primary-dark: #5428c4;
    --auth-accent: #f43f9e;
    --auth-cyan: #19b9e6;
    --auth-ink: #16172d;
    --auth-muted: #6f7489;
    --auth-border: #e2e4ef;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    height: 100dvh;
    min-height: 0;
    margin: 0;
    padding: 48px;
    color: var(--auth-ink);
    font-family:
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;
    background:
        radial-gradient(circle at 74% 0%, rgba(37, 147, 213, 0.32), transparent 31%),
        radial-gradient(circle at 94% 78%, rgba(239, 34, 151, 0.5), transparent 34%),
        linear-gradient(135deg, #070936 0%, #151055 48%, #43043f 100%);
    display: grid;
    place-items: center;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 55% 0 0;
    pointer-events: none;
    opacity: 0.17;
    background-image:
        linear-gradient(30deg, #ffffff 1px, transparent 1px), linear-gradient(150deg, #ffffff 1px, transparent 1px);
    background-size: 58px 34px;
    mask-image: linear-gradient(to bottom, transparent, #000);
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(480px, 0.92fr);
    width: min(1420px, 100%);
    height: min(760px, calc(100dvh - 96px));
    min-height: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 34px;
    box-shadow: 0 32px 90px rgba(6, 3, 41, 0.42);
}

.auth-visual {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    color: #ffffff;
    background-image: var(--auth-image);
    background-position: center;
    background-size: cover;
}

.auth-visual-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(3, 6, 34, 0.2) 0%, rgba(4, 6, 31, 0.28) 38%, rgba(4, 5, 29, 0.92) 100%),
        linear-gradient(90deg, rgba(7, 10, 46, 0.56), transparent 66%);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.auth-brand b {
    color: #ff4ca5;
}

.auth-brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: #ffffff;
    font-size: 1.15rem;
    background: linear-gradient(145deg, #854df1, #f43f9e);
    border-radius: 13px;
    box-shadow: 0 10px 28px rgba(197, 55, 185, 0.32);
}

.auth-brand-desktop {
    position: absolute;
    z-index: 2;
    top: 38px;
    left: 42px;
    padding: 10px 15px 10px 10px;
    color: #ffffff;
    background: rgba(8, 10, 40, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(12px);
}

.auth-visual-copy {
    position: absolute;
    z-index: 2;
    right: 42px;
    bottom: 95px;
    left: 42px;
    max-width: 650px;
}

.auth-visual-kicker,
.auth-kicker {
    color: #6ee1ff;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.auth-visual-copy h2 {
    max-width: 620px;
    margin: 15px 0 14px;
    font-size: clamp(2.05rem, 3.5vw, 3.2rem);
    font-weight: 850;
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.auth-visual-copy p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.03rem;
    line-height: 1.65;
}

.auth-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.auth-feature-list span {
    padding: 8px 13px;
    color: #ffffff;
    font-size: 0.77rem;
    font-weight: 700;
    background: rgba(5, 9, 40, 0.58);
    border: 1px solid rgba(99, 213, 255, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.auth-feature-list i {
    margin-right: 5px;
    color: #50d6ff;
}

.auth-visual-footer {
    position: absolute;
    z-index: 2;
    bottom: 34px;
    left: 42px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.78rem;
}

.auth-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: clamp(28px, 3vw, 46px);
    background: radial-gradient(circle at 100% 0%, rgba(25, 185, 230, 0.08), transparent 32%), #ffffff;
}

.auth-panel-inner {
    width: min(100%, 570px);
    margin: auto;
}

.auth-brand-mobile {
    display: none;
    margin-bottom: 24px;
}

.auth-school-name {
    margin-bottom: 14px;
    color: var(--auth-primary);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.auth-heading {
    margin-bottom: 21px;
}

.auth-kicker {
    color: var(--auth-primary);
}

.auth-heading h1 {
    margin: 10px 0 9px;
    font-size: clamp(1.9rem, 2.7vw, 2.5rem);
    font-weight: 850;
    line-height: 1.12;
    letter-spacing: -0.045em;
}

.auth-heading p {
    max-width: 510px;
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-field label,
.auth-label-row label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.82rem;
    font-weight: 750;
}

.auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-label-row span {
    color: #969aac;
    font-size: 0.72rem;
}

.auth-control {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    min-height: 52px;
    overflow: hidden;
    background: #fbfbfd;
    border: 1px solid var(--auth-border);
    border-radius: 14px;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.auth-control:focus-within {
    background: #ffffff;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(117, 70, 232, 0.1);
}

.auth-control > i {
    color: #868da8;
    font-size: 1.08rem;
    text-align: center;
}

.auth-control input {
    width: 100%;
    height: 50px;
    min-width: 0;
    padding: 0 14px 0 0;
    color: var(--auth-ink);
    font: inherit;
    background: transparent;
    border: 0;
    outline: 0;
}

.auth-control input::placeholder {
    color: #9ca0b1;
}

.auth-password-control {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
}

.auth-password-control button {
    display: grid;
    width: 48px;
    height: 50px;
    padding: 0;
    place-items: center;
    color: #858ba4;
    background: transparent;
    border: 0;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.82rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-muted);
    cursor: pointer;
}

.auth-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-primary);
}

.auth-options a,
.auth-back-link a {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;
}

.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 0 24px;
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    background: linear-gradient(100deg, #6540e8, #8b3ee0 55%, #e43fa6);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 14px 28px rgba(117, 70, 232, 0.22);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.btn-auth:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(117, 70, 232, 0.29);
}

.auth-back-link {
    margin-top: 25px;
    text-align: center;
}

.auth-panel-footer {
    margin-top: 18px;
    color: #9b9eae;
    font-size: 0.7rem;
    text-align: center;
}

.auth-panel-footer i {
    color: #2ca575;
}

.alert {
    margin-bottom: 20px;
    border-radius: 12px;
    font-size: 0.83rem;
}

@media (max-width: 1199.98px) {
    body {
        padding: 32px;
    }

    .auth-shell {
        grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
        height: calc(100dvh - 64px);
    }

    .auth-visual-copy,
    .auth-brand-desktop,
    .auth-visual-footer {
        left: 30px;
    }

    .auth-visual-copy {
        right: 30px;
    }
}

@media (max-width: 899.98px) {
    body {
        height: auto;
        min-height: 100dvh;
        display: block;
        padding: 16px;
        overflow: auto;
    }

    .auth-shell {
        display: block;
        height: auto;
        min-height: calc(100vh - 32px);
        border-radius: 24px;
    }

    .auth-visual {
        min-height: 210px;
        background-position: center 39%;
    }

    .auth-brand-desktop {
        top: 20px;
        left: 20px;
    }

    .auth-visual-copy {
        right: 20px;
        bottom: 20px;
        left: 20px;
    }

    .auth-visual-copy h2 {
        max-width: 560px;
        margin: 8px 0 0;
        font-size: 1.7rem;
    }

    .auth-visual-copy p,
    .auth-feature-list,
    .auth-visual-footer {
        display: none;
    }

    .auth-panel {
        min-height: calc(100vh - 242px);
        padding: 40px 28px 28px;
    }
}

@media (max-width: 575.98px) {
    body {
        height: auto;
        padding: 0;
        background: #ffffff;
    }

    body::before,
    .auth-visual {
        display: none;
    }

    .auth-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 28px 20px 20px;
    }

    .auth-brand-mobile {
        display: inline-flex;
    }

    .auth-school-name {
        margin-bottom: 18px;
    }

    .auth-heading h1 {
        font-size: 2rem;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
    }
}
