/* Global Filament admin overrides (loaded for all themes) */

:root {
    --mbh-table-header-bg: #B8984F;
    --mbh-table-header-text: #ffffff;

    /* Per-table override (litigation stages only) */
    --mbh-litigation-stages-header-bg: #B8984F;
    --mbh-litigation-stages-header-text: #ffffff;

    /* Create-page pending tables override */
    --mbh-create-table-header-bg: #B8984F;
    --mbh-create-table-header-text: #ffffff;

    /* Edit-case selected tables override */
    --mbh-edit-table-header-bg: #B8984F;
    --mbh-edit-table-header-text: #ffffff;

    --mbh-floating-widget-edge: 1.25rem;
    --mbh-floating-widget-bottom: 4.75rem;
}

/* Keep Filament date picker panels above the custom invoice/proforma form shell. */
.qb-document:has(.fi-fo-date-time-picker-panel[style*="display: block"]) {
    z-index: 1000 !important;
}

.qb-document .fi-input-wrp:has(.fi-fo-date-time-picker-panel[style*="display: block"]),
.qb-document .fi-input-wrp-input:has(.fi-fo-date-time-picker-panel[style*="display: block"]),
.qb-document .fi-fo-date-time-picker {
    overflow: visible !important;
}

.qb-document .fi-input-wrp:has(.fi-fo-date-time-picker-panel[style*="display: block"]),
.qb-document .fi-input-wrp-input:has(.fi-fo-date-time-picker-panel[style*="display: block"]) {
    position: relative;
    z-index: 1000 !important;
}

.qb-document .fi-fo-date-time-picker-panel {
    z-index: 10050 !important;
}

.invoice-flow-page .fi-page-header {
    display: none;
}

.invoice-flow-shell {
    display: grid;
    gap: 18px;
    color: #172033;
}

.invoice-flow-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 18px;
    align-items: stretch;
    padding: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 58%, #fff8ea 100%);
    border: 1px solid #d8e0ea;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.invoice-flow-hero-copy {
    display: grid;
    align-content: center;
    gap: 8px;
    min-width: 0;
}

.invoice-flow-eyebrow {
    width: max-content;
    max-width: 100%;
    padding: 5px 10px;
    color: #805900;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    background: #fff3d6;
    border: 1px solid #f3d38a;
    border-radius: 999px;
}

.invoice-flow-hero h2 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 0;
}

.invoice-flow-hero p {
    max-width: 760px;
    margin: 0;
    color: #475569;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.55;
}

.invoice-flow-total-card {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 18px;
    background: #0f172a;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.invoice-flow-total-card span {
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.invoice-flow-total-card strong {
    color: #ffffff;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.invoice-flow-progress {
    height: 8px;
    overflow: hidden;
    background: #e8eef6;
    border-radius: 999px;
}

.invoice-flow-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #9a6b00, #c99a29);
    border-radius: inherit;
    transition: width 0.24s ease;
}

.invoice-flow-stepper {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.invoice-flow-step {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 72px;
    padding: 12px;
    text-align: start;
    background: #ffffff;
    border: 1px solid #d8e0ea;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.invoice-flow-step:not(:disabled):hover {
    transform: translateY(-1px);
    border-color: #c9a245;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.invoice-flow-step.is-active {
    background: #fffaf0;
    border-color: #c99a29;
    box-shadow: 0 16px 34px rgba(154, 107, 0, 0.14);
}

.invoice-flow-step.is-complete {
    background: #f8fafc;
}

.invoice-flow-step.is-locked {
    cursor: not-allowed;
    opacity: 0.58;
}

.invoice-flow-step-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #805900;
    background: #fff3d6;
    border: 1px solid #f3d38a;
    border-radius: 11px;
}

.invoice-flow-step-icon svg {
    width: 20px;
    height: 20px;
}

.invoice-flow-step-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.invoice-flow-step-copy strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
}

.invoice-flow-step-copy small {
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
}

.invoice-flow-body {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.invoice-flow-context {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 14px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #d8e0ea;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
}

.invoice-flow-context-heading {
    display: grid;
    gap: 3px;
}

.invoice-flow-context-heading span {
    color: #805900;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.invoice-flow-context-heading strong {
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
}

.invoice-flow-context-grid {
    display: grid;
    gap: 10px;
}

.invoice-flow-context-card {
    min-width: 0;
    padding: 11px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.invoice-flow-context-card span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.25;
    text-transform: uppercase;
}

.invoice-flow-context-card strong {
    display: block;
    margin-top: 4px;
    color: #172033;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.invoice-flow-context-card.tone-muted strong {
    color: #64748b;
}

.invoice-flow-context-card.tone-accent {
    color: #ffffff;
    background: #0f172a;
    border-color: #0f172a;
}

.invoice-flow-context-card.tone-accent span,
.invoice-flow-context-card.tone-accent strong {
    color: #ffffff;
}

.invoice-flow-workspace {
    min-width: 0;
}

.invoice-flow-current-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 13px 16px;
    background: #ffffff;
    border: 1px solid #d8e0ea;
    border-radius: 14px;
}

.invoice-flow-current-step div {
    display: grid;
    gap: 2px;
}

.invoice-flow-current-step span,
.invoice-flow-current-step small {
    color: #64748b;
    font-size: 12px;
    font-weight: 750;
}

.invoice-flow-current-step strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
}

.invoice-flow-form-card {
    min-width: 0;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #d8e0ea;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
}

.invoice-flow-form-card .qb-document {
    overflow: visible;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.invoice-flow-form-card .qb-document > .fi-section-header,
.invoice-flow-form-card .qb-document .fi-section-header {
    padding: 0 0 14px !important;
    background: transparent !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.invoice-flow-form-card .qb-document .fi-section-header-heading {
    color: #0f172a !important;
    font-size: 16px !important;
    font-weight: 900 !important;
}

.invoice-flow-form-card .qb-document .fi-section-header-description {
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 650 !important;
}

.invoice-flow-form-card .qb-document .fi-section-content {
    padding: 16px 0 0 !important;
}

.invoice-flow-form-card .fi-fo-field-wrp-label label,
.invoice-flow-form-card .fi-fo-field-wrp-label span {
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

.invoice-flow-form-card .fi-input-wrp,
.invoice-flow-form-card .choices__inner {
    border: 1px solid #d1d9e6 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}

.invoice-flow-form-card input,
.invoice-flow-form-card textarea {
    font-size: 14px !important;
    font-weight: 650 !important;
}

.invoice-flow-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 16px;
}

.invoice-flow-actions-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.invoice-flow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 124px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.invoice-flow-btn:not(:disabled):hover {
    transform: translateY(-1px);
}

.invoice-flow-btn:disabled {
    cursor: wait;
    opacity: 0.72;
}

.invoice-flow-btn-primary {
    color: #ffffff;
    background: linear-gradient(180deg, #b98a17 0%, #9a6b00 100%);
    border: 1px solid #8a6000;
    box-shadow: 0 12px 24px rgba(154, 107, 0, 0.22);
}

.invoice-flow-btn-secondary {
    color: #172033;
    background: #fff8ea;
    border: 1px solid #f3d38a;
}

.invoice-flow-btn-ghost {
    color: #172033;
    background: #ffffff;
    border: 1px solid #d1d9e6;
}

.invoice-flow-btn-primary,
.invoice-flow-btn-primary:visited,
.invoice-flow-btn-primary:hover,
.invoice-flow-btn-primary:focus {
    color: #ffffff;
}

.invoice-flow-form-card .qb-invoice-lines .fi-fo-repeater-item {
    overflow: visible !important;
    background: #ffffff !important;
    border: 1px solid #d8e0ea !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06) !important;
}

.invoice-flow-form-card .qb-invoice-lines .fi-fo-repeater-item-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: 14px 14px 0 0 !important;
}

.invoice-flow-form-card .qb-invoice-lines .tox.tox-tinymce {
    border: 1px solid #d1d9e6 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

.invoice-flow-form-card .qb-summary-panel input[disabled] {
    color: #0f172a !important;
    font-weight: 900 !important;
    -webkit-text-fill-color: #0f172a !important;
}

@media (max-width: 1180px) {
    .invoice-flow-body {
        grid-template-columns: 1fr;
    }

    .invoice-flow-context {
        position: static;
    }

    .invoice-flow-context-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .invoice-flow-hero,
    .invoice-flow-stepper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .invoice-flow-hero,
    .invoice-flow-form-card,
    .invoice-flow-context {
        padding: 14px;
        border-radius: 14px;
    }

    .invoice-flow-hero h2,
    .invoice-flow-total-card strong {
        font-size: 22px;
    }

    .invoice-flow-context-grid {
        grid-template-columns: 1fr;
    }

    .invoice-flow-actions,
    .invoice-flow-actions-main {
        align-items: stretch;
        flex-direction: column;
    }

    .invoice-flow-btn {
        width: 100%;
    }
}

/* Table column header row */
.fi-ta-table thead,
.fi-ta-table thead tr,
.fi-ta-table thead th,
.fi-ta-header-cell {
    background-color: var(--mbh-table-header-bg) !important;
}

.fi-ta-header-cell-label,
.fi-ta-header-cell-sort-icon,
.fi-ta-table thead th,
.fi-ta-table thead th * {
    color: var(--mbh-table-header-text) !important;
    font-size: calc(0.875rem + 2px);
}

/* Litigation stages table: use a different header color than the global theme */
.mbh-litigation-stages-table .fi-ta-table thead,
.mbh-litigation-stages-table .fi-ta-table thead tr,
.mbh-litigation-stages-table .fi-ta-table thead th,
.mbh-litigation-stages-table .fi-ta-header-cell {
    background-color: var(--mbh-litigation-stages-header-bg) !important;
}

.mbh-litigation-stages-table .fi-ta-header-cell-label,
.mbh-litigation-stages-table .fi-ta-header-cell-sort-icon,
.mbh-litigation-stages-table .fi-ta-table thead th,
.mbh-litigation-stages-table .fi-ta-table thead th * {
    color: var(--mbh-litigation-stages-header-text) !important;
}

/* Create page (pending tables): force heading background */
.mbh-create-case-table .fi-ta-table thead,
.mbh-create-case-table .fi-ta-table thead tr,
.mbh-create-case-table .fi-ta-table thead th,
.mbh-create-case-table .fi-ta-header-cell {
    background-color: var(--mbh-create-table-header-bg) !important;
}

.mbh-create-case-table .fi-ta-header-cell-label,
.mbh-create-case-table .fi-ta-header-cell-sort-icon,
.mbh-create-case-table .fi-ta-table thead th,
.mbh-create-case-table .fi-ta-table thead th * {
    color: var(--mbh-create-table-header-text) !important;
}

/* Edit case (selected sections): force heading background */
.mbh-edit-case-table .fi-ta-table thead,
.mbh-edit-case-table .fi-ta-table thead tr,
.mbh-edit-case-table .fi-ta-table thead th,
.mbh-edit-case-table .fi-ta-header-cell {
    background-color: var(--mbh-edit-table-header-bg) !important;
}

.mbh-edit-case-table .fi-ta-header-cell-label,
.mbh-edit-case-table .fi-ta-header-cell-sort-icon,
.mbh-edit-case-table .fi-ta-table thead th,
.mbh-edit-case-table .fi-ta-table thead th * {
    color: var(--mbh-edit-table-header-text) !important;
}

/* Gold action buttons can inherit low-contrast text from browser/theme states.
   Force clear white labels anywhere we use the MBH gold palette inline. */
button[style*="#B8984F"],
button[style*="#b8984f"],
button[style*="#A48030"],
button[style*="#a48030"],
a[style*="#B8984F"],
a[style*="#b8984f"],
a[style*="#A48030"],
a[style*="#a48030"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

button[style*="#B8984F"]:disabled,
button[style*="#b8984f"]:disabled,
button[style*="#A48030"]:disabled,
button[style*="#a48030"]:disabled {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 0.88 !important;
}

/* Keep only filled primary/custom action buttons white.
    Gray/secondary action buttons must keep Filament's dark text. */
.fi-ac-btn-action.fi-btn.fi-btn-color-primary,
.fi-ac-btn-action.fi-btn.fi-btn-color-primary:link,
.fi-ac-btn-action.fi-btn.fi-btn-color-primary:visited,
.fi-ac-btn-action.fi-btn.fi-btn-color-primary:hover,
.fi-ac-btn-action.fi-btn.fi-btn-color-primary:active,
.fi-ac-btn-action.fi-btn.fi-btn-color-primary:focus,
.fi-ac-btn-action.fi-btn.fi-btn-color-primary .fi-btn-label,
.fi-ac-btn-action.fi-btn.fi-btn-color-primary svg,
.fi-ac-btn-action.fi-btn.fi-btn-color-primary span,
.fi-ac-btn-action.fi-btn[class*="text-white"],
.fi-ac-btn-action.fi-btn[class*="bg-custom"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Global button clarity: cover header actions, footer actions, table toolbars,
   grouped actions, and any custom filled MBH button from one place. */
.fi-btn {
    font-weight: 700 !important;
    border: 1px solid transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.fi-btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(184, 152, 79, 0.22) !important;
}

/* ToggleButtons render as `label.fi-btn`, so keep these color overrides scoped
   to actual buttons/links instead of every `.fi-btn` in the UI. */
:is(button, a).fi-btn.fi-btn-color-primary,
:is(button, a).fi-btn.fi-btn-color-primary:link,
:is(button, a).fi-btn.fi-btn-color-primary:visited,
:is(button, a).fi-btn.fi-btn-color-primary:hover,
:is(button, a).fi-btn.fi-btn-color-primary:active,
:is(button, a).fi-btn.fi-btn-color-primary:focus,
:is(button, a).fi-btn.fi-btn-color-success,
:is(button, a).fi-btn.fi-btn-color-success:link,
:is(button, a).fi-btn.fi-btn-color-success:visited,
:is(button, a).fi-btn.fi-btn-color-success:hover,
:is(button, a).fi-btn.fi-btn-color-success:active,
:is(button, a).fi-btn.fi-btn-color-success:focus,
:is(button, a).fi-btn.fi-btn-color-warning,
:is(button, a).fi-btn.fi-btn-color-warning:link,
:is(button, a).fi-btn.fi-btn-color-warning:visited,
:is(button, a).fi-btn.fi-btn-color-warning:hover,
:is(button, a).fi-btn.fi-btn-color-warning:active,
:is(button, a).fi-btn.fi-btn-color-warning:focus,
:is(button, a).fi-btn.fi-btn-color-danger,
:is(button, a).fi-btn.fi-btn-color-danger:link,
:is(button, a).fi-btn.fi-btn-color-danger:visited,
:is(button, a).fi-btn.fi-btn-color-danger:hover,
:is(button, a).fi-btn.fi-btn-color-danger:active,
:is(button, a).fi-btn.fi-btn-color-danger:focus,
:is(button, a).fi-btn[class*="text-white"],
:is(button, a).fi-btn[class*="bg-custom"],
:is(button, a).fi-btn[style*="#B8984F"],
:is(button, a).fi-btn[style*="#b8984f"],
:is(button, a).fi-btn[style*="#A48030"],
:is(button, a).fi-btn[style*="#a48030"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

:is(button, a).fi-btn.fi-btn-color-primary .fi-btn-label,
:is(button, a).fi-btn.fi-btn-color-primary .fi-btn-icon,
:is(button, a).fi-btn.fi-btn-color-primary svg,
:is(button, a).fi-btn.fi-btn-color-primary span,
:is(button, a).fi-btn.fi-btn-color-success .fi-btn-label,
:is(button, a).fi-btn.fi-btn-color-success .fi-btn-icon,
:is(button, a).fi-btn.fi-btn-color-success svg,
:is(button, a).fi-btn.fi-btn-color-success span,
:is(button, a).fi-btn.fi-btn-color-warning .fi-btn-label,
:is(button, a).fi-btn.fi-btn-color-warning .fi-btn-icon,
:is(button, a).fi-btn.fi-btn-color-warning svg,
:is(button, a).fi-btn.fi-btn-color-warning span,
:is(button, a).fi-btn.fi-btn-color-danger .fi-btn-label,
:is(button, a).fi-btn.fi-btn-color-danger .fi-btn-icon,
:is(button, a).fi-btn.fi-btn-color-danger svg,
:is(button, a).fi-btn.fi-btn-color-danger span,
:is(button, a).fi-btn[class*="text-white"] .fi-btn-label,
:is(button, a).fi-btn[class*="text-white"] .fi-btn-icon,
:is(button, a).fi-btn[class*="text-white"] svg,
:is(button, a).fi-btn[class*="text-white"] span,
:is(button, a).fi-btn[class*="bg-custom"] .fi-btn-label,
:is(button, a).fi-btn[class*="bg-custom"] .fi-btn-icon,
:is(button, a).fi-btn[class*="bg-custom"] svg,
:is(button, a).fi-btn[class*="bg-custom"] span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

:is(button, a).fi-btn.fi-btn-color-gray,
:is(button, a).fi-btn.fi-btn-color-gray:link,
:is(button, a).fi-btn.fi-btn-color-gray:visited,
:is(button, a).fi-btn.fi-btn-color-gray:hover,
:is(button, a).fi-btn.fi-btn-color-gray:active,
:is(button, a).fi-btn.fi-btn-color-gray:focus,
:is(button, a).fi-btn.fi-btn-outlined,
:is(button, a).fi-btn.fi-btn-outlined:link,
:is(button, a).fi-btn.fi-btn-outlined:visited,
:is(button, a).fi-btn.fi-btn-outlined:hover,
:is(button, a).fi-btn.fi-btn-outlined:active,
:is(button, a).fi-btn.fi-btn-outlined:focus {
    color: rgb(31 41 55) !important;
    -webkit-text-fill-color: rgb(31 41 55) !important;
    border-color: rgb(209 213 219 / 0.9) !important;
}

:is(button, a).fi-btn.fi-btn-color-gray .fi-btn-label,
:is(button, a).fi-btn.fi-btn-color-gray .fi-btn-icon,
:is(button, a).fi-btn.fi-btn-color-gray svg,
:is(button, a).fi-btn.fi-btn-color-gray span,
:is(button, a).fi-btn.fi-btn-outlined .fi-btn-label,
:is(button, a).fi-btn.fi-btn-outlined .fi-btn-icon,
:is(button, a).fi-btn.fi-btn-outlined svg,
:is(button, a).fi-btn.fi-btn-outlined span {
    color: rgb(31 41 55) !important;
    -webkit-text-fill-color: rgb(31 41 55) !important;
}

/* ToggleButtons use `label.fi-btn` for each option. Force the unselected and
   selected states directly so button theme overrides cannot bleed into forms. */
:is(.fi-fo-toggle-buttons, .fi-btn-group) input:not(:checked) + label.fi-btn {
    background-color: #ffffff !important;
    border-color: rgb(209 213 219 / 0.9) !important;
}

:is(.fi-fo-toggle-buttons, .fi-btn-group) input:not(:checked) + label.fi-btn,
:is(.fi-fo-toggle-buttons, .fi-btn-group) input:not(:checked) + label.fi-btn .fi-btn-label,
:is(.fi-fo-toggle-buttons, .fi-btn-group) input:not(:checked) + label.fi-btn .fi-btn-icon,
:is(.fi-fo-toggle-buttons, .fi-btn-group) input:not(:checked) + label.fi-btn span,
:is(.fi-fo-toggle-buttons, .fi-btn-group) input:not(:checked) + label.fi-btn svg {
    color: rgb(23 32 51) !important;
    -webkit-text-fill-color: rgb(23 32 51) !important;
    text-shadow: none !important;
}

:is(.fi-fo-toggle-buttons, .fi-btn-group) input:checked + label.fi-btn,
:is(.fi-fo-toggle-buttons, .fi-btn-group) input:checked + label.fi-btn .fi-btn-label,
:is(.fi-fo-toggle-buttons, .fi-btn-group) input:checked + label.fi-btn .fi-btn-icon,
:is(.fi-fo-toggle-buttons, .fi-btn-group) input:checked + label.fi-btn span,
:is(.fi-fo-toggle-buttons, .fi-btn-group) input:checked + label.fi-btn svg {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

:is(.dark .fi-fo-toggle-buttons, .dark .fi-btn-group) input:not(:checked) + label.fi-btn {
    background-color: rgb(255 255 255 / 0.05) !important;
    border-color: rgb(255 255 255 / 0.2) !important;
}

:is(.dark .fi-fo-toggle-buttons, .dark .fi-btn-group) input:not(:checked) + label.fi-btn,
:is(.dark .fi-fo-toggle-buttons, .dark .fi-btn-group) input:not(:checked) + label.fi-btn .fi-btn-label,
:is(.dark .fi-fo-toggle-buttons, .dark .fi-btn-group) input:not(:checked) + label.fi-btn .fi-btn-icon,
:is(.dark .fi-fo-toggle-buttons, .dark .fi-btn-group) input:not(:checked) + label.fi-btn span,
:is(.dark .fi-fo-toggle-buttons, .dark .fi-btn-group) input:not(:checked) + label.fi-btn svg {
    color: rgb(255 255 255 / 0.9) !important;
    -webkit-text-fill-color: rgb(255 255 255 / 0.9) !important;
}

/* Filament actions often render on the action wrapper itself, not only on a
   nested `.fi-btn`. Target the real interactive node so top/header/footer
   actions stay readable across the system, including custom toolbars. */
.fi-body .fi-ac-action.fi-ac-btn-action,
.fi-body .fi-form-actions .fi-ac-action.fi-ac-btn-action,
.fi-body .fi-page-sub-navigation .fi-ac-action.fi-ac-btn-action,
.fi-body .fi-ta-header-toolbar .fi-ac-action.fi-ac-btn-action,
.fi-body .fi-ta-actions .fi-ac-action.fi-ac-btn-action,
.fi-body .fi-header .fi-ac-action.fi-ac-btn-action,
.fi-body .fi-modal-footer .fi-ac-action.fi-ac-btn-action {
    font-weight: 700 !important;
    border-radius: 0.75rem !important;
}

.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-primary,
.fi-body .fi-form-actions .fi-ac-action.fi-ac-btn-action.fi-btn-color-primary,
.fi-body .fi-page-sub-navigation .fi-ac-action.fi-ac-btn-action.fi-btn-color-primary,
.fi-body .fi-ta-header-toolbar .fi-ac-action.fi-ac-btn-action.fi-btn-color-primary,
.fi-body .fi-ta-actions .fi-ac-action.fi-ac-btn-action.fi-btn-color-primary,
.fi-body .fi-header .fi-ac-action.fi-ac-btn-action.fi-btn-color-primary,
.fi-body .fi-modal-footer .fi-ac-action.fi-ac-btn-action.fi-btn-color-primary,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-success,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-warning,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-danger,
.fi-body .fi-ac-action.fi-ac-btn-action[class*="text-white"],
.fi-body .fi-ac-action.fi-ac-btn-action[class*="bg-custom"],
.fi-body .fi-ac-action.fi-ac-btn-action[style*="#B8984F"],
.fi-body .fi-ac-action.fi-ac-btn-action[style*="#b8984f"],
.fi-body .fi-ac-action.fi-ac-btn-action[style*="#A48030"],
.fi-body .fi-ac-action.fi-ac-btn-action[style*="#a48030"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-primary .fi-btn-label,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-primary .fi-btn-icon,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-primary span,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-primary svg,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-success .fi-btn-label,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-success .fi-btn-icon,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-success span,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-success svg,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-warning .fi-btn-label,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-warning .fi-btn-icon,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-warning span,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-warning svg,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-danger .fi-btn-label,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-danger .fi-btn-icon,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-danger span,
.fi-body .fi-ac-action.fi-ac-btn-action.fi-btn-color-danger svg,
.fi-body .fi-ac-action.fi-ac-btn-action[class*="text-white"] .fi-btn-label,
.fi-body .fi-ac-action.fi-ac-btn-action[class*="text-white"] .fi-btn-icon,
.fi-body .fi-ac-action.fi-ac-btn-action[class*="text-white"] span,
.fi-body .fi-ac-action.fi-ac-btn-action[class*="text-white"] svg,
.fi-body .fi-ac-action.fi-ac-btn-action[class*="bg-custom"] .fi-btn-label,
.fi-body .fi-ac-action.fi-ac-btn-action[class*="bg-custom"] .fi-btn-icon,
.fi-body .fi-ac-action.fi-ac-btn-action[class*="bg-custom"] span,
.fi-body .fi-ac-action.fi-ac-btn-action[class*="bg-custom"] svg {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.fi-body .fi-ac-action.fi-ac-btn-action:not(.fi-btn-color-primary):not(.fi-btn-color-success):not(.fi-btn-color-warning):not(.fi-btn-color-danger):not([class*="text-white"]):not([class*="bg-custom"]),
.fi-body .fi-form-actions .fi-ac-action.fi-ac-btn-action:not(.fi-btn-color-primary):not(.fi-btn-color-success):not(.fi-btn-color-warning):not(.fi-btn-color-danger):not([class*="text-white"]):not([class*="bg-custom"]),
.fi-body .fi-header .fi-ac-action.fi-ac-btn-action:not(.fi-btn-color-primary):not(.fi-btn-color-success):not(.fi-btn-color-warning):not(.fi-btn-color-danger):not([class*="text-white"]):not([class*="bg-custom"]),
.fi-body .fi-modal-footer .fi-ac-action.fi-ac-btn-action:not(.fi-btn-color-primary):not(.fi-btn-color-success):not(.fi-btn-color-warning):not(.fi-btn-color-danger):not([class*="text-white"]):not([class*="bg-custom"]) {
    color: rgb(31 41 55) !important;
    -webkit-text-fill-color: rgb(31 41 55) !important;
}

.fi-body .fi-ac-action.fi-ac-btn-action:not(.fi-btn-color-primary):not(.fi-btn-color-success):not(.fi-btn-color-warning):not(.fi-btn-color-danger):not([class*="text-white"]):not([class*="bg-custom"]) .fi-btn-label,
.fi-body .fi-ac-action.fi-ac-btn-action:not(.fi-btn-color-primary):not(.fi-btn-color-success):not(.fi-btn-color-warning):not(.fi-btn-color-danger):not([class*="text-white"]):not([class*="bg-custom"]) .fi-btn-icon,
.fi-body .fi-ac-action.fi-ac-btn-action:not(.fi-btn-color-primary):not(.fi-btn-color-success):not(.fi-btn-color-warning):not(.fi-btn-color-danger):not([class*="text-white"]):not([class*="bg-custom"]) span,
.fi-body .fi-ac-action.fi-ac-btn-action:not(.fi-btn-color-primary):not(.fi-btn-color-success):not(.fi-btn-color-warning):not(.fi-btn-color-danger):not([class*="text-white"]):not([class*="bg-custom"]) svg {
    color: rgb(31 41 55) !important;
    -webkit-text-fill-color: rgb(31 41 55) !important;
}
