:root {
    --school-surface: #f7faf9;
    --school-sidebar: #0f2f2e;
    --school-sidebar-soft: #123b39;
    --school-primary: #0f766e;
    --school-accent: #d97706;
    --school-topbar-height: 5rem;
}

.fi-body {
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.09), transparent 34rem),
        linear-gradient(180deg, #f7faf9 0%, #f8fafc 48%, #ffffff 100%);
}

.fi-sidebar {
    background: linear-gradient(180deg, var(--school-sidebar) 0%, #102a43 100%);
    border-inline-start: 0;
    border-inline-end: 0;
}

.fi-sidebar,
.fi-sidebar > *,
.fi-sidebar-nav,
.fi-sidebar-nav-groups {
    background-color: var(--school-sidebar);
}

.fi-sidebar-nav {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

@media (min-width: 1024px) {
    .fi-sidebar-header {
        display: none;
    }
}

.fi-sidebar-header .fi-logo,
.fi-sidebar-header a {
    color: #0f172a;
    font-weight: 900;
}

.fi-sidebar-header .fi-logo {
    align-items: center;
    display: inline-flex;
    gap: 0.65rem;
}

.school-panel-brand {
    align-items: center;
    display: inline-flex;
    gap: 0.65rem;
    min-width: 0;
}

.school-panel-brand-logo {
    align-items: center;
    border-radius: 0.75rem;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.5rem;
    justify-content: center;
    overflow: hidden;
    width: 2.5rem;
}

.school-panel-brand-logo img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.school-panel-brand-logo span {
    align-items: center;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: #ffffff;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 900;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.school-panel-brand-name {
    color: #0f172a;
    display: block;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.2;
    max-width: 10.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-sidebar-nav {
    padding-inline: 0.75rem;
}

.fi-sidebar-group-label {
    color: #ffffff;
    font-weight: 800;
}

.fi-sidebar-group-button {
    border-radius: 0.75rem;
    cursor: pointer;
    padding-block: 0.35rem;
    padding-inline: 0.55rem;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.fi-sidebar-group-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fi-sidebar-item a {
    border-radius: 0.7rem;
    color: #ffffff;
    font-weight: 700;
}

.fi-sidebar-item a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.fi-sidebar-item.fi-active a {
    background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%);
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.28);
    color: #ffffff;
}

.fi-sidebar-item-label,
.fi-sidebar-group-button,
.fi-sidebar-group-button span,
.fi-sidebar-group-button svg,
.fi-sidebar-item a span,
.fi-sidebar-item a svg {
    color: #ffffff !important;
}

.fi-sidebar-item:not(.fi-active) a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.fi-sidebar-item:not(.fi-active) a:hover .fi-sidebar-item-label,
.fi-sidebar-item:not(.fi-active) a:hover svg {
    color: #ffffff !important;
}

.fi-sidebar-item-icon,
.fi-sidebar-group-button svg {
    color: currentColor;
}

.fi-topbar {
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
    min-height: var(--school-topbar-height);
    position: sticky;
    top: 0;
    z-index: 80;
}

.fi-main {
    padding-top: 2rem;
}

.fi-header-heading {
    color: #0f172a;
    font-weight: 900;
}

.fi-section,
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-wi-widget > .fi-section {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.fi-btn-color-primary {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    box-shadow: 0 12px 22px rgba(15, 118, 110, 0.22);
}

.fi-btn-color-primary:hover {
    filter: brightness(1.02);
}

.school-compact-select {
    max-width: 34rem;
}

.choices__list--dropdown,
.choices__list[aria-expanded] {
    max-height: 14rem !important;
    overflow: hidden !important;
}

.choices__list--dropdown .choices__list,
.choices__list[aria-expanded] .choices__list {
    max-height: 14rem !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

.choices__list--dropdown .choices__item,
.choices__list[aria-expanded] .choices__item {
    min-height: 2.25rem;
}

.fi-wi-stats-overview-stat {
    overflow: hidden;
    position: relative;
}

.fi-wi-stats-overview-stat::after {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(217, 119, 6, 0.1));
    border-radius: 999px;
    content: "";
    height: 7rem;
    inset-inline-end: -2.4rem;
    position: absolute;
    top: -3.2rem;
    width: 7rem;
}

.fi-wi-stats-overview-stat:nth-child(2)::after {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.17), rgba(15, 118, 110, 0.11));
}

.fi-wi-stats-overview-stat:nth-child(3)::after {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.16), rgba(245, 158, 11, 0.14));
}

.fi-wi-stats-overview-stat:nth-child(4)::after {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(20, 184, 166, 0.12));
}

.fi-ta-header-toolbar,
.fi-ta-content {
    background: #ffffff;
}

.fi-input-wrp {
    border-radius: 0.75rem;
}

.fi-badge {
    border-radius: 999px;
}

.school-topbar-brand {
    align-items: center;
    color: #0f172a;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.65rem;
    min-width: 0;
    order: -1;
    text-decoration: none;
}

.fi-topbar .school-topbar-brand,
.school-topbar-brand {
    background: transparent;
    border: 0;
    box-shadow: none;
    position: fixed;
    top: 0.85rem;
    z-index: 130;
    user-select: none;
}

[dir="rtl"] .fi-topbar .school-topbar-brand,
[dir="rtl"] .school-topbar-brand,
html[dir="rtl"] .fi-topbar .school-topbar-brand,
html[dir="rtl"] .school-topbar-brand {
    left: auto;
    right: 2rem;
}

[dir="ltr"] .fi-topbar .school-topbar-brand,
[dir="ltr"] .school-topbar-brand,
html[dir="ltr"] .fi-topbar .school-topbar-brand,
html[dir="ltr"] .school-topbar-brand {
    left: 2rem;
    right: auto;
}

.fi-sidebar-header .school-panel-brand {
    display: none;
}

@media (min-width: 1024px) {
    .fi-topbar .school-topbar-brand {
        padding: 0;
    }
}

.school-topbar-brand:hover {
    color: #0f766e;
}

.school-topbar-brand-logo {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 900;
    height: 2.45rem;
    justify-content: center;
    overflow: hidden;
    width: 2.45rem;
}

.school-topbar-brand-logo img {
    height: 100%;
    object-fit: contain;
    user-select: none;
    width: 100%;
}

.school-topbar-brand-name {
    display: block;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.2;
    max-width: min(22rem, 38vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.school-topbar-language {
    align-items: center;
    display: flex;
    margin-inline: 0.5rem;
}

.school-language-button {
    align-items: center;
    background: rgba(15, 118, 110, 0.1);
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 999px;
    color: #0f766e;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 900;
    gap: 0.4rem;
    height: 2.25rem;
    padding-inline: 0.8rem;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.school-language-button:hover {
    background: #0f766e;
    color: #ffffff;
    transform: translateY(-1px);
}

.school-language-icon {
    height: 1.05rem;
    width: 1.05rem;
}

.school-language-icon svg {
    height: 100%;
    width: 100%;
}

.school-auth-language {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.school-auth-language .school-topbar-language {
    margin-inline: 0;
}

.school-table-logo {
    border-radius: 0.75rem;
    display: inline-flex;
    height: 3rem;
    object-fit: contain;
    width: 3rem;
}

.school-table-logo--empty {
    align-items: center;
    background: rgba(148, 163, 184, 0.14);
    color: #64748b;
    font-weight: 900;
    justify-content: center;
}

.school-import-template-panel {
    align-items: center;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(14, 165, 233, 0.08));
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding: 1rem;
}

.school-import-template-panel h2 {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 900;
}

.school-import-template-panel p {
    color: #475569;
    font-size: 0.88rem;
    margin-top: 0.25rem;
}

.school-action-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .school-action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .school-action-grid {
        grid-template-columns: 1fr;
    }

    .school-topbar-brand-name {
        max-width: 44vw;
    }

    .school-import-template-panel {
        align-items: stretch;
        flex-direction: column;
    }
}

.school-action-card {
    align-items: center;
    border-radius: 1rem;
    color: #ffffff;
    display: flex;
    gap: 0.95rem;
    min-height: 6.5rem;
    overflow: hidden;
    padding: 1.1rem;
    position: relative;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.school-action-card:hover {
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.18);
    color: #ffffff;
    transform: translateY(-2px);
}

.school-action-card::after {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    content: "";
    height: 8rem;
    inset-inline-end: -3rem;
    position: absolute;
    top: -3rem;
    width: 8rem;
}

.school-action-card strong {
    display: block;
    font-size: 1rem;
    font-weight: 900;
}

.school-action-card small {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    font-size: 0.78rem;
    margin-top: 0.25rem;
}

.school-action-icon {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 0.9rem;
    flex: 0 0 auto;
    height: 3rem;
    padding: 0.65rem;
    width: 3rem;
}

.school-action-card--primary {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.school-action-card--sky {
    background: linear-gradient(135deg, #0369a1 0%, #38bdf8 100%);
}

.school-action-card--amber {
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
}

.school-action-card--slate {
    background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
}

.dark .fi-body {
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.14), transparent 32rem),
        linear-gradient(180deg, #07111f 0%, #0f172a 52%, #111827 100%);
}

.dark .fi-topbar {
    background: rgba(7, 17, 31, 0.92);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.dark .fi-main,
.dark .fi-page {
    color: #e5e7eb;
}

.dark .fi-header-heading {
    color: #f8fafc;
}

.dark .fi-breadcrumbs-item-label,
.dark .fi-breadcrumbs-item-separator,
.dark .fi-header-subheading {
    color: #cbd5e1;
}

.dark .fi-section,
.dark .fi-ta-ctn,
.dark .fi-wi-stats-overview-stat,
.dark .fi-wi-widget > .fi-section {
    background: rgba(15, 23, 42, 0.86);
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.dark .fi-ta-header-toolbar,
.dark .fi-ta-content,
.dark .fi-input-wrp {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.18);
}

.dark .fi-input,
.dark .fi-select-input,
.dark .fi-textarea {
    color: #f8fafc;
}

.dark .fi-input::placeholder,
.dark .fi-textarea::placeholder {
    color: #94a3b8;
}

.dark .fi-ta-empty-state-heading,
.dark .fi-ta-text,
.dark .fi-fo-field-wrp-label span {
    color: #f8fafc;
}

.dark .fi-ta-empty-state-description,
.dark .fi-fo-field-wrp-helper-text {
    color: #cbd5e1;
}

.dark .fi-sidebar {
    background: linear-gradient(180deg, #061f1f 0%, #0f2f46 100%);
}

.dark .fi-sidebar,
.dark .fi-sidebar > *,
.dark .fi-sidebar-nav,
.dark .fi-sidebar-nav-groups {
    background-color: #061f1f;
}

.dark .fi-sidebar-header {
    background: rgba(255, 255, 255, 0.05);
}

.dark .fi-sidebar-header .fi-logo,
.dark .fi-sidebar-header a {
    color: #f8fafc;
}

.dark .school-panel-brand-name {
    color: #f8fafc;
}

.dark .school-import-template-panel {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.13), rgba(56, 189, 248, 0.09));
    border-color: rgba(45, 212, 191, 0.22);
}

.dark .school-import-template-panel h2 {
    color: #f8fafc;
}

.dark .school-import-template-panel p {
    color: #cbd5e1;
}

.dark .school-topbar-brand {
    color: #f8fafc;
}

.dark .school-topbar-brand:hover {
    color: #5eead4;
}

@media (min-width: 1024px) {
    .dark .fi-topbar .school-topbar-brand {
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }
}

.dark .school-topbar-brand-logo {
    border-color: transparent;
    box-shadow: none;
}

.dark .school-language-button {
    background: rgba(20, 184, 166, 0.16);
    border-color: rgba(45, 212, 191, 0.28);
    color: #ccfbf1;
}

.dark .school-language-button:hover {
    background: #14b8a6;
    color: #042f2e;
}
