/* =========================
   SchoolPixels — Auth pages theme
   Shared by: index.php, parent_login.php, student_login.php,
   student_login.php, forgot_password.php, library/login.php
   Keep one copy so every sign-in screen stays visually identical --
   edit here, not per-page.
   ========================= */
:root {
    --main-bg: linear-gradient(135deg, #2c3e50, #4ca1af);
    --card-bg: rgba(255, 255, 255, 0.22);
    --card-border: rgba(255, 255, 255, 0.18);

    --input-bg: #f5f7fa;
    --input-border: #6a82fb;
    --text: #ffffff;
    --muted: rgba(255,255,255,0.78);

    --radius: 22px;
    --shadow: 0 14px 44px rgba(0,0,0,0.24);
    --nav-h: 56px;
}

* { box-sizing: border-box; }

body.auth-theme-page {
    margin: 0;
    background: var(--main-bg);
    font-family: 'Nunito', Arial, sans-serif;
    min-height: 100vh;
    color: var(--text);
    display: grid;
    place-items: center;
    padding-top: var(--nav-h);
}

body.auth-theme-page main {
    width: 100%;
    padding: 26px 14px;
    display: grid;
    place-items: center;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.2rem 2.5rem 2rem;
    width: 500px;
    max-width: 96vw;
    min-height: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    backdrop-filter: blur(10px);
}

@media (max-width: 520px) {
    .auth-card {
        padding: 1.2rem 0.9rem 1.1rem;
        width: 99vw;
        min-height: unset;
    }
}

/* -- Top navbar -- */
.top-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(25, 44, 56, .80);
    backdrop-filter: blur(14px) saturate(1.5);
    border-bottom: 1px solid rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    padding: 0 1.2rem;
    z-index: 200;
    gap: .8rem;
}
.nav-brand {
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -.02em;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
    font-family: 'Nunito', Arial, sans-serif;
}
.nav-brand .brand-pixels {
    background: linear-gradient(90deg, #6a82fb, #00c0fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-left: auto;
}
.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .27rem .72rem;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 700;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    transition: background .15s, color .15s;
    border: 1px solid transparent;
}
.nav-links a:hover {
    background: rgba(255,255,255,.13);
    border-color: rgba(255,255,255,.18);
    color: #fff;
}
.nav-links a i { font-size: .85em; }

/* Header */
.login-header {
    text-align: center;
    margin-top: 5rem;
    margin-bottom: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.favicon-container {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(44,62,80,0.14);
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 14px 34px rgba(0,0,0,0.16);
    margin-bottom: 10px;
    overflow: hidden;
}

.favicon-container img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: block;
}

.login-header h2 {
    font-size: 2.1em;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.brand-chip {
    font-size: 1.05em;
    margin-top: 0.6rem;
    margin-bottom: 0.2rem;
    background: linear-gradient(45deg, #edc68fff 0%, #8a7958ff 100%);
    color: #202021ff;
    border-radius: 10px;
    padding: 0.55em 1.05em;
    font-weight: 800;
    display: inline-block;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    line-height: 1.2;
}

/* Form */
.auth-theme-page .form-label {
    color: var(--text);
    font-weight: 700;
    margin-bottom: .35em;
}

.auth-theme-page .input-group-text {
    background: #232b3a;
    border: 1px solid var(--input-border);
    color: #6a82fb;
    border-radius: 12px 0 0 12px;
}

.auth-theme-page .form-control,
.auth-theme-page .form-select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: #232b3a;
    border-left: 0;
    border-radius: 0 12px 12px 0;
    font-size: 1.05em;
    font-weight: 700;
    padding-top: 0.82rem;
    padding-bottom: 0.82rem;
}

.auth-theme-page .form-control:not(.input-group .form-control) {
    border-left: 1px solid var(--input-border);
    border-radius: 12px;
}

/* No visible change on click/focus -- same border, no glow ring */
.auth-theme-page .form-control:focus,
.auth-theme-page .form-select:focus {
    border-color: var(--input-border);
    box-shadow: none;
    outline: none;
}

.auth-theme-page .pw-toggle {
    border: 1px solid var(--input-border) !important;
    border-left: 0 !important;
    border-radius: 0 12px 12px 0 !important;
    background: #f5f7fa !important;
    color: #232b3a !important;
}

.auth-theme-page .pw-toggle:focus,
.auth-theme-page .pw-toggle:active,
.auth-theme-page .pw-toggle:hover {
    box-shadow: none !important;
    border-color: var(--input-border) !important;
    background: #f5f7fa !important;
    color: #232b3a !important;
}

/* Quick links -- portal switcher badges inside the card */
.quick-links {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 14px;
    z-index: 2;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.quick-links::-webkit-scrollbar {
    display: none;
}

.quick-links .qbadge {
    font-size: 0.89rem;
    font-weight: 800;
    border-radius: 10px;
    padding: 0.45em 0.75em;
    box-shadow: 0 10px 26px rgba(0,0,0,0.14);
    text-decoration: none !important;
    transition: transform 0.13s ease, box-shadow 0.13s ease, filter 0.13s ease;
    border: 1px solid rgba(255,255,255,0.14);
    letter-spacing: 0.005em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    flex: 0 0 auto;
    backdrop-filter: blur(8px);
}

/* Same palette as the buttons/links below -- one color per portal */
.qbadge-home     { background: #2370ff; color: #fff; }
.qbadge-library  { background: #ffd600; color: #232b3a; }
.qbadge-scheduler{ background: #119a5a; color: #fff; }
.qbadge-students { background: #00c0fa; color: #fff; }
.qbadge-parents  { background: #fc5c7d; color: #fff; }
.qbadge-guide    { background: #7c3aed; color: #fff; }

.quick-links .qbadge:hover,
.quick-links .qbadge:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0,0,0,0.18);
    filter: brightness(1.02);
}

@media (max-width: 520px) {
    .login-header {
        margin-top: 4.3rem;
    }

    .quick-links {
        left: 10px;
        right: 10px;
        gap: 0.4rem;
        justify-content: flex-start;
    }

    .quick-links .qbadge {
        font-size: 0.82rem;
        padding: 0.4em 0.66em;
    }
}

/* Primary action button */
.btn-auth {
    background: linear-gradient(90deg, #6a82fb 0%, #fc5c7d 100%);
    border: none;
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.02em;
    border-radius: 12px;
    font-size: 1.10rem;
    padding: 0.88rem 1rem;
    width: 100%;
    margin-top: 1.1em;
    box-shadow: 0 14px 34px rgba(106, 130, 251, 0.16);
    transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.btn-auth:hover,
.btn-auth:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 44px rgba(106, 130, 251, 0.22);
    filter: brightness(1.02);
}

.forgot-link {
    color: orange;
    font-size: 1.03em;
    text-decoration: none;
    font-weight: 700;
}

.forgot-link:hover {
    text-decoration: underline;
    color: #fff2b0;
}

.auth-theme-page .footer {
    margin-top: 1.8rem;
    font-weight: 600;
    color: #ddd;
    text-align: center;
    font-size: 1.01rem;
    letter-spacing: 0.01em;
}

.auth-theme-page .footer a {
    color: orange;
    text-decoration: none;
    font-weight: 800;
}

.auth-theme-page .footer a:hover { text-decoration: underline; }

.auth-theme-page .error,
.auth-theme-page .alert-danger,
.auth-theme-page .alert-info {
    padding: 0.8em 1em;
    border-radius: 12px;
    margin-bottom: 1em;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 12px 26px rgba(0,0,0,0.10);
    border: 1px solid rgba(255,255,255,0.12);
}
.auth-theme-page .error,
.auth-theme-page .alert-danger {
    background: #dc3545;
    color: #fff;
}
.auth-theme-page .alert-info {
    background: rgba(35, 43, 58, 0.85);
    color: #fff;
}
.auth-theme-page .alert-danger .btn-close,
.auth-theme-page .alert-info .btn-close {
    filter: invert(1) grayscale(1) brightness(2);
}

/* Toasts */
.toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1080;
}

.auth-theme-page .toast {
    min-width: 260px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(35, 43, 58, 0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 45px rgba(0,0,0,0.22);
}

.auth-theme-page .toast .toast-body {
    font-weight: 700;
    color: #fff;
}

/* A11y focus */
.auth-theme-page :where(a, button, .form-check-input):focus-visible {
    outline: 2.5px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

/* Text fields never show a focus ring/outline, on click or keyboard */
.auth-theme-page :where(input, .form-control):focus,
.auth-theme-page :where(input, .form-control):focus-visible {
    outline: none;
    box-shadow: none;
}

/* ============================================================
   SchoolPixels Auth Experience v3 ? precision learning workspace
   ============================================================ */

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 180ms;
    animation-timing-function: cubic-bezier(.2, .8, .2, 1);
}

body.auth-theme-page {
    --auth-ink: #081426;
    --auth-ink-soft: #11213a;
    --auth-cobalt: #4f46e5;
    --auth-cobalt-strong: #4338ca;
    --auth-mint: #10b981;
    --auth-surface: rgba(255, 255, 255, .97);
    --auth-border: rgba(255, 255, 255, .14);
    min-height: 100svh;
    padding-top: 72px;
    overflow-x: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 14% 16%, rgba(79, 70, 229, .24), transparent 30rem),
        radial-gradient(circle at 88% 84%, rgba(16, 185, 129, .16), transparent 28rem),
        linear-gradient(145deg, #07111f 0%, #0a1830 48%, #0b1d36 100%) !important;
    font-family: Manrope, Nunito, "Segoe UI", sans-serif;
}

body.auth-theme-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    opacity: .28;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

body.auth-theme-page::after {
    content: "";
    position: fixed;
    width: min(48vw, 680px);
    aspect-ratio: 1;
    top: 12%;
    left: 7%;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .07);
    box-shadow:
        0 0 0 64px rgba(255, 255, 255, .018),
        0 0 0 128px rgba(255, 255, 255, .012);
}

body.auth-theme-page main {
    min-height: calc(100svh - 72px);
    padding: clamp(1.25rem, 3vw, 3rem);
    align-items: center;
}

.top-nav {
    height: 72px;
    padding-inline: clamp(1.25rem, 4vw, 4.5rem);
    background: rgba(7, 17, 31, .76);
    border-bottom-color: rgba(255, 255, 255, .09);
    backdrop-filter: blur(22px) saturate(1.35);
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    font-family: Manrope, Nunito, sans-serif;
    font-size: 1rem;
    letter-spacing: -.035em;
}

.nav-brand > img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(79, 70, 229, .28);
}

.nav-brand .brand-pixels {
    background: linear-gradient(100deg, #8da0ff, #55e0bf);
    -webkit-background-clip: text;
    background-clip: text;
}

.nav-note {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: rgba(255, 255, 255, .58);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .015em;
}

.nav-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--auth-mint);
    box-shadow: 0 0 0 5px rgba(16, 185, 129, .1);
}

.auth-shell {
    width: min(1180px, 100%);
    margin-inline: auto;
}

.auth-shell--home {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 6.5rem);
}

.auth-story {
    max-width: 660px;
    color: #fff;
    padding: clamp(1rem, 3vw, 2.5rem);
}

.auth-story-badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.5rem;
    padding: .48rem .72rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .065);
    color: rgba(255, 255, 255, .78);
    backdrop-filter: blur(12px);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.auth-story h1 {
    margin: 0 0 1.25rem;
    max-width: 12ch;
    font-size: clamp(3rem, 6vw, 5.9rem);
    font-weight: 900;
    line-height: .96;
    letter-spacing: -.072em;
    text-wrap: balance;
}

.auth-story h1 span {
    color: transparent;
    background: linear-gradient(100deg, #90a2ff 8%, #55e0bf 88%);
    -webkit-background-clip: text;
    background-clip: text;
}

.auth-story > p {
    max-width: 56ch;
    margin: 0;
    color: rgba(255, 255, 255, .66);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.7;
}

.auth-story-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .7rem;
    margin-top: 2rem;
}

.auth-story-points > div {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: start;
    gap: .65rem;
    min-width: 0;
    padding: .85rem;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 16px;
    background: rgba(255, 255, 255, .045);
}

.auth-story-points i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(79, 70, 229, .15);
    color: #9cafff;
}

.auth-story-points span {
    color: rgba(255, 255, 255, .48);
    font-size: .68rem;
    line-height: 1.45;
}

.auth-story-points strong {
    display: block;
    margin-bottom: .16rem;
    color: rgba(255, 255, 255, .9);
    font-size: .76rem;
}

.auth-story-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.35rem;
    color: rgba(255, 255, 255, .34);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-story-foot span:not(:last-child)::after {
    content: "?";
    margin-left: 1rem;
    color: rgba(255, 255, 255, .18);
}

.auth-card {
    color: #111b2e;
    background: var(--auth-surface);
    border-color: rgba(255, 255, 255, .5);
    box-shadow: 0 32px 90px rgba(0, 0, 0, .32), inset 0 1px 0 #fff;
    backdrop-filter: blur(28px) saturate(1.2);
}

.auth-card--home {
    width: 100%;
    max-width: 520px;
    min-height: 0;
    justify-self: end;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border-radius: 28px;
}

.auth-card--home .login-header {
    align-items: flex-start;
    margin: 0 0 1.45rem;
    text-align: left;
}

.auth-card--home .favicon-container {
    width: 52px;
    height: 52px;
    margin-bottom: 1rem;
    border-radius: 15px;
    border-color: rgba(79, 70, 229, .14);
    background: #f2f5ff;
    box-shadow: none;
}

.auth-card--home .favicon-container img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.auth-eyebrow {
    margin: 0 0 .36rem;
    color: var(--auth-cobalt-strong);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.login-header h2,
.auth-card--home .login-header h2 {
    color: #0b1629;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    letter-spacing: -.045em;
}

.login-subtitle {
    margin: .3rem 0 0;
    color: #647087;
    font-size: .88rem;
    line-height: 1.55;
}

.auth-theme-page .form-label {
    color: #27344a;
    font-size: .78rem;
    font-weight: 800;
}

.auth-theme-page .input-group {
    border-radius: 13px;
    transition: box-shadow .18s ease, transform .18s ease;
}

.auth-theme-page .input-group:focus-within {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .13);
}

.auth-theme-page .input-group-text {
    min-width: 48px;
    justify-content: center;
    color: #71809a;
    background: #f5f7fb;
    border-color: #dbe1ec;
    border-radius: 13px 0 0 13px;
}

.auth-theme-page .form-control,
.auth-theme-page .form-select {
    min-height: 50px;
    color: #111b2e;
    background: #fff;
    border-color: #dbe1ec;
    font-size: .92rem;
    font-weight: 650;
}

.auth-theme-page .form-control:focus,
.auth-theme-page .form-select:focus {
    border-color: var(--auth-cobalt);
    box-shadow: none;
}

.auth-theme-page .form-control::placeholder {
    color: #9aa5b7;
    font-weight: 550;
}

.auth-theme-page .pw-toggle,
.auth-theme-page .pw-toggle:hover,
.auth-theme-page .pw-toggle:focus-visible {
    min-width: 48px;
    color: #71809a !important;
    background: #fff !important;
    border-color: #dbe1ec !important;
}

.btn-auth {
    min-height: 50px;
    margin-top: 1.15rem;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--auth-cobalt), var(--auth-cobalt-strong));
    box-shadow: 0 14px 28px rgba(52, 81, 236, .22);
    font-size: .94rem;
    letter-spacing: -.01em;
}

.btn-auth:hover,
.btn-auth:focus-visible {
    color: #fff;
    box-shadow: 0 18px 34px rgba(52, 81, 236, .3);
    filter: saturate(1.08);
}

.forgot-link,
.auth-theme-page .footer a {
    color: var(--auth-cobalt-strong);
}

.forgot-link {
    font-size: .78rem;
    font-weight: 800;
}

.forgot-link:hover,
.auth-theme-page .footer a:hover {
    color: #263fca;
}

.portal-switcher {
    margin-top: 1.5rem;
    padding-top: 1.15rem;
    border-top: 1px solid #e7ebf2;
}

.portal-switcher-label {
    display: block;
    margin-bottom: .7rem;
    color: #8a95a7;
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.auth-card--home .quick-links {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
    overflow: visible;
}

.auth-card--home .quick-links .qbadge {
    min-width: 0;
    padding: .65rem .35rem;
    flex-direction: column;
    gap: .28rem;
    border: 1px solid #e4e9f1;
    border-radius: 12px;
    background: #f8f9fc;
    color: #59667b;
    box-shadow: none;
    font-size: .64rem;
}

.auth-card--home .quick-links .qbadge i {
    color: var(--portal-accent, var(--auth-cobalt));
    font-size: 1rem;
}

.auth-card--home .qbadge-library { --portal-accent: #b47a00; }
.auth-card--home .qbadge-scheduler { --portal-accent: #078a67; }
.auth-card--home .qbadge-students { --portal-accent: #3562e9; }
.auth-card--home .qbadge-parents { --portal-accent: #b94b75; }
.auth-card--home .qbadge-guide { --portal-accent: #6d28d9; }

.auth-card--home .quick-links .qbadge:hover,
.auth-card--home .quick-links .qbadge:focus-visible {
    color: #152139;
    background: #fff;
    border-color: color-mix(in srgb, var(--portal-accent, var(--auth-cobalt)) 34%, #e4e9f1);
    box-shadow: 0 10px 24px rgba(19, 35, 63, .08);
}

.auth-theme-page .footer {
    margin-top: 1rem;
    color: #929cab;
    font-size: .68rem;
    font-weight: 650;
}

.auth-theme-page :where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid rgba(79, 70, 229, .42);
    outline-offset: 2px;
}

.auth-theme-page :where(input, .form-control):focus-visible {
    outline: none;
}

@media (max-width: 980px) {
    .auth-shell--home {
        width: min(580px, 100%);
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .auth-story {
        padding: .5rem .25rem;
        text-align: center;
    }

    .auth-story h1 {
        max-width: none;
        margin-inline: auto;
        font-size: clamp(2.5rem, 8vw, 4rem);
    }

    .auth-story > p {
        margin-inline: auto;
    }

    .auth-story-points,
    .auth-story-foot {
        display: none;
    }

    .auth-story-badge {
        margin-bottom: 1rem;
    }

    .auth-card--home {
        justify-self: center;
    }
}

@media (max-width: 560px) {
    body.auth-theme-page {
        padding-top: 64px;
    }

    .top-nav {
        height: 64px;
        padding-inline: 1rem;
    }

    .nav-note {
        display: none;
    }

    body.auth-theme-page main {
        min-height: calc(100svh - 64px);
        padding: 1rem;
        align-items: start;
    }

    .auth-story {
        padding-top: .75rem;
    }

    .auth-story h1 {
        font-size: clamp(2.2rem, 12vw, 3rem);
    }

    .auth-story > p {
        font-size: .88rem;
        line-height: 1.55;
    }

    .auth-card--home {
        padding: 1.25rem;
        border-radius: 22px;
    }

    .auth-card--home .quick-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .auth-card--home .quick-links .qbadge {
        flex-direction: row;
        font-size: .7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }

    .auth-theme-page *,
    .auth-theme-page *::before,
    .auth-theme-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}


.auth-skip-link {
    position: fixed;
    top: .75rem;
    left: .75rem;
    z-index: 5000;
    padding: .68rem .9rem;
    border-radius: 11px;
    background: #fff;
    color: #14213a;
    font-size: .78rem;
    font-weight: 850;
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
    transform: translateY(-160%);
    transition: transform .16s ease;
}

.auth-skip-link:focus {
    color: #14213a;
    transform: translateY(0);
}


/* Keep every role-specific sign-in page in the same visual family. */
.auth-card:not(.auth-card--home) .favicon-container {
    border-color: #e1e7f0;
    background: #f3f5fb;
    box-shadow: none;
}

.auth-card:not(.auth-card--home) .brand-chip {
    color: #4338ca;
    background: #eef1ff;
    border: 1px solid #dfe4ff;
    box-shadow: none;
}

.auth-card:not(.auth-card--home) .quick-links .qbadge {
    border-color: #e4e9f1;
    background: #f8f9fc;
    color: #58667b;
    box-shadow: none;
}

.auth-card:not(.auth-card--home) .qbadge-library i { color: #b47a00; }
.auth-card:not(.auth-card--home) .qbadge-scheduler i { color: #078a67; }
.auth-card:not(.auth-card--home) .qbadge-students i { color: #3562e9; }
.auth-card:not(.auth-card--home) .qbadge-parents i { color: #b94b75; }
.auth-card:not(.auth-card--home) .qbadge-guide i { color: #6d28d9; }

.auth-card:not(.auth-card--home) .quick-links .qbadge:hover,
.auth-card:not(.auth-card--home) .quick-links .qbadge:focus-visible {
    color: #152139;
    background: #fff;
    border-color: #cfd7e5;
    box-shadow: 0 10px 24px rgba(19, 35, 63, .08);
}

/* School-aware identity on the shared login page. */
.nav-brand-copy {
    min-width: 0;
    display: grid;
    gap: .12rem;
    line-height: 1.08;
}

.nav-brand-copy strong {
    max-width: min(42vw, 360px);
    overflow: hidden;
    color: #fff;
    font-size: .83rem;
    font-weight: 800;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-brand-copy small {
    color: rgba(255, 255, 255, .48);
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .105em;
    text-transform: uppercase;
}

.login-school-context {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-top: 1rem;
    padding: .62rem .7rem .62rem .8rem;
    border: 1px solid #e1e6f0;
    border-radius: 13px;
    background: #f6f8fc;
}

.login-school-context label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin: 0;
    color: #5d6a80;
    font-size: .69rem;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.login-school-context label i {
    color: var(--auth-cobalt-strong);
    font-size: .88rem;
}

.auth-theme-page .login-school-context .form-select {
    width: min(62%, 275px);
    min-height: 36px;
    padding-block: .38rem;
    padding-left: .7rem;
    border-color: #d5dce8;
    border-radius: 9px;
    color: #26334a;
    font-size: .74rem;
    font-weight: 750;
}

@media (max-width: 560px) {
    .nav-brand-copy strong {
        max-width: 58vw;
        font-size: .78rem;
    }

    .nav-brand-copy small {
        font-size: .52rem;
    }

    .login-school-context {
        align-items: stretch;
        flex-direction: column;
        gap: .45rem;
    }

    .auth-theme-page .login-school-context .form-select {
        width: 100%;
    }
}
