:root {
    color: #0f172a;
    background: #071a15;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
}

button,
input {
    font: inherit;
}

.login-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background-color: #071a15;
    background-image: url("school-login-background.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.login-page__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 18, 14, 0.78) 0%, rgba(3, 18, 14, 0.42) 48%, rgba(3, 18, 14, 0.08) 100%);
}

.login-page__content {
    position: relative;
    display: flex;
    min-height: 100vh;
    align-items: center;
    padding: 2rem clamp(1.25rem, 8vw, 8rem);
}

.login-card {
    width: 100%;
    min-width: 0;
    max-width: 430px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 1.75rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.school-logo {
    display: block;
    width: auto;
    max-width: 210px;
    height: 44px;
    object-fit: contain;
    object-position: left center;
}

h1 {
    margin: 2.25rem 0 0;
    color: #020617;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.25rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.login-form {
    display: grid;
    gap: 1.25rem;
    margin-top: 2rem;
}

.form-field {
    display: block;
}

.form-field > span:first-child {
    display: block;
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
}

.form-field input {
    width: 100%;
    height: 3.25rem;
    padding: 0 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    outline: none;
    background: #fff;
    color: #0f172a;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-field input:focus {
    border-color: #166534;
    box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.12);
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: grid;
    width: 3rem;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 0 0.75rem 0.75rem 0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.password-toggle:hover {
    background: #f1f5f9;
    color: #065f46;
}

.password-toggle:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 4px rgba(6, 95, 70, 0.15);
}

.eye-icon {
    width: 20px;
    height: 20px;
}

.eye-icon--hide,
.password-toggle.is-visible .eye-icon--show {
    display: none;
}

.password-toggle.is-visible .eye-icon--hide {
    display: block;
}

.field-error {
    margin: -0.8rem 0 0;
    color: #b91c1c;
    font-size: 0.78rem;
    line-height: 1.25rem;
}

.login-alert {
    margin: 0;
    padding: 0.75rem 1rem;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.submit-button {
    display: flex;
    width: 100%;
    height: 3.25rem;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    border: 0;
    border-radius: 0.75rem;
    outline: none;
    background: #022c22;
    box-shadow: 0 10px 25px rgba(18, 60, 52, 0.2);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.submit-button:hover:not(:disabled) {
    background: #064e3b;
}

.submit-button:focus-visible {
    box-shadow: 0 0 0 4px rgba(6, 78, 59, 0.2), 0 10px 25px rgba(18, 60, 52, 0.2);
}

.submit-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.admission-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    margin-top: 1rem;
}

.admission-links--single {
    grid-template-columns: 1fr;
}

.admission-links a {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d7e2dc;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.72);
    color: #065f46;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.05rem;
    text-align: center;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.admission-links a:hover {
    border-color: #86b9a4;
    background: #f0fdf4;
}

.admission-links a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(22, 101, 52, 0.12);
}

@media (max-width: 639px) {
    .login-page {
        background-position: 63% center;
    }

    .login-page__content {
        padding: 2rem 1.25rem;
    }

    .login-card {
        width: calc(100vw - 2.5rem);
        max-width: none;
        padding: 1.75rem;
    }

    .login-form,
    .form-field,
    .password-field {
        min-width: 0;
    }

    .admission-links {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 680px) {
    .login-page__content {
        align-items: flex-start;
    }

    .login-card {
        margin: auto 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
