.fi-tenant-menu {
    .fi-dropdown-panel {
        min-width: fit-content;
        margin-top: 2px;
        min-height: fit-content !important;
        max-height: fit-content !important;
    }

    margin: 14px;
}

.fi-sidebar-nav {
    .fi-tenant-menu {
        margin: -10px;
        margin-right: -6px;
        margin-bottom: -12px;
    }

    .fi-dropdown-list-item>.fi-icon {
        color: var(--gray-700);
    }
}

.fi-user-menu,
.fi-tenant-menu {
    .fi-dropdown-list-item>.fi-icon {
        color: var(--gray-700);
    }
}

.fi-sidebar-header,
.fi-topbar {
    height: 3.5rem !important;
}

.fi-topbar-end {
    margin-top: -6px;
}

.fi-simple-main {
    form {
        margin-top: 12px;
    }
}

[data-filepond-item-state="processing-complete"] .filepond--item-panel {
    background-color: #4f39f6;
}

.fi-auth-layout main>div:first-child {
    max-width: 525px !important;
    padding: 0px !important;
    margin: auto;
}

.fi-panel-app main .fi-page>section:first-child {
    min-height: 800px;
}

.fi-panel-app .fi-topbar-ctn nav>div:first-child {
    display: flex !important;
}

.app-menu ul li {
    width: 100% !important;

    button.fi-topbar-item-button {
        width: 100% !important;
        justify-content: start !important;

        svg:last-child {
            display: none;
        }
    }

    a {
        justify-content: start !important;
    }
}

.fi-breadcrumbs {
    margin-bottom: 1.5rem !important;
}

.fi-simple-main {
    --tw-ring-color: none;
}

.fi-sidebar-nav {
    border-top: 1px solid var(--sidebar-border);
}

.fi-sc-form .fi-sc-component .fi-sc-actions,
.fi-ta-col-manager-actions-ctn,
.fi-modal-footer .fi-modal-footer-actions:not(.flex-col-reverse) {
    display: flex;
    flex-direction: row-reverse;
    margin-top: 8px;
}

.app-col-manager-modal {
    .fi-ta-col-manager-heading {
        display: none;
    }

    .fi-ta-col-manager {
        border: 1px solid var(--border-subtle);
        padding: 2em;
        border-radius: var(--radius-md);
    }
}

.fi-sc-form .fi-sc-component .fi-fieldset .fi-sc-actions {
    display: flex;
    flex-direction: row;
}

.fi-auth-layout .fi-sc-form .fi-sc-actions {
    display: flex;
    flex-direction: column;
}

.fi-align-center .fi-modal-footer-actions {
    flex-direction: row !important;
    display: grid !important;
}

.fi-dropdown-panel {
    label {
        cursor: pointer;
    }
}

input[type="checkbox"] {
    cursor: pointer;
}

.fi-main.max-w-7xl {
    max-width: 85rem !important;
}

.fi-account-widget {
    .fi-avatar {
        height: 4rem !important;
        width: 4rem !important;
        margin-right: 0.3rem !important;
    }
}

.fi-wi-stats-overview-stat-content {
    row-gap: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.fi-wi-stats-overview-stat-description {
    width: 100% !important;

    span {
        width: 100% !important;
    }
}

#livewire-error {
    padding: 0 !important;

    iframe {
        background-color: #fff !important;
    }
}

.fi-badge {
    padding: 2px 8px !important;
    border-radius: var(--radius-sm) !important;
    font-weight: var(--font-weight-medium);
}

.fi-topbar-ctn {
    background: var(--surface-base);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: none;
    overflow-x: unset;
}

.fi-sidebar-header-ctn {
    border-bottom: 1px solid var(--sidebar-border);
}

.fi-sidebar-nav {
    border-top: none;
}

.fi-ta-col-manager-items {
    padding-top: 16px;
    padding-bottom: 16px;
}

.fi-ta-col-manager-apply-action-ctn {
    display: flex;
    flex-direction: row-reverse;
}

.fi-dropdown-panel {
    min-width: fit-content;
}

.fi-layout {
    margin-bottom: -1px;
}

.fi-wi-chart-canvas-ctn {
    min-height: 300px !important;
    width: 100% !important;
}

.fi-modal-content {

    .fi-fo-builder-block-picker,
    .fi-fo-repeater-add {
        justify-content: center !important;
    }

    .fi-fo-builder-item-content {
        padding: 20px !important;
        border: 1px solid var(--border-subtle) !important;
        border-radius: var(--radius-md) !important;
    }

    .fi-fo-builder-label-between-items-ctn {
        border: 0 !important;
        margin-top: 8px !important;
        margin-bottom: 8px !important;

        .fi-fo-builder-label-between-items-divider-before,
        .fi-fo-builder-label-between-items-divider-after {
            display: none !important;
        }
    }

    .fi-fo-repeater-label-between-items-ctn {
        border: 0 !important;
        margin-top: 8px !important;
        margin-bottom: 8px !important;

        .fi-fo-repeater-label-between-items-divider-before,
        .fi-fo-repeater-label-between-items-divider-after {
            display: none !important;
        }
    }
}

.fi-wi-chart-canvas-ctn {
    min-height: 300px !important;
    width: 100% !important;
}

:root,
:host {
    --spacing: 0.225rem;

    --text-base: 0.85rem;
    --text-sm: 0.85rem;
    --text-md: 0.9rem;
    --text-lg: 1rem;
    --text-xl: 1.1rem;
    --text-2xl: 1.2rem;
    --text-3xl: 1.4rem;

    --app-max-wd: 100%;

    /* --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700; */

    /* radius scale */
    --radius-xs: 0.25rem;
    --radius-sm: 0.375rem;
    --radius-md: 0.4rem;
    --radius-lg: 0.5rem;
    --radius-full: 9999px;

    /* neutral surfaces & borders */
    --surface-base: #ffffff;
    --surface-sunken: #fafafa;
    --surface-raised: #ffffff;
    --border-subtle: oklch(0.929 0.003 264 / 1);
    --border-default: oklch(0.87 0.004 264 / 1);

    /* sidebar tokens, derived from the accent so tenant color overrides cascade */
    --sidebar-bg: var(--surface-sunken);
    --sidebar-border: var(--border-subtle);
    --sidebar-active-bg: color-mix(in oklab, var(--primary-500) 10%, transparent);
    --sidebar-active-fg: var(--primary-700);
    --sidebar-hover-bg: color-mix(in oklab, var(--primary-500) 6%, transparent);

    /* motion */
    --anim-fast: 100ms;
    --anim-base: 150ms;
    --anim-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.fi-toggle {
    --spacing: 0.25rem;
}

.fi-modal>.fi-modal-window-ctn>.fi-modal-window .fi-modal-heading {
    font-size: var(--text-lg);
}

.fi-select-input-ctn {
    .fi-scrollable {
        max-height: 375px !important;
    }
}

footer>* {
    max-width: var(--app-max-wd) !important;
    margin: auto;
}

.fi-topbar {
    max-width: var(--app-max-wd) !important;
    margin: 0 auto;
    --tw-ring-shadow: none;
}

.fi-topbar:nth-child(2) {
    height: 16px !important;
    padding: 0px 12px !important;
}

.fi-topbar-item.fi-active .fi-topbar-item-btn,
.fi-tabs-item.fi-active {
    background-color: var(--primary-100) !important;
}

.fi-topbar-ctn>.fi-topbar .fi-topbar-start {
    display: flex !important;
}

@media (max-width: 1023px) {
    .fi-topbar:nth-child(2) {
        display: none !important;
    }
}

.fi-auth-layout {
    .fi-logo {
        height: 86px !important;
        margin-bottom: 64px !important;
    }
}

.fi-auth-login {
    .fi-simple-header-subheading {
        display: none !important;
    }
}

.fi-wi-widget,
.fi-ta-ctn,
.fi-sc-component {
    animation: fadeIn var(--anim-base) var(--anim-ease);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fi-sc-section {
    transition: all var(--anim-base) var(--anim-ease);
}

.fi-section-header-heading {
    font-size: var(--text-sm);
    line-height: var(--tw-leading, var(--text-sm--line-height));
    --tw-font-weight: var(--font-weight-medium);
    font-weight: var(--font-weight-medium);
    color: var(--gray-950);
}

.fi-topbar-item-label {
    font-size: 0.85rem !important;
}

.fi-wi-chart {
    .fi-wi-chart-canvas-ctn {
        min-height: 220px !important;
        max-height: 320px !important;
        width: 100% !important;
    }

    .fi-section-content-ctn {
        display: grid;
        grid-template-rows: 1fr;
        transition: all var(--anim-base) var(--anim-ease);
    }

    .fi-section-content-ctn[aria-expanded="false"] {
        grid-template-rows: 0fr;
    }

    .fi-section-content {
        overflow: hidden;
    }
}

.app-valorio-formula {
    display: flex;
    flex-direction: column;
    gap: 8px;

    hr {
        color: #a0a0a0;
    }

    span {
        text-align: center;
    }
}

.fi-panel-app,
.fi-panel-admin {
    .fi-main {
        margin-top: 1em;
        margin-bottom: 1em;
    }
}

.fi-fo-date-time-picker-calendar {
    gap: 12px !important;
    margin: 12px !important;
}

.fi-fo-date-time-picker .fi-fo-date-time-picker-calendar .fi-fo-date-time-picker-calendar-day.fi-selected {
    background-color: var(--primary-500) !important;
    color: white !important;
}

.ftv-root {
    .ftv-item {
        margin-top: 4rem;
    }

    .ftv-item:nth-child(1) {
        margin-top: 2rem;
    }

    .ftv-card-meta {
        margin-top: 3rem;
    }


    .ftv-card-clickable {
        cursor: pointer;
    }


    .ftv-card-clickable {
        cursor: pointer;
    }

    .ftv-card-current {
        background-color: color-mix(in oklab, var(--primary-500) 6%, var(--ftv-card-surface));
        --tw-ring-color: var(--primary-500);
        --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
    }

    .ftv-card-with-badge {
        padding-right: calc(var(--spacing) * 5);
    }

    .ftv-card-badge {
        position: absolute;
        top: calc(var(--spacing) * 3);
        right: calc(var(--spacing) * 3);
    }
}

.fi-fo-date-time-picker-time-inputs {
    margin-top: 36px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px;
}

.fi-fo-date-time-picker-panel-header {
    margin-bottom: 36px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px;
}

.fi-topbar-nav-groups {
    column-gap: 6px;
}

.shadow-lg {
    --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
}

.valorio-auth-split {
    min-height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
}

.valorio-auth-form-panel {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    order: 2;
    view-transition-name: valorio-auth-form;
}

.valorio-auth-form-panel .fi-simple-main {
    animation: loginAnimation .3s ease-out;
}

.valorio-auth-version {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2em;
    margin: 0;
    text-align: center;
    font-size: 0.85rem;
    color: #666769;
    pointer-events: none;
}

.valorio-auth-visual-panel {
    display: none;
    position: relative;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3em 2em;
    background: linear-gradient(180deg, #1e00ff, #2a12e0, #2a12e0, #61618c);
    view-transition-name: valorio-auth-visual;
}

::view-transition-group(valorio-auth-form),
::view-transition-group(valorio-auth-visual) {
    animation-duration: 420ms;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.valorio-auth-grid {
    position: absolute;
    inset: -1px;
    opacity: .35;
    background-image:
        repeating-linear-gradient(60deg, rgb(255 255 255 / .08) 0 1px, transparent 1px 64px),
        repeating-linear-gradient(-60deg, rgb(255 255 255 / .08) 0 1px, transparent 1px 64px);
    mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, black 40%, transparent 85%);
}

.valorio-auth-visual-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5em;
    max-width: 26rem;
}

.valorio-auth-tagline {
    color: rgb(255 255 255 / .92);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-wrap: balance;
    min-height: 3em;
    transition: opacity .25s ease;
}

.valorio-cube-scene {
    --cube-size: clamp(96px, 14vw, 190px);
    width: var(--cube-size);
    height: calc(var(--cube-size) * 1.32);
    position: relative;
    perspective: 900px;
    animation: valorioCubeFloat 6s ease-in-out infinite;
}

.valorio-cube-glow {
    position: absolute;
    top: calc(var(--cube-size) * 0.58);
    left: 50%;
    width: calc(var(--cube-size) * 2.1);
    height: calc(var(--cube-size) * 2.1);
    margin: calc(var(--cube-size) * -1.05) 0 0 calc(var(--cube-size) * -1.05);
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(147 127 255 / .55), transparent 70%);
    filter: blur(36px);
    animation: valorioCubeGlow 6s ease-in-out infinite;
}

.valorio-cube-shadow {
    position: absolute;
    top: calc(var(--cube-size) * 1.22);
    left: 50%;
    width: 78%;
    height: calc(var(--cube-size) * 0.22);
    margin-left: -39%;
    background: radial-gradient(closest-side, rgb(9 0 40 / .55), transparent 75%);
    filter: blur(6px);
    animation: valorioCubeShadow 6s ease-in-out infinite;
}

.valorio-cube-tilt {
    position: absolute;
    inset: 0;
    transform: rotate(0deg);
    animation: valorioCubeSpin 22s linear infinite;
    animation-delay: 1.85s;
}

.valorio-cube-img {
    display: block;
    width: 100%;
}

.valorio-cube-img svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.valorio-cube-unit {
    transform-box: fill-box;
    transform-origin: 50% 50%;
    animation: valorioCubeAssemble 1.15s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes valorioCubeAssemble {
    0% {
        opacity: 0;
        transform: scale(.2) rotate(var(--cube-unit-rot, 30deg));
    }

    55% {
        opacity: 1;
    }

    72% {
        transform: scale(1.06) rotate(calc(var(--cube-unit-rot, 30deg) * -0.08));
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes valorioCubeFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6%);
    }
}

@keyframes valorioCubeShadow {

    0%,
    100% {
        opacity: .55;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: .35;
        transform: translateX(-50%) scale(.88);
    }
}

@keyframes valorioCubeGlow {

    0%,
    100% {
        opacity: .5;
        transform: scale(1);
    }

    50% {
        opacity: .85;
        transform: scale(1.08);
    }
}

@media (min-width: 768px) {
    .valorio-auth-split {
        flex-direction: row;
    }

    .valorio-auth-form-panel,
    .valorio-auth-visual-panel {
        flex: 1 1 50%;
        min-height: 100dvh;
    }

    .valorio-auth-visual-panel {
        display: flex;
        order: 2;
        padding: 4em;
    }

    .valorio-auth-form-panel {
        order: 1;
    }

    /* Password-reset pages mirror the split: form on the right, visual on the left. */
    .fi-auth-password .valorio-auth-form-panel {
        order: 2;
    }

    .fi-auth-password .valorio-auth-visual-panel {
        order: 1;
    }

    .valorio-cube-scene {
        --cube-size: clamp(160px, 16vw, 260px);
    }
}

@media (prefers-reduced-motion: reduce) {

    .valorio-cube-scene,
    .valorio-cube-tilt,
    .valorio-cube-unit,
    .valorio-cube-glow,
    .valorio-cube-shadow {
        animation: none;
    }

    .valorio-cube-unit {
        opacity: 1;
    }
}

.valorio-email-verification {
    margin-top: 16px;

    .fi-sc-text {
        width: 100%;
        text-align: center !important;
    }
}


.driver-popover {
    min-width: 560px !important;
    padding: 2em !important;
    border-radius: var(--radius-md) !important;

    @media (max-width: 560px) {
        min-width: 100% !important;
    }

    .driver-popover-close-btn {
        font-size: 26px !important;
        color: #535353;
        top: 2px !important;
        right: 4px !important;
    }

    .driver-popover-title {
        margin-bottom: 32px !important;
        font-size: 1.5em !important;
    }

    .driver-popover-description {
        font-size: 0.875em !important;
    }

    footer {
        margin-top: 64px !important;

        justify-content: end !important;

        button {
            color: black !important;
            font-size: 0.875em;
            border: 1px solid rgb(221, 221, 221);
        }
    }
}

.driver-popover * {
    font-family: var(--font-family) !important;
}

.fi-sidebar {
    max-width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: none;
}

.fi-layout-sidebar-toggle-btn-ctn,
.fi-main-ctn {
    background-color: var(--surface-base);
}

html:has(.fi-simple-layout) {

    .fi-no-database,
    .fi-sidebar-item-btn,
    .fi-user-menu,
    .fi-topbar {
        display: none;
    }

    @media (min-width: 1023px) {
        .fi-simple-main {
            padding: 3em;
            box-shadow: 0px 0px 6px rgb(0 0 0 / 0.1);
            border-radius: 2em;
        }

        .fi-simple-layout {
            .fi-simple-main-ctn {
                max-width: 1280px;
            }
        }
    }

}


.fi-sidebar-item.fi-active>.fi-sidebar-item-btn {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-fg);
}

.fi-sidebar-database-notifications-btn:hover,
.fi-tenant-menu-trigger:hover,
.fi-user-menu-trigger:hover,
.fi-sidebar-item>.fi-sidebar-item-btn:hover {
    background-color: var(--sidebar-hover-bg);
}

.fi-sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    margin: 0;
    padding: 0.5em;
}

/* Default bell trigger is replaced by the "open-notifications" user menu action; kept mounted (not removed) so its modal/Livewire component still exists for that action to dispatch open-modal against. */
.fi-sidebar-database-notifications-btn {
    display: none;
}

.valorio-sidebar-collapse {
    border-bottom: 1px solid var(--sidebar-border);

    .fi-topbar-open-collapse-sidebar-btn {
        margin: o auto;
        margin-top: 16px;
        margin-bottom: 16px;
        width: 100%;
    }

    .valorio-sidebar-img-collapse {
        display: flex;
        align-items: center;
        margin: o auto;
        margin-top: 16px;
        margin-bottom: 16px;
        width: 100%;

        img {
            height: 100% !important;
            width: 180px;
            margin: 8px;
            margin-left: 16px;
        }
    }

    .fi-topbar-close-collapse-sidebar-btn {
        margin: o auto;
        margin-top: 12px;
        margin-bottom: 12px;
        width: 100%;
        justify-content: end;
        padding-right: 20px;
    }
}

.fi-sidebar-header-ctn {
    display: none;
}

@media (max-width: 1023px) {
    .valorio-sidebar-collapse {
        & .valorio-sidebar-img-collapse {
            img {
                width: 160px;
                margin-top: 16px;
                margin-bottom: 16px;
            }
        }
    }
}

html:has(.valorio-report-stack) {
    .fi-ta-record:hover {
        background-color: var(--gray-50);
        transition: background-color var(--anim-fast) var(--anim-ease);
    }
}

.fi-topbar-end {
    li {
        list-style: none;
    }
}

.fi-sidebar-item-grouped-border-part,
.fi-sidebar-item-grouped-border,
.fi-sidebar-item-grouped-border-part-not-first {
    opacity: 0 !important;
}

.fi-sidebar-nav-groups {
    row-gap: 6px !important;
    margin-top: -12px !important;
}

.fi-sidebar-group-items {
    row-gap: 6px !important;

    .fi-sidebar-item:nth-child(1) {
        margin-top: 2px !important;
    }
}

.fi-sidebar-group-btn {
    button {
        svg {
            opacity: 0 !important;
        }
    }
}

.fi-sidebar-group-btn:hover {
    button {
        svg {
            opacity: 1 !important;
        }
    }
}

.fi-sidebar-database-notifications-btn .fi-icon,
.fi-sidebar-footer .fi-sidebar-item-btn .fi-icon,
.fi-sidebar .fi-dropdown-trigger .fi-icon,
.fi-sidebar-item-icon,
.fi-sidebar-group-btn .fi-icon,
.fi-user-menu-trigger-text,
.fi-tenant-menu-trigger-tenant-name,
.fi-sidebar-group-label {
    color: var(--gray-700);
}

.fi-sidebar-group.fi-active .fi-sidebar-group-dropdown-trigger-btn .fi-icon,
.fi-sidebar-item.fi-active>.fi-sidebar-item-btn>.fi-icon {
    color: var(--primary-700);
}

.fi-sidebar-group-btn {
    border-radius: var(--radius-md);
}

.fi-sidebar-item:has(.fi-sidebar-item-grouped-border) {
    .fi-sidebar-item-label {
        font-weight: 500 !important;
    }
}

.fi-sidebar-group-btn:hover {
    background-color: var(--sidebar-hover-bg);
}

.fi-sidebar-open {

    .fi-user-menu-trigger .fi-avatar,
    .fi-tenant-menu-trigger .fi-avatar {
        margin-left: -3px;
    }

    .fi-sidebar-item-label,
    .fi-sidebar-group-label {
        margin-left: 3px;
    }

    .fi-sidebar-group[data-group-label]:not([data-group-label=""]) {
        .fi-sidebar-item:last-child {
            margin-bottom: 8px;
        }
    }
}

.valorio-diff-modal-second-level {
    .fi-modal-window {
        max-height: fit-content;
        transition-duration: 0ms;
        animation-duration: 0ms;
    }
}

html:has(.valorio-diff-modal-second-level) {
    .fi-modal-content:has(> .valorio-diff-modal-first-level) {
        overflow: hidden;
    }
}

html:has(.valorio-diff-modal-second-level .fi-modal-content) {
    .fi-modal-content:has(> .valorio-diff-modal-second-level) {
        overflow: hidden;
    }
}


html:has(.valorio-diff-modal-second-level) {
    .fi-modal-window:has(> * > .valorio-diff-modal-first-level) {
        transition-duration: 0ms;
        animation-duration: 0ms;
    }

    .fi-modal-window:has(> * > .valorio-diff-modal-second-level) {
        transition-duration: 100ms;
        animation-duration: 100ms;
    }
}

.fi-wi-stats-overview-stat {
    /* box-shadow: 0px 2px 2cqmax rgb(0 0 0 / 0.1);
    border: 1px solid var(--border-subtle); */
    transition: transform var(--anim-base) var(--anim-ease);
}

.fi-wi-stats-overview-stat:hover {
    transform: scale(1.02);
}

.fi-resource-reporting-reports {
    .fi-wi-stats-overview {
        .fi-section-header-heading {
            display: none;
        }
    }
}

.app-simple-layout {
    .fi-sidebar-database-notifications-btn {
        display: none;
    }

    .fi-header {
        div:has(.fi-header-heading) {
            display: none;
        }
    }

    .fi-sc-form {
        min-height: 65vh;
    }
}

.valorio-workspace-switcher {
    .fi-dropdown-list-item {
        align-items: center;
        gap: calc(var(--spacing) * 3);
        width: 100%;
        padding: calc(var(--spacing) * 3);
        padding-left: 2px;
        font-weight: var(--font-weight-medium);
        font-size: var(--text-md);
        line-height: var(--tw-leading, var(--text-md--line-height));

        .fi-dropdown-list-item-image {
            width: 1.75em;
            height: 1.75em;
        }
    }
}

.fi-sidebar-footer {
    /* border-top: none; */
    /* padding: 0.5em; */

    .fi-user-menu {
        .fi-user-menu-trigger {
            padding: 0.8em;
            border-radius: var(--radius-md) !important;
            margin-top: -12px;
        }

        .fi-user-menu-trigger:hover {
            background-color: var(--sidebar-active-bg);
        }
    }
}

/*
 * Sticky table headers: the header row pins to the top of the viewport once it
 * scrolls out of view, so long tables stay readable without shrinking the table
 * into a fixed-height scroll box.
 *
 * `position: sticky` only tracks real page scroll if NO ancestor between the
 * `<th>` and the page has a non-`visible` overflow (auto/hidden/clip all count,
 * confirmed by testing) — any such ancestor becomes sticky's reference frame
 * instead of the page, and since these table wrappers never scroll internally
 * (no max-height), the header would just sit static rather than sticking. Two
 * such ancestors exist here and both need to be neutralized:
 *
 * 1. `.fi-ta-ctn` — this project's committed resources/css/tailwind.css snapshot
 *    carries an outdated, unconditional `.fi-ta-ctn{overflow:hidden}` (current
 *    Filament only hides overflow when the table has no header toolbar). Restore
 *    the conditional behavior for tables that do have a header.
 * 2. `.fi-ta-content-ctn` — Filament sets `overflow-x: auto` unconditionally so
 *    wide tables get a contained horizontal scrollbar. Sticky and that scrollbar
 *    can't coexist on the same element, so this is only enabled when a table
 *    actually overflows (`.app-table-x-scroll`, toggled by
 *    resources/js/sticky-tables.js via ResizeObserver) — most tables fit their
 *    container and get a working sticky header; a genuinely wide table keeps its
 *    scrollbar but loses stickiness for itself.
 *
 * `.fi-ta-header-ctn` (heading/description/header actions plus the search,
 * filters, grouping and column manager toolbar) sticks above the column header
 * row. Its height varies per table and can change at runtime (filters wrapping
 * to a second line, the bulk-selection toolbar appearing), so the column header
 * row's `top` offset is read from `--app-ta-header-h`, a custom property that
 * resources/js/sticky-tables.js keeps in sync per table via ResizeObserver
 * (scoped to each `.fi-ta-ctn` since a page can have more than one table, e.g.
 * relation managers).
 *
 * The column header row's `position: sticky` rule below is scoped to
 * `:not(.app-table-x-scroll)`. On an x-scrolling table, `top: var(--app-ta-
 * header-h)` doesn't just fail to stick — since that table's nearest "scrolling
 * ancestor" is itself (never actually scrolling), the header renders pinned
 * `--app-ta-header-h` pixels below the *top of that container's own box*,
 * permanently, regardless of page scroll, shoving it down into the body rows
 * instead of sitting above them. resources/js/sticky-tables.js's cloned header
 * (`.app-ta-sticky-clone`) is what actually provides stickiness for these
 * tables; the real header row just needs to stay in normal flow.
 */
.fi-ta-ctn.fi-ta-ctn-with-header {
    overflow: visible !important;
}

.fi-ta-content-ctn {
    overflow-x: visible !important;
}

.fi-ta-content-ctn.app-table-x-scroll {
    overflow-x: auto !important;
}

/*
 * Filament rounds `.fi-ta-content-ctn`'s bottom corners to match the card when
 * there's no pagination footer below it, relying on its own `overflow` to clip
 * the table's square background/rows to that curve. `overflow-x: visible`
 * above (needed for sticky, see the comment further down) leaves nothing to do
 * that clipping any more, so the last row's square corners show past the
 * curve. `clip-path` reproduces the same visual clip without setting
 * `overflow`, so it doesn't create a scroll container and doesn't break
 * sticky the way `overflow: hidden`/`auto`/`clip` all do here.
 */
/* .fi-ta-content-ctn:not(.fi-ta-ctn-with-footer .fi-ta-content-ctn) {
    clip-path: inset(0 round 0 0 var(--radius-xl) var(--radius-xl));
} */

.fi-ta-header-ctn {
    position: sticky;
    top: 0;
    z-index: 20;
}

/*
 * An opaque background is only wanted once this is actually pinned to the top
 * of the viewport (to stay readable over rows scrolling underneath); applied
 * unconditionally it also covers the card's own rounded top corners while the
 * header is still in its normal, non-stuck position. `.app-ta-header-stuck` is
 * toggled by resources/js/sticky-tables.js via an IntersectionObserver on a
 * sentinel placed right before this element.
 */
.fi-ta-header-ctn.app-ta-header-stuck {
    background-color: var(--color-white, #fff);
}

.fi-ta-header-ctn.app-ta-header-stuck:where(.dark, .dark *) {
    background-color: var(--gray-900, #101828);
}

:where(.fi-ta-content-ctn:not(.app-table-x-scroll)) .fi-ta-table>thead>tr:where(:not(.fi-ta-table-head-groups-row)):where(:not(.fi-ta-table-stacked-header-row))>th {
    position: sticky;
    top: var(--app-ta-header-h, 0px);
    z-index: 10;
    background-color: var(--gray-50, #f9fafb);
}

.fi-ta-table>thead>tr>th:where(.dark, .dark *) {
    background-color: color-mix(in oklab, white 5%, var(--gray-900, #101828));
}

/*
 * `.app-ta-sticky-clone` is the JS-managed fallback header (see
 * resources/js/sticky-tables.js) shown in place of the native sticky column
 * header row on tables where `.app-table-x-scroll` is active — `position`,
 * `top`, `left`, `width` and `height` are all set inline per-frame by that
 * script; this just adds the same divider the real thead/tbody boundary gets
 * (`.fi-ta-table` divide-y) since the clone has no tbody sibling to draw it.
 */
.app-ta-sticky-clone {
    box-shadow: 0 1px 0 0 var(--border-subtle);
}

.app-ta-sticky-clone:where(.dark, .dark *) {
    box-shadow: 0 1px 0 0 color-mix(in oklab, white 10%, transparent);
}

.fi-ta-header-toolbar {
    border-top: none;
}

/*
 * Filament has no supported toggle for the numeric badge on the filters
 * trigger button — hiddenFilterIndicators() only hides the "Field: value"
 * chip row above the table, not this badge. `.fi-ta-filters-modal` lands on
 * the dialog, a sibling of the trigger (not an ancestor), hence :has(). Each
 * selector is scoped to its own filters-layout wrapper class so no other
 * modal/dropdown-triggering badge elsewhere in the app is affected.
 */
div:has(> .fi-ta-filters-modal) .fi-modal-trigger .fi-icon-btn-badge-ctn,
.fi-ta-filters-dropdown .fi-icon-btn-badge-ctn,
.fi-ta-filters-trigger-action-ctn .fi-icon-btn-badge-ctn {
    display: none;
}

/*
 * Empty-state icon (resources/views/components/empty-state-icon.blade.php).
 * Every resource's table renders the same mark — a small cube built from
 * `public/images/empty-cube.svg`'s 44 unit facets, recoloured to the brand
 * blue via `var(--primary-*)` (see The Derived Accent Rule) so a tenant's
 * custom theme colour still cascades correctly, and set gently spinning.
 */
.valorio-empty-state {
    max-width: 40rem;
    margin: 0 auto;
    padding: 4rem 1rem;
    text-align: center;
}

.valorio-empty-icon {
    width: 9rem;
    margin: 0 auto 1.5rem;
    animation: valorioEmptyFloat 5s ease-in-out infinite;
}

.valorio-empty-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.valorio-cube-top {
    fill: var(--primary-200, #d8e4ff);
}

.valorio-cube-right,
.valorio-cube-left {
    fill: var(--primary-600, #3a00cf);
}

.valorio-cube-edge {
    fill: none;
    stroke: var(--primary-200, #d8e4ff);
    stroke-width: .5;
    vector-effect: non-scaling-stroke;
}

.valorio-cube-spin {
    transform-box: fill-box;
    transform-origin: center;
    animation: valorioCubeSpin 22s linear infinite;
}

@keyframes valorioCubeSpin {
    to {
        transform: rotate(360deg);
    }
}

.valorio-empty-heading {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--gray-700, #374151);
}

.valorio-empty-heading:where(.dark, .dark *) {
    color: var(--gray-200, #e5e7eb);
}

.valorio-empty-description {
    margin-top: .375rem;
    font-size: .875rem;
    line-height: 1.5;
    color: var(--gray-500, #6b7280);
}

.valorio-empty-description:where(.dark, .dark *) {
    color: var(--gray-400, #9ca3af);
}

@keyframes valorioEmptyFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@media (prefers-reduced-motion: reduce) {

    .valorio-empty-icon,
    .valorio-empty-icon * {
        animation: none !important;
    }
}

.valorio-cube-shadow {
    display: none;
}