/* =====================================================================
   Auth pages — School Operations Dashboard
   ===================================================================== */

.auth-shell {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(246, 245, 243, 0.92)),
        var(--bg-app);
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1fr);
}

.auth-panel {
    /* Fallback for browsers without image-set()/WebP (~3%): full-size PNG. */
    background:
        linear-gradient(160deg, rgba(90, 22, 32, 0.95) 0%, rgba(122, 31, 43, 0.88) 55%, rgba(42, 38, 40, 0.92) 100%),
        url("/images/school-hero-campus.png");
    /* 123 KB WebP instead of 2.2 MB PNG — every staff login paid for this. */
    background:
        linear-gradient(160deg, rgba(90, 22, 32, 0.95) 0%, rgba(122, 31, 43, 0.88) 55%, rgba(42, 38, 40, 0.92) 100%),
        image-set(
            url("/images/school-hero-campus.webp") type("image/webp"),
            url("/images/school-hero-campus.png") type("image/png")
        );
    background-size: cover;
    background-position: center;
    color: white;
    padding: var(--space-9) var(--space-8);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Scrim only. This used to also carry a repeating-linear-gradient that
       drew a 1px white line every 92px — a leftover from the flat-colour
       panel it replaced. Over a photograph it reads as render noise or a
       cracked screen, not as texture, so it is gone. */
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.22));
    pointer-events: none;
}
.auth-panel::before {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.28));
    pointer-events: none;
}

.auth-panel__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    color: white;
    text-decoration: none;
    position: relative;
    z-index: 2;
}
.auth-panel__brand:hover { color: white; }
.auth-panel__brand-mark {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    font-weight: var(--fw-bold);
    font-size: var(--fs-xl);
    display: inline-flex;
    align-items: center; justify-content: center;
}
.auth-panel__brand-text { font-weight: var(--fw-semibold); font-size: var(--fs-lg); }
.auth-panel__brand-sub {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
}

.auth-panel__hero {
    position: relative;
    z-index: 2;
    max-width: 460px;
}
.auth-panel__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 var(--space-3);
    margin-bottom: var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.auth-panel__hero h2 {
    color: white;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    margin-bottom: var(--space-3);
    font-weight: var(--fw-bold);
    max-width: 560px;
}
.auth-panel__hero p {
    color: rgba(255,255,255,0.85);
    font-size: var(--fs-md);
    line-height: var(--lh-loose);
    margin: 0;
}

.auth-panel__features {
    position: relative;
    z-index: 2;
    display: grid;
    gap: var(--space-3);
    max-width: 460px;
}
.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    font-size: var(--fs-sm);
    color: rgba(255,255,255,0.92);
}
.auth-feature__dot {
    width: 24px; height: 24px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.2);
    color: white;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center; justify-content: center;
    font-weight: var(--fw-bold);
    font-size: 13px;
    margin-top: 1px;
}

.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-5);
    overflow-y: auto;
}
.auth-form {
    width: 100%;
    max-width: 470px;
    padding: var(--space-7);
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-lg);
}
.auth-form__header { margin-bottom: var(--space-6); }
.auth-form__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 var(--space-3);
    margin-bottom: var(--space-3);
    border: 1px solid var(--color-primary-100);
    border-radius: var(--radius-pill);
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.auth-form h1 {
    color: var(--text-strong);
    font-size: var(--fs-4xl);
    margin: 0 0 var(--space-1);
    font-weight: var(--fw-bold);
}
.auth-form p.subtitle {
    color: var(--text-muted);
    margin: 0;
    font-size: var(--fs-base);
}
.login-form {
    display: grid;
    gap: var(--space-4);
}
.login-form .form-group { margin-bottom: 0; }
.auth-form .btn-primary {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    font-size: var(--fs-md);
    margin-top: var(--space-2);
    box-shadow: 0 12px 22px -14px rgba(122, 31, 43, 0.9);
}

.demo-login-group {
    margin-top: var(--space-7);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border-subtle);
}
.demo-login-group__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.demo-login-group__label {
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    color: var(--text-strong);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-1);
}
.demo-login-group__header p {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--fs-xs);
}
.demo-login-list {
    display: grid;
    gap: var(--space-2);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.demo-login {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    width: 100%;
    min-height: 74px;
    padding: var(--space-3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-canvas);
    color: var(--text-strong);
    text-align: left;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
    font-family: inherit;
    font-size: var(--fs-sm);
}
.demo-login:hover {
    border-color: var(--color-primary-300);
    background: var(--color-primary-50);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.demo-login__title { font-weight: var(--fw-semibold); color: var(--text-strong); }
.demo-login__meta  { font-size: var(--fs-xs); color: var(--text-muted); }
.demo-login .badge {
    flex-shrink: 0;
    margin-top: 1px;
}
.demo-login__hint {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin: var(--space-3) 0 0;
}

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-panel { display: none; }
    .auth-form-wrap { min-height: 100vh; }
}

@media (max-width: 560px) {
    .auth-form-wrap {
        align-items: stretch;
        padding: var(--space-4);
    }
    .auth-form {
        max-width: none;
        padding: var(--space-5);
        border-radius: var(--radius-md);
    }
    .demo-login-list { grid-template-columns: 1fr; }
}
