    /* ============================================================
     * ARD Agency — Premium Filament theme overlay
     * Tightens spacing, refines sidebar, polishes typography.
     * ============================================================ */

    /* ---------- Layout: tighter content padding ---------- */
    .fi-page {
        padding: 1rem 0.25rem !important;
    }

    /* Remove the default massive gap and padding from Filament's main page section wrapper */
    .fi-page>section.flex.flex-col.gap-y-8.py-8 {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        row-gap: 0.5rem !important;
    }

    /* Filament wraps the page slot in `.grid.auto-cols-fr.gap-y-8`,
       which adds 2rem (32px) between every top-level child (KPI grid,
       form, snapshot strip, table). 32px is too generous for dense
       finance/operations dashboards — tighten it. */
    .fi-page .grid.auto-cols-fr.gap-y-8 {
        row-gap: 0.85rem !important;
    }

    .fi-section,
    .fi-resource-table-container {
        margin-top: 0.75rem;
    }

    .fi-sidebar+.fi-main {
        padding-left: 0 !important;
    }

    .fi-main {
        padding-inline: 0.5rem !important;
    }

    /* ============================================================
     * Sidebar — premium polish
     * ============================================================ */
    .fi-sidebar {
        border-right: 1px solid rgb(226 232 240);
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        box-shadow: 1px 0 0 rgba(15, 23, 42, 0.02);
        padding-top: 0 !important;
    }

    .dark .fi-sidebar {
        border-right-color: rgb(30 41 59);
        background: linear-gradient(180deg, rgb(15 23 42) 0%, rgb(2 6 23) 100%);
        box-shadow: none;
    }

    /* Brand area — custom-rendered logo + name */
    .fi-sidebar-header {
        padding: 0.95rem 1rem !important;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
        background: transparent;
        min-height: 0 !important;
    }

    .fi-sidebar-header:empty {
        display: none !important;
    }

    /* Filament wraps the brandLogo in .fi-logo; reset constraints so the
       custom HTML can size itself naturally. */
    .fi-sidebar-header .fi-logo {
        height: auto !important;
        max-width: 100% !important;
    }

    .ard-brand {
        display: flex;
        align-items: center;
        gap: 0.7rem;
    }

    .ard-brand-mark svg {
        width: 1.3rem;
        height: 1.3rem;
    }

    .ard-brand-text {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
        min-width: 0;
    }

    .ard-brand-name {
        font-weight: 700;
        font-size: 0.94rem;
        letter-spacing: -0.005em;
        color: rgb(15 23 42);
    }

    .ard-brand-tag {
        font-size: 0.66rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: rgb(100 116 139);
        margin-top: 2px;
        font-weight: 600;
    }

    .dark .ard-brand-name {
        color: rgb(241 245 249);
    }

    .dark .ard-brand-tag {
        color: rgb(148 163 184);
    }

    /* Collapsed sidebar — hide name+tag, center the mark */
    .fi-sidebar-collapsed .ard-brand-text {
        display: none;
    }

    .fi-sidebar-collapsed .ard-brand {
        justify-content: center;
        gap: 0;
    }

    /* ---------- Navigation list — tight, dense, premium ---------- */
    .fi-sidebar-nav {
        padding-top: 0.4rem !important;
        padding-bottom: 0.5rem !important;
        margin-top: 0 !important;
        gap: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .fi-sidebar-nav-groups {
        gap: 0 !important;
    }

    /* Big gap between MASTER DATA and ADMINISTRATION lived in the sidebar
       group margins. Collapse those down to a single small gap that
       visually separates without wasting screen. */
    .fi-sidebar-nav .fi-sidebar-group {
        margin: 0 !important;
        padding: 0.25rem 0 !important;
    }

    .fi-sidebar-nav .fi-sidebar-group+.fi-sidebar-group {
        margin-top: 0.45rem !important;
        padding-top: 0.45rem !important;
        border-top: 1px solid rgba(148, 163, 184, 0.14);
    }

    .dark .fi-sidebar-nav .fi-sidebar-group+.fi-sidebar-group {
        border-top-color: rgba(51, 65, 85, 0.6);
    }

    /* Group labels — compact and quiet */
    .fi-sidebar-group-label {
        font-size: 0.65rem !important;
        font-weight: 700 !important;
        letter-spacing: 0.1em !important;
        text-transform: uppercase !important;
        color: rgb(100 116 139) !important;
        padding: 0.25rem 0.95rem 0.35rem !important;
        margin: 0 !important;
    }

    .dark .fi-sidebar-group-label {
        color: rgb(148 163 184) !important;
    }

    .fi-sidebar-group-collapse-button {
        padding: 0.25rem 0.6rem !important;
    }

    /* Group items list — no extra vertical padding between items */
    .fi-sidebar-group-items {
        gap: 0.1rem !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Nav items — compact, clean */
    .fi-sidebar-item-button {
        padding: 0.5rem 0.75rem !important;
        margin: 0.1rem 0.5rem !important;
        border-radius: 0.5rem !important;
        font-size: 0.875rem !important;
        font-weight: 500 !important;
        color: rgb(51 65 85) !important;
        transition: background-color .12s ease, color .12s ease, transform .08s ease;
    }

    .dark .fi-sidebar-item-button {
        color: rgb(203 213 225) !important;
    }

    .fi-sidebar-item-button:hover {
        background-color: rgb(241 245 249) !important;
        color: rgb(15 23 42) !important;
    }

    .dark .fi-sidebar-item-button:hover {
        background-color: rgba(99, 102, 241, 0.08) !important;
        color: rgb(241 245 249) !important;
    }

    /* Active state — accent stripe + tinted background */
    .fi-sidebar-item.fi-active .fi-sidebar-item-button,
    .fi-sidebar-item-button[aria-current="page"] {
        background: linear-gradient(90deg, rgba(99, 102, 241, 0.10) 0%, rgba(99, 102, 241, 0.04) 100%) !important;
        color: rgb(67 56 202) !important;
        font-weight: 600 !important;
        position: relative;
    }

    .fi-sidebar-item.fi-active .fi-sidebar-item-button::before,
    .fi-sidebar-item-button[aria-current="page"]::before {
        content: '';
        position: absolute;
        left: -0.5rem;
        top: 0.4rem;
        bottom: 0.4rem;
        width: 3px;
        background: rgb(99 102 241);
        border-radius: 0 4px 4px 0;
    }

    .dark .fi-sidebar-item.fi-active .fi-sidebar-item-button,
    .dark .fi-sidebar-item-button[aria-current="page"] {
        background: linear-gradient(90deg, rgba(129, 140, 248, 0.18) 0%, rgba(129, 140, 248, 0.06) 100%) !important;
        color: rgb(199 210 254) !important;
    }

    .fi-sidebar-item-icon {
        flex-shrink: 0;
        width: 1.15rem !important;
        height: 1.15rem !important;
    }

    /* Collapsed sidebar */
    .fi-sidebar-collapsed .fi-sidebar-item-button {
        margin: 0.125rem 0.35rem !important;
        padding: 0.55rem 0.5rem !important;
        justify-content: center;
    }

    .fi-sidebar-collapsed .fi-sidebar-group-label {
        display: none !important;
    }

    /* ---------- Topbar polish ----------
     *
     * Decision (reversed from an earlier attempt):
     *   When a modal opens we WANT the topbar to dim along with the
     *   rest of the page — that's the focus convention every Filament
     *   modal in the panel follows. Previously this rule pushed the
     *   topbar to z-35 (above the overlay) which left it at full
     *   brightness while the rest of the page faded — making the
     *   header look "wrong" / disconnected when, e.g., the Dashboard's
     *   per-fuel "Update Rate" modal was open.
     *
     *   Filament's own stack:
     *     - .fi-modal-close-overlay (backdrop):   z-40, fixed inset-0
     *     - .fi-modal-window (the panel):         z-40, fixed inset-0
     *   Both at z-40 — panel renders AFTER overlay in DOM order, so
     *   the panel naturally sits on top. We just need the topbar to
     *   be a normal sticky element BELOW z-40 so the overlay covers
     *   it. z-20 is Filament's default — keeping the visual polish
     *   (opaque background + bottom border) but letting Filament's
     *   stacking convention work as designed.
     */
    .fi-topbar {
        background: rgb(255 255 255) !important;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
        /* Inherits position: sticky; top: 0; z-index: 20 from Filament's
           own classes. We do NOT override z-index here so the close
           overlay (z-40) cleanly covers the topbar when a modal opens. */
    }

    .dark .fi-topbar {
        background: rgb(15 23 42) !important;
        border-bottom-color: rgba(30, 41, 59, 0.7);
    }

    /* ============================================================
     * Stats-overview widget value text — readability guard
     *
     * Filament's StatsOverviewWidget Stat blade renders the value as
     * `text-gray-950 dark:text-white`. But some Filament builds /
     * panel plugins propagate the `->color('warning')` modifier into
     * the value's render path too — the result is dark-amber text on
     * a dark-amber tinted card, nearly invisible. Visible on the
     * dashboard's Active Shift card where `SH00003` reads as a low-
     * contrast smudge.
     *
     * Force the value to use the high-contrast neutral in dark mode
     * regardless of any color modifier on the Stat. We do NOT touch
     * light mode — the default text-gray-950 is fine there.
     * ============================================================ */
    .dark .fi-wi-stats-overview-stat-value {
        color: rgb(248 250 252) !important;
        /* slate-50 — close to white */
    }

    /* ============================================================
     * Table grouping — highlighted group headers
     *
     * Filament's default group header component renders as a near-
     * flat row: text-sm font-medium on a gray-50 background. On the
     * Fuel Rates list — the only place we use table grouping today —
     * the header carries genuinely important information (per-fuel
     * CURRENT RATE summary) that operators read at a glance before
     * drilling into history. Beefing up the header gives that info
     * the visual weight it deserves.
     *
     * (Aside: an earlier version of this comment included the Blade
     * tag name with angle brackets. Blade's compiler interprets the
     * `&lt;x-...&gt;` syntax even inside CSS /* */
    comments and * injects compiled PHP into the middle of the CSS — breaking * the entire file with a "syntax error, expecting endif" panic * because the injected PHP `if` had no matching `endif`. Kept * the tag name out of the comment to prevent regressions.) * * Treatment: * - Larger title font+bolder weight * - Indigo accent stripe down the left edge * - Soft gradient background (light + dark mode variants) * - Subtle inset shadow so the header reads as a banner,
    not * just an alternating row * * Targeted by `.fi-ta-group-header` so only group rows are * affected — normal data rows stay untouched. *============================================================*/ .fi-ta-group-header {
        background: linear-gradient(90deg,
                rgba(99, 102, 241, 0.10) 0%,
                rgba(99, 102, 241, 0.04) 60%,
                rgba(99, 102, 241, 0.02) 100%) !important;
        border-left: 4px solid rgb(99 102 241) !important;
        padding: 0.85rem 1.1rem !important;
        box-shadow: inset 0 -1px 0 rgba(99, 102, 241, 0.18) !important;
    }

    .dark .fi-ta-group-header {
        background: linear-gradient(90deg,
                rgba(129, 140, 248, 0.18) 0%,
                rgba(129, 140, 248, 0.08) 60%,
                rgba(129, 140, 248, 0.04) 100%) !important;
        border-left-color: rgb(129 140 248) !important;
        box-shadow: inset 0 -1px 0 rgba(129, 140, 248, 0.25) !important;
    }

    /* Title: bump from text-sm → text-base, semibold → bold, indigo. */
    .fi-ta-group-header h4 {
        font-size: 1rem !important;
        /* text-base */
        font-weight: 700 !important;
        /* bold */
        letter-spacing: -0.005em !important;
        color: rgb(55 48 163) !important;
        /* indigo-800 */
    }

    .dark .fi-ta-group-header h4 {
        color: rgb(199 210 254) !important;
        /* indigo-200 */
    }

    /* Description: make it readable (was text-gray-500). */
    .fi-ta-group-header p {
        font-size: 0.825rem !important;
        font-weight: 600 !important;
        color: rgb(67 56 202) !important;
        /* indigo-700 */
        margin-top: 0.15rem !important;
    }

    .dark .fi-ta-group-header p {
        color: rgb(165 180 252) !important;
        /* indigo-300 */
    }

    /* Collapse chevron — keep visible but tinted to match the
       header's indigo accent. */
    .fi-ta-group-header .fi-icon-btn {
        color: rgb(79 70 229) !important;
    }

    .dark .fi-ta-group-header .fi-icon-btn {
        color: rgb(165 180 252) !important;
    }

    /* ============================================================
     * Modal-open layout safety
     *
     * Filament's body scroll-lock removes the vertical scrollbar
     * (~15px wide on Windows) when a modal opens, which reflows the
     * entire page horizontally — most visibly, the topbar's search
     * bar and avatar jog to the right at the moment the modal
     * appears. Reserving the scrollbar gutter at the document level
     * prevents the shift.
     * ============================================================ */
    html {
        scrollbar-gutter: stable;
    }

    /* ============================================================
     * Global Search — distinct, prominent command-bar
     * (Sits in the topbar between the sidebar toggle and the
     * user menu. Styled wider and pill-shaped so it doesn't get
     * mistaken for the per-table search input.)
     * ============================================================ */

    .fi-topbar .fi-global-search-field {
        width: 100%;
    }

    /* The actual <input> Filament renders sits inside .fi-input-wrp
       — target both the wrapper and the input so border + shadow
       look like a single rounded pill. */
    .fi-topbar .fi-global-search .fi-input-wrp {
        border-radius: 999px !important;
        border: 1px solid rgba(148, 163, 184, 0.30) !important;
        background: rgba(248, 250, 252, 0.85) !important;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
        transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
        height: 2.5rem;
    }

    .fi-topbar .fi-global-search .fi-input-wrp:hover {
        background: rgba(241, 245, 249, 1) !important;
        border-color: rgba(99, 102, 241, 0.35) !important;
    }

    .fi-topbar .fi-global-search .fi-input-wrp:focus-within {
        background: #ffffff !important;
        border-color: rgb(99 102 241) !important;
        box-shadow:
            0 0 0 3px rgba(99, 102, 241, 0.18),
            0 1px 2px rgba(15, 23, 42, 0.06) !important;
    }

    .fi-topbar .fi-global-search .fi-input {
        background: transparent !important;
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        padding-inline: 0.5rem !important;
        height: 100%;
        color: rgb(15 23 42) !important;
        letter-spacing: 0.005em;
    }

    .fi-topbar .fi-global-search .fi-input::placeholder {
        color: rgb(100 116 139) !important;
        font-weight: 500;
        opacity: 1;
    }

    /* Leading magnifier icon — bigger + indigo on focus. */
    .fi-topbar .fi-global-search .fi-input-wrp-icon,
    .fi-topbar .fi-global-search .fi-input-wrp svg {
        color: rgb(100 116 139) !important;
        width: 1.05rem;
        height: 1.05rem;
        margin-inline-start: 0.35rem;
    }

    .fi-topbar .fi-global-search .fi-input-wrp:focus-within svg {
        color: rgb(79 70 229) !important;
    }

    /* Dark mode */
    .dark .fi-topbar .fi-global-search .fi-input-wrp {
        background: rgba(30, 41, 59, 0.6) !important;
        border-color: rgba(71, 85, 105, 0.55) !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.20);
    }

    .dark .fi-topbar .fi-global-search .fi-input-wrp:hover {
        background: rgba(30, 41, 59, 0.85) !important;
        border-color: rgba(129, 140, 248, 0.45) !important;
    }

    .dark .fi-topbar .fi-global-search .fi-input-wrp:focus-within {
        background: rgba(15, 23, 42, 0.95) !important;
        border-color: rgb(129 140 248) !important;
        box-shadow:
            0 0 0 3px rgba(129, 140, 248, 0.22),
            0 1px 2px rgba(0, 0, 0, 0.25) !important;
    }

    .dark .fi-topbar .fi-global-search .fi-input {
        color: rgb(241 245 249) !important;
    }

    .dark .fi-topbar .fi-global-search .fi-input::placeholder {
        color: rgb(148 163 184) !important;
    }

    .dark .fi-topbar .fi-global-search .fi-input-wrp-icon,
    .dark .fi-topbar .fi-global-search .fi-input-wrp svg {
        color: rgb(148 163 184) !important;
    }

    .dark .fi-topbar .fi-global-search .fi-input-wrp:focus-within svg {
        color: rgb(165 180 252) !important;
    }

    /* Results dropdown — match the input rounding so the floating
       panel reads as the same component. */
    .fi-global-search-results-ctn {
        border-radius: 0.85rem !important;
        box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.04) !important;
        border: 1px solid rgba(148, 163, 184, 0.20) !important;
        margin-top: 0.4rem !important;
        overflow: hidden;
    }

    .dark .fi-global-search-results-ctn {
        border-color: rgba(51, 65, 85, 0.6) !important;
        box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.50), 0 0 0 1px rgba(15, 23, 42, 0.4) !important;
    }

    /* Mobile — let the pill stretch but keep it usable. */
    @media (max-width: 640px) {
        .fi-topbar .fi-global-search {
            margin: 0 0.5rem;
            min-width: 0;
            max-width: none;
        }

        .fi-topbar .fi-global-search .fi-input-wrp {
            height: 2.25rem;
        }
    }

    /* ---------- Tables ---------- */
    .fi-ta-cell {
        padding: 0.65rem 0.75rem !important;
    }

    .fi-ta-header-cell {
        font-size: 0.72rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: rgb(100 116 139) !important;
        padding: 0.6rem 0.75rem !important;
    }

    .dark .fi-ta-header-cell {
        color: rgb(148 163 184) !important;
    }

    .fi-ta-ctn {
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 0 rgba(15, 23, 42, 0.03);
        border: 1px solid rgba(148, 163, 184, 0.16);
        border-radius: 0.75rem !important;
    }

    .dark .fi-ta-ctn {
        border-color: rgba(51, 65, 85, 0.5);
    }

    /* ---------- Buttons ---------- */
    .fi-btn {
        font-weight: 500 !important;
        letter-spacing: 0.01em;
    }

    /* ---------- Page header ---------- */
    .fi-header {
        padding-bottom: 0.5rem !important;
    }

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

    /* ---------- Forms ---------- */
    .fi-section-content {
        padding: 1rem !important;
    }

    .fi-fo-component-ctn {
        margin-bottom: 0.5rem !important;
    }

    /* ---------- Scrollbar ---------- */
    .fi-sidebar-nav::-webkit-scrollbar {
        width: 6px;
    }

    .fi-sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.35);
        border-radius: 6px;
    }

    .fi-sidebar-nav::-webkit-scrollbar-thumb:hover {
        background: rgba(100, 116, 139, 0.55);
    }

    /* ---------- Modals ---------- */
    .fi-modal-window {
        border-radius: 1rem !important;
        box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.04);
    }

    .fi-modal-header {
        padding: 1.25rem 1.5rem 0.75rem 1.5rem !important;
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    }

    .fi-modal-heading {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        letter-spacing: -0.01em;
    }

    .fi-modal-content {
        padding: 1.25rem 1.5rem !important;
    }

    .fi-modal-footer {
        padding: 0.85rem 1.5rem !important;
        border-top: 1px solid rgba(148, 163, 184, 0.16);
        background: rgb(248 250 252);
    }

    .dark .fi-modal-footer {
        background: rgba(15, 23, 42, 0.4);
    }

    .fi-fo-fieldset {
        padding: 0.75rem !important;
    }

    /* ============================================================
     * Toggle alignment — global fix (revised 2026-05-28)
     *
     * Two issues stacked on top of each other:
     *
     *   1. Horizontal misalignment of the toggle pill within the
     *      field wrapper. Filament 3 renders the toggle label and the
     *      switch button as siblings inside a flex `justify-between`
     *      container. In wide / full-width columns, this pushes the
     *      pill to the far-right edge with a huge disconnected gap.
     *
     *   2. Vertical mis-centering of the white knob INSIDE the pill.
     *      The previous fix added `padding: 0.4rem 0 !important` to
     *      `.fi-fo-toggle` for extra breathing room, but the
     *      absolutely-positioned `<span>` knob doesn't re-center when
     *      the button gains vertical padding — the track stretches
     *      taller but the knob stays anchored to the original top
     *      offset, leaving it visually high. Reported 2026-05-28.
     *
     * Solution:
     *   • Drop the padding override entirely so the toggle button
     *     stays at its native height, where Filament's own absolute
     *     positioning of the knob already centers it.
     *   • Force the toggle button itself to `inline-flex` +
     *     `align-items: center` so any host-page CSS that touches
     *     line-height can't drag the knob off-center.
     *   • Keep the horizontal `justify-content: start` rule so the
     *     pill sits next to its label in wide layouts.
     * ============================================================ */
    .fi-fo-field-wrp:has(button.fi-fo-toggle) .flex.items-center.justify-between {
        justify-content: start !important;
        gap: 0.85rem !important;
        display: inline-flex !important;
    }

    /* Re-center the white knob — defence-in-depth against any
       host-page CSS that breaks vertical alignment inside the pill. */
    button.fi-fo-toggle {
        display: inline-flex !important;
        align-items: center !important;
        line-height: 1 !important;
    }

    button.fi-fo-toggle>span {
        align-self: center !important;
    }

    /* ---------- Back button bar ---------- */
    .ard-back-bar {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .ard-back-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.4rem 0.85rem;
        border: 1px solid rgb(226 232 240);
        background: white;
        border-radius: 0.5rem;
        font-size: 0.8rem;
        font-weight: 500;
        color: rgb(51 65 85);
        text-decoration: none;
        transition: background-color .12s ease, border-color .12s ease;
    }

    .ard-back-btn:hover {
        background: rgb(248 250 252);
        border-color: rgb(99 102 241);
        color: rgb(67 56 202);
    }

    .dark .ard-back-btn {
        background: rgb(30 41 59);
        border-color: rgb(51 65 85);
        color: rgb(203 213 225);
    }

    .dark .ard-back-btn:hover {
        background: rgb(15 23 42);
        border-color: rgb(99 102 241);
        color: rgb(199 210 254);
    }

    .ard-back-btn svg {
        width: 14px;
        height: 14px;
    }

    /* ============================================================
     * App Footer — 3-column professional bar
     * Injected via PanelsRenderHook::FOOTER in AdminPanelProvider.
     * ============================================================ */
    .ard-footer {
        width: 100%;
        border-top: 1px solid rgba(148, 163, 184, 0.18);
        background: rgba(255, 255, 255, 0.70);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        padding: 0.7rem 1.5rem;
        margin-top: auto;
    }

    .dark .ard-footer {
        border-top-color: rgba(30, 41, 59, 0.6);
        background: rgba(15, 23, 42, 0.75);
    }

    .ard-footer-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        max-width: 100%;
    }

    /* Each column takes equal 1/3 width */
    .ard-footer-col {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.775rem;
        color: rgb(100 116 139);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dark .ard-footer-col {
        color: rgb(148 163 184);
    }

    /* Left — aligned left (default) */
    .ard-footer-left {
        justify-content: flex-start;
    }

    /* Centre — centred */
    .ard-footer-center {
        justify-content: center;
        text-align: center;
    }

    /* Right — aligned right */
    .ard-footer-right {
        justify-content: flex-end;
        text-align: right;
    }

    .ard-footer-label {
        font-weight: 500;
        flex-shrink: 0;
    }

    /* Branded link with accent underline on hover */
    .ard-footer-link {
        font-weight: 600;
        color: rgb(79 70 229);
        text-decoration: none;
        position: relative;
        transition: color 0.15s ease;
    }

    .ard-footer-link::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -1px;
        width: 0;
        height: 1.5px;
        background: rgb(79 70 229);
        border-radius: 1px;
        transition: width 0.2s ease;
    }

    .ard-footer-link:hover {
        color: rgb(67 56 202);
    }

    .ard-footer-link:hover::after {
        width: 100%;
    }

    .dark .ard-footer-link {
        color: rgb(129 140 248);
    }

    .dark .ard-footer-link::after {
        background: rgb(129 140 248);
    }

    .dark .ard-footer-link:hover {
        color: rgb(165 180 252);
    }

    .ard-footer-copy {
        font-weight: 500;
        letter-spacing: 0.01em;
    }

    /* RedMind Technologies — R and M in red, rest in white */
    .ard-footer-brand {
        /* Override the default indigo link colour — each span
           controls its own colour so the hover tint still works. */
        color: inherit !important;
        font-weight: 700 !important;
        letter-spacing: 0.01em;
    }

    .ard-brand-red {
        color: #ef4444 !important;
        /* Tailwind red-500 */
        font-weight: 700;
    }

    .ard-brand-white {
        color: #ffffff !important;
        font-weight: 700;
    }

    /* Light mode: footer bg is light so switch to near-black text.
       Filament adds .dark to <html>, NOT to .fi-layout — selector
       must target html:not(.dark) to work correctly. */
    html:not(.dark) .ard-brand-white {
        color: rgb(15 23 42) !important;
        /* slate-950 */
    }

    /* Dark mode: always white */
    html.dark .ard-brand-white {
        color: #ffffff !important;
    }

    /* Hover: subtly lighten the whole brand name */
    .ard-footer-brand:hover .ard-brand-red {
        color: #f87171 !important;
        /* red-400 — slightly brighter */
    }

    .ard-footer-brand:hover .ard-brand-white {
        color: #e2e8f0 !important;
        /* slate-200 */
    }

    /* Responsive: stack to a single centred column below 640px. */
    @media (max-width: 640px) {
        .ard-footer-inner {
            flex-direction: column;
            gap: 0.35rem;
            text-align: center;
        }

        .ard-footer-col {
            justify-content: center !important;
            flex: unset;
        }
    }

    /* ============================================================
     * Daily Sales (Overall) dashboard — dark-mode-aware card system
     * Used by resources/views/filament/pages/daily-sales-dashboard.
     * Inline styles in that view drift in dark theme, so the page
     * was refactored to use these semantic classes instead.
     * ============================================================ */

    /* Base card (Day Shift, Night Shift, Stock Calculation) */
    .ard-ds-card {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
        padding: 1.25rem;
    }

    .dark .ard-ds-card {
        background: rgb(30 41 59);
        border-color: rgb(51 65 85);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    }

    .ard-ds-card-heading {
        margin: 0;
        font-size: 0.95rem;
        font-weight: 600;
        color: #0f172a;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .dark .ard-ds-card-heading {
        color: rgb(241 245 249);
    }

    .ard-ds-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.85rem;
    }

    .ard-ds-row,
    .ard-ds-row-last {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.4rem 0;
        font-size: 0.875rem;
    }

    .ard-ds-row {
        border-bottom: 1px solid #f1f5f9;
    }

    .dark .ard-ds-row {
        border-bottom-color: rgba(51, 65, 85, 0.55);
    }

    .ard-ds-label {
        color: #64748b;
    }

    .dark .ard-ds-label {
        color: rgb(148 163 184);
    }

    .ard-ds-value {
        color: #0f172a;
        font-weight: 500;
        font-variant-numeric: tabular-nums;
    }

    .dark .ard-ds-value {
        color: rgb(226 232 240);
    }

    .ard-ds-value-neg {
        color: #b91c1c;
        font-weight: 500;
        font-variant-numeric: tabular-nums;
    }

    .dark .ard-ds-value-neg {
        color: rgb(248 113 113);
    }

    .ard-ds-total-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.6rem 0;
        border-top: 2px solid #e2e8f0;
        margin-top: 0.4rem;
        font-size: 0.95rem;
        font-weight: 700;
        color: #0f172a;
        font-variant-numeric: tabular-nums;
    }

    .dark .ard-ds-total-row {
        color: rgb(241 245 249);
        border-top-color: rgb(51 65 85);
    }

    .ard-ds-total-row-success {
        color: #047857;
        border-top-color: #a7f3d0;
    }

    .dark .ard-ds-total-row-success {
        color: rgb(110 231 183);
        border-top-color: rgba(16, 185, 129, 0.35);
    }

    .ard-ds-empty {
        padding: 1.5rem 0;
        color: #94a3b8;
        font-size: 0.875rem;
        text-align: center;
        font-style: italic;
    }

    .dark .ard-ds-empty {
        color: rgb(100 116 139);
    }

    .ard-ds-ref-tag {
        font-size: 0.75rem;
        font-weight: 600;
        color: #64748b;
        background: #f1f5f9;
        padding: 0.2rem 0.55rem;
        border-radius: 6px;
    }

    .dark .ard-ds-ref-tag {
        color: rgb(203 213 225);
        background: rgba(51, 65, 85, 0.6);
    }

    .ard-ds-no-entry {
        font-size: 0.7rem;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .dark .ard-ds-no-entry {
        color: rgb(100 116 139);
    }

    /* Shift icon chips */
    .ard-ds-chip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 14px;
    }

    .ard-ds-chip-day {
        background: #fef3c7;
        color: #b45309;
    }

    .dark .ard-ds-chip-day {
        background: rgba(180, 83, 9, 0.25);
        color: rgb(253 224 71);
    }

    .ard-ds-chip-night {
        background: #e0e7ff;
        color: #3730a3;
    }

    .dark .ard-ds-chip-night {
        background: rgba(55, 48, 163, 0.35);
        color: rgb(199 210 254);
    }

    .ard-ds-chip-grand {
        background: #10b981;
        color: #ffffff;
    }

    .ard-ds-chip-fuel {
        background: #fef3c7;
        color: #92400e;
    }

    .dark .ard-ds-chip-fuel {
        background: rgba(146, 64, 14, 0.30);
        color: rgb(252 211 77);
    }

    .ard-ds-chip-balance {
        background: #3b82f6;
        color: #ffffff;
    }

    /* Grand Total card (gradient green) */
    .ard-ds-grand-card {
        background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
        border: 1px solid #a7f3d0;
        border-radius: 12px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
        padding: 1.25rem;
    }

    .dark .ard-ds-grand-card {
        background: linear-gradient(180deg, rgba(6, 78, 59, 0.35) 0%, rgba(6, 95, 70, 0.18) 100%);
        border-color: rgba(16, 185, 129, 0.35);
    }

    .ard-ds-grand-heading {
        margin: 0 0 0.85rem 0;
        font-size: 0.95rem;
        font-weight: 600;
        color: #065f46;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .dark .ard-ds-grand-heading {
        color: rgb(167 243 208);
    }

    .ard-ds-grand-received {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.55rem 0;
        border-top: 1px solid #a7f3d0;
        margin-top: 0.4rem;
        font-size: 0.875rem;
        color: #047857;
        font-weight: 500;
        font-variant-numeric: tabular-nums;
    }

    .dark .ard-ds-grand-received {
        color: rgb(110 231 183);
        border-top-color: rgba(16, 185, 129, 0.35);
    }

    .ard-ds-grand-pill {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.8rem 0.85rem;
        background: #10b981;
        color: #ffffff;
        border-radius: 8px;
        margin-top: 0.6rem;
        font-size: 1rem;
        font-weight: 700;
        font-variant-numeric: tabular-nums;
    }

    .ard-ds-divider {
        border-top: 1px dashed rgba(4, 120, 87, 0.25);
        margin: 0.5rem 0;
    }

    .dark .ard-ds-divider {
        border-top-color: rgba(16, 185, 129, 0.35);
    }

    .ard-ds-flow-line {
        position: absolute;
        right: 4px;
        top: 12px;
        bottom: 12px;
        width: 2px;
        border-right: 2px dashed rgba(16, 185, 129, 0.45);
        z-index: 10;
    }

    .dark .ard-ds-flow-line {
        border-right-color: rgba(16, 185, 129, 0.6);
    }

    .ard-ds-flow-pointer {
        position: absolute;
        right: -1.5rem;
        top: 50%;
        width: 1.5rem;
        border-top: 2px dashed rgba(16, 185, 129, 0.45);
        transform: translateY(-50%);
    }

    .dark .ard-ds-flow-pointer {
        border-top-color: rgba(16, 185, 129, 0.6);
    }

    .ard-ds-minus-indicator {
        position: absolute;
        right: -1.75rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.75rem;
        font-weight: bold;
        color: #b91c1c;
        background: #ecfdf5;
        padding: 0 4px;
        border-radius: 4px;
        line-height: 1;
        border: 1px solid rgba(185, 28, 28, 0.2);
        z-index: 20;
    }

    .dark .ard-ds-minus-indicator {
        color: #f87171;
        background: rgb(6, 78, 59);
        border-color: rgba(248, 113, 113, 0.2);
    }

    /* Stock Calculation table */
    .ard-ds-stock-wrap {
        overflow-x: auto;
    }

    .ard-ds-stock-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.875rem;
    }

    .ard-ds-stock-table thead tr {
        background: #f8fafc;
    }

    .dark .ard-ds-stock-table thead tr {
        background: rgba(15, 23, 42, 0.5);
    }

    .ard-ds-stock-table th {
        text-align: right;
        padding: 0.75rem 0.85rem;
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
        border-bottom: 1px solid #e2e8f0;
    }

    .ard-ds-stock-table th:first-child {
        text-align: left;
    }

    .dark .ard-ds-stock-table th {
        color: rgb(148 163 184);
        border-bottom-color: rgb(51 65 85);
    }

    .ard-ds-stock-table td {
        padding: 0.85rem;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
        font-variant-numeric: tabular-nums;
        color: #0f172a;
    }

    .dark .ard-ds-stock-table td {
        border-bottom-color: rgba(51, 65, 85, 0.5);
        color: rgb(226 232 240);
    }

    .ard-ds-stock-table td:first-child {
        text-align: left;
    }

    .ard-ds-stock-fuel-name {
        font-weight: 600;
        color: #0f172a;
    }

    .dark .ard-ds-stock-fuel-name {
        color: rgb(241 245 249);
    }

    .ard-ds-stock-fuel-code {
        font-size: 0.7rem;
        color: #94a3b8;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-top: 2px;
    }

    .dark .ard-ds-stock-fuel-code {
        color: rgb(100 116 139);
    }

    .ard-ds-stock-sold {
        color: #b91c1c !important;
    }

    .dark .ard-ds-stock-sold {
        color: rgb(248 113 113) !important;
    }

    .ard-ds-stock-new {
        color: #047857 !important;
    }

    .dark .ard-ds-stock-new {
        color: rgb(110 231 183) !important;
    }

    .ard-ds-stock-available {
        font-weight: 700 !important;
    }

    .ard-ds-stock-available--neg {
        color: #b91c1c !important;
    }

    .dark .ard-ds-stock-available--neg {
        color: rgb(248 113 113) !important;
    }

    .ard-ds-stock-note {
        font-size: 0.75rem;
        color: #94a3b8;
        margin-top: 0.75rem;
        margin-bottom: 0;
        line-height: 1.5;
    }

    .dark .ard-ds-stock-note {
        color: rgb(100 116 139);
    }

    .ard-ds-stock-note strong {
        color: #475569;
    }

    .dark .ard-ds-stock-note strong {
        color: rgb(203 213 225);
    }

    /* ─── System Stock Reconciliation ────────────────────────────────
       Lives inside the Stock Calculation card, under the derived table.
       Reuses .ard-ds-stock-table wholesale so the two tables share
       column rhythm, borders and dark-mode treatment; only the input,
       the button and the status pills are new. Blue (#3b82f6 →
       #2563eb) is the palette already used by .ard-ds-chip-balance and
       the Balance Tracking card. */
    .ard-ds-recon {
        margin-top: 1.5rem;
        padding-top: 1.25rem;
        border-top: 1px dashed #e2e8f0;
    }

    .dark .ard-ds-recon {
        border-top-color: rgb(51 65 85);
    }

    .ard-ds-recon-heading {
        font-size: 0.9rem;
        font-weight: 700;
        color: #0f172a;
        margin: 0 0 0.85rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .dark .ard-ds-recon-heading {
        color: rgb(241 245 249);
    }

    .ard-ds-recon-banner {
        font-size: 0.75rem;
        line-height: 1.5;
        padding: 0.6rem 0.8rem;
        margin-bottom: 0.85rem;
        border-radius: 8px;
        background: #fffbeb;
        border: 1px solid #fde68a;
        color: #92400e;
    }

    .dark .ard-ds-recon-banner {
        background: rgba(146, 64, 14, 0.20);
        border-color: rgba(217, 119, 6, 0.45);
        color: rgb(252 211 77);
    }

    /* Status is a label, not a figure - left-align it so it doesn't read
       as a number in the tabular-nums column flow. */
    .ard-ds-recon-table th:nth-child(5),
    .ard-ds-recon-table td:nth-child(5) {
        text-align: left;
    }

    .ard-ds-recon-input {
        width: 100%;
        max-width: 150px;
        padding: 0.4rem 0.6rem;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        background: #ffffff;
        color: #0f172a;
        font-size: 0.875rem;
        font-variant-numeric: tabular-nums;
        text-align: right;
        transition: border-color 120ms ease, box-shadow 120ms ease;
    }

    .ard-ds-recon-input:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
    }

    .ard-ds-recon-input:disabled {
        background: #f1f5f9;
        color: #94a3b8;
        cursor: not-allowed;
    }

    .dark .ard-ds-recon-input {
        background: rgb(15 23 42);
        border-color: rgb(51 65 85);
        color: rgb(226 232 240);
    }

    .dark .ard-ds-recon-input:disabled {
        background: rgba(51, 65, 85, 0.4);
        color: rgb(100 116 139);
    }

    /* Current Stock (Tank) - a read-only mirror of Tank Master, toned
       down so it reads as reference rather than as another figure the
       operator is meant to reconcile. */
    .ard-ds-recon-tank {
        font-weight: 600;
        color: #475569;
    }

    .dark .ard-ds-recon-tank {
        color: rgb(148 163 184);
    }


    .ard-ds-recon-locked-value {
        font-weight: 700;
        color: #0f172a;
    }

    .dark .ard-ds-recon-locked-value {
        color: rgb(226 232 240);
    }

    .ard-ds-recon-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.4rem 0.9rem;
        border: 0;
        border-radius: 8px;
        background: #3b82f6;
        color: #ffffff;
        font-size: 0.78rem;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        transition: background 120ms ease, box-shadow 120ms ease;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    }

    .ard-ds-recon-btn:hover {
        background: #2563eb;
    }

    .ard-ds-recon-btn:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

    /* One Save for the whole table, right-aligned under it so it reads
       as belonging to the table rather than to the last row. */
    .ard-ds-recon-actions {
        display: flex;
        justify-content: flex-end;
        margin-top: 0.85rem;
    }

    .ard-ds-recon-actions .ard-ds-recon-btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.82rem;
    }

    .ard-ds-recon-confirmed {
        font-size: 0.75rem;
        font-weight: 600;
        color: #64748b;
    }

    .dark .ard-ds-recon-confirmed {
        color: rgb(148 163 184);
    }

    .ard-ds-recon-muted {
        color: #94a3b8 !important;
    }

    .ard-ds-recon-match {
        color: #047857 !important;
    }

    .dark .ard-ds-recon-match {
        color: rgb(110 231 183) !important;
    }

    .ard-ds-recon-pill {
        display: inline-block;
        padding: 0.2rem 0.55rem;
        border-radius: 999px;
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        white-space: nowrap;
    }

    .ard-ds-recon-pill--pending {
        background: #f1f5f9;
        color: #64748b;
    }

    .ard-ds-recon-pill--match {
        background: #ecfdf5;
        color: #047857;
    }

    .ard-ds-recon-pill--surplus {
        background: #eff6ff;
        color: #1d4ed8;
    }

    .ard-ds-recon-pill--short {
        background: #fef2f2;
        color: #b91c1c;
    }

    .dark .ard-ds-recon-pill--pending {
        background: rgba(51, 65, 85, 0.55);
        color: rgb(148 163 184);
    }

    .dark .ard-ds-recon-pill--match {
        background: rgba(6, 78, 59, 0.45);
        color: rgb(110 231 183);
    }

    .dark .ard-ds-recon-pill--surplus {
        background: rgba(30, 58, 138, 0.45);
        color: rgb(147 197 253);
    }

    .dark .ard-ds-recon-pill--short {
        background: rgba(127, 29, 29, 0.45);
        color: rgb(248 113 113);
    }

    /* Balance Tracking card (gradient blue) */
    .ard-ds-balance-card {
        background: linear-gradient(180deg, #eff6ff 0%, #f0f9ff 100%);
        border: 1px solid #bfdbfe;
        border-radius: 12px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
        padding: 1.25rem;
    }

    .dark .ard-ds-balance-card {
        background: linear-gradient(180deg, rgba(30, 58, 138, 0.32) 0%, rgba(30, 64, 175, 0.18) 100%);
        border-color: rgba(59, 130, 246, 0.35);
    }

    .ard-ds-balance-heading {
        margin: 0 0 0.85rem 0;
        font-size: 0.95rem;
        font-weight: 600;
        color: #1e3a8a;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .dark .ard-ds-balance-heading {
        color: rgb(191 219 254);
    }

    .ard-ds-balance-item {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 0.95rem 1rem;
    }

    .dark .ard-ds-balance-item {
        background: rgb(30 41 59);
        border-color: rgb(51 65 85);
    }

    .ard-ds-balance-item--alert {
        background: #fef2f2;
        border-color: #fecaca;
    }

    .dark .ard-ds-balance-item--alert {
        background: rgba(127, 29, 29, 0.25);
        border-color: rgba(248, 113, 113, 0.35);
    }

    .ard-ds-balance-item--ok {
        background: #ecfdf5;
        border-color: #a7f3d0;
    }

    .dark .ard-ds-balance-item--ok {
        background: rgba(6, 78, 59, 0.30);
        border-color: rgba(16, 185, 129, 0.35);
    }

    .ard-ds-balance-label {
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #64748b;
    }

    .dark .ard-ds-balance-label {
        color: rgb(148 163 184);
    }

    .ard-ds-balance-label--alert {
        color: #991b1b;
    }

    .dark .ard-ds-balance-label--alert {
        color: rgb(252 165 165);
    }

    .ard-ds-balance-label--ok {
        color: #065f46;
    }

    .dark .ard-ds-balance-label--ok {
        color: rgb(167 243 208);
    }

    .ard-ds-balance-value {
        font-size: 1.35rem;
        font-weight: 700;
        color: #0f172a;
        margin-top: 0.4rem;
        font-variant-numeric: tabular-nums;
    }

    .dark .ard-ds-balance-value {
        color: rgb(241 245 249);
    }

    .ard-ds-balance-value--received {
        color: #047857;
    }

    .dark .ard-ds-balance-value--received {
        color: rgb(110 231 183);
    }

    .ard-ds-balance-value--alert {
        color: #b91c1c;
        font-size: 1.5rem;
        font-weight: 800;
    }

    .dark .ard-ds-balance-value--alert {
        color: rgb(248 113 113);
    }

    .ard-ds-balance-value--ok {
        color: #047857;
        font-size: 1.5rem;
        font-weight: 800;
    }

    .dark .ard-ds-balance-value--ok {
        color: rgb(110 231 183);
    }

    .ard-ds-balance-note {
        font-size: 0.75rem;
        color: #475569;
        margin-top: 0.85rem;
        margin-bottom: 0;
        line-height: 1.5;
    }

    .dark .ard-ds-balance-note {
        color: rgb(203 213 225);
    }

    /* Grid wrappers */
    .ard-ds-shift-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1rem;
        margin-top: 1.25rem;
    }

    .ard-ds-balance-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1rem;
    }

    /* ============================================================
     * Report KPI / surface / diff / ledger / history classes
     * Shared across:
     *   • Reports: Purchase Aging, Payments, Reorder, Supplier Ledger
     *   • Approval Requests view (reason, diff table, history)
     * Each light-mode rule has a `.dark` counterpart so the screens
     * read correctly under both Filament themes.
     * ============================================================ */

    /* ---- Grid wrappers ---- */
    .ard-kpi-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 0.85rem;
        margin-bottom: 1.1rem;
    }

    .ard-kpi-grid--wide {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .ard-kpi-grid--cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        margin-bottom: 0;
        margin-top: 0.85rem;
    }

    .ard-kpi-grid--identity {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        margin-top: 1rem;
        margin-bottom: 0;
    }

    /* ---- KPI tile ---- */
    .ard-kpi {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 0.85rem 1rem;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }

    .dark .ard-kpi {
        background: rgb(30 41 59);
        border-color: rgb(51 65 85);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    }

    .ard-kpi-label {
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
    }

    .dark .ard-kpi-label {
        color: rgb(148 163 184);
    }

    .ard-kpi-value {
        font-size: 1.4rem;
        font-weight: 700;
        color: #0f172a;
        margin-top: 0.2rem;
        font-variant-numeric: tabular-nums;
    }

    .dark .ard-kpi-value {
        color: rgb(241 245 249);
    }

    .ard-kpi-value--sm {
        font-size: 1.1rem;
    }

    .ard-kpi-value--md {
        font-size: 1.15rem;
    }

    .ard-kpi-value--lg {
        font-size: 1.55rem;
    }

    .ard-kpi-value--xl {
        font-size: 1.2rem;
    }

    .ard-kpi-value--danger {
        color: #b91c1c;
    }

    .dark .ard-kpi-value--danger {
        color: rgb(248 113 113);
    }

    .ard-kpi-value--warn {
        color: #b45309;
    }

    .dark .ard-kpi-value--warn {
        color: rgb(251 191 36);
    }

    .ard-kpi-value--success {
        color: #047857;
    }

    .dark .ard-kpi-value--success {
        color: rgb(110 231 183);
    }

    .ard-kpi-hint {
        font-size: 0.7rem;
        color: #94a3b8;
        margin-top: 0.15rem;
    }

    .dark .ard-kpi-hint {
        color: rgb(100 116 139);
    }

    .ard-kpi-hint--md {
        font-size: 0.78rem;
        color: #64748b;
    }

    .dark .ard-kpi-hint--md {
        color: rgb(148 163 184);
    }

    /* ---- Surface card (used by supplier identity strip, etc.) ---- */
    .ard-surface {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 1.05rem 1.2rem;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    }

    .dark .ard-surface {
        background: rgb(30 41 59);
        border-color: rgb(51 65 85);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    }

    .ard-surface--padded-table {
        padding: 0;
        overflow-x: auto;
        margin-top: 1rem;
    }

    .ard-surface-header {
        padding: 0.85rem 1.1rem 0.6rem;
        border-bottom: 1px solid #e2e8f0;
    }

    .dark .ard-surface-header {
        border-bottom-color: rgb(51 65 85);
    }

    .ard-surface-title {
        font-size: 0.95rem;
        font-weight: 600;
        color: #0f172a;
    }

    .dark .ard-surface-title {
        color: rgb(241 245 249);
    }

    .ard-surface-subtitle {
        font-size: 0.75rem;
        color: #64748b;
        margin-top: 0.1rem;
    }

    .dark .ard-surface-subtitle {
        color: rgb(148 163 184);
    }

    .ard-gstin-line {
        font-size: 0.7rem;
        color: #64748b;
        margin-top: 0.2rem;
    }

    .dark .ard-gstin-line {
        color: rgb(148 163 184);
    }

    .ard-gstin-value {
        font-family: monospace;
        color: #334155;
    }

    .dark .ard-gstin-value {
        color: rgb(203 213 225);
    }

    .ard-arrow-muted {
        color: #94a3b8;
    }

    .dark .ard-arrow-muted {
        color: rgb(100 116 139);
    }

    /* ---- Empty state box (dashed) ---- */
    .ard-empty-box {
        background: #ffffff;
        border: 1px dashed #cbd5e1;
        border-radius: 12px;
        padding: 2.5rem 1.5rem;
        text-align: center;
        color: #64748b;
        margin-top: 1rem;
    }

    .dark .ard-empty-box {
        background: rgb(30 41 59);
        border-color: rgba(71, 85, 105, 0.8);
        color: rgb(148 163 184);
    }

    .ard-empty-icon {
        font-size: 2rem;
        line-height: 1;
        margin-bottom: 0.5rem;
    }

    .ard-empty-title {
        font-size: 1.05rem;
        font-weight: 600;
        color: #0f172a;
    }

    .dark .ard-empty-title {
        color: rgb(241 245 249);
    }

    .ard-empty-subtitle {
        font-size: 0.85rem;
        margin-top: 0.35rem;
    }

    /* ---- Snapshot strip (Aging report) ---- */
    .ard-snapshot {
        margin: 0.6rem 0 0.2rem;
        font-size: 0.75rem;
        color: #64748b;
    }

    .dark .ard-snapshot {
        color: rgb(148 163 184);
    }

    .ard-snapshot strong {
        color: #334155;
    }

    .dark .ard-snapshot strong {
        color: rgb(203 213 225);
    }

    /* ---- Approval reason callout ---- */
    .ard-reason-box {
        white-space: pre-wrap;
        background: #f8fafc;
        padding: 10px 12px;
        border-radius: 6px;
        border-left: 3px solid #4f46e5;
        color: #0f172a;
    }

    .dark .ard-reason-box {
        background: rgba(15, 23, 42, 0.6);
        border-left-color: rgb(129 140 248);
        color: rgb(241 245 249);
    }

    /* ---- Approval diff table ---- */
    .ard-diff-wrap {
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        overflow: hidden;
    }

    .dark .ard-diff-wrap {
        border-color: rgb(51 65 85);
    }

    .ard-diff-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 12.5px;
    }

    .ard-diff-table thead tr {
        background: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
    }

    .dark .ard-diff-table thead tr {
        background: rgba(15, 23, 42, 0.5);
        border-bottom-color: rgb(51 65 85);
    }

    .ard-diff-table th {
        text-align: left;
        padding: 8px 12px;
        font-size: 11px;
        text-transform: uppercase;
        color: #64748b;
        letter-spacing: 0.04em;
    }

    .dark .ard-diff-table th {
        color: rgb(148 163 184);
    }

    .ard-diff-row {
        border-bottom: 1px solid #f1f5f9;
        background: transparent;
    }

    .dark .ard-diff-row {
        border-bottom-color: rgba(51, 65, 85, 0.5);
    }

    .ard-diff-row.is-changed {
        background: #fffbeb;
    }

    .dark .ard-diff-row.is-changed {
        background: rgba(180, 83, 9, 0.12);
    }

    .ard-diff-cell-field {
        padding: 8px 12px;
        vertical-align: top;
        font-weight: 500;
        color: #0f172a;
    }

    .dark .ard-diff-cell-field {
        color: rgb(241 245 249);
    }

    .ard-diff-field-key {
        font-size: 10px;
        color: #94a3b8;
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    }

    .dark .ard-diff-field-key {
        color: rgb(100 116 139);
    }

    .ard-diff-cell-old {
        padding: 8px 12px;
        vertical-align: top;
        color: #475569;
        word-break: break-word;
    }

    .dark .ard-diff-cell-old {
        color: rgb(148 163 184);
    }

    .ard-diff-cell-new {
        padding: 8px 12px;
        vertical-align: top;
        color: #0f172a;
        word-break: break-word;
    }

    .dark .ard-diff-cell-new {
        color: rgb(241 245 249);
    }

    .ard-diff-pill-old {
        background: #fee2e2;
        padding: 2px 6px;
        border-radius: 4px;
        text-decoration: line-through;
        color: #991b1b;
    }

    .dark .ard-diff-pill-old {
        background: rgba(127, 29, 29, 0.35);
        color: rgb(252 165 165);
    }

    .ard-diff-pill-new {
        background: #dcfce7;
        padding: 2px 6px;
        border-radius: 4px;
        color: #166534;
        font-weight: 500;
    }

    .dark .ard-diff-pill-new {
        background: rgba(6, 78, 59, 0.35);
        color: rgb(134 239 172);
    }

    .ard-diff-muted {
        color: #94a3b8;
    }

    .dark .ard-diff-muted {
        color: rgb(100 116 139);
    }

    .ard-diff-empty {
        padding: 16px;
        text-align: center;
        color: #94a3b8;
        font-style: italic;
    }

    .dark .ard-diff-empty {
        color: rgb(100 116 139);
    }

    /* ---- Empty-state callout (no changed fields) ---- */
    .ard-diff-empty-state {
        padding: 1.25rem 1.5rem;
        background: rgba(99, 102, 241, 0.05);
        border: 1px dashed rgba(99, 102, 241, 0.25);
        border-radius: 0.75rem;
        color: rgb(71 85 105);
    }

    .ard-diff-empty-state strong {
        display: block;
        font-size: 0.95rem;
        color: rgb(30 41 59);
        margin-bottom: 0.35rem;
    }

    .ard-diff-empty-state p {
        margin: 0;
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .dark .ard-diff-empty-state {
        background: rgba(129, 140, 248, 0.08);
        border-color: rgba(129, 140, 248, 0.30);
        color: rgb(148 163 184);
    }

    .dark .ard-diff-empty-state strong {
        color: rgb(226 232 240);
    }

    /* ---- null / empty value sigil ---- */
    .ard-diff-null {
        font-style: italic;
        color: #94a3b8;
        font-size: 0.85em;
    }

    .dark .ard-diff-null {
        color: rgb(100 116 139);
    }

    /* ---- Nested table — for list-of-objects values (e.g. pump_readings) ---- */
    .ard-diff-nested-table {
        width: 100%;
        border-collapse: collapse;
        margin: 0;
        font-size: 0.78rem;
        background: rgba(255, 255, 255, 0.6);
        border-radius: 0.5rem;
        overflow: hidden;
    }

    .dark .ard-diff-nested-table {
        background: rgba(15, 23, 42, 0.4);
    }

    .ard-diff-nested-table th {
        background: rgba(15, 23, 42, 0.06);
        font-weight: 700;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: rgb(71 85 105);
        padding: 0.4rem 0.55rem;
        text-align: left;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    }

    .dark .ard-diff-nested-table th {
        background: rgba(255, 255, 255, 0.05);
        color: rgb(148 163 184);
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .ard-diff-nested-table td {
        padding: 0.4rem 0.55rem;
        border-bottom: 1px solid rgba(15, 23, 42, 0.05);
        vertical-align: top;
        font-variant-numeric: tabular-nums;
    }

    .dark .ard-diff-nested-table td {
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }

    .ard-diff-nested-table tr:last-child td {
        border-bottom: none;
    }

    /* ---- Chip list — for flat arrays of scalars ---- */
    .ard-diff-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .ard-diff-chip {
        background: rgba(99, 102, 241, 0.10);
        padding: 0.15rem 0.5rem;
        border-radius: 999px;
        font-size: 0.78rem;
        color: rgb(67 56 202);
    }

    .dark .ard-diff-chip {
        background: rgba(129, 140, 248, 0.18);
        color: rgb(199 210 254);
    }

    /* ---- Key/value vertical list — for associative arrays ---- */
    .ard-diff-kv {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
        font-size: 0.8rem;
    }

    .ard-diff-kv-row {
        display: flex;
        gap: 0.5rem;
        padding: 0.15rem 0;
        border-bottom: 1px dashed rgba(15, 23, 42, 0.06);
    }

    .ard-diff-kv-row:last-child {
        border-bottom: none;
    }

    .dark .ard-diff-kv-row {
        border-bottom-color: rgba(255, 255, 255, 0.06);
    }

    .ard-diff-kv-key {
        font-weight: 600;
        color: rgb(71 85 105);
        min-width: 8rem;
    }

    .dark .ard-diff-kv-key {
        color: rgb(148 163 184);
    }

    .ard-diff-kv-val {
        flex: 1;
        font-variant-numeric: tabular-nums;
    }

    /* ---- JSON fallback — pretty-printed when no better shape detected ---- */
    .ard-diff-json {
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
        font-size: 0.75rem;
        background: rgba(15, 23, 42, 0.05);
        padding: 0.5rem 0.6rem;
        border-radius: 0.4rem;
        max-height: 12rem;
        overflow: auto;
        margin: 0;
        color: rgb(30 41 59);
    }

    .dark .ard-diff-json {
        background: rgba(255, 255, 255, 0.04);
        color: rgb(226 232 240);
    }

    /* Pills carrying complex content (nested tables, kv lists) need
       to relax the inline padding from the simple-scalar variant. */
    .ard-diff-pill-old,
    .ard-diff-pill-new {
        display: block;
        padding: 0.35rem 0.5rem;
    }

    /* ============================================================
     * Edit-page read-only context panel
     *
     * Used on EditPurchaseReceipt (and any future Edit page with a
     * "you're editing this record" read-only header). Mirrors the
     * field shape of the corresponding View page so the operator
     * doesn't have to leave the Edit form to refresh their memory
     * of what they're touching.
     * ============================================================ */
    .ard-edit-context {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .ard-edit-context-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.85rem 1.5rem;
    }

    @media (max-width: 768px) {
        .ard-edit-context-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (max-width: 480px) {
        .ard-edit-context-grid {
            grid-template-columns: 1fr;
        }
    }

    .ard-edit-context-field {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }

    .ard-edit-context-label {
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: rgb(100 116 139);
    }

    .dark .ard-edit-context-label {
        color: rgb(148 163 184);
    }

    .ard-edit-context-value {
        font-size: 0.9rem;
        color: rgb(15 23 42);
        font-variant-numeric: tabular-nums;
    }

    .dark .ard-edit-context-value {
        color: rgb(241 245 249);
    }

    .ard-edit-context-strong {
        font-weight: 700;
    }

    .ard-edit-context-badge {
        display: inline-block;
        padding: 0.18rem 0.55rem;
        border-radius: 999px;
        font-size: 0.72rem;
        font-weight: 600;
    }

    .ard-edit-context-subhead {
        margin-top: 0.5rem;
        font-size: 0.95rem;
        font-weight: 700;
        color: rgb(15 23 42);
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
    }

    .dark .ard-edit-context-subhead {
        color: rgb(241 245 249);
    }

    .ard-edit-context-subhead-hint {
        font-size: 0.72rem;
        font-weight: 500;
        color: rgb(100 116 139);
    }

    .ard-edit-context-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.82rem;
        background: rgba(15, 23, 42, 0.02);
        border: 1px solid rgba(15, 23, 42, 0.06);
        border-radius: 0.5rem;
        overflow: hidden;
    }

    .dark .ard-edit-context-table {
        background: rgba(255, 255, 255, 0.02);
        border-color: rgba(255, 255, 255, 0.06);
    }

    .ard-edit-context-table th {
        background: rgba(15, 23, 42, 0.05);
        padding: 0.5rem 0.7rem;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: rgb(71 85 105);
        text-align: left;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    }

    .dark .ard-edit-context-table th {
        background: rgba(255, 255, 255, 0.04);
        color: rgb(148 163 184);
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .ard-edit-context-table td {
        padding: 0.5rem 0.7rem;
        border-bottom: 1px solid rgba(15, 23, 42, 0.05);
        vertical-align: top;
        font-variant-numeric: tabular-nums;
        color: rgb(15 23 42);
    }

    .dark .ard-edit-context-table td {
        border-bottom-color: rgba(255, 255, 255, 0.05);
        color: rgb(226 232 240);
    }

    .ard-edit-context-table tr:last-child td {
        border-bottom: none;
    }

    .ard-align-right {
        text-align: right;
    }

    .ard-edit-context-mode {
        background: rgba(16, 185, 129, 0.14);
        color: #047857;
        padding: 0.15rem 0.5rem;
        border-radius: 999px;
        font-size: 0.72rem;
        font-weight: 600;
    }

    .dark .ard-edit-context-mode {
        background: rgba(16, 185, 129, 0.22);
        color: rgb(110 231 183);
    }

    /* ---- Approval history timeline ---- */
    .ard-history-row {
        display: flex;
        gap: 10px;
        padding: 8px 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .dark .ard-history-row {
        border-bottom-color: rgba(51, 65, 85, 0.5);
    }

    .ard-history-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        margin-top: 6px;
        flex-shrink: 0;
    }

    .ard-history-title {
        font-weight: 500;
        color: #0f172a;
    }

    .dark .ard-history-title {
        color: rgb(241 245 249);
    }

    .ard-history-time {
        font-size: 11px;
        color: #94a3b8;
    }

    .dark .ard-history-time {
        color: rgb(100 116 139);
    }

    .ard-history-note {
        font-size: 12px;
        color: #475569;
        margin-top: 2px;
    }

    .dark .ard-history-note {
        color: rgb(148 163 184);
    }

    .ard-history-empty {
        color: #94a3b8;
        font-style: italic;
    }

    .dark .ard-history-empty {
        color: rgb(100 116 139);
    }

    /* ---- Supplier ledger journal table ---- */
    .ard-ledger-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.85rem;
    }

    .ard-ledger-table thead tr {
        background: #0f172a;
        color: #ffffff;
        text-transform: uppercase;
        font-size: 0.7rem;
        letter-spacing: 0.04em;
    }

    .dark .ard-ledger-table thead tr {
        background: rgb(2 6 23);
        color: rgb(226 232 240);
    }

    .ard-ledger-table th {
        padding: 0.55rem 0.9rem;
        font-weight: 600;
        text-align: left;
    }

    .ard-ledger-table th.is-right {
        text-align: right;
    }

    .ard-ledger-row-data {
        border-bottom: 1px solid #f1f5f9;
    }

    .dark .ard-ledger-row-data {
        border-bottom-color: rgba(51, 65, 85, 0.5);
    }

    .ard-ledger-row-opening {
        background: #f8fafc;
        font-weight: 600;
        border-top: 2px solid #0f172a;
    }

    .dark .ard-ledger-row-opening {
        background: rgba(15, 23, 42, 0.4);
        border-top-color: rgb(51 65 85);
    }

    .ard-ledger-row-closing {
        background: #f1f5f9;
        font-weight: 700;
        border-top: 2px solid #0f172a;
    }

    .dark .ard-ledger-row-closing {
        background: rgba(15, 23, 42, 0.6);
        border-top-color: rgb(51 65 85);
    }

    .ard-ledger-cell {
        padding: 0.5rem 0.9rem;
        color: #334155;
    }

    .dark .ard-ledger-cell {
        color: rgb(203 213 225);
    }

    .ard-ledger-cell-strong {
        color: #0f172a;
    }

    .dark .ard-ledger-cell-strong {
        color: rgb(241 245 249);
    }

    .ard-ledger-cell-muted {
        font-size: 0.75rem;
        color: #64748b;
    }

    .dark .ard-ledger-cell-muted {
        color: rgb(148 163 184);
    }

    .ard-ledger-cell-tag {
        text-transform: uppercase;
        font-size: 0.72rem;
        letter-spacing: 0.04em;
        color: #475569;
    }

    .dark .ard-ledger-cell-tag {
        color: rgb(148 163 184);
    }

    .ard-ledger-cell-money {
        text-align: right;
        font-family: monospace;
        font-variant-numeric: tabular-nums;
    }

    .ard-ledger-cell-money--paid {
        color: #047857;
    }

    .dark .ard-ledger-cell-money--paid {
        color: rgb(110 231 183);
    }

    .ard-ledger-cell-money--closing {
        color: #b91c1c;
    }

    .dark .ard-ledger-cell-money--closing {
        color: rgb(248 113 113);
    }

    .ard-ledger-cell-empty {
        text-align: center;
        padding: 1.4rem;
        color: #94a3b8;
    }

    .dark .ard-ledger-cell-empty {
        color: rgb(100 116 139);
    }

    /* ============================================================
       APPROVAL ROW HIGHLIGHTS
       Tint a list-page row based on the kind of pending approval
       request attached to it. Operators scan the table and see
       at-a-glance which records are mid-workflow:
         · light blue → an UPDATE request is waiting on review
         · light red  → a DELETE / CANCEL request is waiting
       Cell backgrounds use !important because Filament's striped
       table sets row-background inline on alternate rows and would
       otherwise win the cascade on every second row.
       ============================================================ */
    .ard-row-pending-edit>td,
    tr.ard-row-pending-edit>td {
        background-color: rgba(59, 130, 246, 0.10) !important;
    }

    .ard-row-pending-edit:hover>td,
    tr.ard-row-pending-edit:hover>td {
        background-color: rgba(59, 130, 246, 0.18) !important;
    }

    .dark .ard-row-pending-edit>td,
    .dark tr.ard-row-pending-edit>td {
        background-color: rgba(59, 130, 246, 0.18) !important;
    }

    .dark .ard-row-pending-edit:hover>td,
    .dark tr.ard-row-pending-edit:hover>td {
        background-color: rgba(59, 130, 246, 0.26) !important;
    }

    .ard-row-pending-delete>td,
    tr.ard-row-pending-delete>td {
        background-color: rgba(239, 68, 68, 0.10) !important;
    }

    .ard-row-pending-delete:hover>td,
    tr.ard-row-pending-delete:hover>td {
        background-color: rgba(239, 68, 68, 0.18) !important;
    }

    .dark .ard-row-pending-delete>td,
    .dark tr.ard-row-pending-delete>td {
        background-color: rgba(239, 68, 68, 0.18) !important;
    }

    .dark .ard-row-pending-delete:hover>td,
    .dark tr.ard-row-pending-delete:hover>td {
        background-color: rgba(239, 68, 68, 0.26) !important;
    }

    /* ------------------------------------------------------------
       DELETED (soft-deleted) rows — persistent SOLID red so an
       approved deletion stays visible in the list and is
       unmistakably flagged. Stronger than the pending-delete tint
       (which is light red) so a deleted row reads as terminal.
       Applied by ApprovalRowHighlight when $record->trashed().
       ------------------------------------------------------------ */
    .ard-row-trashed>td,
    tr.ard-row-trashed>td {
        background-color: rgba(239, 68, 68, 0.16) !important;
    }

    .ard-row-trashed:hover>td,
    tr.ard-row-trashed:hover>td {
        background-color: rgba(239, 68, 68, 0.24) !important;
    }

    /* line-through the first cell (reference) as a clear "deleted" cue */
    .ard-row-trashed>td:first-child {
        text-decoration: line-through;
        text-decoration-color: rgba(239, 68, 68, 0.7);
    }

    .dark .ard-row-trashed>td,
    .dark tr.ard-row-trashed>td {
        background-color: rgba(239, 68, 68, 0.24) !important;
    }

    .dark .ard-row-trashed:hover>td,
    .dark tr.ard-row-trashed:hover>td {
        background-color: rgba(239, 68, 68, 0.32) !important;
    }

    /* ============================================================
       NUMBER INPUTS — strip spinner buttons.
       Mouse-wheel scroll over a focused number input silently
       changes the value, which has caused operators to overwrite
       financial values without noticing. Pair this CSS with the
       BODY_END script that blurs number inputs on wheel.
       ============================================================ */
    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    input[type="number"] {
        -moz-appearance: textfield;
        appearance: textfield;
    }

    /* ============================================================
       VIEW-PAGE BORDERED VALUES (2026-06-05)
       Operator ask: "all view pages values fields wants to bordered
       for user easy to read the values".

       Wraps every Filament Infolist TextEntry value inside a subtle
       bordered, padded box on ANY ViewRecord page. Scope-locked to
       `.fi-resource-view-record-page` so it does NOT paint Create/Edit
       (inputs already have borders), table chrome, or dashboard
       widgets.
       ============================================================ */
    .fi-resource-view-record-page .fi-in-text,
    .fi-resource-view-record-page .fi-in-text-entry-content {
        display: inline-flex;
        align-items: center;
        padding: 0.4rem 0.75rem;
        min-height: 2rem;
        background-color: rgba(248, 250, 252, 0.6);
        border: 1px solid rgba(203, 213, 225, 0.7);
        border-radius: 0.5rem;
        font-variant-numeric: tabular-nums;
    }

    /* Badges already have their own pill style — strip the double
       border so we don't paint a box around a pill. */
    .fi-resource-view-record-page .fi-in-text .fi-badge,
    .fi-resource-view-record-page .fi-in-text-entry-content .fi-badge {
        background: transparent;
        border: 0;
        padding: 0;
        min-height: auto;
    }

    /* Wider boxes for money values so a long ₹ figure doesn't get
       cropped by the inline-flex sizing above. */
    .fi-resource-view-record-page .fi-in-text:has(.fi-in-text-entry-prefix) {
        min-width: 9rem;
    }

    /* Section-internal grid spacing — pad the entries a bit so the
       new boxed values don't bump into each other. */
    .fi-resource-view-record-page .fi-in-component-ctn .fi-in-entry {
        gap: 0.25rem;
    }

    /* Dark-mode counterpart — translucent slate panel that reads
       cleanly on both standard dark theme + the darker variants. */
    .dark .fi-resource-view-record-page .fi-in-text,
    .dark .fi-resource-view-record-page .fi-in-text-entry-content {
        background-color: rgba(30, 41, 59, 0.45);
        border-color: rgba(71, 85, 105, 0.55);
    }

    /* ============================================================
       HTML-CONTENT ENTRY FULL-WIDTH RESET
       Filament Infolist DOM chain for a TextEntry inside a Section:

         fi-section
           └ fi-section-content-ctn
               └ fi-section-content (p-6)
                   └ .grid            ← grid container
                       └ fi-in-entry  ← grid column span
                           └ fi-in-text
                               └ fi-in-text-entry-content
                                   └ .ard-html-entry  (our wrapper)
                                       └ .ard-items-wrap
                                           └ table.ard-items-table

       EVERY layer must be block/full-width or the table is squeezed
       to whatever the grid column template allows. The !important
       flags override Filament's inline/scoped Tailwind utilities.
       ============================================================ */

    /* 1. The grid wrapper inside the section content */
    .fi-resource-view-record-page .fi-section-content > .grid:has(.ard-html-entry) {
        display: block !important;
        width: 100% !important;
    }

    /* 2. fi-in-entry — the grid-column child */
    .fi-resource-view-record-page .fi-in-entry:has(.ard-html-entry) {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 3. fi-in-text + fi-in-text-entry-content — strip bordered-box */
    .fi-resource-view-record-page .fi-in-text:has(.ard-html-entry),
    .fi-resource-view-record-page .fi-in-text-entry-content:has(.ard-html-entry) {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        min-height: 0 !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
    }

    /* 4. The .ard-html-entry wrapper div itself */
    .ard-html-entry {
        display: block !important;
        width: 100% !important;
    }

    /* 5. Any intermediate ancestor container that limits width (like .max-w-max) */
    .fi-resource-view-record-page div:has(.ard-html-entry) {
        max-width: none !important;
        width: 100% !important;
    }



    /* Placeholder em-dashes for missing values render as plain
       muted text — DO NOT wrap them in a box (looks like a UI bug
       when several entries in a row each contain a tiny boxed "—"). */
    .fi-resource-view-record-page .fi-in-text.fi-in-text-placeholder {
        border: 0;
        background: transparent;
        padding: 0;
        min-height: 0;
        color: rgba(100, 116, 139, 0.9);
    }

    /* ============================================================
     * Permission matrix — Role View / User View "Permissions by
     * Module". Responsive equal-height card grid (2026-06-09).
     *   ≥1400px → 4 cols · ≥1200px → 3 · ≥768px → 2 · else 1.
     * ============================================================ */
    .ard-perm-matrix {
        display: grid;
        grid-template-columns: 1fr;          /* mobile: single column */
        gap: 18px;
        width: 100%;
        align-items: stretch;                /* equal-height rows */
    }
    @media (min-width: 768px)  { .ard-perm-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
    @media (min-width: 1200px) { .ard-perm-matrix { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
    @media (min-width: 1400px) { .ard-perm-matrix { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

    .ard-pm-card {
        display: flex;
        flex-direction: column;
        height: 100%;                        /* fill the cell → equal heights */
        min-width: 0;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        background: #ffffff;
        overflow: hidden;
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    }
    .ard-pm-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-height: 50px;                    /* uniform header height */
        padding: 12px 14px;
        background: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
    }
    .ard-pm-title {
        font-weight: 700;
        font-size: 13px;
        color: #0f172a;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }
    .ard-pm-pill {
        flex-shrink: 0;
        font-size: 11px;
        font-weight: 700;
        padding: 2px 9px;
        border-radius: 9999px;
        white-space: nowrap;
    }
    .ard-pm-pill--full { background: #dcfce7; color: #166534; }
    .ard-pm-pill--partial { background: #fef3c7; color: #92400e; }
    .ard-pm-pill--none { background: #f1f5f9; color: #64748b; }
    .ard-pm-body {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 8px;
        flex: 1 1 auto;
        max-height: 260px;                   /* scroll inside when long */
        overflow-y: auto;
    }
    .ard-pm-row {
        display: flex;
        align-items: flex-start;
        gap: 9px;
        padding: 5px 8px;
        border-radius: 7px;
    }
    .ard-pm-row--on { background: rgb(240, 253, 244); }
    .ard-pm-ico {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
        margin-top: 1px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 10px;
        font-weight: bold;
    }
    .ard-pm-ico--on { background: #22c55e; color: #ffffff; }
    .ard-pm-ico--off { background: #e2e8f0; color: #94a3b8; }
    .ard-pm-label {
        font-size: 12.5px;
        font-weight: 500;
        line-height: 1.3;
        overflow-wrap: anywhere;             /* long names wrap, never overflow */
        word-break: break-word;
    }
    .ard-pm-label--on { color: #0f172a; }
    .ard-pm-label--off { color: #94a3b8; }
    .ard-pm-body::-webkit-scrollbar { width: 7px; }
    .ard-pm-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
    .ard-pm-body::-webkit-scrollbar-track { background: transparent; }

    /* Dark theme */
    .dark .ard-pm-card { background: #1e293b; border-color: #334155; box-shadow: none; }
    .dark .ard-pm-head { background: #0f172a; border-color: #334155; }
    .dark .ard-pm-title { color: #e2e8f0; }
    .dark .ard-pm-pill--full { background: rgba(34, 197, 94, 0.18); color: #86efac; }
    .dark .ard-pm-pill--partial { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
    .dark .ard-pm-pill--none { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
    .dark .ard-pm-row--on { background: rgba(34, 197, 94, 0.12); }
    .dark .ard-pm-ico--off { background: #334155; color: #64748b; }
    .dark .ard-pm-label--on { color: #e2e8f0; }
    .dark .ard-pm-label--off { color: #64748b; }
    .dark .ard-pm-body::-webkit-scrollbar-thumb { background: #475569; }

    /* ============================================================
     * Role Create / Edit — permission module cards (the form grid).
     * Cards stretch to equal height per row, and each permission
     * checkbox reads as a clean tappable row. (2026-06-09)
     * ============================================================ */
    .ard-role-perm-card { height: 100%; }
    /* Checkbox options as comfortable, evenly-spaced rows. */
    .ard-role-perm-card .fi-fo-checkbox-list-option {
        padding: 6px 8px;
        border-radius: 8px;
        transition: background-color .15s ease;
    }
    .ard-role-perm-card .fi-fo-checkbox-list-option:hover {
        background-color: rgba(99, 102, 241, 0.06);
    }
    .dark .ard-role-perm-card .fi-fo-checkbox-list-option:hover {
        background-color: rgba(129, 140, 248, 0.10);
    }

    /* ── Financial approval "Proposed Changes" (module-aware view) ── */
    .ard-fc { display:flex; flex-direction:column; gap:1.5rem; }
    .ard-fc-head { display:flex; flex-wrap:wrap; align-items:center; gap:.75rem 1rem;
        padding:1rem 1.25rem; border-radius:.85rem; border:1px solid #e2e8f0;
        background:linear-gradient(135deg,#eef2ff 0%,#f8fafc 100%); }
    .dark .ard-fc-head { border-color:#334155; background:linear-gradient(135deg,#1e1b4b 0%,#0f172a 100%); }
    .ard-fc-head-module { font-size:.7rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:#6366f1; }
    .dark .ard-fc-head-module { color:#a5b4fc; }
    .ard-fc-head-ref { display:inline-block; margin-top:.25rem; font-size:1.15rem; font-weight:800; letter-spacing:.02em;
        color:#fff; background:#4f46e5; padding:.28rem .8rem; border-radius:.6rem;
        box-shadow:0 2px 6px rgba(79,70,229,.35); font-variant-numeric:tabular-nums; }
    .ard-fc-head-party { display:inline-flex; align-items:center; gap:.4rem; margin-left:auto;
        padding:.35rem .75rem; border-radius:9999px; background:#fff; border:1px solid #e2e8f0; }
    .dark .ard-fc-head-party { background:#1e293b; border-color:#334155; }
    .ard-fc-head-party-label { font-size:.65rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:#94a3b8; }
    .ard-fc-head-party-name { font-size:.9rem; font-weight:700; color:#0f172a; }
    .dark .ard-fc-head-party-name { color:#f1f5f9; }
    .ard-fc-section-title { display:flex; align-items:center; gap:.5rem; font-size:.8rem; font-weight:700;
        text-transform:uppercase; letter-spacing:.05em; color:#475569; margin-bottom:.6rem; }
    .dark .ard-fc-section-title { color:#cbd5e1; }
    .ard-fc-section-title::before { content:''; width:.55rem; height:.55rem; border-radius:9999px; background:#6366f1; flex:0 0 auto; }
    .ard-fc-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:.75rem; }
    .ard-fc-card { padding:.7rem .85rem; border-radius:.7rem; border:1px solid #e2e8f0; background:#fff; }
    .dark .ard-fc-card { border-color:#334155; background:#1e293b; }
    .ard-fc-card.is-changed { border-color:#fcd34d; background:#fffbeb; }
    .dark .ard-fc-card.is-changed { border-color:#a16207; background:#27220c; }
    .ard-fc-card-label { display:flex; align-items:center; justify-content:space-between; gap:.5rem;
        font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:#64748b; margin-bottom:.35rem; }
    .dark .ard-fc-card-label { color:#94a3b8; }
    .ard-fc-card-vals { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; font-variant-numeric:tabular-nums; }
    .ard-fc-old { color:#b91c1c; text-decoration:line-through; font-weight:600; }
    .dark .ard-fc-old { color:#fca5a5; }
    .ard-fc-arrow { color:#94a3b8; font-weight:700; }
    .ard-fc-new { color:#15803d; font-weight:800; }
    .dark .ard-fc-new { color:#86efac; }
    .ard-fc-same { color:#334155; font-weight:600; }
    .dark .ard-fc-same { color:#cbd5e1; }
    .ard-fc-badge { display:inline-block; padding:.05rem .4rem; font-size:.58rem; font-weight:700;
        letter-spacing:.03em; text-transform:uppercase; border-radius:9999px; background:#fde68a; color:#92400e; white-space:nowrap; }
    .dark .ard-fc-badge { background:#78350f; color:#fde68a; }
    .ard-fc-lines-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
    @media (max-width:820px){ .ard-fc-lines-grid { grid-template-columns:1fr; } }
    .ard-fc-col-head { display:inline-block; font-size:.68rem; font-weight:700; text-transform:uppercase;
        letter-spacing:.05em; padding:.2rem .5rem; border-radius:.4rem; margin-bottom:.45rem; }
    .ard-fc-col-old { background:#fee2e2; color:#991b1b; } .dark .ard-fc-col-old { background:#7f1d1d; color:#fecaca; }
    .ard-fc-col-new { background:#dcfce7; color:#166534; } .dark .ard-fc-col-new { background:#14532d; color:#bbf7d0; }
    .ard-fc-table { width:100%; border-collapse:separate; border-spacing:0; font-size:.82rem;
        border:1px solid #e2e8f0; border-radius:.6rem; overflow:hidden; }
    .dark .ard-fc-table { border-color:#334155; }
    .ard-fc-table th { text-align:left; font-size:.64rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
        color:#64748b; background:#f1f5f9; padding:.5rem .7rem; white-space:nowrap; }
    .dark .ard-fc-table th { color:#94a3b8; background:#0f172a; }
    .ard-fc-table td { padding:.5rem .7rem; border-top:1px solid #e2e8f0; color:#0f172a; white-space:nowrap;
        font-variant-numeric:tabular-nums; }
    .dark .ard-fc-table td { border-color:#334155; color:#e2e8f0; }
    .ard-fc-line-added td { background:#e0f2fe; color:#075985; font-weight:700; }
    .dark .ard-fc-line-added td { background:#0c4a6e; color:#bae6fd; }
    .ard-fc-line-changed td { background:#dcfce7; color:#166534; }
    .dark .ard-fc-line-changed td { background:#14532d; color:#bbf7d0; }
    .ard-fc-line-removed td { background:#fee2e2; color:#991b1b; text-decoration:line-through; }
    .dark .ard-fc-line-removed td { background:#7f1d1d; color:#fecaca; }
    .ard-fc-line-tag { display:inline-block; margin-left:.4rem; padding:0 .35rem; font-size:.58rem; font-weight:700;
        text-transform:uppercase; letter-spacing:.03em; border-radius:9999px; vertical-align:middle; }
    .ard-fc-tag-added { background:#0284c7; color:#fff; } .ard-fc-tag-removed { background:#dc2626; color:#fff; }
    .ard-fc-emptyrows { padding:.7rem; font-size:.8rem; color:#94a3b8; border:1px dashed #cbd5e1; border-radius:.5rem; }
    .dark .ard-fc-emptyrows { border-color:#475569; }

    /* ================================================================
     * Purchase / Sales Bill "Items" line-item table
     * Full-width + properly responsive.
     *
     * Strategy:
     *   · Desktop/tablet (>640px) : horizontal scrollable table.
     *   · Mobile (<=640px)        : each <tr> becomes a card; each
     *     <td> is a flex row: label (left) + value (right).
     *     Labels come from real <span class="ard-cell-lbl"> DOM nodes
     *     inside each <td> — NOT CSS ::before pseudo-elements, which
     *     are overridden by Filament's own stylesheet.
     * ================================================================ */

    /* Label spans: hidden on desktop (table mode) */
    .ard-cell-lbl {
        display: none;
    }

    /* Outer scroll container */
    .ard-items-wrap {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #e2e8f0;
        border-radius: .55rem;
    }
    .dark .ard-items-wrap { border-color: #334155; }

    /* Table */
    .ard-items-table {
        width: 100%;
        min-width: 680px;        /* keeps all cols visible with scroll on tablet */
        border-collapse: collapse;
        font-size: .85rem;
        table-layout: auto;
    }

    /* Header row */
    .ard-items-table thead tr { background: #f1f5f9; }
    .dark .ard-items-table thead tr { background: #0f172a; }

    .ard-items-table th {
        padding: .65rem .8rem;
        text-align: left;
        font-size: .67rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #475569;
        white-space: nowrap;
        border-bottom: 2px solid #e2e8f0;
    }
    .dark .ard-items-table th { color: #94a3b8; border-bottom-color: #334155; }
    .ard-items-table th.ard-num { text-align: right; }

    /* Data cells */
    .ard-items-table td {
        padding: .6rem .8rem;
        border-bottom: 1px solid #f1f5f9;
        color: #1e293b;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
        vertical-align: middle;
    }
    .dark .ard-items-table td { border-bottom-color: #1e293b; color: #e2e8f0; }
    .ard-items-table tbody tr:last-child td { border-bottom: 0; }

    /* Zebra + hover */
    .ard-items-table tbody tr:nth-child(even) td { background: #f8fafc; }
    .dark .ard-items-table tbody tr:nth-child(even) td { background: #0b1220; }
    .ard-items-table tbody tr:hover td { background: #eff6ff; transition: background .12s; }
    .dark .ard-items-table tbody tr:hover td { background: rgba(99,102,241,.08); }

    /* Numeric + bold */
    .ard-items-table .ard-num { text-align: right; }
    .ard-items-table .ard-strong { font-weight: 700; color: #0f172a; }
    .dark .ard-items-table .ard-strong { color: #f1f5f9; }

    /* ── Mobile: stacked label-value cards (<=640px) ── */
    @media (max-width: 640px) {

        /* Remove the outer border — cards carry their own border */
        .ard-items-wrap {
            border: 0;
            border-radius: 0;
            overflow-x: visible;
        }

        /* Table resets */
        .ard-items-table {
            min-width: 0;
            font-size: .83rem;
        }

        /* Visually hide the <thead> (keep accessible) */
        .ard-items-table thead {
            position: absolute;
            width: 1px; height: 1px;
            overflow: hidden;
            clip: rect(0 0 0 0);
            white-space: nowrap;
        }

        /* Each <tr> → standalone card */
        .ard-items-table tbody tr {
            display: block;
            margin-bottom: .75rem;
            border: 1px solid #e2e8f0;
            border-radius: .55rem;
            overflow: hidden;
            background: #fff;
        }
        .dark .ard-items-table tbody tr { border-color: #334155; background: #1e293b; }
        .ard-items-table tbody tr:nth-child(even) td { background: transparent; }
        .ard-items-table tbody tr:hover td { background: transparent; }

        /* Each <td> → horizontal label : value row */
        .ard-items-table td {
            display: flex !important;
            align-items: baseline;
            justify-content: space-between;
            gap: .75rem;
            white-space: normal;
            text-align: right;
            border-bottom: 1px solid #f1f5f9;
            border-top: 0 !important;
            padding: .5rem .85rem;
        }
        .dark .ard-items-table td { border-bottom-color: #334155; }
        .ard-items-table tbody tr td:last-child { border-bottom: 0; }

        /* Show label spans as left-side text */
        .ard-cell-lbl {
            display: inline !important;
            flex: 0 0 auto;
            text-align: left;
            font-size: .65rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .04em;
            color: #64748b;
            white-space: nowrap;
        }
        .dark .ard-cell-lbl { color: #94a3b8; }

        /* Line Total: highlighted row */
        .ard-items-table td.ard-strong {
            background: #f0f9ff !important;
            border-top: 1px solid #e2e8f0 !important;
            font-size: .9rem;
        }
        .dark .ard-items-table td.ard-strong {
            background: #0b1220 !important;
            border-top-color: #334155 !important;
        }
    }

    /* ============================================================
     * Inline filter panel (desktop AboveContent layout). The panel is always
     * built but stays HIDDEN until the "Filter" header action (next to Export)
     * toggles `body.ard-table-filters-open`. Driving visibility from a body
     * class — rather than the panel's own Alpine state — keeps it open across
     * Livewire re-renders / filter changes. Phones use the funnel-dropdown, so
     * this container only exists on desktop; the media query is belt-and-braces.
     * ============================================================ */
    @media (min-width: 1024px) {
        .fi-ta-filters-above-content-ctn {
            display: none !important;
        }
        body.ard-table-filters-open .fi-ta-filters-above-content-ctn {
            display: grid !important;
        }
    }
