/* School Filament panel — sidebar identity, no topbar chrome */

:root {
    --school-brand: #3b82f6;
    --school-brand-dark: #1e40af;
    --school-surface: #f1f5f9;
    --school-card: #ffffff;
    --school-ink: #0f172a;
    --school-muted: #64748b;
    --school-line: rgba(148, 163, 184, 0.35);
    --school-radius: 1rem;
}

.dark {
    --school-surface: #0b1220;
    --school-card: #111827;
    --school-ink: #f8fafc;
    --school-muted: #94a3b8;
    --school-line: rgba(148, 163, 184, 0.22);
}

html.fi {
    font-feature-settings: "kern";
}

/* Hide Filament topbar completely — identity lives in the sidebar */
.fi-topbar {
    display: none !important;
}

.fi-body {
    background:
        radial-gradient(1200px 500px at 100% -10%, rgba(59, 130, 246, 0.12), transparent 55%),
        radial-gradient(900px 420px at 0% 0%, rgba(16, 185, 129, 0.08), transparent 50%),
        var(--school-surface) !important;
}

.dark .fi-body {
    background:
        radial-gradient(1100px 480px at 100% -10%, rgba(59, 130, 246, 0.18), transparent 55%),
        radial-gradient(800px 400px at 0% 0%, rgba(16, 185, 129, 0.1), transparent 50%),
        #020617 !important;
}

/* Mobile open-menu control (topbar is gone) */
.school-mobile-nav {
    position: fixed;
    top: 0.85rem;
    inset-inline-start: 0.85rem;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid rgba(96, 165, 250, 0.45);
    border-radius: 0.85rem;
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.45);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.school-mobile-nav:hover {
    transform: translateY(-1px);
    border-color: #93c5fd;
}

@media (min-width: 1024px) {
    .school-mobile-nav {
        display: none !important;
    }
}

/* Sidebar shell */
.fi-sidebar {
    border-inline-end: 1px solid var(--school-line);
}

.fi-sidebar-header {
    height: auto !important;
    min-height: 5.5rem;
    padding: 1rem 1.1rem !important;
    overflow: visible !important;
    align-items: stretch !important;
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid var(--school-line) !important;
}

.fi-sidebar > .overflow-x-clip {
    overflow: visible !important;
}

.fi-sidebar-header > div,
.fi-sidebar-header .fi-logo {
    display: block !important;
    width: 100%;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
}

.fi-logo {
    height: auto !important;
}

/* New school brand card (sidebar) */
.school-brand-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    width: 100%;
    padding: 0.85rem;
    border-radius: 1rem;
    border: 1px solid rgba(96, 165, 250, 0.28);
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(59, 130, 246, 0.28), transparent 55%),
        linear-gradient(160deg, #0b1220, #111827 70%);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.28);
    animation: school-brand-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html:not(.dark) .school-brand-card {
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(59, 130, 246, 0.16), transparent 55%),
        linear-gradient(160deg, #ffffff, #f8fafc 70%);
    border-color: rgba(59, 130, 246, 0.22);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.school-brand-card__mark {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.85rem;
    color: #fff;
    background: linear-gradient(145deg, #60a5fa, #1d4ed8);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.4);
}

.school-brand-card__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.school-brand-card__eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #93c5fd;
}

html:not(.dark) .school-brand-card__eyebrow {
    color: #2563eb;
}

.school-brand-card__name {
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.3;
    color: #f8fafc;
    white-space: normal;
}

html:not(.dark) .school-brand-card__name {
    color: #0f172a;
}

.school-brand-card__hint {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
}

/* Sidebar account card (footer) */
.school-sidebar-account {
    margin: 0.75rem;
    padding: 0.9rem;
    border-radius: 1rem;
    border: 1px solid var(--school-line);
    background: rgba(15, 23, 42, 0.72);
    animation: school-account-in 0.5s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html:not(.dark) .school-sidebar-account {
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.school-sidebar-account__person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.school-sidebar-account__avatar {
    border-radius: 999px !important;
    box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.55);
    animation: school-avatar-breathe 2.8s ease-in-out infinite;
}

.school-sidebar-account__text {
    min-width: 0;
}

.school-sidebar-account__name {
    font-size: 0.9rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.25;
}

html:not(.dark) .school-sidebar-account__name {
    color: #0f172a;
}

.school-sidebar-account__role {
    display: inline-flex;
    margin-top: 0.25rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.4);
    border: 1px solid rgba(147, 197, 253, 0.35);
}

html:not(.dark) .school-sidebar-account__role {
    color: #1e40af;
    background: #dbeafe;
    border-color: #bfdbfe;
}

.school-sidebar-account__email {
    margin-top: 0.3rem;
    font-size: 0.7rem;
    color: #94a3b8;
    direction: ltr;
    unicode-bidi: plaintext;
    word-break: break-all;
}

.school-sidebar-account__actions {
    margin-top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.school-sidebar-account__theme {
    display: flex;
    justify-content: center;
    padding: 0.2rem;
    border-radius: 0.75rem;
    background: rgba(148, 163, 184, 0.08);
}

.school-sidebar-account__logout {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(251, 113, 133, 0.35);
    background: rgba(244, 63, 94, 0.12);
    color: #fda4af;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.school-sidebar-account__logout:hover {
    transform: translateY(-1px);
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(251, 113, 133, 0.55);
}

html:not(.dark) .school-sidebar-account__logout {
    color: #be123c;
    background: #fff1f2;
    border-color: #fecdd3;
}

.fi-sidebar-nav-groups > * + * {
    margin-top: 0.85rem;
}

.fi-sidebar-item-button {
    border-radius: 0.75rem !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-button {
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

/* Page header */
.fi-header-heading {
    letter-spacing: -0.02em;
    font-weight: 800 !important;
}

.fi-header-subheading {
    color: var(--school-muted) !important;
    margin-top: 0.25rem;
}

/* Give page content room under the mobile nav button */
@media (max-width: 1023px) {
    .fi-main {
        padding-top: 0.5rem;
    }

    .fi-page-header {
        padding-inline-start: 3.2rem;
    }
}

/* Sections / cards */
.fi-section,
.fi-wi-stats-overview-stat,
.fi-ta-ctn,
.fi-fo-component-ctn > .fi-section {
    border-radius: var(--school-radius) !important;
}

.fi-section {
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(15, 23, 42, 0.04);
}

.dark .fi-section {
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.35),
        0 10px 28px rgba(0, 0, 0, 0.25);
}

.fi-section-header {
    border-bottom-color: var(--school-line) !important;
}

.fi-wi-stats-overview-stat {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-2px);
}

.fi-page-dashboard .fi-page-content {
    gap: 1.25rem;
}

.dark .fi-dashboard-action-card {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(180deg, #111827, #0b1220);
}

.fi-ta-header-cell {
    font-weight: 700 !important;
}

.fi-input,
.fi-select-input,
.fi-textarea,
.fi-btn {
    border-radius: 0.75rem !important;
}

@keyframes school-brand-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes school-account-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes school-avatar-breathe {
    0%,
    100% {
        box-shadow: 0 0 0 2px rgba(191, 219, 254, 0.45);
    }
    50% {
        box-shadow:
            0 0 0 2px rgba(147, 197, 253, 0.85),
            0 0 0 6px rgba(59, 130, 246, 0.18);
    }
}

@media (prefers-reduced-motion: reduce) {
    .school-brand-card,
    .school-sidebar-account,
    .school-sidebar-account__avatar,
    .school-mobile-nav,
    .fi-wi-stats-overview-stat {
        animation: none !important;
        transition: none !important;
    }
}
