/* TEACHER-PORTAL-3 Part 6 -- Teacher Portal login, visually redesigned to
   match the rest of the Teacher Portal shell (teacher-layout.css's own
   dark/purple `--tp-*`/`--ds-*` tokens), rather than the raw unstyled
   Bootstrap card the page used before. Deliberately reuses the SAME
   custom-property theme every other Teacher Portal page already uses
   (light/dark handled automatically by design-tokens.css), instead of a
   one-off hardcoded palette like parent-login.css/student-login.css. */

body.teacher-login {
    min-height: 100vh;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, var(--tp-accent, #6c4ee3) 0%, #241a4d 100%);
    font-family: 'Nunito', system-ui, sans-serif;
}

.teacher-login__card {
    max-width: 420px;
    width: 100%;
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    background: var(--tp-surface);
    color: var(--tp-text);
}

.teacher-login__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif;
    font-weight: 800;
    color: var(--tp-accent);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
}
.teacher-login__brand:hover,
.teacher-login__brand:focus-visible {
    color: var(--tp-text);
}

.teacher-login__portal-label {
    display: block;
    font-size: var(--ds-text-small-size);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tp-text-muted);
    margin-bottom: 1rem;
}

.teacher-login__heading {
    font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif;
    font-weight: 800;
    color: var(--tp-text);
}

.teacher-login__card .text-muted { color: var(--tp-text-muted) !important; }

.teacher-login__card .form-label { color: var(--tp-text); font-weight: 600; }

.teacher-login__card .form-control {
    background: var(--tp-surface-alt);
    border: 1px solid var(--tp-border);
    color: var(--tp-text);
}
.teacher-login__card .form-control:focus {
    background: var(--tp-surface-alt);
    color: var(--tp-text);
    border-color: var(--tp-accent);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--tp-accent) 25%, transparent);
}
.teacher-login__card .form-control::placeholder { color: var(--tp-text-muted); }

.teacher-login__submit {
    background-color: var(--tp-accent);
    border-color: var(--tp-accent);
    color: var(--tp-accent-contrast);
    font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.65rem 1.5rem;
}
.teacher-login__submit:hover,
.teacher-login__submit:focus-visible {
    filter: brightness(1.08);
    color: var(--tp-accent-contrast);
}

.teacher-login__back {
    display: inline-block;
    margin-top: 1.25rem;
    color: var(--tp-text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}
.teacher-login__back:hover,
.teacher-login__back:focus-visible {
    color: var(--tp-accent);
    text-decoration: underline;
}

.teacher-login__error {
    background: var(--ds-color-danger-surface, #fdecea);
    color: var(--ds-color-danger-text, #7a1f16);
    border: 1px solid var(--ds-color-danger, #d33);
    border-radius: 12px;
}

@media (max-width: 420px) {
    .teacher-login__card { border-radius: 18px; }
    body.teacher-login { padding: 1rem; }
}
