* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2e73ce;
    --primary-dark: #174f9c;
    --primary-light: #eaf4ff;
    --success: #239447;
    --danger: #d93636;
    --text: #243447;
    --muted: #667788;
    --border: #d7e4f2;
    --surface: #ffffff;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    color: var(--text);

    font-family:
        "Segoe UI",
        Tahoma,
        Geneva,
        Verdana,
        Arial,
        sans-serif;

    background:
        radial-gradient(
            circle at top left,
            rgba(255, 255, 255, 0.95),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #e8f5ff 0%,
            #f7fbff 48%,
            #fff3cc 100%
        );

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

.login-page {
    width: min(1120px, 94%);
    min-height: 650px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    margin: auto;
    padding: 32px 0;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 32px;

    background: rgba(255, 255, 255, 0.92);

    box-shadow:
        0 24px 65px rgba(38, 80, 125, 0.2);
}

.brand-panel {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: clamp(32px, 5vw, 65px);

    overflow: hidden;

    color: white;

    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(255, 255, 255, 0.22),
            transparent 27%
        ),
        linear-gradient(
            145deg,
            #1e5ca8,
            #3f92e5
        );
}

.brand-panel::before,
.brand-panel::after {
    content: "";

    position: absolute;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.08);
}

.brand-panel::before {
    width: 280px;
    height: 280px;

    right: -130px;
    top: -90px;
}

.brand-panel::after {
    width: 230px;
    height: 230px;

    left: -110px;
    bottom: -80px;
}

.brand-content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 440px;

    text-align: center;
}

.school-logo {
    width: 112px;
    height: 112px;

    margin-bottom: 22px;

    object-fit: contain;

    border: 5px solid rgba(255, 255, 255, 0.75);
    border-radius: 24px;

    background: white;

    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
}

.brand-label {
    margin-bottom: 8px;

    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.7px;
}

.brand-content h1 {
    margin-bottom: 10px;

    font-size: clamp(40px, 5vw, 60px);
    font-weight: 800;
    line-height: 1.1;
}

.brand-description {
    margin-bottom: 40px;

    font-size: 21px;
    font-weight: 500;
}

.feature-list {
    display: grid;
    gap: 14px;

    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 14px 17px;

    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 17px;

    background: rgba(255, 255, 255, 0.12);
}

.feature-item span {
    flex-shrink: 0;

    font-size: 28px;
}

.feature-item p {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: clamp(28px, 5vw, 65px);
}

.login-card {
    width: 100%;
    max-width: 430px;
}

.login-heading {
    margin-bottom: 33px;

    text-align: center;
}

.login-icon {
    display: block;

    margin-bottom: 8px;

    font-size: 49px;
    line-height: 1;
}

.login-heading h2 {
    margin-bottom: 8px;

    color: var(--primary-dark);

    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
}

.login-heading p {
    color: var(--muted);

    font-size: 16px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 21px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #324a62;

    font-size: 15px;
    font-weight: 700;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 16px;

    transform: translateY(-50%);

    font-size: 20px;

    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    height: 56px;

    padding: 0 52px;

    outline: none;

    border: 2px solid var(--border);
    border-radius: 15px;

    color: var(--text);
    background: #fbfdff;

    font-size: 16px;
    font-weight: 500;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.input-wrapper input::placeholder {
    color: #99a8b5;
}

.input-wrapper input:focus {
    border-color: #60a5e9;
    background: white;

    box-shadow:
        0 0 0 4px rgba(63, 146, 229, 0.14);
}

.input-wrapper input.invalid {
    border-color: var(--danger);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;

    width: 38px;
    height: 38px;

    transform: translateY(-50%);

    border: 0;
    border-radius: 10px;

    background: transparent;

    cursor: pointer;
}

.password-toggle:hover {
    background: #edf5fc;
}

.login-message {
    min-height: 22px;
    margin: -3px 0 15px;

    text-align: center;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.login-message.error {
    color: var(--danger);
}

.login-message.success {
    color: var(--success);
}

.login-button {
    width: 100%;
    min-height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    border: 0;
    border-radius: 15px;

    color: white;

    background:
        linear-gradient(
            135deg,
            #2f80dc,
            #1858ad
        );

    box-shadow:
        0 8px 0 #104584,
        0 13px 26px rgba(27, 94, 166, 0.2);

    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.4px;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow:
        0 10px 0 #104584,
        0 16px 28px rgba(27, 94, 166, 0.24);
}

.login-button:active:not(:disabled) {
    transform: translateY(6px);

    box-shadow:
        0 2px 0 #104584;
}

.login-button:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.spinner {
    width: 21px;
    height: 21px;

    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    border-radius: 50%;

    animation: spinnerRotate 0.75s linear infinite;
}

.hidden {
    display: none;
}

.login-help {
    margin-top: 25px;
    padding: 13px 15px;

    border: 1px solid #dfebf6;
    border-radius: 13px;

    color: var(--muted);
    background: #f7fbff;

    text-align: center;

    font-size: 13px;
    line-height: 1.5;
}

.home-link {
    display: block;

    margin-top: 22px;

    color: var(--primary);

    text-align: center;
    text-decoration: none;

    font-size: 15px;
    font-weight: 700;
}

.home-link:hover {
    text-decoration: underline;
}

footer {
    padding: 18px 20px;

    color: #617080;

    text-align: center;

    font-size: 13px;
    line-height: 1.5;
}

@keyframes spinnerRotate {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 820px) {
    .login-page {
        grid-template-columns: 1fr;

        margin: 20px auto;
    }

    .brand-panel {
        padding: 35px 25px;
    }

    .school-logo {
        width: 85px;
        height: 85px;
    }

    .brand-content h1 {
        font-size: 40px;
    }

    .brand-description {
        margin-bottom: 25px;
    }

    .feature-list {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-page {
        width: 96%;

        margin: 10px auto;

        border-radius: 22px;
    }

    .brand-panel {
        padding: 28px 18px;
    }

    .brand-label {
        font-size: 12px;
    }

    .brand-content h1 {
        font-size: 34px;
    }

    .brand-description {
        margin-bottom: 0;

        font-size: 17px;
    }

    .login-panel {
        padding: 32px 20px;
    }

    .login-heading {
        margin-bottom: 27px;
    }

    .login-heading h2 {
        font-size: 31px;
    }
}