html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #a855f7;
}

.btn-primary {
    color: #fff;
    background-color: #7c3aed;
    border-color: #6d28d9;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--theme-accent, #a855f7);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* =========================================================
   PupilStack Theme Variables
   Keep this clean. Do not force page colours here.
   Pages should use these variables over time.
   ========================================================= */

:root {
    --theme-bg-main: #05070d;
    --theme-bg-deep: #090612;
    --theme-bg-card: rgba(15, 23, 42, 0.62);
    --theme-bg-card-strong: rgba(15, 23, 42, 0.82);
    --theme-accent: #a855f7;
    --theme-accent-dark: #7c3aed;
    --theme-accent-soft: #d8b4fe;
    --theme-accent-pale: #ddd6fe;
    --theme-text-main: #f8fafc;
    --theme-text-soft: #cbd5e1;
    --theme-text-muted: #94a3b8;
    --theme-border: rgba(196, 181, 253, 0.18);
    --theme-border-strong: rgba(216, 180, 254, 0.34);
    --theme-glow: rgba(168, 85, 247, 0.24);
}

/* Purple */
body.theme-purple {
    --theme-bg-main: #05070d;
    --theme-bg-deep: #090612;
    --theme-bg-card: rgba(15, 23, 42, 0.62);
    --theme-bg-card-strong: rgba(15, 23, 42, 0.82);
    --theme-accent: #a855f7;
    --theme-accent-dark: #7c3aed;
    --theme-accent-soft: #d8b4fe;
    --theme-accent-pale: #ddd6fe;
    --theme-border: rgba(196, 181, 253, 0.18);
    --theme-border-strong: rgba(216, 180, 254, 0.34);
    --theme-glow: rgba(168, 85, 247, 0.24);
}

/* Blue */
body.theme-blue {
    --theme-bg-main: #05070d;
    --theme-bg-deep: #06111f;
    --theme-bg-card: rgba(15, 23, 42, 0.62);
    --theme-bg-card-strong: rgba(15, 23, 42, 0.82);
    --theme-accent: #0ea5e9;
    --theme-accent-dark: #2563eb;
    --theme-accent-soft: #bfdbfe;
    --theme-accent-pale: #dbeafe;
    --theme-border: rgba(147, 197, 253, 0.18);
    --theme-border-strong: rgba(147, 197, 253, 0.34);
    --theme-glow: rgba(14, 165, 233, 0.24);
}

/* Green */
body.theme-green {
    --theme-bg-main: #05070d;
    --theme-bg-deep: #06140d;
    --theme-bg-card: rgba(15, 23, 42, 0.62);
    --theme-bg-card-strong: rgba(15, 23, 42, 0.82);
    --theme-accent: #22c55e;
    --theme-accent-dark: #16a34a;
    --theme-accent-soft: #bbf7d0;
    --theme-accent-pale: #dcfce7;
    --theme-border: rgba(134, 239, 172, 0.18);
    --theme-border-strong: rgba(134, 239, 172, 0.34);
    --theme-glow: rgba(34, 197, 94, 0.24);
}

/* Gold */
body.theme-gold {
    --theme-bg-main: #05070d;
    --theme-bg-deep: #171006;
    --theme-bg-card: rgba(15, 23, 42, 0.62);
    --theme-bg-card-strong: rgba(15, 23, 42, 0.82);
    --theme-accent: #facc15;
    --theme-accent-dark: #d97706;
    --theme-accent-soft: #fde68a;
    --theme-accent-pale: #fef3c7;
    --theme-border: rgba(253, 230, 138, 0.18);
    --theme-border-strong: rgba(253, 230, 138, 0.34);
    --theme-glow: rgba(250, 204, 21, 0.22);
}

/* Onyx */
body.theme-onyx {
    --theme-bg-main: #05070d;
    --theme-bg-deep: #020617;
    --theme-bg-card: rgba(15, 23, 42, 0.62);
    --theme-bg-card-strong: rgba(15, 23, 42, 0.82);
    --theme-accent: #e5e7eb;
    --theme-accent-dark: #64748b;
    --theme-accent-soft: #f8fafc;
    --theme-accent-pale: #ffffff;
    --theme-border: rgba(226, 232, 240, 0.16);
    --theme-border-strong: rgba(248, 250, 252, 0.30);
    --theme-glow: rgba(255, 255, 255, 0.16);
}

::selection {
    background: var(--theme-glow);
    color: #ffffff;
}
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: 82px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 28px;
    background: radial-gradient(circle at top left, var(--theme-glow), transparent 34%), radial-gradient(circle at top right, color-mix(in srgb, var(--theme-accent-dark) 14%, transparent), transparent 36%), rgba(5, 7, 13, 0.82);
    border-bottom: 1px solid var(--theme-border);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 270px;
    color: #f8fafc;
    text-decoration: none;
}

    .brand:hover {
        color: #ffffff;
    }

.brand-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 14px;
    filter: drop-shadow(0 0 14px var(--theme-glow)) drop-shadow(0 0 28px color-mix(in srgb, var(--theme-accent-dark) 30%, transparent));
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

    .brand-text strong {
        color: #f8fafc;
        font-size: 18px;
        font-weight: 950;
        letter-spacing: -0.03em;
        line-height: 1;
    }

    .brand-text small {
        color: var(--theme-accent-soft);
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .02em;
        white-space: nowrap;
    }

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

a.nav-link,
.nav-link.disabled {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--theme-accent-pale);
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
    background: radial-gradient(circle at top, color-mix(in srgb, var(--theme-accent-soft) 14%, transparent), transparent 65%), color-mix(in srgb, var(--theme-accent) 12%, transparent);
    border: 1px solid var(--theme-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
    white-space: nowrap;
}

    a.nav-link:hover {
        color: #ffffff;
        background: radial-gradient(circle at top, color-mix(in srgb, var(--theme-accent-pale) 22%, transparent), transparent 65%), color-mix(in srgb, var(--theme-accent) 22%, transparent);
        border-color: var(--theme-border-strong);
        transform: translateY(-1px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.30), 0 0 24px var(--theme-glow), inset 0 1px 0 rgba(255, 255, 255, 0.10);
    }

    a.nav-link.active {
        color: #ffffff;
        background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent-dark) 72%, transparent), color-mix(in srgb, var(--theme-accent) 52%, transparent));
        border-color: var(--theme-border-strong);
        box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34), 0 0 30px var(--theme-glow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }

        a.nav-link.active::after {
            content: "";
            position: absolute;
            left: 50%;
            bottom: -8px;
            width: 28px;
            height: 3px;
            border-radius: 999px;
            background: linear-gradient(90deg, var(--theme-accent), var(--theme-accent-soft));
            transform: translateX(-50%);
            box-shadow: 0 0 16px var(--theme-glow);
        }

.nav-link.disabled {
    color: var(--theme-accent-soft);
    cursor: default;
    opacity: .75;
}

    .nav-link.disabled:hover {
        transform: none;
        color: var(--theme-accent-soft);
        background: radial-gradient(circle at top, color-mix(in srgb, var(--theme-accent-soft) 14%, transparent), transparent 65%), color-mix(in srgb, var(--theme-accent) 12%, transparent);
        border-color: var(--theme-border);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

@media (max-width: 1050px) {
    .top-nav {
        position: fixed;
        top: 12px;
        left: 16px;
        right: 16px;
        min-height: 74px;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        padding: 10px 18px;
        border-radius: 28px;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.055)), radial-gradient(circle at top left, color-mix(in srgb, var(--theme-accent) 18%, transparent), transparent 38%), rgba(5, 7, 13, 0.46);
        border: 1px solid rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(28px) saturate(170%);
        -webkit-backdrop-filter: blur(28px) saturate(170%);
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 -1px 0 rgba(255, 255, 255, 0.06);
        overflow: visible;
    }

        .top-nav::before {
            content: "";
            position: absolute;
            inset: 1px;
            border-radius: 27px;
            pointer-events: none;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 42%);
            opacity: .72;
        }

        .top-nav::after {
            content: "";
            position: absolute;
            left: 18px;
            right: 18px;
            top: 8px;
            height: 1px;
            border-radius: 999px;
            pointer-events: none;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
        }

    .brand {
        justify-content: center;
        min-width: 0;
    }

    .nav-links {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 2px 6px;
        scrollbar-width: none;
    }

        .nav-links::-webkit-scrollbar {
            display: none;
        }

    a.nav-link,
    .nav-link.disabled {
        min-height: 38px;
        padding: 0 13px;
        font-size: 13px;
    }
}

@media (max-width: 560px) {
    .brand {
        justify-content: flex-start;
    }

    .brand-logo {
        width: 44px;
        height: 44px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        max-width: 235px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}


html,
body {
    min-height: 100%;
    margin: 0;
    background: radial-gradient(circle at top left, var(--theme-glow), transparent 34%), radial-gradient(circle at top right, color-mix(in srgb, var(--theme-accent) 14%, transparent), transparent 36%), linear-gradient(135deg, var(--theme-bg-main), var(--theme-bg-deep) 50%, #020617);
    background-attachment: fixed;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    min-height: 100svh;
}

.app-shell {
    min-height: 100vh;
    min-height: 100svh;
    background: radial-gradient(circle at top left, var(--theme-glow), transparent 34%), radial-gradient(circle at top right, color-mix(in srgb, var(--theme-accent) 14%, transparent), transparent 36%), radial-gradient(circle at bottom center, color-mix(in srgb, var(--theme-accent-dark) 12%, transparent), transparent 42%), linear-gradient(135deg, var(--theme-bg-main), var(--theme-bg-deep) 50%, #020617);
    background-attachment: fixed;
}

.app-main {
    min-height: 100vh;
    min-height: 100svh;
    padding-top: 100px;
    box-sizing: border-box;
}
@media (max-width: 1050px) {
    .top-nav {
        top: 10px;
        left: 12px;
        right: 12px;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 26px;
    }

    .brand {
        justify-content: center;
        min-width: 0;
    }

    .nav-links {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 2px 6px;
        scrollbar-width: none;
    }

        .nav-links::-webkit-scrollbar {
            display: none;
        }

    a.nav-link,
    .nav-link.disabled {
        min-height: 38px;
        padding: 0 13px;
        font-size: 13px;
    }

    .app-main {
        padding-top: 154px;
    }
}

@media (max-width: 560px) {
    .top-nav {
        top: 8px;
        left: 8px;
        right: 8px;
        padding: 12px;
        border-radius: 24px;
    }

    .brand {
        justify-content: flex-start;
    }

    .brand-logo {
        width: 44px;
        height: 44px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        max-width: 235px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-main {
        padding-top: 148px;
    }
}
@media (max-width: 1050px) {
    .top-nav {
        top: 10px;
        left: 12px;
        right: 12px;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 26px;
    }

    .brand {
        justify-content: center;
        min-width: 0;
    }

    .nav-links {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 2px 6px;
        scrollbar-width: none;
    }

        .nav-links::-webkit-scrollbar {
            display: none;
        }

    a.nav-link,
    .nav-link.disabled {
        min-height: 38px;
        padding: 0 13px;
        font-size: 13px;
    }

    .app-main {
        padding-top: 154px;
    }
}

@media (max-width: 560px) {
    .top-nav {
        top: 8px;
        left: 8px;
        right: 8px;
        padding: 12px;
        border-radius: 24px;
    }

    .brand {
        justify-content: flex-start;
    }

    .brand-logo {
        width: 44px;
        height: 44px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        max-width: 235px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .app-main {
        padding-top: 148px;
    }
}