/* Unified Filament surface normalization across platform + tenant panels */
/* NOTE: --gray-N vars are oklch() values in Filament v3 — do NOT wrap in rgb() */
.fi-body {
    --u-bg: var(--gray-950);
    --u-card: var(--gray-800);
    --u-surface: var(--gray-700);
    --u-ink: var(--gray-50);
    --u-muted: var(--gray-300);
    --u-line: rgba(255, 255, 255, 0.12);
}

html:not(.dark) .fi-body {
    --u-bg: var(--gray-50);
    --u-card: var(--gray-100);
    --u-surface: var(--gray-50);
    --u-ink: var(--gray-900);
    --u-muted: var(--gray-600);
    --u-line: rgba(0, 0, 0, 0.10);
}

/* ── SchoolOS custom dashboard component classes ────────────────────────── */
/* Filament does not know about these — we must style them explicitly */
.so-kpi-card,
.so-panel,
.so-device-card,
.ao-kpi-card,
.ao-panel,
.rp-card,
.pm-chip-panel,
.pm-table-wrap,
.pm-footer,
.pm-role-card {
    background: var(--u-card) !important;
    border-color: var(--u-line) !important;
    color: var(--u-ink) !important;
}

.so-list-row,
.so-chip,
.so-textarea,
.so-response,
.ao-list-item,
.rp-item,
.pm-row-odd,
.pm-row-odd .pm-td-perm,
.pm-chip-off,
.pm-btn-ghost,
.pm-search {
    background: var(--u-surface) !important;
    border-color: var(--u-line) !important;
    color: var(--u-ink) !important;
}

.so-kpi-label,
.so-kpi-meta,
.so-head-sub,
.so-list-row .so-sub,
.so-list-row .so-time,
.so-progress-head,
.ao-kpi-label,
.ao-kpi-meta,
.ao-empty,
.ao-progress-head,
.rp-label,
.rp-sub,
.rp-legend,
.pm-legend,
.pm-chip-sub,
.pm-perm-code,
.pm-role-card-count {
    color: var(--u-muted) !important;
}

.so-progress-track,
.ao-progress-track,
.rp-progress,
.pm-progress,
.pm-progress-mini,
.pm-check-btn,
.pm-th-role,
.pm-th-perm,
.pm-group-td,
.pm-td-check,
.pm-td-perm {
    border-color: var(--u-line) !important;
}

/* Tenant panel: hide misplaced desktop sidebar collapse arrow near the brand logo */
.fi-sidebar-header .fi-icon-btn:first-of-type {
    display: none !important;
}
