/*
 * Nexus's look on top of Filament's theme, which is dark only (AdminPanelProvider).
 *
 * The direction (cas, 2026-11-24): NEUTRAL surfaces — near-black, like SalesDash's own panels — and
 * all colour in the accents: the brand's cyan and violet, glows, tinted tiles and status colours,
 * heading towards the "Nexus mockup" as interface elements are added. New elements draw from the
 * tokens below rather than hard-coding a colour, so the whole look can move in one place.
 *
 * Plain CSS registered as a Filament asset (AppServiceProvider), so no npm build; it targets
 * Filament's own `fi-` classes, which can move between versions — glance at it after an upgrade.
 */

:root {
    /* Surfaces: Filament's gray scale draws the page (950) and cards (900); these sit between. */
    --nx-surface-page: #0d0d12;
    --nx-surface-chrome: #111117;
    --nx-surface-card: #17171e;
    --nx-border: rgb(255 255 255 / 0.07);
    --nx-border-strong: rgb(255 255 255 / 0.12);
    --nx-text-muted: rgb(255 255 255 / 0.62);

    /* Brand accents (the design sheet). */
    --nx-cyan: #00c2ff;
    --nx-violet: #8b5cf6;
    --nx-violet-strong: #7c3aed;
    --nx-lavender: #c4b5fd;
    --nx-gradient-brand: linear-gradient(135deg, #7c3aed 0%, #6d5cf6 55%, #3b82f6 100%);

    /* Status: one colour per kind of outcome, used by tiles, pills and charts alike. */
    --nx-status-done: #22c55e;
    --nx-status-active: #8b5cf6;
    --nx-status-waiting: #00c2ff;
    --nx-status-failed: #f43f5e;
}

/* ---- Page: neutral, with the faintest brand glow in the corners ---- */

.fi-body {
    background:
        radial-gradient(70rem 40rem at 100% -10%, rgb(124 58 237 / 0.10), transparent 60%),
        radial-gradient(50rem 30rem at -10% 110%, rgb(0 194 255 / 0.05), transparent 60%),
        var(--nx-surface-page) !important;
    background-attachment: fixed !important;
}

/* ---- Chrome: sidebar and top bar one quiet surface, separated by hairlines ---- */

.fi-sidebar.fi-main-sidebar,
.fi-sidebar .fi-sidebar-header,
.fi-topbar {
    background-color: var(--nx-surface-chrome) !important;
}

.fi-topbar {
    box-shadow: none !important;
    border-bottom: 1px solid var(--nx-border);
}

.fi-sidebar.fi-main-sidebar {
    border-right: 1px solid var(--nx-border);
}

.fi-sidebar .fi-sidebar-item-btn {
    border-radius: 0.65rem;
}

.fi-sidebar .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item-icon {
    color: var(--nx-text-muted) !important;
}

.fi-sidebar .fi-sidebar-item-btn:hover,
.fi-sidebar .fi-sidebar-item-btn:focus-visible {
    background-color: rgb(255 255 255 / 0.05) !important;
}

/* The active item: the brand gradient and a soft violet glow, as in the mockup. */
.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: var(--nx-gradient-brand) !important;
    box-shadow: 0 8px 24px -10px rgb(124 58 237 / 0.8);
}

.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #fff !important;
}

/* ---- Cards and tables: hairline borders instead of Filament's ring ---- */

.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn {
    border-radius: 1rem !important;
    box-shadow: 0 0 0 1px var(--nx-border) !important;
}

/* ---- Sign-in: the brand glows behind the card ---- */

.fi-simple-layout {
    background:
        radial-gradient(60rem 40rem at 85% 110%, rgb(124 58 237 / 0.35), transparent 60%),
        radial-gradient(50rem 30rem at 0% 100%, rgb(0 194 255 / 0.16), transparent 60%),
        var(--nx-surface-page);
}

.fi-simple-main {
    border: 1px solid var(--nx-border);
}

/* ---- Dashboard tiles: each a wash of its status colour, with a tinted border ---- */

.nx-stat {
    --nx-stat-color: var(--nx-violet);
    border-radius: 1rem !important;
    background: linear-gradient(
        150deg,
        color-mix(in srgb, var(--nx-stat-color) 20%, transparent),
        color-mix(in srgb, var(--nx-stat-color) 4%, transparent) 70%
    ) !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--nx-stat-color) 35%, transparent) !important;
}

.nx-stat .fi-icon {
    color: var(--nx-stat-color);
}

.nx-stat-cyan {
    --nx-stat-color: var(--nx-cyan);
}

.nx-stat-violet {
    --nx-stat-color: var(--nx-violet);
}

.nx-stat-done {
    --nx-stat-color: var(--nx-status-done);
}

.nx-stat-failed {
    --nx-stat-color: var(--nx-status-failed);
}
