/* ==========================================================================
   Indigo Nova - authentication & signup screens
   --------------------------------------------------------------------------
   Shared by the staff login, student login, platform login and school signup.
   Depends on the tokens defined in nova.css, so it inherits dark mode.
   ========================================================================== */

body.nova-auth {
    margin: 0;
    font-family: var(--nova-font);
    background: var(--nova-canvas);
    color: var(--nova-text);
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Brand side
   -------------------------------------------------------------------------- */
.auth-brand {
    position: relative;
    flex: 1 1 56%;
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 55%, #5B21B6 100%);
    color: #fff;
    padding: 56px 60px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Soft light bloom so the flat gradient reads as depth rather than a slab. */
.auth-brand-glow {
    position: absolute;
    inset: -30% -10% auto -20%;
    height: 90%;
    background:
        radial-gradient(45% 55% at 25% 30%, rgba(167, 139, 250, .40) 0%, transparent 70%),
        radial-gradient(40% 50% at 75% 15%, rgba(56, 189, 248, .22) 0%, transparent 70%);
    filter: blur(10px);
    pointer-events: none;
}
.auth-brand::after {
    /* fine grid, barely there */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(70% 70% at 40% 40%, #000 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(70% 70% at 40% 40%, #000 0%, transparent 100%);
    pointer-events: none;
}

.auth-brand-inner { position: relative; z-index: 1; max-width: 520px; width: 100%; }

.auth-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
.auth-logo img { max-height: 46px; width: auto; }
.auth-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 13px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(6px);
    font-size: 21px; font-weight: 700;
}

.auth-brand h1 {
    font-size: 38px; font-weight: 750; letter-spacing: -0.035em;
    line-height: 1.1; margin: 0 0 14px; color: #fff;
}
.auth-tagline {
    font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .74);
    margin: 0 0 32px; max-width: 440px;
}

.auth-points { list-style: none; padding: 0; margin: 0; }
.auth-points li {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 0; font-size: 14.5px; color: rgba(255, 255, 255, .82);
}
.auth-points i {
    flex: none;
    width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .16); font-size: 10px;
}

/* Notices ---------------------------------------------------------------- */
.auth-notices h2 {
    font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: rgba(255, 255, 255, .6); margin: 0 0 14px;
}
.auth-notices h2 i { margin-right: 6px; }
.auth-notice-scroll { max-height: 300px; overflow-y: auto; padding-right: 6px; }
.auth-notice {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    padding: 15px 17px;
    margin-bottom: 10px;
    backdrop-filter: blur(6px);
}
.auth-notice h3 { font-size: 15px; font-weight: 620; margin: 0 0 5px; color: #fff; }
.auth-notice p { font-size: 13.5px; line-height: 1.55; color: rgba(255, 255, 255, .72); margin: 0; }
.auth-notice a { color: #C4B5FD; font-weight: 550; }
.auth-notice-scroll::-webkit-scrollbar { width: 5px; }
.auth-notice-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 999px; }

/* --------------------------------------------------------------------------
   Form side
   -------------------------------------------------------------------------- */
.auth-panel {
    position: relative;
    flex: 0 0 480px;
    background: var(--nova-surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 52px;
}
.auth-toggle { position: absolute; top: 22px; right: 24px; margin: 0; }

.auth-card { width: 100%; max-width: 380px; margin: 0 auto; }

.auth-card-head { margin-bottom: 26px; }
.auth-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--nova-accent-soft); color: var(--nova-accent-700);
    font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
    padding: 5px 11px; border-radius: 999px; margin-bottom: 16px;
}
.auth-card-head h2 {
    font-size: 27px; font-weight: 700; letter-spacing: -0.03em;
    margin: 0 0 7px; color: var(--nova-text);
}
.auth-card-head p { font-size: 14px; color: var(--nova-muted); margin: 0; line-height: 1.55; }

.auth-field { margin-bottom: 17px; }
.auth-field > label {
    display: block; font-size: 12.5px; font-weight: 600;
    color: var(--nova-text-soft); margin-bottom: 7px;
}

.auth-input {
    position: relative;
    display: flex; align-items: center;
    background: var(--nova-surface);
    border: 1.5px solid var(--nova-border);
    border-radius: 11px;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.auth-input:focus-within { border-color: var(--nova-accent); box-shadow: 0 0 0 4px var(--nova-accent-soft); }
.auth-input.input-error { border-color: var(--nova-danger); }
.auth-input > i:first-child {
    flex: none; width: 42px; text-align: center;
    color: var(--nova-muted); font-size: 14px;
}
.auth-input input {
    flex: 1 1 auto; min-width: 0;
    border: none; background: transparent; outline: none;
    padding: 12px 14px 12px 0;
    font-size: 14.5px; color: var(--nova-text);
    font-family: inherit;
}
.auth-input input::placeholder { color: var(--nova-muted); opacity: .7; }
.auth-input input:-webkit-autofill {
    -webkit-text-fill-color: var(--nova-text);
    -webkit-box-shadow: 0 0 0 40px var(--nova-surface) inset;
}

.auth-reveal {
    flex: none; border: none; background: transparent; cursor: pointer;
    color: var(--nova-muted); width: 42px; height: 40px; border-radius: 0 10px 10px 0;
}
.auth-reveal:hover { color: var(--nova-accent-600); }

.auth-error { display: block; font-size: 12.5px; color: var(--nova-danger); margin-top: 5px; }
.auth-error:empty { display: none; }

.auth-captcha { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.auth-captcha img { border-radius: 9px; border: 1px solid var(--nova-border); max-height: 44px; }
.auth-refresh {
    border: 1.5px solid var(--nova-border); background: var(--nova-surface);
    color: var(--nova-muted); width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
    transition: color .16s ease, border-color .16s ease;
}
.auth-refresh:hover { color: var(--nova-accent-600); border-color: var(--nova-accent); }

.auth-submit {
    width: 100%;
    border: none;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--nova-accent) 0%, var(--nova-accent-700) 100%);
    color: #fff;
    font-family: inherit; font-size: 15px; font-weight: 620;
    padding: 13px 20px;
    margin-top: 6px;
    cursor: pointer;
    box-shadow: 0 10px 24px -12px var(--nova-accent-glow);
    transition: transform .08s ease, box-shadow .18s ease, filter .18s ease;
}
.auth-submit:hover { filter: brightness(1.07); box-shadow: 0 14px 30px -12px var(--nova-accent-glow); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit i { margin-left: 7px; font-size: 12px; }

.auth-links {
    display: flex; flex-wrap: wrap; gap: 8px 18px;
    margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--nova-border-soft);
}
.auth-links a { font-size: 13px; color: var(--nova-muted); text-decoration: none; }
.auth-links a:hover { color: var(--nova-accent-600); }
.auth-links i { margin-right: 5px; }

.auth-signup {
    margin-top: 14px; font-size: 13.5px; color: var(--nova-muted);
}
.auth-signup a { color: var(--nova-accent-600); font-weight: 600; }

.auth-foot {
    position: absolute; bottom: 20px; left: 0; right: 0;
    text-align: center; font-size: 12px; color: var(--nova-muted);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .auth-panel { flex-basis: 420px; padding: 40px 36px; }
    .auth-brand { padding: 48px 44px; }
    .auth-brand h1 { font-size: 32px; }
}

@media (max-width: 900px) {
    .auth-shell { flex-direction: column; }
    .auth-brand {
        flex: none;
        padding: 40px 28px 34px;
        text-align: center;
        align-items: flex-start;
    }
    .auth-brand-inner { margin: 0 auto; }
    .auth-logo { justify-content: center; margin-bottom: 20px; }
    .auth-brand h1 { font-size: 27px; }
    .auth-tagline { margin-bottom: 0; }
    .auth-points, .auth-notices { display: none; }
    .auth-panel { flex: 1 1 auto; padding: 34px 24px 64px; }
    .auth-toggle { top: -54px; right: 18px; border-color: rgba(255, 255, 255, .3); color: #fff; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-submit, .auth-input { transition: none; }
}

/* Helper text under a field (school code hint) */
.auth-hint { display: block; font-size: 12px; color: var(--nova-muted); margin-top: 5px; }

/* ==========================================================================
   Signup
   ========================================================================== */
body.nova-signup { background: var(--nova-canvas); }

.signup-hero {
    position: relative;
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 55%, #5B21B6 100%);
    color: #fff;
    padding: 34px 24px 96px;
    overflow: hidden;
    text-align: center;
}
.signup-hero::after {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(60% 80% at 50% 20%, #000 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(60% 80% at 50% 20%, #000 0%, transparent 100%);
    pointer-events: none;
}
.signup-hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }

.signup-brand {
    display: inline-flex; align-items: center; gap: 11px;
    color: #fff; text-decoration: none;
    font-size: 16px; font-weight: 650; letter-spacing: -0.02em;
    margin-bottom: 28px;
}
.signup-brand .auth-mark { width: 38px; height: 38px; font-size: 15px; border-radius: 11px; }
.signup-brand:hover, .signup-brand:focus { color: #fff; }

.signup-toggle {
    position: absolute; top: 0; right: 0;
    border-color: rgba(255, 255, 255, .28); color: #fff; margin: 0;
}
.signup-toggle:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .5); color: #fff; }

.signup-hero h1 {
    font-size: 34px; font-weight: 750; letter-spacing: -0.035em;
    margin: 0 0 12px; color: #fff; line-height: 1.15;
}
.signup-hero p { font-size: 16px; color: rgba(255, 255, 255, .74); margin: 0; line-height: 1.6; }

.signup-wrap { max-width: 880px; margin: -68px auto 70px; padding: 0 22px; position: relative; z-index: 2; }

.signup-card {
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: 18px;
    box-shadow: var(--nova-shadow);
    padding: 28px 30px;
    margin-bottom: 18px;
}
.signup-card-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.signup-step {
    flex: none;
    width: 30px; height: 30px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--nova-accent-soft); color: var(--nova-accent-700);
    font-size: 14px; font-weight: 700;
}
.signup-card-head h2 { font-size: 18px; font-weight: 660; margin: 2px 0 3px; letter-spacing: -0.02em; }
.signup-card-head p { font-size: 13.5px; color: var(--nova-muted); margin: 0; }

.signup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.auth-field .req { color: var(--nova-danger); }

.auth-input-area { align-items: flex-start; }
.auth-input-area > i:first-child { margin-top: 12px; }
.auth-input textarea {
    flex: 1 1 auto; min-width: 0;
    border: none; background: transparent; outline: none; resize: vertical;
    padding: 11px 14px 11px 0;
    font-size: 14.5px; color: var(--nova-text); font-family: inherit;
}

/* Plans ------------------------------------------------------------------ */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.plan-card {
    position: relative;
    display: block;
    border: 2px solid var(--nova-border);
    border-radius: 15px;
    padding: 20px 18px;
    cursor: pointer;
    font-weight: 400;
    margin: 0;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.plan-card:hover { border-color: var(--nova-accent); transform: translateY(-2px); }
.plan-card.selected { border-color: var(--nova-accent); box-shadow: 0 0 0 4px var(--nova-accent-soft); }
.plan-card input { position: absolute; opacity: 0; pointer-events: none; }

.plan-tick {
    position: absolute; top: 14px; right: 14px;
    width: 21px; height: 21px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--nova-border-soft); color: transparent; font-size: 10px;
    transition: background .16s ease, color .16s ease;
}
.plan-card.selected .plan-tick { background: var(--nova-accent); color: #fff; }

.plan-name { display: block; font-size: 15px; font-weight: 640; margin-bottom: 3px; }
.plan-price { display: block; font-size: 25px; font-weight: 700; color: var(--nova-accent-600);
              letter-spacing: -0.03em; margin-bottom: 13px; }
.plan-price small { font-size: 12.5px; color: var(--nova-muted); font-weight: 500; letter-spacing: 0; }
.plan-meta { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--nova-text-soft); }
.plan-meta i { color: var(--nova-accent); width: 16px; margin-right: 6px; }

/* Footer ----------------------------------------------------------------- */
.signup-foot {
    background: var(--nova-surface);
    border: 1px solid var(--nova-border);
    border-radius: 18px;
    box-shadow: var(--nova-shadow);
    padding: 22px 30px;
}
.signup-terms { display: flex; align-items: center; gap: 9px; font-weight: 500;
                font-size: 14px; color: var(--nova-text-soft); margin: 0; cursor: pointer; }
.signup-terms input { width: 16px; height: 16px; accent-color: var(--nova-accent); margin: 0; }

.signup-actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-top: 18px;
}
.signup-actions > a { font-size: 13.5px; color: var(--nova-muted); }
.signup-actions > a:hover { color: var(--nova-accent-600); }
.signup-submit { width: auto; min-width: 220px; margin-top: 0; }

@media (max-width: 700px) {
    .signup-hero { padding: 26px 18px 84px; }
    .signup-hero h1 { font-size: 26px; }
    .signup-grid { grid-template-columns: 1fr; }
    .signup-card, .signup-foot { padding: 22px 18px; }
    .signup-submit { width: 100%; }
    .signup-actions { flex-direction: column-reverse; align-items: stretch; }
    .signup-actions > a { text-align: center; }
}

/* Signup confirmation ----------------------------------------------------- */
.done-tick {
    width: 62px; height: 62px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .24);
    color: #fff; font-size: 26px; margin-bottom: 20px;
}
.done-facts { margin: 0 0 22px; }
.done-facts > div {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 13px 0; border-bottom: 1px solid var(--nova-border-soft);
}
.done-facts > div:last-child { border-bottom: none; }
.done-facts dt { font-size: 13.5px; color: var(--nova-muted); font-weight: 500; margin: 0; }
.done-facts dd { font-size: 14px; font-weight: 600; margin: 0; text-align: right; }
.done-code { font-size: 13px; }
.done-go {
    display: block; text-align: center; text-decoration: none;
    width: 100%; margin-top: 0;
}
.done-go:hover, .done-go:focus { color: #fff; }
.done-note {
    margin: 20px 0 0; font-size: 13px; color: var(--nova-muted); line-height: 1.6;
    background: var(--nova-canvas); border-radius: 11px; padding: 13px 15px;
}
.done-note i { color: var(--nova-accent); margin-right: 6px; }

/* Radio choice group (student / parent on password reset) ----------------- */
.auth-choice { display: flex; gap: 10px; }
.auth-choice > label {
    flex: 1 1 0; margin: 0; cursor: pointer; font-weight: 500;
}
.auth-choice input { position: absolute; opacity: 0; pointer-events: none; }
.auth-choice span {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    border: 1.5px solid var(--nova-border); border-radius: 11px;
    padding: 11px 12px; font-size: 14px; color: var(--nova-text-soft);
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.auth-choice span i { font-size: 13px; }
.auth-choice > label:hover span { border-color: var(--nova-accent); }
.auth-choice input:checked + span {
    border-color: var(--nova-accent);
    background: var(--nova-accent-soft);
    color: var(--nova-accent-700);
    font-weight: 600;
}
