/* This asset may be registered globally by Filament; every rule is client scoped. */
.fi-panel-client .client-period-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .6rem;
    margin-inline-start: auto;
    color: var(--dashboard-text);
}

.fi-panel-client .client-period-description {
    margin-top: .3rem;
    font-size: .8rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.fi-panel-client .fi-header:has(.client-period-toolbar) {
    flex-wrap: wrap;
}

.fi-panel-client .fi-header:has(.client-period-toolbar) > :first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.fi-panel-client .fi-header-actions-ctn:has(.client-period-toolbar) {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
    margin-inline-start: auto;
}

@media (min-width: 640px) {
    .fi-panel-client .fi-header:has(.client-period-toolbar) > :first-child {
        flex: 1 1 16rem;
    }
}

.fi-panel-client .dashboard-handoff-alert {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-block: .75rem;
    padding: .65rem;
    border-radius: .5rem;
    background: var(--dashboard-active-bg);
    color: var(--dashboard-active-text);
    font-weight: 600;
}

.fi-panel-client .dashboard-handoff-alert svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.fi-panel-client .dashboard-table .dashboard-handoff-unread td {
    background: var(--dashboard-active-bg);
}

.fi-panel-client .dashboard-table .dashboard-handoff-unread td:first-child {
    border-inline-start: 3px solid var(--dashboard-blue);
    padding-inline-start: .5rem;
}

.fi-panel-client .client-cache-answer {
    display: grid;
    gap: 1rem;
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--dashboard-text);
    line-height: 1.65;
}

.fi-panel-client .client-cache-meta {
    color: var(--dashboard-muted);
    font-size: .875rem;
}

.fi-panel-client .client-cache-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1rem;
}

.fi-panel-client .client-report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: 1rem;
}

.fi-panel-client .client-report-metric {
    padding: 1rem;
    border: 1px solid var(--dashboard-border);
    border-radius: .6rem;
    background: var(--dashboard-panel);
}

.fi-panel-client .client-report-metric h2,
.fi-panel-client .client-report-metric small {
    color: var(--dashboard-muted);
    font-size: .8rem;
}

.fi-panel-client .client-report-metric p {
    color: var(--dashboard-text);
    font-size: 1.5rem;
    margin-block: .3rem;
}

.fi-panel-client {
    --dashboard-bg: #f3f6fa;
    --dashboard-panel: #ffffff;
    --dashboard-border: #dbe3ed;
    --dashboard-text: #253449;
    --dashboard-muted: #52647b;
    --dashboard-blue: #2166bd;
    --dashboard-chrome: #ffffff;
    --dashboard-control: #ffffff;
    --dashboard-hover: #edf3fc;
    --dashboard-active-bg: #e5efff;
    --dashboard-active-border: #bdd5f4;
    --dashboard-active-text: #1c5a9f;
    --dashboard-strong: #142033;
    --dashboard-positive: #247440;
    --dashboard-negative: #ac3c32;
    --dashboard-chart-grid: #e1e8f0;
    --dashboard-link-hover: #164c8f;
    --dashboard-success-bg: #e6f4eb;
    --dashboard-warning-bg: #fff3d3;
    --dashboard-warning-text: #815c0d;
    --dashboard-danger-bg: #fdecea;
    --dashboard-muted-bg: #e9eef5;
    --dashboard-progress-bg: #dfe7f1;
    color-scheme: light;
    background: var(--dashboard-bg);
    color: var(--dashboard-text);
}

.dark .fi-panel-client {
    --dashboard-bg: #090f19;
    --dashboard-panel: #101923;
    --dashboard-border: #202c3b;
    --dashboard-text: #e8eef7;
    --dashboard-muted: #a2afc1;
    --dashboard-blue: #62a8ff;
    --dashboard-chrome: #0b121d;
    --dashboard-control: #111c2a;
    --dashboard-hover: #19293d;
    --dashboard-active-bg: #0c2b4b;
    --dashboard-active-border: #133858;
    --dashboard-active-text: #9dcbff;
    --dashboard-strong: #f4f7fc;
    --dashboard-positive: #98d5ab;
    --dashboard-negative: #f2b4ac;
    --dashboard-chart-grid: #233043;
    --dashboard-link-hover: #aed4ff;
    --dashboard-success-bg: #163127;
    --dashboard-warning-bg: #352e18;
    --dashboard-warning-text: #e6ca7b;
    --dashboard-danger-bg: #3a1f1c;
    --dashboard-muted-bg: #202936;
    --dashboard-progress-bg: #263140;
    color-scheme: dark;
}

.fi-panel-client .fi-topbar,
.fi-panel-client .fi-sidebar,
.fi-panel-client .fi-sidebar-header {
    background: var(--dashboard-chrome);
}

.fi-panel-client .fi-topbar {
    box-shadow: 0 1px 0 var(--dashboard-border);
}

.fi-panel-client .fi-sidebar {
    border-inline-end: 1px solid var(--dashboard-border);
}

.fi-panel-client .fi-sidebar-header {
    box-shadow: none;
}

.fi-panel-client .fi-sidebar-nav {
    padding-inline: 1rem;
}

.fi-panel-client .fi-sidebar-item-btn {
    min-height: 2.6rem;
    border-radius: .4rem;
}

.fi-panel-client .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: var(--dashboard-active-bg);
    box-shadow: inset 0 0 0 1px var(--dashboard-active-border);
}

.fi-panel-client .fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-panel-client .fi-sidebar-item.fi-active .fi-icon {
    color: var(--dashboard-active-text);
}

.fi-panel-client .fi-main {
    padding-inline: 1.25rem;
}

.fi-panel-client .fi-page-header-main-ctn {
    padding-block: 1.4rem;
    gap: 1.5rem;
}

.fi-panel-client .client-dashboard {
    display: grid;
    gap: 1rem;
    min-width: 0;
    font-variant-numeric: tabular-nums;
}

.fi-panel-client .dashboard-content {
    display: grid;
    min-width: 0;
    gap: 1rem;
}

.fi-panel-client .dashboard-content.is-loading {
    opacity: .55;
}

.fi-panel-client .dashboard-update-status {
    margin-top: -.7rem;
    margin-bottom: -.3rem;
    color: var(--dashboard-muted);
    font-size: .6875rem;
    line-height: 1.5;
    text-align: end;
}

.fi-panel-client .dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: .25rem;
}

.fi-panel-client .dashboard-toolbar h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 650;
    letter-spacing: -.025em;
}

.fi-panel-client .dashboard-toolbar p {
    margin-top: .3rem;
    color: var(--dashboard-muted);
    font-size: .8rem;
    line-height: 1.6;
}

.fi-panel-client .dashboard-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
}

.fi-panel-client .dashboard-period,
.fi-panel-client .dashboard-refresh {
    min-height: 2.4rem;
    border: 1px solid var(--dashboard-border);
    border-radius: .4rem;
    background-color: var(--dashboard-control);
    color: var(--dashboard-text);
    font-size: .8rem;
}

.fi-panel-client .dashboard-period {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-width: 12rem;
    padding: .55rem .75rem;
}

.fi-panel-client .dashboard-period > svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: var(--dashboard-muted);
}

.fi-panel-client .dashboard-period select {
    min-width: 0;
    flex: 1;
    padding: 0 .2rem 0 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.fi-panel-client .dashboard-period option {
    background: var(--dashboard-control);
    color: var(--dashboard-text);
}

.fi-panel-client .dashboard-refresh {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .55rem .8rem;
    cursor: pointer;
}

.fi-panel-client .dashboard-refresh svg {
    width: 1rem;
    height: 1rem;
}

.fi-panel-client .dashboard-refresh:hover:not(:disabled) {
    background: var(--dashboard-hover);
    border-color: var(--dashboard-active-border);
}

.fi-panel-client .dashboard-refresh:disabled {
    cursor: wait;
    opacity: .55;
}

.fi-panel-client .client-dashboard :is(a, button, select):focus-visible {
    outline: 2px solid var(--dashboard-blue);
    outline-offset: 3px;
}

.fi-panel-client .dashboard-kpis,
.fi-panel-client .dashboard-charts,
.fi-panel-client .dashboard-summaries {
    display: grid;
    min-width: 0;
    gap: 1rem;
}

.fi-panel-client .dashboard-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fi-panel-client .dashboard-charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fi-panel-client .dashboard-summaries {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.fi-panel-client .dashboard-kpi,
.fi-panel-client .dashboard-plan,
.fi-panel-client .dashboard-panel,
.fi-panel-client .dashboard-charts .fi-section {
    min-width: 0;
    border: 1px solid var(--dashboard-border);
    border-radius: .6rem;
    background: var(--dashboard-panel);
    box-shadow: 0 2px 6px #00000014;
}

.fi-panel-client .dashboard-kpi {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1rem;
}

.fi-panel-client .dashboard-kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    flex: 0 0 2.6rem;
    border-radius: .6rem;
    background: var(--dashboard-active-bg);
    color: var(--dashboard-blue);
}

.fi-panel-client .dashboard-kpi-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.fi-panel-client .dashboard-label {
    color: var(--dashboard-muted);
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .025em;
    line-height: 1.5;
    text-transform: uppercase;
}

.fi-panel-client .dashboard-kpi-link {
    color: inherit;
    white-space: normal;
}

.fi-panel-client .dashboard-kpi-link:is(:hover, :focus-visible) {
    text-decoration: underline;
    text-underline-offset: .15em;
}

.fi-panel-client .dashboard-value {
    margin-block: .3rem .2rem;
    color: var(--dashboard-strong);
    font-size: 1.65rem;
    font-weight: 650;
    letter-spacing: -.04em;
    line-height: 1.15;
}

.fi-panel-client .dashboard-trend {
    color: var(--dashboard-muted);
    font-size: .6875rem;
    line-height: 1.5;
}

.fi-panel-client .dashboard-trend.is-positive {
    color: var(--dashboard-positive);
}

.fi-panel-client .dashboard-trend.is-negative {
    color: var(--dashboard-negative);
}

.fi-panel-client .dashboard-trend.is-neutral {
    color: var(--dashboard-muted);
}

.fi-panel-client .dashboard-charts > * {
    min-width: 0;
}

.fi-panel-client .dashboard-charts .fi-section {
    height: 100%;
}

.fi-panel-client .dashboard-charts .fi-section-header {
    padding: .75rem 1rem .25rem;
    border: 0;
}

.fi-panel-client .dashboard-charts .fi-section-header-heading {
    font-size: .85rem;
    font-weight: 500;
}

.fi-panel-client .dashboard-charts .fi-section-header-description {
    color: var(--dashboard-muted);
    font-size: .72rem;
    line-height: 1.4;
}

.fi-panel-client .dashboard-charts .fi-section-content {
    padding: .25rem 1rem .75rem;
}

.fi-panel-client .dashboard-charts .fi-wi-chart-frame {
    height: 220px;
}

.fi-panel-client .dashboard-charts .fi-wi-chart-text-color {
    color: var(--dashboard-muted);
}

.fi-panel-client .dashboard-charts .fi-wi-chart-grid-color {
    color: var(--dashboard-chart-grid);
}

.fi-panel-client .dashboard-panel {
    display: flex;
    flex-direction: column;
}

.fi-panel-client .dashboard-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    padding: .9rem .85rem .6rem;
}

.fi-panel-client .dashboard-panel-header h2 {
    min-width: 0;
    margin: 0;
    font-size: .8rem;
    font-weight: 550;
    line-height: 1.5;
}

.fi-panel-client .dashboard-panel a {
    color: var(--dashboard-blue);
    text-decoration: none;
}

.fi-panel-client .dashboard-panel a:hover {
    color: var(--dashboard-link-hover);
    text-decoration: underline;
}

.fi-panel-client .dashboard-panel-header > a {
    flex-shrink: 0;
    font-size: .6875rem;
}

.fi-panel-client .dashboard-panel-body {
    flex: 1;
    min-width: 0;
    padding: 0 .85rem .8rem;
    overflow-x: auto;
}

.fi-panel-client .dashboard-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--dashboard-text);
    font-size: .6875rem;
    line-height: 1.4;
}

.fi-panel-client .dashboard-table th,
.fi-panel-client .dashboard-table td {
    padding: .4rem .25rem;
    text-align: start;
    vertical-align: top;
}

.fi-panel-client .dashboard-table th:first-child,
.fi-panel-client .dashboard-table td:first-child {
    padding-inline-start: 0;
}

.fi-panel-client .dashboard-table th:last-child,
.fi-panel-client .dashboard-table td:last-child {
    padding-inline-end: 0;
}

.fi-panel-client .dashboard-table th {
    color: var(--dashboard-muted);
    font-size: .6875rem;
    font-weight: 400;
}

.fi-panel-client .dashboard-table caption:not(.fi-sr-only) {
    padding-top: .9rem;
    color: var(--dashboard-text);
    font-size: .72rem;
    text-align: start;
}

.fi-panel-client .dashboard-table tbody tr + tr {
    border-top: 1px solid var(--dashboard-border);
}

.fi-panel-client .dashboard-table td {
    overflow-wrap: anywhere;
}

.fi-panel-client .dashboard-table .dashboard-muted {
    display: block;
    margin-top: .15rem;
    font-size: .6875rem;
}

.fi-panel-client .dashboard-record-link {
    display: block;
    max-width: 20ch;
    overflow: hidden;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-panel-client .dashboard-models-table {
    table-layout: fixed;
}

.fi-panel-client .dashboard-models-table th:first-child {
    width: 38%;
}

.fi-panel-client .dashboard-models-table :is(th, td):not(:first-child) {
    padding-inline: .2rem;
    text-align: end;
    white-space: nowrap;
}

.fi-panel-client .dashboard-empty {
    padding: 1.5rem .2rem;
    color: var(--dashboard-muted);
    font-size: .75rem;
    line-height: 1.7;
    text-align: center;
}

.fi-panel-client .dashboard-muted,
.fi-panel-client .dashboard-section-note {
    color: var(--dashboard-muted);
    font-size: .7rem;
    line-height: 1.6;
}

.fi-panel-client .dashboard-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: .25rem;
    padding: .1rem .35rem;
    font-size: .6875rem;
    line-height: 1.5;
    white-space: nowrap;
}

.fi-panel-client .dashboard-badge.is-success {
    background: var(--dashboard-success-bg);
    color: var(--dashboard-positive);
}

.fi-panel-client .dashboard-badge.is-warning {
    background: var(--dashboard-warning-bg);
    color: var(--dashboard-warning-text);
}

.fi-panel-client .dashboard-badge.is-info {
    background: var(--dashboard-active-bg);
    color: var(--dashboard-active-text);
}

.fi-panel-client .dashboard-badge.is-muted {
    background: var(--dashboard-muted-bg);
    color: var(--dashboard-muted);
}

.fi-panel-client .dashboard-badge.is-danger {
    background: var(--dashboard-danger-bg);
    color: var(--dashboard-negative);
}

.fi-panel-client .dashboard-plan {
    display: grid;
    gap: .3rem;
    padding: 1rem 1.1rem;
}

.fi-panel-client .dashboard-plan-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.fi-panel-client .dashboard-plan .dashboard-value {
    margin: 0;
}

.fi-panel-client .dashboard-plan-detail {
    color: var(--dashboard-text);
    font-size: .75rem;
    line-height: 1.5;
}

.fi-panel-client .dashboard-plan .dashboard-progress {
    height: .45rem;
    margin-block: .2rem;
}

.fi-panel-client .dashboard-progress.is-warning > span {
    background: var(--dashboard-warning-text);
}

.fi-panel-client .dashboard-progress.is-danger > span {
    background: var(--dashboard-negative);
}

.fi-panel-client .dashboard-stat-value {
    margin-top: .25rem;
    color: var(--dashboard-strong);
    font-size: 1.25rem;
    font-weight: 550;
    letter-spacing: -.02em;
}

.fi-panel-client .dashboard-inline-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    margin-block: .45rem 1rem;
}

.fi-panel-client .dashboard-inline-stats > div {
    min-width: 0;
}

.fi-panel-client .dashboard-intents {
    display: grid;
    gap: .7rem;
    margin-top: .8rem;
    list-style: none;
}

.fi-panel-client .dashboard-intent-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .3rem;
    color: var(--dashboard-text);
    font-size: .6875rem;
    overflow-wrap: anywhere;
}

.fi-panel-client .dashboard-intent-label > span:last-child {
    flex-shrink: 0;
}

.fi-panel-client .dashboard-progress {
    height: .22rem;
    overflow: hidden;
    border-radius: 1rem;
    background: var(--dashboard-progress-bg);
}

.fi-panel-client .dashboard-progress > span {
    display: block;
    height: 100%;
    max-width: 100%;
    border-radius: inherit;
    background: var(--dashboard-blue);
}

.fi-panel-client .dashboard-panel-footer {
    margin-top: auto;
    padding: .65rem .85rem;
    border-top: 1px solid var(--dashboard-border);
    font-size: .6875rem;
}

.fi-panel-client .dashboard-section-note {
    margin-top: .1rem;
}

@media (min-width: 1400px) {
    .fi-panel-client .dashboard-summaries {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1199px) {
    .fi-panel-client .dashboard-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fi-panel-client .dashboard-kpi {
        padding: 1rem;
    }
}

@media (max-width: 1099px) {
    .fi-panel-client .dashboard-charts {
        grid-template-columns: minmax(0, 1fr);
    }

    .fi-panel-client .dashboard-summaries {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 639px) {
    .fi-panel-client .fi-header-actions-ctn:has(.client-period-toolbar),
    .fi-panel-client .client-period-toolbar {
        width: 100%;
    }

    .fi-panel-client .fi-main {
        padding-inline: .85rem;
    }

    .fi-panel-client .dashboard-kpis,
    .fi-panel-client .dashboard-summaries {
        grid-template-columns: minmax(0, 1fr);
    }

    .fi-panel-client .dashboard-toolbar,
    .fi-panel-client .dashboard-controls {
        align-items: stretch;
    }

    .fi-panel-client .dashboard-controls {
        width: 100%;
    }

    .fi-panel-client .dashboard-period {
        flex: 1;
    }

    .fi-panel-client .dashboard-kpi {
        padding: 1rem 1.1rem;
    }
}
