/* ═══════════════════════════════════════════════════════════════
   Wasl Admin Portal — Premium Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ───────────────────────────────────────────── */
:root {
    /* Brand */
    --gold-primary: #cbaf87;
    --gold-light: #dcc9a8;
    --gold-dim: #a8905f;
    --gold-rgb: 203 175 135;

    /* Surface */
    --surface-base: #0a0a0a;
    --surface-raised: #111111;
    --surface-float: #161616;

    /* Easing */
    --ease-spring: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);

    /* Typography */
    --font-tajawal:
        "Tajawal", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
        "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* ─── Base / Typography ───────────────────────────────────────── */
html,
body {
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* ─── Custom Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}
::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 99px;
}
::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 99px;
    transition: background 0.3s ease;
}
html:hover::-webkit-scrollbar-thumb,
body:hover::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(var(--gold-rgb) / 0.25),
        rgba(var(--gold-rgb) / 0.5)
    );
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        rgba(var(--gold-rgb) / 0.55),
        var(--gold-primary)
    ) !important;
}
/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
*:hover {
    scrollbar-color: rgba(var(--gold-rgb) / 0.35) transparent;
}

/* ─── Widget Entrance Animations ─────────────────────────────── */
@keyframes premiumFadeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.fi-wi-widget {
    animation: premiumFadeIn 0.55s var(--ease-snap) both;
}
.fi-wi-widget:nth-child(2) {
    animation-delay: 0.06s;
}
.fi-wi-widget:nth-child(3) {
    animation-delay: 0.12s;
}
.fi-wi-widget:nth-child(4) {
    animation-delay: 0.18s;
}
.fi-wi-widget:nth-child(5) {
    animation-delay: 0.24s;
}
.fi-wi-widget:nth-child(6) {
    animation-delay: 0.3s;
}

/* ─── Dashboard — Stat Cards ──────────────────────────────────── */
.fi-wi-stats-overview-stat {
    will-change: transform, box-shadow;
    background: rgba(255 255 255 / 0.03) !important;
    backdrop-filter: blur(12px) saturate(1.4) !important;
    border: 1px solid rgba(var(--gold-rgb) / 0.09) !important;
    border-radius: 1.25rem !important;
    transition:
        transform 0.4s var(--ease-spring),
        box-shadow 0.4s var(--ease-spring),
        background 0.35s ease,
        border-color 0.35s ease !important;
    box-shadow:
        0 1px 3px rgba(0 0 0 / 0.25),
        0 4px 12px rgba(0 0 0 / 0.18),
        inset 0 1px 0 rgba(255 255 255 / 0.04) !important;
}
.fi-wi-stats-overview-stat:hover {
    background: rgba(var(--gold-rgb) / 0.07) !important;
    border-color: rgba(var(--gold-rgb) / 0.45) !important;
    transform: translateY(-6px) scale(1.015) !important;
    box-shadow:
        0 20px 40px -8px rgba(var(--gold-rgb) / 0.18),
        0 8px 16px -4px rgba(var(--gold-rgb) / 0.1),
        inset 0 1px 0 rgba(255 255 255 / 0.06) !important;
}
.fi-wi-stats-overview-stat-label {
    font-weight: 700 !important;
    letter-spacing: 0.03em !important;
    color: var(--gold-primary) !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
}
.fi-wi-stats-overview-stat-value {
    font-family: inherit !important;
    font-weight: 800 !important;
    background: linear-gradient(
        90deg,
        var(--gold-dim) 0%,
        var(--gold-light) 50%,
        var(--gold-dim) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    animation: shimmer 4s linear infinite;
}

/* ─── Sidebar — Active State ──────────────────────────────────── */
/*
 * Original gradient look is preserved.
 * border-inline-end is replaced by a ::before pill that is clipped
 * inside the button (overflow:hidden) so it can never bleed into
 * the content area as a full-height stripe — in any layout
 * direction or sidebar collapse state.
 */
.fi-sidebar-item-button.bg-gray-100,
.fi-sidebar-item-button.dark\:bg-white\/5 {
    position: relative !important;
    background: linear-gradient(
        90deg,
        rgba(var(--gold-rgb) / 0.18) 0%,
        rgba(var(--gold-rgb) / 0.04) 100%
    ) !important;
    border-radius: 0.75rem !important;
    color: var(--gold-primary) !important;
    box-shadow: inset 0 1px 0 rgba(255 255 255 / 0.04) !important;
    overflow: hidden !important;
}

/* Indicator pill — visually identical to the old border, but contained */
.fi-sidebar-item-button.bg-gray-100::before,
.fi-sidebar-item-button.dark\:bg-white\/5::before {
    content: "" !important;
    position: absolute !important;
    inset-block: 20% !important;
    inset-inline-end: 0 !important;
    width: 3px !important;
    border-radius: 99px 0 0 99px !important;
    background: var(--gold-primary) !important;
    box-shadow: 0 0 8px rgba(var(--gold-rgb) / 0.65) !important;
}

/* ─── Sidebar — Hover State (non-active) ──────────────────────── */
.fi-sidebar-item-button:not(.bg-gray-100):not(.dark\:bg-white\/5):hover {
    background: rgba(var(--gold-rgb) / 0.06) !important;
    border-radius: 0.75rem !important;
    transition:
        background 0.2s ease,
        border-radius 0.2s ease !important;
}

/* ─── Sidebar — Collapsed State ───────────────────────────────── */

/* The collapsed sidebar panel itself — match dashboard's glassmorphism */
.fi-sidebar.fi-sidebar-collapsible-on-desktop.fi-sidebar--collapsed,
.fi-sidebar[x-bind\:class] {
    background: rgba(10 10 10 / 0.7) !important;
    backdrop-filter: blur(14px) saturate(1.5) !important;
    border-inline-end: 1px solid rgba(var(--gold-rgb) / 0.08) !important;
}

/* All sidebar item buttons in collapsed mode — centred icon layout */
.fi-sidebar--collapsed .fi-sidebar-item-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.75rem !important;
    height: 2.75rem !important;
    margin-inline: auto !important;
    border-radius: 0.85rem !important;
    transition:
        background 0.25s var(--ease-spring),
        box-shadow 0.25s var(--ease-spring),
        transform 0.25s var(--ease-spring) !important;
}

/* Icons inside collapsed sidebar items */
.fi-sidebar--collapsed .fi-sidebar-item-button svg {
    width: 1.35rem !important;
    height: 1.35rem !important;
    color: rgba(var(--gold-rgb) / 0.5) !important;
    transition: color 0.2s ease, filter 0.2s ease !important;
    flex-shrink: 0 !important;
}

/* Hover — non-active icon */
.fi-sidebar--collapsed .fi-sidebar-item-button:not(.bg-gray-100):not(.dark\:bg-white\/5):hover {
    background: rgba(var(--gold-rgb) / 0.09) !important;
    box-shadow: 0 0 0 1px rgba(var(--gold-rgb) / 0.18) inset !important;
    transform: scale(1.08) !important;
}

.fi-sidebar--collapsed .fi-sidebar-item-button:not(.bg-gray-100):not(.dark\:bg-white\/5):hover svg {
    color: var(--gold-primary) !important;
    filter: drop-shadow(0 0 5px rgba(var(--gold-rgb) / 0.6)) !important;
}

/* Active item in collapsed mode */
.fi-sidebar--collapsed .fi-sidebar-item-button.bg-gray-100,
.fi-sidebar--collapsed .fi-sidebar-item-button.dark\:bg-white\/5 {
    background: linear-gradient(
        135deg,
        rgba(var(--gold-rgb) / 0.18) 0%,
        rgba(var(--gold-rgb) / 0.06) 100%
    ) !important;
    border-radius: 0.85rem !important;
    position: relative !important;
    box-shadow:
        0 0 0 1px rgba(var(--gold-rgb) / 0.3) inset,
        0 4px 12px rgba(var(--gold-rgb) / 0.12) !important;
    overflow: visible !important;
}

/* Active icon — fully lit up */
.fi-sidebar--collapsed .fi-sidebar-item-button.bg-gray-100 svg,
.fi-sidebar--collapsed .fi-sidebar-item-button.dark\:bg-white\/5 svg {
    color: var(--gold-primary) !important;
    filter: drop-shadow(0 0 6px rgba(var(--gold-rgb) / 0.75)) !important;
}

/* Glowing bottom dot for active item */
.fi-sidebar--collapsed .fi-sidebar-item-button.bg-gray-100::after,
.fi-sidebar--collapsed .fi-sidebar-item-button.dark\:bg-white\/5::after {
    content: "" !important;
    position: absolute !important;
    bottom: -2px !important;
    inset-inline: 0 !important;
    margin-inline: auto !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    background: var(--gold-primary) !important;
    box-shadow:
        0 0 8px 2px rgba(var(--gold-rgb) / 0.8),
        0 0 14px rgba(var(--gold-rgb) / 0.4) !important;
}

/* Remove the ::before pill in collapsed mode (it's inline-end and looks odd when collapsed) */
.fi-sidebar--collapsed .fi-sidebar-item-button.bg-gray-100::before,
.fi-sidebar--collapsed .fi-sidebar-item-button.dark\:bg-white\/5::before {
    display: none !important;
}

/* ─── Sidebar — Collapsed Group Icons (non-active) ────────────── */
/* All group trigger icons — dimmed gold base */
.fi-sidebar--collapsed .fi-sidebar-group button svg {
    width: 1.35rem !important;
    height: 1.35rem !important;
    color: rgba(var(--gold-rgb) / 0.45) !important;
    transition: color 0.2s ease, filter 0.2s ease !important;
}

/* Group trigger button base */
.fi-sidebar--collapsed .fi-sidebar-group > x-filament\:\:dropdown > button,
.fi-sidebar--collapsed .fi-sidebar-group button.relative {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.75rem !important;
    height: 2.75rem !important;
    margin-inline: auto !important;
    border-radius: 0.85rem !important;
    transition:
        background 0.25s var(--ease-spring),
        box-shadow 0.25s var(--ease-spring),
        transform 0.25s var(--ease-spring) !important;
}

/* Group trigger hover */
.fi-sidebar--collapsed .fi-sidebar-group:not(.fi-active) button.relative:hover {
    background: rgba(var(--gold-rgb) / 0.09) !important;
    box-shadow: 0 0 0 1px rgba(var(--gold-rgb) / 0.18) inset !important;
    transform: scale(1.08) !important;
}

.fi-sidebar--collapsed .fi-sidebar-group:not(.fi-active) button.relative:hover svg {
    color: var(--gold-primary) !important;
    filter: drop-shadow(0 0 5px rgba(var(--gold-rgb) / 0.6)) !important;
}

/* ─── Sidebar — Active Group Icon (matches dashboard active style) */
/*
 * When any child item in a group is active, Filament sets .fi-active on the <li>.
 * We use :has() (supported in all modern browsers) to style the group trigger button
 * exactly like the active page-item button.
 */

/* Active group trigger button — golden box */
.fi-sidebar--collapsed .fi-sidebar-group.fi-active button.relative {
    position: relative !important;
    background: linear-gradient(
        135deg,
        rgba(var(--gold-rgb) / 0.18) 0%,
        rgba(var(--gold-rgb) / 0.06) 100%
    ) !important;
    border-radius: 0.85rem !important;
    box-shadow:
        0 0 0 1px rgba(var(--gold-rgb) / 0.3) inset,
        0 4px 12px rgba(var(--gold-rgb) / 0.12) !important;
    overflow: visible !important;
}

/* Active group icon — fully illuminated */
.fi-sidebar--collapsed .fi-sidebar-group.fi-active button.relative svg {
    color: var(--gold-primary) !important;
    filter: drop-shadow(0 0 6px rgba(var(--gold-rgb) / 0.75)) !important;
}

/* Active group bottom dot — identical to active page item */
.fi-sidebar--collapsed .fi-sidebar-group.fi-active button.relative::after {
    content: "" !important;
    position: absolute !important;
    bottom: -2px !important;
    inset-inline: 0 !important;
    margin-inline: auto !important;
    width: 5px !important;
    height: 5px !important;
    border-radius: 50% !important;
    background: var(--gold-primary) !important;
    box-shadow:
        0 0 8px 2px rgba(var(--gold-rgb) / 0.8),
        0 0 14px rgba(var(--gold-rgb) / 0.4) !important;
}

/* Fallback using :has() for even stronger targeting */
.fi-sidebar--collapsed .fi-sidebar-group:has(.fi-sidebar-item-button.bg-gray-100) button.relative,
.fi-sidebar--collapsed .fi-sidebar-group:has(.fi-sidebar-item-button.dark\:bg-white\/5) button.relative {
    background: linear-gradient(
        135deg,
        rgba(var(--gold-rgb) / 0.18) 0%,
        rgba(var(--gold-rgb) / 0.06) 100%
    ) !important;
    border-radius: 0.85rem !important;
    box-shadow:
        0 0 0 1px rgba(var(--gold-rgb) / 0.3) inset,
        0 4px 12px rgba(var(--gold-rgb) / 0.12) !important;
}

.fi-sidebar--collapsed .fi-sidebar-group:has(.fi-sidebar-item-button.bg-gray-100) button.relative svg,
.fi-sidebar--collapsed .fi-sidebar-group:has(.fi-sidebar-item-button.dark\:bg-white\/5) button.relative svg {
    color: var(--gold-primary) !important;
    filter: drop-shadow(0 0 6px rgba(var(--gold-rgb) / 0.75)) !important;
}


/* ─── Buttons ─────────────────────────────────────────────────── */
.fi-btn {
    will-change: transform;
    transition:
        transform 0.25s var(--ease-spring),
        box-shadow 0.25s var(--ease-spring) !important;
}
.fi-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow:
        0 8px 18px -4px rgba(var(--gold-rgb) / 0.28),
        0 3px 8px -3px rgba(var(--gold-rgb) / 0.12) !important;
}
.fi-btn:active {
    transform: translateY(0) scale(0.975) !important;
    box-shadow: none !important;
    transition-duration: 0.1s !important;
}
.fi-btn:focus-visible {
    outline: 2px solid var(--gold-primary) !important;
    outline-offset: 3px !important;
}

/* ─── Tables ──────────────────────────────────────────────────── */
.fi-ta-row {
    transition: background-color 0.18s ease-in-out !important;
}
.fi-ta-row:hover td {
    background-color: rgba(var(--gold-rgb) / 0.04) !important;
}
.fi-ta-header-cell {
    border-block-end-color: rgba(var(--gold-rgb) / 0.15) !important;
    color: rgba(var(--gold-rgb) / 0.75) !important;
    letter-spacing: 0.04em !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
}

/* ─── Inputs & Selects ────────────────────────────────────────── */
.fi-input,
.fi-select {
    transition:
        box-shadow 0.25s ease,
        border-color 0.25s ease !important;
}
.fi-input:focus-within,
.fi-select:focus-within {
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb) / 0.18) !important;
    border-color: var(--gold-primary) !important;
}
.fi-input:focus-visible,
.fi-select:focus-visible {
    outline: 2px solid var(--gold-primary) !important;
    outline-offset: 2px !important;
}

/* ─── Modals & Dialogs ────────────────────────────────────────── */
.fi-modal-window {
    backdrop-filter: blur(6px) saturate(1.3) !important;
    border: 1px solid rgba(var(--gold-rgb) / 0.14) !important;
    border-radius: 1.5rem !important;
    box-shadow:
        0 32px 64px -16px rgba(0 0 0 / 0.6),
        0 0 0 1px rgba(var(--gold-rgb) / 0.08),
        inset 0 1px 0 rgba(255 255 255 / 0.04) !important;
    animation: premiumFadeIn 0.3s var(--ease-snap) both !important;
}

/* ─── Badges / Status Pills ───────────────────────────────────── */
.fi-badge {
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease !important;
}
.fi-badge:hover {
    box-shadow: 0 0 10px rgba(var(--gold-rgb) / 0.45) !important;
    transform: scale(1.06) !important;
}

/* ─── Notifications / Toasts ──────────────────────────────────── */
/*
 * Scoped to Filament's own hint/notification elements only.
 * [role="status"] / [role="alert"] are intentionally excluded —
 * Filament assigns those roles to full page-region wrappers which
 * would cause a full-height gold stripe down the page edge.
 */
.fi-fo-field-wrp-hint,
.fi-notifications,
.fi-notification {
    border-inline-start: 2px solid rgba(var(--gold-rgb) / 0.4) !important;
    padding-inline-start: 0.75rem !important;
}

/* ─── Page Header ─────────────────────────────────────────────── */
.fi-header-heading {
    background: linear-gradient(
        110deg,
        var(--gold-dim) 0%,
        var(--gold-light) 55%,
        var(--gold-dim) 100%
    );
    background-size: 180% auto;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    animation: shimmer 6s linear infinite;
    font-weight: 800 !important;
}

/* ─── RTL / Arabic Font Override ──────────────────────────────── */
html[dir="rtl"],
html[dir="rtl"] body,
html[lang="ar"],
html[lang="ar"] body {
    --font-sans: var(--font-tajawal);
    font-family: var(--font-tajawal) !important;
}
html[dir="rtl"] .fi-wi-stats-overview-stat-value,
html[lang="ar"] .fi-wi-stats-overview-stat-value {
    font-family: var(--font-tajawal) !important;
}

/* ─── Language Switcher ───────────────────────────────────────── */
.language-switch-trigger {
    position: relative;
    width: 2.35rem !important;
    height: 2.35rem !important;
    border-radius: 0.65rem !important;
    border: 1.5px solid rgba(var(--gold-rgb) / 0.3) !important;
    background: rgba(var(--gold-rgb) / 0.08) !important;
    color: var(--gold-primary) !important;
    transition: all 0.3s var(--ease-spring) !important;
}
.language-switch-trigger:hover {
    background: rgba(var(--gold-rgb) / 0.16) !important;
    border-color: var(--gold-primary) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(var(--gold-rgb) / 0.28) !important;
}
.language-switch-trigger img {
    width: 1.5rem !important;
    height: 1.5rem !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    box-shadow: 0 0 0 1.5px rgba(var(--gold-rgb) / 0.4) !important;
    transition: box-shadow 0.25s ease !important;
}
.language-switch-trigger:hover img {
    box-shadow: 0 0 0 2px var(--gold-primary) !important;
}
.language-switch-trigger span {
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.05em !important;
}

/* Dropdown items */
button.fi-dropdown-list-item:has(img),
button.fi-dropdown-list-item:has(span) {
    border-radius: 0.6rem !important;
    transition:
        background 0.2s ease,
        box-shadow 0.2s ease !important;
    padding: 0.45rem 0.65rem !important;
}
button.fi-dropdown-list-item:has(img):hover,
button.fi-dropdown-list-item:has(span):hover {
    background: rgba(var(--gold-rgb) / 0.1) !important;
    box-shadow: inset 0 0 0 1px rgba(var(--gold-rgb) / 0.25) !important;
}
button.fi-dropdown-list-item img {
    width: 1.6rem !important;
    height: 1.6rem !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    box-shadow: 0 0 0 1.5px rgba(var(--gold-rgb) / 0.3) !important;
    transition: box-shadow 0.2s ease !important;
}
button.fi-dropdown-list-item:hover img {
    box-shadow: 0 0 0 2px var(--gold-primary) !important;
}
button.fi-dropdown-list-item span.text-sm {
    color: rgba(var(--gold-rgb) / 0.85) !important;
    font-weight: 500 !important;
    transition: color 0.2s ease !important;
}
button.fi-dropdown-list-item:hover span.text-sm {
    color: var(--gold-primary) !important;
}

/* ─── Progress Bars ───────────────────────────────────────────── */

/* Filament's own progress bar component (.fi-progress-bar) */
.fi-progress-bar {
    background: rgba(var(--gold-rgb) / 0.12) !important;
    border-radius: 99px !important;
    overflow: hidden !important;
}

.fi-progress-bar-fill,
[class*="fi-progress"] > [class*="fill"],
[class*="fi-progress"] > div {
    background: linear-gradient(
        90deg,
        var(--gold-dim) 0%,
        var(--gold-primary) 50%,
        var(--gold-light) 100%
    ) !important;
    border-radius: 99px !important;
    box-shadow: 0 0 8px rgba(var(--gold-rgb) / 0.5) !important;
    transition: width 0.4s var(--ease-spring) !important;
}

/* Livewire / Alpine SPA page-load progress bar (top of screen) */
[x-ref="bar"],
#nprogress .bar,
.fi-loading-bar {
    background: linear-gradient(
        90deg,
        var(--gold-dim),
        var(--gold-primary),
        var(--gold-light)
    ) !important;
    height: 2.5px !important;
    box-shadow:
        0 0 10px rgba(var(--gold-rgb) / 0.8),
        0 0 4px rgba(var(--gold-rgb) / 0.5) !important;
}

/* NProgress peg (the glowing right edge) */
#nprogress .peg {
    box-shadow:
        0 0 10px var(--gold-primary),
        0 0 5px var(--gold-primary) !important;
}

/* Native HTML <progress> element */
progress {
    appearance: none !important;
    -webkit-appearance: none !important;
    height: 6px !important;
    border-radius: 99px !important;
    border: none !important;
    background: rgba(var(--gold-rgb) / 0.12) !important;
    overflow: hidden !important;
}

/* WebKit fill */
progress::-webkit-progress-bar {
    background: rgba(var(--gold-rgb) / 0.12) !important;
    border-radius: 99px !important;
}

progress::-webkit-progress-value {
    background: linear-gradient(
        90deg,
        var(--gold-dim),
        var(--gold-primary),
        var(--gold-light)
    ) !important;
    border-radius: 99px !important;
    box-shadow: 0 0 6px rgba(var(--gold-rgb) / 0.45) !important;
    transition: width 0.4s var(--ease-spring) !important;
}

/* Firefox fill */
progress::-moz-progress-bar {
    background: linear-gradient(
        90deg,
        var(--gold-dim),
        var(--gold-primary),
        var(--gold-light)
    ) !important;
    border-radius: 99px !important;
}

/* ═══════════════════════════════════════════════════════════════
   Global Page Theming — all resource pages match the dashboard
   ═══════════════════════════════════════════════════════════════ */

/* ─── Page Background ─────────────────────────────────────────── */
.fi-main {
    background:
        radial-gradient(ellipse 80% 40% at 50% -10%, rgba(var(--gold-rgb) / 0.06) 0%, transparent 70%),
        var(--surface-base) !important;
}

/* ─── Form & View Sections (cards on resource pages) ─────────────── */
.fi-section {
    background: rgba(255 255 255 / 0.02) !important;
    backdrop-filter: blur(10px) saturate(1.3) !important;
    border: 1px solid rgba(var(--gold-rgb) / 0.09) !important;
    border-radius: 1.25rem !important;
    box-shadow:
        0 1px 3px rgba(0 0 0 / 0.2),
        0 4px 16px rgba(0 0 0 / 0.15),
        inset 0 1px 0 rgba(255 255 255 / 0.03) !important;
    animation: premiumFadeIn 0.45s var(--ease-snap) both !important;
}

.fi-section-header {
    border-block-end: 1px solid rgba(var(--gold-rgb) / 0.08) !important;
    padding-block-end: 0.75rem !important;
}

.fi-section-header-heading {
    color: var(--gold-primary) !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

/* ─── Table Container Card ────────────────────────────────────── */
.fi-ta-ctn {
    background: rgba(255 255 255 / 0.02) !important;
    backdrop-filter: blur(10px) saturate(1.3) !important;
    border: 1px solid rgba(var(--gold-rgb) / 0.09) !important;
    border-radius: 1.25rem !important;
    box-shadow:
        0 1px 3px rgba(0 0 0 / 0.2),
        0 4px 16px rgba(0 0 0 / 0.12),
        inset 0 1px 0 rgba(255 255 255 / 0.03) !important;
    overflow: hidden !important;
    animation: premiumFadeIn 0.45s var(--ease-snap) both !important;
}

/* ─── Page Header / Breadcrumbs ───────────────────────────────── */
.fi-breadcrumbs ol li a,
.fi-breadcrumbs ol li span {
    color: rgba(var(--gold-rgb) / 0.6) !important;
    font-size: 0.8rem !important;
    transition: color 0.2s ease !important;
}

.fi-breadcrumbs ol li a:hover {
    color: var(--gold-primary) !important;
}

.fi-breadcrumbs ol li:last-child span {
    color: var(--gold-primary) !important;
    font-weight: 600 !important;
}

/* Breadcrumb separator */
.fi-breadcrumbs ol li svg {
    color: rgba(var(--gold-rgb) / 0.3) !important;
}

/* ─── Tabs ────────────────────────────────────────────────────── */
.fi-tabs {
    border-block-end: 1px solid rgba(var(--gold-rgb) / 0.1) !important;
}

.fi-tabs-tab {
    color: rgba(var(--gold-rgb) / 0.55) !important;
    font-weight: 500 !important;
    transition: color 0.2s ease, border-color 0.2s ease !important;
}

.fi-tabs-tab:hover {
    color: var(--gold-primary) !important;
}

.fi-tabs-tab[aria-selected="true"],
.fi-tabs-tab.fi-active {
    color: var(--gold-primary) !important;
    font-weight: 700 !important;
    border-block-end: 2px solid var(--gold-primary) !important;
}

/* ─── Relation Manager / Sub-table wrappers ───────────────────── */
.fi-relation-manager {
    background: rgba(255 255 255 / 0.015) !important;
    border: 1px solid rgba(var(--gold-rgb) / 0.08) !important;
    border-radius: 1rem !important;
}

/* ─── Empty State ─────────────────────────────────────────────── */
.fi-ta-empty-state {
    padding-block: 3rem !important;
}

.fi-ta-empty-state-icon {
    color: rgba(var(--gold-rgb) / 0.25) !important;
}

.fi-ta-empty-state-heading {
    color: rgba(var(--gold-rgb) / 0.7) !important;
    font-weight: 700 !important;
}

.fi-ta-empty-state-description {
    color: rgba(var(--gold-rgb) / 0.4) !important;
}

/* ─── Action Group Buttons (Create, Export, etc.) ─────────────── */
.fi-ta-header-toolbar .fi-btn-color-primary {
    background: linear-gradient(
        135deg,
        rgba(var(--gold-rgb) / 0.25) 0%,
        rgba(var(--gold-rgb) / 0.12) 100%
    ) !important;
    border: 1px solid rgba(var(--gold-rgb) / 0.35) !important;
    color: var(--gold-primary) !important;
    box-shadow: 0 2px 8px rgba(var(--gold-rgb) / 0.15) !important;
}

.fi-ta-header-toolbar .fi-btn-color-primary:hover {
    background: linear-gradient(
        135deg,
        rgba(var(--gold-rgb) / 0.35) 0%,
        rgba(var(--gold-rgb) / 0.18) 100%
    ) !important;
    border-color: var(--gold-primary) !important;
    box-shadow: 0 4px 14px rgba(var(--gold-rgb) / 0.28) !important;
}

/* ─── Pagination ──────────────────────────────────────────────── */
.fi-pagination {
    border-block-start: 1px solid rgba(var(--gold-rgb) / 0.07) !important;
    padding-block: 0.75rem !important;
}

.fi-pagination-item a,
.fi-pagination-item button {
    color: rgba(var(--gold-rgb) / 0.6) !important;
    border-radius: 0.5rem !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}

.fi-pagination-item a:hover,
.fi-pagination-item button:hover {
    background: rgba(var(--gold-rgb) / 0.08) !important;
    color: var(--gold-primary) !important;
}

.fi-pagination-item--active a,
.fi-pagination-item--active button {
    background: rgba(var(--gold-rgb) / 0.15) !important;
    color: var(--gold-primary) !important;
    font-weight: 700 !important;
    box-shadow: 0 0 0 1px rgba(var(--gold-rgb) / 0.3) !important;
}

/* ─── Staggered page content entrance ────────────────────────── */
.fi-section:nth-child(1) { animation-delay: 0.04s !important; }
.fi-section:nth-child(2) { animation-delay: 0.1s !important; }
.fi-section:nth-child(3) { animation-delay: 0.16s !important; }
.fi-section:nth-child(4) { animation-delay: 0.22s !important; }

/* ─── Top Navbar / Header Bar ─────────────────────────────────── */
.fi-topbar {
    background: rgba(10 10 10 / 0.75) !important;
    backdrop-filter: blur(14px) saturate(1.5) !important;
    border-block-end: 1px solid rgba(var(--gold-rgb) / 0.07) !important;
    box-shadow: 0 1px 0 rgba(var(--gold-rgb) / 0.05) !important;
}

/* ─── Form Field Labels ────────────────────────────────────────── */
.fi-fo-field-wrp-label label {
    color: rgba(var(--gold-rgb) / 0.75) !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em !important;
    text-transform: uppercase !important;
}

/* Required asterisk */
.fi-fo-field-wrp-label .fi-fo-field-wrp-label-required-indicator {
    color: var(--gold-dim) !important;
}

/* ─── Form Field Helper / Hint Text ───────────────────────────── */
.fi-fo-field-wrp-hint {
    color: rgba(var(--gold-rgb) / 0.4) !important;
    font-size: 0.75rem !important;
    border-inline-start: 2px solid rgba(var(--gold-rgb) / 0.2) !important;
    padding-inline-start: 0.5rem !important;
}

/* ─── Infolist / View Page Entries ────────────────────────────── */
.fi-in-entry-wrp {
    border-block-end: 1px solid rgba(var(--gold-rgb) / 0.06) !important;
    padding-block: 0.65rem !important;
    transition: background 0.2s ease !important;
}

.fi-in-entry-wrp:hover {
    background: rgba(var(--gold-rgb) / 0.025) !important;
}

.fi-in-entry-wrp:last-child {
    border-block-end: none !important;
}

.fi-in-entry-wrp-label {
    color: rgba(var(--gold-rgb) / 0.55) !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}

.fi-in-text-entry {
    color: rgba(255 255 255 / 0.85) !important;
    font-weight: 500 !important;
}

/* ─── Dropdown Panel (action menus) ───────────────────────────── */
.fi-dropdown-panel {
    background: rgba(15 15 15 / 0.9) !important;
    backdrop-filter: blur(14px) saturate(1.4) !important;
    border: 1px solid rgba(var(--gold-rgb) / 0.12) !important;
    border-radius: 1rem !important;
    box-shadow:
        0 16px 32px -8px rgba(0 0 0 / 0.5),
        0 0 0 1px rgba(var(--gold-rgb) / 0.06) !important;
}

/* ─── Select / Dropdown Options ───────────────────────────────── */
.choices__list--dropdown,
.choices__list[aria-expanded] {
    background: rgba(15 15 15 / 0.95) !important;
    border: 1px solid rgba(var(--gold-rgb) / 0.12) !important;
    border-radius: 0.75rem !important;
    backdrop-filter: blur(12px) !important;
}

.choices__item--selectable.is-highlighted,
.choices__item--choice:hover {
    background: rgba(var(--gold-rgb) / 0.09) !important;
    color: var(--gold-primary) !important;
}

/* ─── Table Filter Indicator ──────────────────────────────────── */
.fi-ta-filter-indicator {
    background: rgba(var(--gold-rgb) / 0.12) !important;
    border: 1px solid rgba(var(--gold-rgb) / 0.25) !important;
    border-radius: 99px !important;
    color: var(--gold-primary) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* ─── Table Search Input ──────────────────────────────────────── */
.fi-ta-search-field input {
    background: rgba(255 255 255 / 0.03) !important;
    border: 1px solid rgba(var(--gold-rgb) / 0.12) !important;
    border-radius: 0.75rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.fi-ta-search-field input:focus {
    border-color: var(--gold-primary) !important;
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb) / 0.15) !important;
    outline: none !important;
}

/* ─── Toggle / Checkbox / Radio polish ────────────────────────── */
.fi-fo-toggle-button[aria-checked="true"],
[type="checkbox"]:checked,
[type="radio"]:checked {
    accent-color: var(--gold-primary) !important;
}

/* ─── Key/Value Stat rows on View pages ───────────────────────── */
.fi-in-section {
    background: rgba(255 255 255 / 0.015) !important;
    border: 1px solid rgba(var(--gold-rgb) / 0.07) !important;
    border-radius: 1rem !important;
}

/* ─── User Avatar in topbar ───────────────────────────────────── */
.fi-user-avatar {
    ring-color: rgba(var(--gold-rgb) / 0.4) !important;
    box-shadow: 0 0 0 2px rgba(var(--gold-rgb) / 0.3) !important;
    transition: box-shadow 0.25s ease !important;
}

.fi-user-avatar:hover {
    box-shadow: 0 0 0 2.5px var(--gold-primary), 0 0 10px rgba(var(--gold-rgb) / 0.3) !important;
}
