/*
 * ATLAS SPHERE — premium enterprise WebGIS theme overlay.
 * Loaded panel-wide after Filament's own stylesheet (STYLES_AFTER render hook).
 * Targets Filament's documented `fi-*` component classes only — never touches
 * Filament's internal layout markup, so upgrades stay safe.
 */

:root {
    --atlas-teal: #0d9488;
    --atlas-teal-dark: #0f766e;
    --atlas-cyan: #22d3ee;
    --atlas-blue: #2563eb;
    --atlas-amber: #f59e0b;
    --atlas-surface-dark: rgba(15, 23, 42, 0.92);
    --atlas-border-dark: rgba(148, 163, 184, 0.18);
}

/* Sidebar + topbar: subtle glass depth instead of flat fill */
.dark .fi-sidebar {
    background: linear-gradient(180deg, rgba(8, 15, 30, 0.98), rgba(15, 23, 42, 0.98));
    border-inline-end-color: var(--atlas-border-dark);
}

.dark .fi-topbar {
    background: rgba(10, 16, 32, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--atlas-border-dark);
}

.dark .fi-topbar-ctn {
    box-shadow: none;
}

.fi-sidebar-item-active .fi-sidebar-item-btn {
    position: relative;
}

.fi-sidebar-item-active .fi-sidebar-item-btn::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--atlas-cyan), var(--atlas-teal));
}

/* Sections / cards: rounded, glassy, consistent premium surface */
.fi-section {
    border-radius: 1rem !important;
}

.dark .fi-section {
    background: var(--atlas-surface-dark);
    border-color: var(--atlas-border-dark);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
}

.fi-section-header-heading {
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* Buttons: slightly bolder weight for an executive-tool feel */
.fi-btn {
    font-weight: 700;
    border-radius: 0.6rem;
}

/* Badges: crisper pill shape */
.fi-badge {
    font-weight: 700;
    border-radius: 999px;
}

/* Tables: tighter grid lines, clearer hover state */
.dark .fi-ta-ctn {
    background: var(--atlas-surface-dark);
    border-color: var(--atlas-border-dark);
}

.fi-ta-row:hover .fi-ta-cell {
    background-color: rgba(13, 148, 136, 0.06);
}

.dark .fi-ta-row:hover .fi-ta-cell {
    background-color: rgba(45, 212, 191, 0.06);
}

.fi-ta-header-cell {
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    font-size: 0.68rem;
}

/* Modals: rounder, softer shadow to match the rest of the shell */
.fi-modal-window {
    border-radius: 1.1rem !important;
}

/* Stat widgets (dashboard KPI cards) */
.fi-wi-stats-overview-stat {
    border-radius: 1rem !important;
}

.dark .fi-wi-stats-overview-stat {
    background: var(--atlas-surface-dark);
    border-color: var(--atlas-border-dark);
}

/* Inputs: consistent rounding with the rest of the shell */
.fi-input-wrp {
    border-radius: 0.6rem !important;
}

/* Scrollbar polish for the dark theme (WebKit + Firefox) */
.dark ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dark ::-webkit-scrollbar-track {
    background: transparent;
}

.dark ::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}

.dark {
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}
