/* ==========================================================================
   reader_auth.css — cosmic sign-in skin for /login and /student/login
   Restyles the existing student-auth markup without touching form logic.
   ========================================================================== */

:root {
    --rj-bg: #070b1c;
    --rj-bg-2: #0b1026;
    --rj-line: rgba(255, 255, 255, 0.12);
    --rj-text: #eef2ff;
    --rj-muted: #98a3c9;
    --rj-gold: #f8b84e;
    --rj-gold-2: #ffd479;
    --rj-font: 'Outfit', 'Noto Sans TC', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--rj-font);
    color: var(--rj-text);
    background:
        radial-gradient(1200px 700px at 80% -10%, rgba(124, 92, 255, 0.35), transparent 60%),
        radial-gradient(900px 600px at 5% 110%, rgba(248, 184, 78, 0.22), transparent 60%),
        linear-gradient(160deg, #070b1c, #0b1026 55%, #050814);
    min-height: 100vh;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 70% 15%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 40% 75%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 85% 65%, rgba(255,255,255,0.35), transparent),
        radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.3), transparent);
    opacity: 0.55;
}

/* ------------------------------------------------------------- shell layout */
.student-shell,
.student-main,
.student-container {
    position: relative;
    z-index: 1;
    max-width: none;
}

.student-header--auth { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.student-header-side { display: none; }
.student-header-slogan { color: var(--rj-muted); font-size: 0.8rem; letter-spacing: 0.04em; }

.student-main {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.student-container { width: 100%; max-width: 980px; margin: 0 auto; }

.student-auth-panel {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 1.2rem;
    align-items: stretch;
    width: 100%;
}
.student-auth-panel .student-auth-card:only-child,
.student-auth-panel > .student-auth-card:first-child:last-child {
    grid-column: 1 / -1;
    max-width: 440px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------- hero */
.student-auth-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.7rem;
    padding: 2rem 2.2rem;
    border-radius: 1.6rem;
    border: 1px solid var(--rj-line);
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(124, 92, 255, 0.35), transparent 55%),
        linear-gradient(150deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    box-shadow: 0 30px 80px -50px rgba(0,0,0,0.9);
    position: relative;
    overflow: hidden;
}
.student-auth-hero::after {
    content: "";
    position: absolute;
    right: -3rem; bottom: -4rem;
    width: 14rem; height: 14rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(248,184,78,0.28), transparent 70%);
}
.student-auth-hero-school {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.15;
}
.student-auth-hero-tagline {
    color: var(--rj-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 26rem;
}
.student-auth-hero-kicker {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rj-gold-2);
    border: 1px solid rgba(248, 184, 78, 0.4);
    background: rgba(248, 184, 78, 0.1);
    text-decoration: none;
}

/* --------------------------------------------------------------------- card */
.student-auth-card {
    padding: 1.8rem 1.7rem;
    border-radius: 1.6rem;
    border: 1px solid var(--rj-line);
    background: rgba(12, 17, 40, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 80px -50px rgba(0,0,0,0.95);
    color: var(--rj-text);
}

.student-auth-heading {
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    margin: 0.4rem 0 0.6rem;
    color: var(--rj-text);
}

.student-auth-card .text-muted,
.student-auth-card .form-text,
.student-auth-card small { color: var(--rj-muted) !important; }

.student-auth-card a { color: var(--rj-gold-2); text-decoration: none; }
.student-auth-card a:hover { color: #fff; }

/* --------------------------------------------------------------- form fields */
.student-auth-card .form-label,
.student-auth-card label { color: var(--rj-muted); font-size: 0.78rem; letter-spacing: 0.03em; }

.student-auth-card .form-control,
.student-auth-card .form-select {
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid var(--rj-line);
    color: var(--rj-text);
    border-radius: 0.75rem;
    padding: 0.62rem 0.85rem;
    font-size: 0.92rem;
    font-family: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.student-auth-card .form-control-lg { padding: 0.7rem 0.9rem; font-size: 1rem; }
.student-auth-card .form-control::placeholder { color: rgba(152, 163, 201, 0.7); }
.student-auth-card .form-control:focus,
.student-auth-card .form-select:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(248, 184, 78, 0.7);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(248, 184, 78, 0.16);
    outline: none;
}
.student-auth-card .form-select option { background: #0b1026; color: #eef2ff; }
.student-auth-card input:-webkit-autofill {
    -webkit-text-fill-color: #eef2ff;
    box-shadow: 0 0 0 40px #121933 inset;
}

/* ----------------------------------------------------------------- buttons */
.student-auth-card .btn,
.student-auth-card .btn-primary {
    background: linear-gradient(135deg, #f8b84e, #ff9f45);
    border: 0;
    color: #241300;
    font-weight: 800;
    border-radius: 0.8rem;
    padding: 0.7rem 1rem;
    letter-spacing: 0.01em;
    box-shadow: 0 16px 36px -18px rgba(248, 184, 78, 0.85);
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.student-auth-card .btn:hover,
.student-auth-card .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 44px -18px rgba(248, 184, 78, 0.95);
    color: #241300;
}
.student-auth-card .btn-outline-primary,
.student-auth-card .btn-outline-secondary,
.student-auth-card .btn-light {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--rj-line);
    color: var(--rj-text);
    box-shadow: none;
}

/* ------------------------------------------------------------------ alerts */
.student-auth-card .alert {
    border-radius: 0.8rem;
    border: 1px solid var(--rj-line);
    font-size: 0.84rem;
    padding: 0.65rem 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--rj-text);
}
.student-auth-card .alert-danger {
    border-color: rgba(255, 107, 107, 0.45);
    background: rgba(255, 107, 107, 0.12);
    color: #ffc0c0;
}
.student-auth-card .alert-success {
    border-color: rgba(57, 211, 165, 0.45);
    background: rgba(57, 211, 165, 0.12);
    color: #a9f2da;
}
.student-auth-card .alert-info {
    border-color: rgba(78, 168, 255, 0.4);
    background: rgba(78, 168, 255, 0.12);
    color: #bcdcff;
}

/* ------------------------------------------------------------- auth helpers */
.student-auth-card .nav-pills,
.student-auth-card .nav-tabs { border: 0; gap: 0.4rem; }
.student-auth-card .nav-pills .nav-link {
    border-radius: 999px;
    color: var(--rj-muted);
    font-size: 0.8rem;
    padding: 0.38rem 0.85rem;
    border: 1px solid var(--rj-line);
    background: rgba(255, 255, 255, 0.04);
}
.student-auth-card .nav-pills .nav-link.active {
    background: rgba(248, 184, 78, 0.18);
    color: var(--rj-gold-2);
    border-color: rgba(248, 184, 78, 0.5);
}
.student-auth-card hr { border-color: var(--rj-line); opacity: 1; }
.student-auth-card .badge { background: rgba(255,255,255,0.08) !important; color: var(--rj-text) !important; font-weight: 600; }
.student-auth-card .visually-hidden { position: absolute !important; }
.student-auth-card .list-group-item {
    background: transparent;
    border-color: var(--rj-line);
    color: var(--rj-text);
}

/* Brand partial sits at the top of the card. */
.student-auth-card img { filter: drop-shadow(0 8px 20px rgba(0,0,0,0.5)); }

@media (max-width: 820px) {
    .student-auth-panel { grid-template-columns: 1fr; }
    .student-auth-hero { padding: 1.3rem 1.4rem; }
    .student-auth-hero-tagline { font-size: 0.84rem; }
    .student-auth-card { padding: 1.4rem 1.2rem; }
}

/* The app shell sets its own font + dark-on-light text on body.student-app;
   beat that specificity on auth screens only. */
body.student-app {
    font-family: var(--rj-font);
    color: var(--rj-text);
}
body.student-app .student-auth-card,
body.student-app .student-auth-card p,
body.student-app .student-auth-card span,
body.student-app .student-auth-card div,
body.student-app .student-auth-card label,
body.student-app .student-auth-hero,
body.student-app .student-auth-hero * {
    color: var(--rj-text);
}
body.student-app .student-auth-card .text-muted,
body.student-app .student-auth-hero-tagline { color: var(--rj-muted) !important; }
body.student-app .student-auth-heading { color: var(--rj-text); }

/* The base app paints a bright blue gradient on the auth shell and caps the
   panel at 460px; replace both with the cosmic canvas + two-column panel. */
.student-shell--auth,
.student-shell--auth:not(.auth-layout) {
    background: transparent !important;
    min-height: 100vh;
}
.student-auth-panel { max-width: 980px; margin: 0 auto; }
.student-shell--auth .student-main,
.student-shell--auth:not(.auth-layout) .student-main {
    background: transparent;
    min-height: 100vh;
}
