/*
 * Interfy theme for the admin panel.
 *
 * Mirrors the product's design language (interfy-frontend-v2
 * docs/DESIGN_LANGUAGE.md and static/assets/css/theme.scss): blue-tinted
 * page ground, a light slate sidebar, white panels with one level of
 * containment (12px radius, hairline border, faint shadow), the admin teal
 * (--color-admin) as identity accent and BPM blue as the action colour
 * (set as Filament's primary palette in AdminPanelProvider).
 *
 * Plain CSS on Filament's fi-* hooks, registered as a Filament asset, so
 * the Docker image needs no Tailwind build. After editing, run
 * `php artisan filament:assets` and commit public/css/app/interfy-theme.css.
 */

.fi-body {
    --ify-ground: #f0f7fc;
    --ify-sidebar: #d5e3ed;
    --ify-surface: #ffffff;
    --ify-surface-sunken: #f9fcfd;
    --ify-hover: #e8f2f7;
    --ify-border: #dddddd;
    --ify-divider: #e9e8eb;
    --ify-text-muted: #5a5c63;
    --ify-admin: #0b8ec7;
    --ify-shadow: rgba(0, 0, 0, 0.08);

    background-color: var(--ify-ground);
    font-feature-settings: "tnum" 0;
}

.dark .fi-body {
    --ify-ground: #1a1d23;
    --ify-sidebar: #242830;
    --ify-surface: #2d3139;
    --ify-surface-sunken: #242830;
    --ify-hover: #363a45;
    --ify-border: #404552;
    --ify-divider: #363a45;
    --ify-text-muted: #b8bcc8;
    --ify-admin: #2ba8d4;
    --ify-shadow: rgba(0, 0, 0, 0.3);
}

/* ---- Shell ---------------------------------------------------------- */

.fi-topbar > nav {
    background-color: var(--ify-surface);
    box-shadow: 0 1px 0 var(--ify-divider);
    --tw-ring-color: transparent;
}

@media (min-width: 1024px) {
    /* Outranks Filament's lg:/dark:lg:bg-transparent utilities. */
    .fi-body.fi-panel-admin .fi-sidebar {
        background-color: var(--ify-sidebar);
    }
}

.fi-sidebar-group-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ify-text-muted);
}

.fi-sidebar-item-button {
    border-radius: 6px;
    transition: background-color 150ms ease, color 150ms ease;
}

.fi-sidebar-item-button:hover {
    background-color: color-mix(in srgb, var(--ify-surface) 70%, transparent);
}

/* The active page: a neutral surface with a narrow accent rule, never a filled block. */
.fi-sidebar-item-active > .fi-sidebar-item-button {
    background-color: var(--ify-surface);
    box-shadow: inset 3px 0 0 var(--ify-admin);
}

.fi-sidebar-item-active .fi-sidebar-item-label {
    font-weight: 600;
}

/* ---- Page header ---------------------------------------------------- */

.fi-header-heading {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.fi-header-subheading {
    color: var(--ify-text-muted);
}

/* ---- Panels: one level of containment ------------------------------- */

.fi-section,
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-fo-tabs,
.fi-in-tabs {
    background-color: var(--ify-surface);
    border-radius: 12px;
    box-shadow: 0 1px 2px var(--ify-shadow);
    --tw-ring-color: var(--ify-border);
}

.fi-section-header-heading {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.fi-wi-stats-overview-stat-label {
    color: var(--ify-text-muted);
}

.fi-wi-stats-overview-stat-value {
    font-variant-numeric: tabular-nums;
}

/* Sections nested in a section stay flat: no card inside a card. */
.fi-section .fi-section {
    box-shadow: none;
}

/* ---- Tables --------------------------------------------------------- */

.fi-ta-header-cell {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ify-text-muted);
}

.fi-ta-row {
    transition: background-color 150ms ease;
}

.fi-ta-ctn td,
.fi-ta-ctn th {
    font-variant-numeric: tabular-nums;
}

/* ---- Controls ------------------------------------------------------- */

.fi-btn,
.fi-input-wrp,
.fi-dropdown-panel {
    border-radius: 6px;
}

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

.fi-tabs {
    border-radius: 10px;
}

.fi-modal-window {
    border-radius: 12px;
}

/* ---- Sign-in pages -------------------------------------------------- */

.fi-simple-main {
    border-radius: 12px;
    box-shadow: 0 1px 3px var(--ify-shadow);
}

@media (prefers-reduced-motion: reduce) {
    .fi-sidebar-item-button,
    .fi-ta-row {
        transition: none;
    }
}
