/**
 * Dashboard KPI + cashflow — palette locked to business rules:
 * Total kas / arus masuk = biru | Piutang jatuh tempo = oranye | Pengeluaran / arus keluar = merah | Laba / arus bersih = hijau.
 * (Chart.js sparkline reads `color` from .fi-wi-stats-overview-stat-chart-*-color spans.)
 */
:root {
    --efs-finance-in: #2563eb;
    --efs-finance-out: #dc2626;
    --efs-finance-net: #16a34a;
    --efs-card-border: #e2e8f0;
    --efs-card-radius: 0.875rem;
    --efs-card-shadow:
        0 1px 3px 0 rgb(15 23 42 / 0.06),
        0 1px 2px -1px rgb(15 23 42 / 0.06);
    --efs-text-muted: #64748b;
    --efs-text-body: #334155;
    --efs-text-strong: #0f172a;
}

.efs-dashboard-widgets .fi-grid-ctn {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .efs-dashboard-widgets .fi-grid-ctn {
        gap: 1.75rem;
    }
}

/* Remove “double card”: stats grid sits on page bg without an extra section frame */
.fi-wi-stats-overview .fi-section.fi-section-not-contained {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.fi-wi-stats-overview .fi-section-not-contained .fi-section-content-ctn {
    padding: 0;
}

/* Chart card (full-width line chart) */
.fi-wi-chart .fi-section {
    border-radius: var(--efs-card-radius);
    border: 1px solid var(--efs-card-border);
    box-shadow: var(--efs-card-shadow);
    background: #fff;
}

.fi-wi-chart .fi-section-header-heading {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--efs-text-strong);
}

.fi-wi-chart .fi-section-header-description {
    font-size: 0.8125rem;
    color: var(--efs-text-muted);
    margin-top: 0.25rem;
}

.fi-wi-chart .fi-wi-chart-canvas-ctn {
    border-radius: 0.75rem;
    border: 1px solid #f1f5f9;
    background: linear-gradient(180deg, rgb(248 250 252 / 0.95) 0%, #fff 40%);
    padding: 0.5rem 0.35rem 0.35rem;
    margin-top: 0.5rem;
}

.fi-wi-stats-overview {
    margin-bottom: 0;
}

.fi-wi-stats-overview .fi-grid-ctn {
    align-items: stretch;
}

/* KPI tile — white card, mockup-like radius + shadow */
.fi-wi-stats-overview .fi-wi-stats-overview-stat {
    height: 100%;
    border-radius: var(--efs-card-radius);
    border: 1px solid var(--efs-card-border);
    background: #fff;
    box-shadow: var(--efs-card-shadow);
    padding: 1rem 1.15rem 0.9rem;
    text-decoration: none;
    color: inherit;
    transition:
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.fi-wi-stats-overview a.fi-wi-stats-overview-stat:hover {
    border-color: #cbd5e1;
    box-shadow:
        0 4px 6px -1px rgb(15 23 42 / 0.07),
        0 2px 4px -2px rgb(15 23 42 / 0.06);
}

.fi-wi-stats-overview .fi-wi-stats-overview-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Mockup order: headline value → sparkline → footer caption */
.fi-wi-stats-overview .fi-wi-stats-overview-stat-chart {
    order: 3;
    margin-top: 0.5rem;
}

.fi-wi-stats-overview .fi-wi-stats-overview-stat-description {
    order: 4;
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--efs-text-muted);
}

.fi-wi-stats-overview .fi-wi-stats-overview-stat-value {
    order: 2;
    margin-top: 0.35rem;
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--efs-text-strong);
    line-height: 1.15;
}

/* Top row: icon + (title + % pill) */
.efs-stat .fi-wi-stats-overview-stat-label-ctn {
    order: 1;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
}

.efs-stat .fi-wi-stats-overview-stat-label-ctn > :first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
}

.efs-stat .fi-wi-stats-overview-stat-label-ctn > :first-child svg {
    width: 0.95rem;
    height: 0.95rem;
    stroke-width: 1.75;
}

.efs-stat .fi-wi-stats-overview-stat-label {
    flex: 1;
    min-width: 0;
    align-self: center;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--efs-text-muted);
    line-height: 1.3;
}

/* HTML label row (title + pill) inside .fi-wi-stats-overview-stat-label */
.efs-stat-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.efs-stat-title-text {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--efs-text-body);
    letter-spacing: -0.01em;
}

.efs-stat-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.24rem 0.48rem;
    border-radius: 9999px;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.efs-stat-pill--tip {
    cursor: help;
}

.efs-stat-pill-arrow {
    font-size: 0.6rem;
    line-height: 1;
}

.efs-stat-pill--good {
    background: rgb(34 197 94 / 0.16);
    color: #166534;
    border-color: rgb(22 163 74 / 0.24);
}

.efs-stat-pill--bad {
    background: rgb(239 68 68 / 0.15);
    color: #b91c1c;
    border-color: rgb(220 38 38 / 0.24);
}

/* Cash card — accent bar + gradient background */
.efs-stat--cash {
    position: relative;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 60%) !important;
    border-color: #bfdbfe !important;
    overflow: hidden;
}

.efs-stat--cash::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
    border-radius: 4px 0 0 4px;
}

.efs-stat--cash .fi-wi-stats-overview-stat-value {
    color: #1e3a8a;
}

.efs-stat--cash .fi-wi-stats-overview-stat-description {
    border-top-color: #dbeafe;
    color: #3730a3;
    font-weight: 600;
}

/* Icon tiles — match KPI color rules */
.efs-stat--cash .fi-wi-stats-overview-stat-label-ctn > :first-child {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    width: 2.4rem;
    height: 2.4rem;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}

/* Piutang Jatuh Tempo — orange accent */
.efs-stat--receivable {
    position: relative;
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 60%) !important;
    border-color: #fed7aa !important;
    overflow: hidden;
}

.efs-stat--receivable::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #f97316, #c2410c);
    border-radius: 4px 0 0 4px;
}

.efs-stat--receivable .fi-wi-stats-overview-stat-value {
    color: #7c2d12;
}

.efs-stat--receivable .fi-wi-stats-overview-stat-description {
    border-top-color: #fed7aa;
}

.efs-stat--receivable .fi-wi-stats-overview-stat-label-ctn > :first-child {
    background: linear-gradient(135deg, #f97316, #c2410c);
    color: #fff;
    width: 2.4rem;
    height: 2.4rem;
    box-shadow: 0 2px 8px rgba(234,88,12,0.25);
}

/* Pengeluaran — red accent */
.efs-stat--expense {
    position: relative;
    background: linear-gradient(135deg, #fff1f2 0%, #ffffff 60%) !important;
    border-color: #fecdd3 !important;
    overflow: hidden;
}

.efs-stat--expense::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #f87171, #b91c1c);
    border-radius: 4px 0 0 4px;
}

.efs-stat--expense .fi-wi-stats-overview-stat-value {
    color: #7f1d1d;
}

.efs-stat--expense .fi-wi-stats-overview-stat-description {
    border-top-color: #fecdd3;
}

.efs-stat--expense .fi-wi-stats-overview-stat-label-ctn > :first-child {
    background: linear-gradient(135deg, #f87171, #b91c1c);
    color: #fff;
    width: 2.4rem;
    height: 2.4rem;
    box-shadow: 0 2px 8px rgba(220,38,38,0.25);
}

/* Laba Bersih — green accent */
.efs-stat--profit {
    position: relative;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 60%) !important;
    border-color: #bbf7d0 !important;
    overflow: hidden;
}

.efs-stat--profit::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #34d399, #047857);
    border-radius: 4px 0 0 4px;
}

.efs-stat--profit .fi-wi-stats-overview-stat-value {
    color: #14532d;
}

.efs-stat--profit .fi-wi-stats-overview-stat-description {
    border-top-color: #bbf7d0;
}

.efs-stat--profit .fi-wi-stats-overview-stat-label-ctn > :first-child {
    background: linear-gradient(135deg, #34d399, #047857);
    color: #fff;
    width: 2.4rem;
    height: 2.4rem;
    box-shadow: 0 2px 8px rgba(4,120,87,0.25);
}

/* Laba Bersih negatif — red accent override */
.efs-stat--profit-negative {
    background: linear-gradient(135deg, #fff1f2 0%, #ffffff 60%) !important;
    border-color: #fecdd3 !important;
}

.efs-stat--profit-negative::before {
    background: linear-gradient(180deg, #f87171, #b91c1c);
}

.efs-stat--profit-negative .fi-wi-stats-overview-stat-value {
    color: #7f1d1d;
}

.efs-stat--profit-negative .fi-wi-stats-overview-stat-description {
    border-top-color: #fecdd3;
}

.efs-stat--profit-negative .fi-wi-stats-overview-stat-label-ctn > :first-child {
    background: linear-gradient(135deg, #f87171, #b91c1c);
    color: #fff;
    box-shadow: 0 2px 8px rgba(220,38,38,0.25);
}

/* Mode Compliance Pajak — indigo accent */
.efs-stat--compliance {
    position: relative;
    background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 60%) !important;
    border-color: #ddd6fe !important;
    overflow: hidden;
}

.efs-stat--compliance::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #a78bfa, #6d28d9);
    border-radius: 4px 0 0 4px;
}

.efs-stat--compliance .fi-wi-stats-overview-stat-value {
    color: #3b0764;
    font-size: 1.15rem;
}

.efs-stat--compliance .fi-wi-stats-overview-stat-description {
    border-top-color: #ddd6fe;
}

.efs-stat--compliance .fi-wi-stats-overview-stat-label-ctn > :first-child {
    background: linear-gradient(135deg, #a78bfa, #6d28d9);
    color: #fff;
    width: 2.4rem;
    height: 2.4rem;
    box-shadow: 0 2px 8px rgba(109,40,217,0.25);
}

/* Sparkline stroke/fill — same hex as CashflowTrendChart series */
.efs-stat--cash .fi-wi-stats-overview-stat-chart .fi-wi-stats-overview-stat-chart-border-color {
    color: #2563eb !important;
}

.efs-stat--cash .fi-wi-stats-overview-stat-chart .fi-wi-stats-overview-stat-chart-bg-color {
    color: rgba(37, 99, 235, 0.14) !important;
}

.efs-stat--receivable .fi-wi-stats-overview-stat-chart .fi-wi-stats-overview-stat-chart-border-color {
    color: #ea580c !important;
}

.efs-stat--receivable .fi-wi-stats-overview-stat-chart .fi-wi-stats-overview-stat-chart-bg-color {
    color: rgba(234, 88, 12, 0.14) !important;
}

.efs-stat--expense .fi-wi-stats-overview-stat-chart .fi-wi-stats-overview-stat-chart-border-color {
    color: #dc2626 !important;
}

.efs-stat--expense .fi-wi-stats-overview-stat-chart .fi-wi-stats-overview-stat-chart-bg-color {
    color: rgba(220, 38, 38, 0.12) !important;
}

.efs-stat--profit:not(.efs-stat--profit-negative) .fi-wi-stats-overview-stat-chart .fi-wi-stats-overview-stat-chart-border-color {
    color: #16a34a !important;
}

.efs-stat--profit:not(.efs-stat--profit-negative) .fi-wi-stats-overview-stat-chart .fi-wi-stats-overview-stat-chart-bg-color {
    color: rgba(22, 163, 74, 0.14) !important;
}

.efs-stat--profit-negative .fi-wi-stats-overview-stat-chart .fi-wi-stats-overview-stat-chart-border-color {
    color: #dc2626 !important;
}

.efs-stat--profit-negative .fi-wi-stats-overview-stat-chart .fi-wi-stats-overview-stat-chart-bg-color {
    color: rgba(220, 38, 38, 0.12) !important;
}

/* Sparkline area height (Filament mini chart) */
.fi-wi-stats-overview .fi-wi-stats-overview-stat-chart canvas {
    min-height: 2.5rem;
}

/* Pending approvals widget — card shell aligned with dashboard */
.fi-wi-widget .efs-pending-widget.fi-section {
    border-radius: var(--efs-card-radius) !important;
    border-color: var(--efs-card-border) !important;
    box-shadow: var(--efs-card-shadow) !important;
    background: #fff !important;
}

.fi-wi-widget .efs-pending-widget .fi-section-content-ctn {
    padding: 1.1rem 1.2rem 1.15rem;
}

@media (min-width: 768px) {
    .fi-wi-widget .efs-pending-widget .fi-section-content-ctn {
        padding: 1.2rem 1.35rem 1.25rem;
    }
}

.efs-pending-widget__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    margin-bottom: 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.efs-pending-widget__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--efs-text-strong);
}

.efs-pending-widget__subtitle {
    margin: 0.35rem 0 0;
    max-width: 42rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--efs-text-muted);
}

.efs-pending-widget__stat {
    flex-shrink: 0;
    min-width: 9rem;
    padding: 0.65rem 1rem;
    text-align: right;
    border-radius: 0.75rem;
    border: 1px solid #fde68a;
    background: linear-gradient(145deg, #fffbeb 0%, #fff7ed 100%);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.efs-pending-widget__stat-label {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #a16207;
}

.efs-pending-widget__stat-value {
    margin-top: 0.2rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--efs-text-strong);
}

.efs-pending-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.25rem 1.25rem;
    text-align: center;
    border-radius: 0.75rem;
    border: 1px dashed #e2e8f0;
    background: #f8fafc;
}

.efs-pending-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 0.75rem;
    border-radius: 9999px;
    background: #ecfdf5;
    color: #059669;
}

.efs-pending-empty__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--efs-text-body);
}

.efs-pending-empty__text {
    margin: 0.35rem 0 0;
    max-width: 22rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--efs-text-muted);
}

.efs-pending-table-wrap {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid #f1f5f9;
    background: #fafbfc;
}

.efs-pending-table {
    width: 100%;
    min-width: 52rem;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.efs-pending-table thead {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.efs-pending-table th {
    padding: 0.65rem 0.85rem;
    text-align: left;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--efs-text-muted);
    border-bottom: 1px solid #e2e8f0;
}

.efs-pending-table th.text-right {
    text-align: right;
}

.efs-pending-table td {
    padding: 0.7rem 0.85rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.efs-pending-table tbody tr:hover td {
    background: #fafbfc;
}

.efs-pending-table tbody tr:last-child td {
    border-bottom: none;
}

.efs-pending-doclink {
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition:
        color 0.12s ease,
        border-color 0.12s ease;
}

.efs-pending-doclink:hover {
    color: #1e3a8a;
    border-bottom-color: rgb(30 58 138 / 0.35);
}

.efs-pending-tier {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

.efs-pending-tier--manager {
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 0 0 1px rgb(191 219 254 / 0.9);
}

.efs-pending-tier--director {
    background: #faf5ff;
    color: #6b21a8;
    box-shadow: 0 0 0 1px rgb(233 213 255 / 0.95);
}

.efs-pending-typeicon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    background: #fffbeb;
    color: #b45309;
    box-shadow: 0 0 0 1px rgb(253 230 138 / 0.9);
}

.efs-pending-typeicon--purchase {
    font-size: 0.5625rem;
    font-weight: 800;
}

.efs-pending-pill {
    display: inline-flex;
    max-width: 100%;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.25;
}

.efs-pending-pill--project {
    background: #f0f9ff;
    color: #0c4a6e;
    box-shadow: 0 0 0 1px rgb(186 230 253 / 0.9);
}

.efs-pending-review {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.65rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    transition:
        background-color 0.12s ease,
        border-color 0.12s ease;
}

.efs-pending-review:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.efs-pending-review--block {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
}

.efs-pending-field {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.65rem;
    font-size: 0.8125rem;
    color: var(--efs-text-strong);
    background: #fff;
    transition:
        border-color 0.12s ease,
        box-shadow 0.12s ease;
}

.efs-pending-field:focus {
    outline: none;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgb(148 163 184 / 0.2);
}

.efs-pending-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    background: #fff;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}

.efs-pending-action:active {
    transform: scale(0.97);
}

.efs-pending-action svg {
    width: 1.1rem;
    height: 1.1rem;
}

.efs-pending-action--lg {
    width: 2.35rem;
    height: 2.35rem;
}

.efs-pending-action--approve {
    color: #047857;
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.efs-pending-action--approve:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
}

.efs-pending-action--reject {
    color: #be123c;
    border-color: #fecdd3;
    background: #fff1f2;
}

.efs-pending-action--reject:hover {
    background: #ffe4e6;
    border-color: #fda4af;
}

.efs-pending-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.efs-pending-card {
    border-radius: 0.875rem;
    border: 1px solid var(--efs-card-border);
    background: #fff;
    padding: 1rem 1rem 0.85rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.efs-pending-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.efs-pending-card__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid #f1f5f9;
}

.efs-pending-card__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

/* Recent transactions widget */
.fi-wi-widget .efs-recent-widget.fi-section {
    border-radius: var(--efs-card-radius) !important;
    border-color: var(--efs-card-border) !important;
    box-shadow: var(--efs-card-shadow) !important;
    background: #fff !important;
}

.fi-wi-widget .efs-recent-widget .fi-section-content-ctn {
    padding: 1.1rem 1.2rem 1.15rem;
}

.efs-recent-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.efs-recent-widget__title {
    margin: 0;
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--efs-text-strong);
}

.efs-recent-widget__meta {
    font-size: 0.75rem;
    color: var(--efs-text-muted);
}

.efs-recent-widget__table-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    background: #fff;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Sembunyikan kolom Jenis & Pihak di mobile */
@media (max-width: 639px) {
    .efs-recent-widget__table .col-type,
    .efs-recent-widget__table .col-party {
        display: none;
    }
}

.efs-recent-widget__table th {
    font-size: 0.64rem;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.efs-recent-widget__table td {
    font-size: 0.78125rem;
    padding-top: 0.46rem !important;
    padding-bottom: 0.46rem !important;
    line-height: 1.3;
}

.efs-recent-widget__doc {
    font-weight: 600;
    color: #1d4ed8;
}

.efs-recent-status {
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.46rem;
    border-radius: 0.42rem;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    border: 1px solid transparent;
}

.efs-recent-status--success {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.efs-recent-status--warning {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.efs-recent-status--info {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.efs-recent-status--danger {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
}

.efs-recent-status--neutral {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.efs-sales-monitor-widget__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.efs-sales-monitor-widget__title {
    margin: 0;
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--efs-text-strong);
}

.efs-sales-monitor-widget__meta {
    font-size: 0.74rem;
    color: var(--efs-text-muted);
}

.efs-sales-monitor-widget__toolbar {
    display: inline-flex;
    gap: 0.35rem;
}

.efs-sales-filter-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    border-radius: 0.45rem;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    line-height: 1.2;
    cursor: pointer;
}

.efs-sales-filter-btn--active {
    border-color: #0f172a;
    background: #0f172a;
    color: #fff;
}

.efs-sales-kpi-grid {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0.8rem;
}

@media (min-width: 1024px) {
    .efs-sales-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.efs-sales-kpi-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    background: #fff;
    padding: 0.6rem 0.7rem;
}

.efs-sales-kpi-label {
    margin: 0;
    font-size: 0.68rem;
    color: #64748b;
}

.efs-sales-kpi-value {
    margin: 0.25rem 0 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.efs-sales-monitor-grid {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    margin-bottom: 0.6rem;
}

@media (min-width: 1024px) {
    .efs-sales-monitor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.efs-sales-panel {
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    background: #fff;
    padding: 0.65rem 0.7rem;
}

.efs-sales-panel-title {
    margin: 0 0 0.5rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: #334155;
}

.efs-sales-funnel-row,
.efs-sales-aging-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.efs-sales-funnel-item,
.efs-sales-aging-item {
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #f8fafc;
    padding: 0.45rem 0.5rem;
}

.efs-sales-funnel-item span,
.efs-sales-aging-item span {
    display: block;
    font-size: 0.66rem;
    color: #64748b;
}

.efs-sales-funnel-item strong,
.efs-sales-aging-item strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: #0f172a;
}

.efs-sales-list {
    display: grid;
    gap: 0.42rem;
}

.efs-sales-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #f8fafc;
    padding: 0.45rem 0.55rem;
    font-size: 0.72rem;
    min-width: 0;
}

.efs-sales-list-row span {
    color: #334155;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.efs-sales-list-row strong {
    color: #0f172a;
    flex-shrink: 0;
    white-space: nowrap;
}

.efs-sales-empty {
    margin: 0;
    font-size: 0.72rem;
    color: #64748b;
}

/* Transaction form UX */
.efs-invoice-form-card {
    border: 1px solid var(--efs-card-border);
    border-radius: var(--efs-card-radius);
    background: #fff;
    box-shadow: var(--efs-card-shadow);
}

.efs-invoice-form-card .fi-section-content-ctn {
    padding: 1rem;
}

@media (min-width: 768px) {
    .efs-invoice-form-card .fi-section-content-ctn {
        padding: 1.2rem;
    }
}

.efs-invoice-summary-panel {
    border: 1px solid #dbeafe;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
}

.efs-invoice-summary-panel .fi-section-content-ctn {
    padding: 0.85rem 1rem;
}

.efs-invoice-total-input {
    font-weight: 700;
    color: #0f172a;
}

.efs-field-high-contrast input,
.efs-field-high-contrast select,
.efs-field-high-contrast textarea,
.efs-field-high-contrast .fi-input-wrp {
    border-color: #cbd5e1 !important;
}

/* =========================================================
   Global EFS panel theme (clean light, high contrast)
   Applies across topbar, sidebar, pages, forms, tables.
   ========================================================= */

:root {
    --efs-shell-bg: #f8fafc;
    --efs-surface: #ffffff;
    --efs-surface-alt: #f8fafc;
    --efs-border-soft: #e2e8f0;
    --efs-border-strong: #cbd5e1;
}

/* App shell */
.fi-body,
.fi-main {
    background: var(--efs-shell-bg);
}

.fi-main-ctn {
    background: transparent;
}

/* Topbar */
.fi-topbar {
    border-bottom: 1px solid var(--efs-border-soft);
    background: rgb(255 255 255 / 0.92);
    backdrop-filter: saturate(140%) blur(6px);
}

.fi-topbar .fi-input-wrp {
    border-color: var(--efs-border-soft);
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

/* Sidebar */
.fi-sidebar {
    border-right: 1px solid var(--efs-border-soft);
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.fi-sidebar-nav-groups {
    gap: 0.82rem;
}

.fi-sidebar-item-button {
    border-radius: 0.75rem;
    min-height: 1.95rem;
    padding-top: 0.28rem;
    padding-bottom: 0.28rem;
    padding-left: 0.58rem;
    padding-right: 0.58rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fi-sidebar-group {
    margin-bottom: 0.2rem;
}

.fi-sidebar-group-items {
    display: grid;
    gap: 0.12rem;
}

.fi-sidebar-group-label {
    margin-bottom: 0.2rem;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

/* Universal fallback for sidebar structures not using .fi-sidebar-group-items */
.fi-sidebar nav ul {
    row-gap: 0.12rem;
}

.fi-sidebar nav li + li {
    margin-top: 0.08rem;
}

.fi-sidebar nav :is(a, button) {
    min-height: 1.95rem;
}

.efs-sidebar-density-toggle {
    margin-top: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.72rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 0.44rem 0.5rem;
}

.efs-sidebar-density-toggle__label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.01em;
}

.efs-sidebar-density-toggle__button {
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    background: #fff;
    color: #334155;
    font-size: 0.64rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    line-height: 1.2;
    cursor: pointer;
}

.efs-sidebar-density-toggle__button:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

html.efs-sidebar-density-compact .fi-sidebar-nav-groups {
    gap: 0.56rem;
}

html.efs-sidebar-density-compact .fi-sidebar-item-button {
    min-height: 1.74rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

html.efs-sidebar-density-compact .fi-sidebar-group-items {
    gap: 0.06rem;
}

html.efs-sidebar-density-compact .fi-sidebar-group-label {
    margin-bottom: 0.14rem;
}

html.efs-sidebar-density-compact .fi-sidebar nav ul {
    row-gap: 0.05rem;
}

html.efs-sidebar-density-compact .fi-sidebar nav li + li {
    margin-top: 0.03rem;
}

html.efs-sidebar-density-compact .fi-sidebar nav :is(a, button) {
    min-height: 1.74rem;
}

html.efs-sidebar-density-comfortable .fi-sidebar-nav-groups {
    gap: 1.02rem;
}

html.efs-sidebar-density-comfortable .fi-sidebar-item-button {
    min-height: 2.06rem;
    padding-top: 0.34rem;
    padding-bottom: 0.34rem;
    padding-left: 0.62rem;
    padding-right: 0.62rem;
}

html.efs-sidebar-density-comfortable .fi-sidebar-group-items {
    gap: 0.16rem;
}

html.efs-sidebar-density-comfortable .fi-sidebar-group-label {
    margin-bottom: 0.24rem;
}

html.efs-sidebar-density-comfortable .fi-sidebar nav ul {
    row-gap: 0.14rem;
}

html.efs-sidebar-density-comfortable .fi-sidebar nav li + li {
    margin-top: 0.11rem;
}

html.efs-sidebar-density-comfortable .fi-sidebar nav :is(a, button) {
    min-height: 2.06rem;
}

/* ── Sidebar collapsed (desktop) ───────────────────────────────────────── */
.fi-body-has-sidebar-collapsible-on-desktop .fi-sidebar:not(.fi-sidebar-open) .efs-sidebar-density-toggle {
    display: none;
}

.fi-body-has-sidebar-collapsible-on-desktop .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-group-label {
    display: none;
}

.fi-body-has-sidebar-collapsible-on-desktop .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-button {
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
    border-radius: 0.5rem;
}

.fi-body-has-sidebar-collapsible-on-desktop .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}
/* ────────────────────────────────────────────────────────────────────────── */

.fi-sidebar-item-button:hover {
    background: #f1f5f9;
}

.fi-sidebar-item-active .fi-sidebar-item-button {
    background: #e2e8f0;
    color: #0f172a;
    font-weight: 600;
}

/* Common section/card container */
.fi-section {
    border-radius: 1rem;
    border: 1px solid var(--efs-border-soft);
    background: var(--efs-surface);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.05), 0 8px 24px -18px rgb(15 23 42 / 0.22);
}

.fi-section-header {
    border-bottom-color: #eef2f7;
}

.fi-section-header-heading {
    color: #0f172a;
    font-weight: 600;
}

.fi-section-header-description {
    color: #64748b;
}

/* Forms */
.fi-input-wrp,
.fi-select-input,
.fi-ta-text-input,
.fi-fo-text-input,
.fi-fo-select {
    border-color: var(--efs-border-soft);
    background: #fff;
}

.fi-input-wrp:focus-within,
.fi-select-input:focus,
.fi-ta-text-input:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgb(148 163 184 / 0.2);
}

.fi-fo-field-wrp-label {
    color: #334155;
    font-weight: 600;
}

/* Tables */
.fi-ta-ctn {
    border-radius: 1rem;
    border: 1px solid var(--efs-border-soft);
    overflow: hidden;
    background: #fff;
}

.fi-ta-header-ctn {
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.fi-ta-header-cell {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fi-ta-row:hover {
    background: #f8fafc;
}

.fi-ta-actions {
    gap: 0.35rem;
}

.fi-ta-actions .fi-btn {
    border-radius: 0.55rem;
    border: 1px solid #e2e8f0;
}

.fi-ta-text-item-label,
.fi-ta-text-item {
    color: #0f172a;
}

/* Buttons */
.fi-btn {
    border-radius: 0.65rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
}

.fi-btn-color-gray {
    border-color: var(--efs-border-soft);
    background: #fff;
}

.fi-btn-color-primary,
.fi-btn-color-info,
.fi-btn-color-success,
.fi-btn-color-warning,
.fi-btn-color-danger {
    box-shadow: 0 2px 4px rgb(15 23 42 / 0.1);
}

/* Page heading and breadcrumbs */
.fi-header-heading {
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.fi-breadcrumbs-item-label {
    color: #64748b;
}

.fi-breadcrumbs-item-label:hover {
    color: #334155;
}

/* Tenant menu + notifications in topbar */
.fi-topbar .fi-dropdown-trigger,
.fi-topbar .fi-icon-btn {
    border-radius: 0.6rem;
}

.fi-topbar .fi-icon-btn:hover,
.fi-topbar .fi-dropdown-trigger:hover {
    background: #f1f5f9;
}

/* Filter forms and report custom tables fallback */
table.min-w-full thead tr {
    background: #f8fafc;
}

table.min-w-full th {
    letter-spacing: 0.04em;
}

/* Status badges used by widgets/pages */
.efs-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.18rem 0.52rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.25;
}

.efs-status-success {
    background: #dcfce7;
    color: #166534;
    box-shadow: 0 0 0 1px rgb(187 247 208 / 0.9);
}

.efs-status-warning {
    background: #fef3c7;
    color: #92400e;
    box-shadow: 0 0 0 1px rgb(252 211 77 / 0.8);
}

.efs-status-danger {
    background: #ffe4e6;
    color: #be123c;
    box-shadow: 0 0 0 1px rgb(253 164 175 / 0.85);
}

.efs-status-neutral {
    background: #f1f5f9;
    color: #475569;
    box-shadow: 0 0 0 1px rgb(203 213 225 / 0.9);
}

.efs-user-access-banner {
    margin-bottom: 0.8rem;
    border-radius: 0.8rem;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 0.7rem 0.85rem;
}

.efs-user-access-banner__row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}

.efs-user-access-banner__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    flex-shrink: 0;
}

.efs-user-access-banner__icon svg {
    width: 0.92rem;
    height: 0.92rem;
}

.efs-user-access-banner__title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.efs-user-access-banner__message {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.45;
}

.efs-user-access-banner--warning {
    border-color: #fde68a;
    background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
}

.efs-user-access-banner--warning .efs-user-access-banner__icon {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #a16207;
}

.efs-user-access-banner--warning .efs-user-access-banner__title {
    color: #a16207;
}

.efs-user-access-banner--neutral .efs-user-access-banner__icon {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #475569;
}

.efs-user-access-banner--neutral .efs-user-access-banner__title {
    color: #334155;
}

/* Report and settings page shared tokens */
.efs-report-page,
.efs-company-settings {
    display: grid;
    gap: 1.1rem;
}

.efs-access-matrix-page {
    gap: 0.9rem;
}

.efs-access-card {
    display: grid;
    gap: 0.85rem;
}

.efs-access-mode-card {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.efs-access-mode-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.efs-access-mode-title {
    margin: 0;
    font-size: 0.79rem;
    font-weight: 700;
    color: #334155;
}

.efs-access-mode-help {
    margin: 0.2rem 0 0;
    font-size: 0.7rem;
    color: #64748b;
}

.efs-access-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.efs-access-card__title {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 700;
    color: #0f172a;
}

.efs-access-card__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.efs-access-card__meta-active {
    margin: 0;
    font-size: 0.73rem;
    color: #166534;
}

.efs-status-pill {
    border-radius: 9999px;
    padding: 0.22rem 0.56rem;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.efs-access-summary-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.65rem;
}

@media (min-width: 900px) {
    .efs-access-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.efs-access-summary-label {
    margin: 0;
    font-size: 0.68rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.efs-access-summary-value {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    color: #0f172a;
    line-height: 1.4;
    font-weight: 600;
}

.efs-access-chip-title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
}

.efs-access-chip-wrap {
    margin-top: 0.58rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.efs-access-group-stack {
    margin-top: 0.6rem;
    display: grid;
    gap: 0.6rem;
}

.efs-access-group {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.56rem 0.6rem;
}

.efs-access-group-title {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.efs-access-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #dbe3ee;
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 0.26rem 0.5rem;
    font-size: 0.69rem;
    color: #334155;
    line-height: 1.3;
}

.efs-access-empty {
    font-size: 0.73rem;
    color: #64748b;
}

.efs-access-empty-card {
    border-color: #fcd34d;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
    font-size: 0.82rem;
}

.efs-report-card,
.efs-settings-card {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
    padding: 1.2rem 1.25rem;
}

.efs-settings-card-danger {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fffafa 0%, #fff1f2 100%);
}

.efs-settings-form {
    display: grid;
    gap: 0.85rem;
}

.efs-field-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #475569;
}

.efs-field {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.6rem;
    background: #fff;
    padding: 0.48rem 0.65rem;
    font-size: 0.83rem;
    color: #0f172a;
    transition:
        border-color 0.14s ease,
        box-shadow 0.14s ease;
}

.efs-field:focus {
    outline: none;
    border-color: #64748b;
    box-shadow: 0 0 0 3px rgb(100 116 139 / 0.18);
}

.efs-field-help {
    margin-top: 0.3rem;
    font-size: 0.71rem;
    line-height: 1.45;
    color: #64748b;
}

.efs-settings-checkbox-group {
    border: 1px solid #fecaca;
    background: rgb(255 255 255 / 0.65);
    border-radius: 0.6rem;
    padding: 0.75rem;
}

.efs-settings-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    color: #991b1b;
}

.efs-report-filter-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (min-width: 900px) {
    .efs-report-filter-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.efs-report-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.55rem;
}

.efs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 0.72rem;
    border: 1px solid transparent;
    padding: 0.5rem 0.8rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.012em;
    text-decoration: none;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.06), 0 8px 16px -14px rgb(15 23 42 / 0.35);
    transition:
        transform 0.12s ease,
        box-shadow 0.16s ease,
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease;
}

.efs-btn--sm {
    border-radius: 0.6rem;
    padding: 0.4rem 0.62rem;
    font-size: 0.67rem;
}

.efs-btn--md {
    border-radius: 0.72rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.72rem;
}

.efs-btn--lg {
    border-radius: 0.82rem;
    padding: 0.62rem 0.95rem;
    font-size: 0.78rem;
}

.efs-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgb(15 23 42 / 0.1), 0 10px 22px -14px rgb(15 23 42 / 0.45);
}

.efs-btn:active {
    transform: translateY(0);
}

.efs-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgb(37 99 235 / 0.3),
        0 2px 6px rgb(15 23 42 / 0.1),
        0 10px 22px -14px rgb(15 23 42 / 0.45);
}

.efs-btn[disabled],
.efs-btn[aria-disabled="true"],
.efs-btn.is-disabled {
    opacity: 0.58;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
}

.efs-btn.is-loading {
    cursor: progress;
    pointer-events: none;
}

.efs-btn.is-loading::after {
    content: "";
    width: 0.78rem;
    height: 0.78rem;
    border-radius: 9999px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    margin-left: 0.25rem;
    animation: efs-btn-spin 0.65s linear infinite;
    opacity: 0.85;
}

@keyframes efs-btn-spin {
    to {
        transform: rotate(360deg);
    }
}

.efs-btn-primary { background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%); color: #fff; }
.efs-btn-primary:hover { background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%); }
.efs-btn-primary-save { background: linear-gradient(180deg, #1e40af 0%, #1e3a8a 100%); color: #fff; }
.efs-btn-primary-save:hover { background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%); }
.efs-btn-pdf { background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%); color: #fff; }
.efs-btn-pdf:hover { background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%); }
.efs-btn-preview { background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 100%); color: #fff; }
.efs-btn-preview:hover { background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 100%); }
.efs-btn-excel { background: linear-gradient(180deg, #10b981 0%, #059669 100%); color: #fff; }
.efs-btn-excel:hover { background: linear-gradient(180deg, #34d399 0%, #10b981 100%); }
.efs-btn-secondary { border-color: #cbd5e1; background: #fff; color: #334155; }
.efs-btn-secondary:hover { background: #f8fafc; border-color: #94a3b8; }
.efs-btn-danger { background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%); color: #fff; }
.efs-btn-danger:hover { background: linear-gradient(180deg, #f87171 0%, #ef4444 100%); }

.efs-report-summary-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.75rem;
}

.efs-report-summary-grid--2 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.efs-report-summary-grid--3 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 900px) {
    .efs-report-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .efs-report-summary-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .efs-report-summary-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.efs-summary-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
    padding: 0.92rem;
}

.efs-report-table-card {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
    padding: 0.95rem;
}

.efs-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.825rem;
}

.efs-report-table thead {
    background: #f8fafc;
}

.efs-report-table th {
    padding: 0.58rem 0.72rem;
    text-align: left;
    font-size: 0.655rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0;
}

.efs-report-table td {
    padding: 0.6rem 0.72rem;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
    line-height: 1.35;
}

.efs-tab-btn {
    border: 1px solid #cbd5e1;
    border-radius: 0.55rem;
    padding: 0.38rem 0.66rem;
    font-size: 0.7rem;
    font-weight: 600;
    background: #f8fafc;
    color: #334155;
}

.efs-tab-btn--active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.efs-report-page h2,
.efs-company-settings h3 {
    letter-spacing: -0.015em;
}

.efs-report-page p,
.efs-company-settings p {
    line-height: 1.45;
}

@media (min-width: 1024px) {
    .efs-report-card,
    .efs-settings-card {
        padding: 1.25rem 1.35rem;
    }

    .efs-report-table th {
        padding-top: 0.62rem;
        padding-bottom: 0.62rem;
    }

    .efs-report-table td {
        padding-top: 0.64rem;
        padding-bottom: 0.64rem;
    }
}

/* =========================================================
   Dark mode overrides
   Keep same structure but adapt colors to dark palette.
   ========================================================= */

.dark {
    --efs-shell-bg: #020617;
    --efs-surface: #0f172a;
    --efs-surface-alt: #111827;
    --efs-border-soft: #334155;
    --efs-border-strong: #475569;
    --efs-text-muted: #94a3b8;
    --efs-text-body: #cbd5e1;
    --efs-text-strong: #f8fafc;
    --efs-card-shadow:
        0 1px 3px 0 rgb(2 6 23 / 0.45),
        0 1px 2px -1px rgb(2 6 23 / 0.45);
}

.dark .fi-main,
.dark .fi-body {
    background: var(--efs-shell-bg);
}

.dark .fi-topbar {
    border-bottom-color: var(--efs-border-soft);
    background: rgb(15 23 42 / 0.9);
}

.dark .fi-topbar .fi-input-wrp {
    border-color: var(--efs-border-soft);
    background: #0b1220;
}

.dark .fi-sidebar {
    border-right-color: var(--efs-border-soft);
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

.dark .fi-sidebar-item-button:hover {
    background: #1e293b;
}

.dark .efs-sidebar-density-toggle {
    border-color: #334155;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

.dark .efs-sidebar-density-toggle__label {
    color: #94a3b8;
}

.dark .efs-sidebar-density-toggle__button {
    border-color: #334155;
    background: #0b1220;
    color: #cbd5e1;
}

.dark .efs-sidebar-density-toggle__button:hover {
    background: #1e293b;
    border-color: #475569;
}

.dark .fi-sidebar-item-active .fi-sidebar-item-button {
    background: #334155;
    color: #f8fafc;
}

.dark .fi-section,
.dark .fi-ta-ctn,
.dark .fi-wi-chart .fi-section,
.dark .fi-wi-stats-overview .fi-wi-stats-overview-stat,
.dark .fi-wi-widget .efs-recent-widget.fi-section,
.dark .fi-wi-widget .efs-pending-widget.fi-section,
.dark .efs-pending-card,
.dark .efs-pending-table td {
    background: var(--efs-surface) !important;
    border-color: var(--efs-border-soft) !important;
    box-shadow: var(--efs-card-shadow) !important;
}

.dark .fi-wi-chart .fi-wi-chart-canvas-ctn {
    border-color: #334155 !important;
    background: linear-gradient(180deg, rgb(15 23 42 / 0.95) 0%, #0f172a 45%) !important;
}

.dark .fi-section-header,
.dark .fi-section-header-description,
.dark .fi-fo-field-wrp-label,
.dark .fi-header-heading,
.dark .fi-ta-text-item-label,
.dark .fi-ta-text-item,
.dark .fi-breadcrumbs-item-label,
.dark .efs-pending-widget__subtitle,
.dark .efs-pending-empty__text {
    color: var(--efs-text-body) !important;
}

.dark .fi-section-header-heading,
.dark .efs-recent-widget__title,
.dark .efs-pending-widget__title,
.dark .efs-pending-empty__title,
.dark .efs-pending-widget__stat-value {
    color: var(--efs-text-strong) !important;
}

.dark .fi-input-wrp,
.dark .fi-select-input,
.dark .fi-ta-text-input,
.dark .fi-fo-text-input,
.dark .fi-fo-select,
.dark .efs-pending-field {
    border-color: var(--efs-border-soft) !important;
    background: #0b1220 !important;
    color: #e2e8f0 !important;
}

.dark .fi-input-wrp:focus-within,
.dark .fi-select-input:focus,
.dark .fi-ta-text-input:focus,
.dark .efs-pending-field:focus {
    border-color: #64748b !important;
    box-shadow: 0 0 0 3px rgb(100 116 139 / 0.22) !important;
}

.dark .fi-ta-header-cell,
.dark table.min-w-full thead tr,
.dark .efs-recent-widget__table thead,
.dark .efs-pending-table thead {
    background: #1e293b !important;
}

.dark .fi-ta-header-cell,
.dark .efs-recent-widget__table th,
.dark .efs-pending-table th {
    color: #94a3b8 !important;
    border-color: var(--efs-border-soft) !important;
}

/* Force dark header/toolbar on all table shells */
.dark .fi-ta-header-ctn,
.dark .fi-ta-header,
.dark .fi-ta-header-toolbar,
.dark .fi-ta-filters,
.dark .fi-ta-filter-indicators,
.dark .fi-ta-search-field {
    background: #0f172a !important;
    border-color: #334155 !important;
}

.dark .fi-ta-header-ctn {
    border-bottom-color: #334155 !important;
}

.dark .fi-ta-header-toolbar > *,
.dark .fi-ta-header > * {
    background-color: transparent !important;
}

.dark .fi-ta-header-ctn .fi-input-wrp,
.dark .fi-ta-header-ctn .fi-select-input,
.dark .fi-ta-header-ctn .fi-btn {
    background: #111827 !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

.dark .fi-ta-header-ctn .fi-btn:hover {
    background: #1e293b !important;
}

.dark table.min-w-full thead,
.dark table.min-w-full tfoot,
.dark table.min-w-full .bg-gray-50,
.dark table.min-w-full .bg-slate-50 {
    background: #1e293b !important;
}

.dark table.min-w-full th,
.dark table.min-w-full .text-gray-700,
.dark table.min-w-full .text-slate-600,
.dark table.min-w-full .text-slate-700 {
    color: #94a3b8 !important;
}

.dark table.min-w-full td,
.dark table.min-w-full .text-gray-900,
.dark table.min-w-full .text-slate-800,
.dark table.min-w-full .text-slate-900 {
    color: #e2e8f0 !important;
}

.dark table.min-w-full .divide-gray-100 > :not([hidden]) ~ :not([hidden]),
.dark table.min-w-full .divide-gray-200 > :not([hidden]) ~ :not([hidden]),
.dark table.min-w-full .divide-slate-100 > :not([hidden]) ~ :not([hidden]),
.dark table.min-w-full .divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: #334155 !important;
}

.dark .fi-ta-row:hover,
.dark .efs-recent-widget__table tbody tr:hover td,
.dark .efs-pending-table tbody tr:hover td {
    background: #172033 !important;
}

.dark .efs-pending-widget__header {
    border-bottom-color: #334155 !important;
}

.dark .efs-pending-widget__stat {
    border-color: #3b475f;
    background: linear-gradient(145deg, rgb(30 41 59 / 0.9) 0%, rgb(15 23 42 / 0.95) 100%);
    box-shadow: inset 0 0 0 1px rgb(148 163 184 / 0.08);
}

.dark .efs-pending-widget__stat-label {
    color: #fbbf24;
}

.dark .efs-pending-table-wrap {
    border-color: #334155;
    background: #0f172a;
}

.dark .efs-pending-doclink {
    color: #93c5fd;
}

.dark .efs-pending-doclink:hover {
    color: #bfdbfe;
    border-bottom-color: rgb(191 219 254 / 0.45);
}

.dark .efs-pending-tier--manager {
    background: rgb(30 64 175 / 0.25);
    color: #bfdbfe;
    box-shadow: inset 0 0 0 1px rgb(147 197 253 / 0.3);
}

.dark .efs-pending-tier--director {
    background: rgb(126 34 206 / 0.2);
    color: #e9d5ff;
    box-shadow: inset 0 0 0 1px rgb(216 180 254 / 0.32);
}

.dark .efs-pending-typeicon {
    background: rgb(180 83 9 / 0.2);
    color: #fcd34d;
    box-shadow: inset 0 0 0 1px rgb(251 191 36 / 0.35);
}

.dark .efs-pending-pill--project {
    background: rgb(14 116 144 / 0.22);
    color: #bae6fd;
    box-shadow: inset 0 0 0 1px rgb(125 211 252 / 0.35);
}

.dark .efs-pending-review {
    color: #e2e8f0;
    border-color: #334155;
    background: #111827;
}

.dark .efs-pending-review:hover {
    background: #1e293b;
    border-color: #475569;
}

.dark .efs-pending-card__meta,
.dark .efs-pending-card__actions {
    border-top-color: #334155;
}

.dark .efs-pending-action {
    background: #0b1220;
}

.dark .efs-pending-action--approve {
    color: #6ee7b7;
    border-color: rgb(16 185 129 / 0.45);
    background: rgb(16 185 129 / 0.16);
}

.dark .efs-pending-action--approve:hover {
    background: rgb(16 185 129 / 0.25);
    border-color: rgb(110 231 183 / 0.55);
}

.dark .efs-pending-action--reject {
    color: #fda4af;
    border-color: rgb(244 63 94 / 0.5);
    background: rgb(244 63 94 / 0.15);
}

.dark .efs-pending-action--reject:hover {
    background: rgb(244 63 94 / 0.24);
    border-color: rgb(251 113 133 / 0.62);
}

.dark .efs-recent-widget__meta {
    color: #94a3b8;
}

.dark .efs-recent-widget__table-wrap {
    border-color: #334155;
    background: #0f172a;
}

.dark .efs-recent-widget__doc {
    color: #93c5fd;
}

.dark .efs-recent-status {
    box-shadow: inset 0 0 0 1px rgb(148 163 184 / 0.18);
}

.dark .efs-recent-status--success {
    background: rgb(16 185 129 / 0.18);
    color: #a7f3d0;
    border-color: rgb(110 231 183 / 0.38);
}

.dark .efs-recent-status--warning {
    background: rgb(245 158 11 / 0.16);
    color: #fcd34d;
    border-color: rgb(251 191 36 / 0.34);
}

.dark .efs-recent-status--info {
    background: rgb(37 99 235 / 0.18);
    color: #bfdbfe;
    border-color: rgb(147 197 253 / 0.34);
}

.dark .efs-recent-status--danger {
    background: rgb(244 63 94 / 0.16);
    color: #fecdd3;
    border-color: rgb(251 113 133 / 0.36);
}

.dark .efs-recent-status--neutral {
    background: rgb(100 116 139 / 0.2);
    color: #cbd5e1;
    border-color: rgb(148 163 184 / 0.3);
}

.dark .efs-sales-kpi-card,
.dark .efs-sales-panel {
    background: #0f172a;
    border-color: #334155;
}

.dark .efs-sales-funnel-item,
.dark .efs-sales-aging-item,
.dark .efs-sales-list-row {
    background: #111827;
    border-color: #334155;
}

.dark .efs-sales-kpi-value,
.dark .efs-sales-funnel-item strong,
.dark .efs-sales-aging-item strong,
.dark .efs-sales-list-row strong,
.dark .efs-sales-list-row span,
.dark .efs-sales-panel-title {
    color: #e2e8f0;
}

.dark .efs-sales-kpi-label,
.dark .efs-sales-funnel-item span,
.dark .efs-sales-aging-item span,
.dark .efs-sales-empty,
.dark .efs-sales-monitor-widget__meta {
    color: #94a3b8;
}

.dark .efs-sales-filter-btn {
    border-color: #334155;
    background: #111827;
    color: #cbd5e1;
}

.dark .efs-sales-filter-btn--active {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #eff6ff;
}

.dark .efs-status-success {
    background: rgb(16 185 129 / 0.2);
    color: #a7f3d0;
    box-shadow: inset 0 0 0 1px rgb(110 231 183 / 0.35);
}

.dark .efs-status-warning {
    background: rgb(245 158 11 / 0.2);
    color: #fde68a;
    box-shadow: inset 0 0 0 1px rgb(251 191 36 / 0.35);
}

.dark .efs-status-danger {
    background: rgb(244 63 94 / 0.2);
    color: #fecdd3;
    box-shadow: inset 0 0 0 1px rgb(251 113 133 / 0.35);
}

.dark .efs-status-neutral {
    background: rgb(100 116 139 / 0.24);
    color: #cbd5e1;
    box-shadow: inset 0 0 0 1px rgb(148 163 184 / 0.35);
}

.dark .efs-user-access-banner {
    border-color: #334155;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

.dark .efs-user-access-banner__title {
    color: #e2e8f0;
}

.dark .efs-user-access-banner__message {
    color: #94a3b8;
}

.dark .efs-user-access-banner__icon {
    border-color: #475569;
    background: #111827;
    color: #cbd5e1;
}

.dark .efs-user-access-banner--warning {
    border-color: #854d0e;
    background: linear-gradient(180deg, #2a1d0f 0%, #1f2937 100%);
}

.dark .efs-user-access-banner--warning .efs-user-access-banner__icon {
    border-color: #a16207;
    background: rgb(161 98 7 / 0.18);
    color: #fbbf24;
}

.dark .efs-user-access-banner--warning .efs-user-access-banner__title {
    color: #fbbf24;
}

.dark .efs-report-card,
.dark .efs-settings-card,
.dark .efs-summary-card,
.dark .efs-report-table-card {
    background: #0f172a;
    border-color: #334155;
    box-shadow: 0 1px 3px rgb(2 6 23 / 0.42);
}

.dark .efs-settings-card-danger {
    background: #1a0f14;
    border-color: #7f1d1d;
}

.dark .efs-access-card__title,
.dark .efs-access-summary-value {
    color: #e2e8f0;
}

.dark .efs-access-mode-title {
    color: #e2e8f0;
}

.dark .efs-access-mode-help {
    color: #94a3b8;
}

.dark .efs-access-summary-label,
.dark .efs-access-chip-title,
.dark .efs-access-empty {
    color: #94a3b8;
}

.dark .efs-access-card__meta-active {
    color: #86efac;
}

.dark .efs-access-chip {
    background: #111827;
    border-color: #334155;
    color: #cbd5e1;
}

.dark .efs-access-group {
    background: #0b1220;
    border-color: #334155;
}

.dark .efs-access-group-title {
    color: #94a3b8;
}

.dark .efs-access-empty-card {
    border-color: #92400e;
    background: #2a1d0f;
    color: #fbbf24;
}

.dark .efs-field-label,
.dark .efs-field-help {
    color: #94a3b8;
}

.dark .efs-field {
    background: #0b1220;
    border-color: #334155;
    color: #e2e8f0;
}

.dark .efs-settings-checkbox-group {
    background: rgb(2 6 23 / 0.45);
    border-color: #7f1d1d;
}

.dark .efs-settings-checkbox-row {
    color: #fca5a5;
}

.dark .efs-btn-secondary {
    background: #111827;
    border-color: #334155;
    color: #cbd5e1;
}

.dark .efs-btn-secondary:hover {
    background: #1e293b;
}

.dark .efs-btn {
    box-shadow: 0 1px 2px rgb(2 6 23 / 0.45), 0 10px 18px -14px rgb(2 6 23 / 0.65);
}

.dark .efs-btn:focus-visible {
    box-shadow:
        0 0 0 3px rgb(59 130 246 / 0.32),
        0 1px 2px rgb(2 6 23 / 0.45),
        0 10px 18px -14px rgb(2 6 23 / 0.65);
}

.dark .efs-btn[disabled],
.dark .efs-btn[aria-disabled="true"],
.dark .efs-btn.is-disabled {
    box-shadow: 0 1px 2px rgb(2 6 23 / 0.35);
}

.dark .efs-report-table thead {
    background: #1e293b;
}

.dark .efs-report-table th {
    color: #94a3b8;
    border-color: #334155;
}

.dark .efs-report-table td {
    color: #e2e8f0;
    border-color: #1f2b3e;
}

.dark .efs-tab-btn {
    background: #111827;
    border-color: #334155;
    color: #cbd5e1;
}

.dark .efs-tab-btn--active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #eff6ff;
}

.dark .fi-btn-color-gray {
    background: #0f172a;
    border-color: var(--efs-border-soft);
    color: #e2e8f0;
}

.dark .fi-topbar .fi-icon-btn:hover,
.dark .fi-topbar .fi-dropdown-trigger:hover {
    background: #1e293b;
}

/* Dark mode — accent bars & gradients */
.dark .efs-stat--cash {
    background: linear-gradient(135deg, rgb(37 99 235 / 0.08) 0%, transparent 60%) !important;
    border-color: rgb(37 99 235 / 0.25) !important;
}
.dark .efs-stat--receivable {
    background: linear-gradient(135deg, rgb(234 88 12 / 0.08) 0%, transparent 60%) !important;
    border-color: rgb(234 88 12 / 0.25) !important;
}
.dark .efs-stat--expense {
    background: linear-gradient(135deg, rgb(220 38 38 / 0.08) 0%, transparent 60%) !important;
    border-color: rgb(220 38 38 / 0.25) !important;
}
.dark .efs-stat--profit {
    background: linear-gradient(135deg, rgb(22 163 74 / 0.08) 0%, transparent 60%) !important;
    border-color: rgb(22 163 74 / 0.25) !important;
}
.dark .efs-stat--profit-negative {
    background: linear-gradient(135deg, rgb(220 38 38 / 0.08) 0%, transparent 60%) !important;
    border-color: rgb(220 38 38 / 0.25) !important;
}
.dark .efs-stat--compliance {
    background: linear-gradient(135deg, rgb(109 40 217 / 0.08) 0%, transparent 60%) !important;
    border-color: rgb(109 40 217 / 0.25) !important;
}

/* ── Mobile UX refinements (max-width: 1023px) ──────────────────────────── */
@media (max-width: 1023px) {
    /* Compact page padding */
    .fi-page {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-top: 0.75rem !important;
    }

    /* Shrink page header */
    .fi-header {
        margin-bottom: 0.75rem !important;
    }

    .fi-header-heading {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
    }

    .fi-header-subheading {
        font-size: 0.78rem !important;
    }

    /* Hide breadcrumbs — wasted vertical space on mobile */
    .fi-breadcrumbs {
        display: none !important;
    }

    /* Topbar: slimmer height */
    .fi-topbar {
        height: 52px !important;
        min-height: 52px !important;
    }

    .fi-topbar nav {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        min-height: 52px !important;
    }

    /* KPI stat tiles: 2-column grid */
    .fi-wi-stats-overview {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }

    /* Compact stat card internals */
    .fi-wi-stats-overview-stat {
        padding: 0.65rem 0.75rem !important;
    }

    .efs-stat-header {
        margin-bottom: 0.25rem !important;
    }

    .fi-wi-stats-overview-stat-value {
        font-size: 1.1rem !important;
    }

    /* Section content: less padding */
    .fi-section-content-ctn {
        padding: 0.75rem !important;
    }

    .fi-section-header-ctn {
        padding: 0.6rem 0.75rem !important;
    }

    /* Table: horizontal scroll, no overflow clipping */
    .fi-ta-ctn {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .fi-ta-table {
        min-width: 36rem;
    }

    /* Table cell padding: tighter */
    .fi-ta-cell {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    /* Touch-friendly form inputs */
    .fi-input,
    .fi-select-input,
    .fi-textarea {
        min-height: 2.75rem !important;
        font-size: 1rem !important;
    }

    /* Form grid: single column on mobile */
    .fi-fo-component-ctn .grid-cols-2,
    .fi-fo-component-ctn .sm\:grid-cols-2 {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    /* Buttons: touch-friendly */
    .fi-btn {
        min-height: 2.5rem !important;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    /* Widget grid: single column */
    .fi-dashboard-widgets-ctn > .grid {
        grid-template-columns: repeat(1, 1fr) !important;
        gap: 0.75rem !important;
    }

    /* Modal: bottom-sheet, sits above the mobile nav bar */
    .fi-modal-window-ctn {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .fi-modal-window {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 1.25rem 1.25rem 0 0 !important;
        position: relative !important;

        /* height: content up to 90vh, minus the 56px nav bar */
        max-height: calc(90vh - 56px - env(safe-area-inset-bottom, 0px)) !important;

        /* Flex column: header fixed, content scrolls, footer fixed */
        display: flex !important;
        flex-direction: column !important;
    }

    /* Scrollable body */
    .fi-modal-content {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    /* Header and footer do NOT scroll */
    .fi-modal-header {
        flex-shrink: 0 !important;
    }

    .fi-modal-footer {
        flex-shrink: 0 !important;
        padding-bottom: 0.75rem !important;
    }

    /* Action dropdowns: larger tap targets */
    .fi-dropdown-list-item-label {
        padding-top: 0.6rem !important;
        padding-bottom: 0.6rem !important;
    }

    /* Tabs: scrollable, no wrapping */
    .fi-tabs {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .fi-tabs::-webkit-scrollbar {
        display: none;
    }

    /* Dashboard section gap */
    .fi-dashboard-widgets-ctn {
        gap: 0.75rem !important;
    }

    /* ── Form: mobile-friendly refinements ─────────────────────────────────── */

    /* Inline labels: stack vertically instead of side-by-side */
    .fi-fo-field-has-inline-label {
        flex-direction: column !important;
        gap: 0.2rem !important;
    }

    .fi-fo-field-has-inline-label .fi-fo-field-label-col {
        width: 100% !important;
        max-width: none !important;
        flex-shrink: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
    }

    .fi-fo-field-has-inline-label .fi-fo-field-content-col {
        width: 100% !important;
        flex: 1 !important;
    }

    /* All multi-column grids → single column (covers 2, 3, 4, 5, 6 cols) */
    .fi-fo-component-ctn [class*="grid-cols-"],
    .fi-fo-repeater-item-content [class*="grid-cols-"],
    .fi-sc-section-content [class*="grid-cols-"] {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    /* Prevent iOS from auto-zooming in on focus (16px minimum) */
    .fi-input,
    .fi-select-input,
    .fi-textarea,
    .fi-fo-select select,
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="date"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px !important;
    }

    /* Touch-friendly input height */
    .fi-input-wrp {
        min-height: 2.75rem;
    }

    .fi-input {
        min-height: 2.75rem !important;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    .fi-textarea {
        min-height: 5rem !important;
        padding: 0.6rem 0.75rem !important;
    }

    .fi-fo-select select,
    .fi-select-input {
        min-height: 2.75rem !important;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    /* Repeater: touch-friendly delete/reorder buttons */
    .fi-fo-repeater-item-header {
        padding: 0.5rem 0.6rem !important;
        min-height: 2.75rem !important;
    }

    .fi-fo-repeater-item-header-end-actions .fi-icon-btn,
    .fi-fo-repeater-item-header-start-actions .fi-icon-btn {
        width: 2.25rem !important;
        height: 2.25rem !important;
    }

    .fi-fo-repeater-item-content {
        padding: 0.6rem !important;
    }

    /* Add repeater item button: full width */
    .fi-fo-repeater-add {
        width: 100% !important;
    }

    .fi-fo-repeater-add .fi-btn {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Form section gap: tighter */
    .fi-sc-form-section {
        gap: 0.75rem !important;
    }

    /* Label text: slightly smaller */
    .fi-fo-field-label {
        font-size: 0.82rem !important;
    }

    /* Sticky form actions: sit above the mobile bottom nav */
    .fi-sticky {
        bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Padding on form content so last field isn't hidden under sticky bar */
    .fi-sc-form {
        padding-bottom: 1rem !important;
    }

    /* Input wrapper prefix/suffix: keep compact */
    .fi-input-wrp-prefix,
    .fi-input-wrp-suffix {
        padding-left: 0.6rem !important;
        padding-right: 0.6rem !important;
        font-size: 0.85rem !important;
    }

    /* Helper/hint text */
    .fi-fo-field-wrp-helper-text {
        font-size: 0.75rem !important;
    }

    /* Select native: ensure it's full width */
    .fi-fo-select-native select {
        width: 100% !important;
    }

    /* ── Date picker: bottom-sheet calendar on mobile ─────────────────────── */
    .fi-fo-date-time-picker-panel {
        position: fixed !important;
        inset: auto 0 calc(96px + env(safe-area-inset-bottom, 0px)) 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 1.25rem 1.25rem 0 0 !important;
        max-height: 72vh;
        overflow-y: auto;
        z-index: 200 !important;
        box-shadow: 0 -4px 32px rgb(0 0 0 / 0.18) !important;
        padding: 1rem !important;
    }

    /* Drag handle hint at top of bottom sheet */
    .fi-fo-date-time-picker-panel::before {
        content: '';
        display: block;
        width: 2.5rem;
        height: 4px;
        border-radius: 2px;
        background: #cbd5e1;
        margin: 0 auto 0.75rem;
    }

    /* Calendar header: month select + year input */
    .fi-fo-date-time-picker-panel-header {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 0.75rem !important;
    }

    .fi-fo-date-time-picker-month-select,
    .fi-fo-date-time-picker-year-input {
        min-height: 2.5rem !important;
        font-size: 1rem !important;
        padding: 0.35rem 0.5rem !important;
        border-radius: 0.5rem !important;
        flex: 1;
    }

    /* Day-of-week header row */
    .fi-fo-date-time-picker-calendar-header {
        margin-bottom: 0.25rem !important;
    }

    .fi-fo-date-time-picker-calendar-header-day {
        font-size: 0.72rem !important;
        font-weight: 600 !important;
        text-align: center;
        padding: 0.25rem 0 !important;
    }

    /* Calendar day cells: bigger touch targets */
    .fi-fo-date-time-picker-calendar {
        gap: 4px !important;
    }

    .fi-fo-date-time-picker-calendar-day {
        min-height: 2.75rem !important;
        font-size: 0.95rem !important;
        border-radius: 0.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    /* Time inputs in picker */
    .fi-fo-date-time-picker-time-inputs input {
        min-height: 2.75rem !important;
        font-size: 1.1rem !important;
        width: 3.5rem !important;
        text-align: center;
    }

    /* Backdrop overlay when calendar open */
    .fi-fo-date-time-picker-panel[style*="display: block"] ~ * {
        pointer-events: none;
    }

    /* ── Custom select dropdown: larger option tap targets ────────────────── */
    .fi-select-option,
    .choices__item,
    [class*="ts-option"] {
        padding-top: 0.65rem !important;
        padding-bottom: 0.65rem !important;
        font-size: 1rem !important;
        min-height: 2.75rem !important;
    }

    /* Select search input */
    .choices__input,
    .ts-input input,
    [class*="ts-wrapper"] input {
        font-size: 16px !important;
        min-height: 2.5rem !important;
    }

    /* ── Toggle: bigger touch target ─────────────────────────────────────── */
    .fi-fo-toggle-wrapper {
        min-height: 2.75rem !important;
        align-items: center !important;
    }

    /* ── Checkbox & radio: bigger tap area ───────────────────────────────── */
    .fi-fo-checkbox-input,
    .fi-fo-radio-input {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }

    .fi-fo-checkbox-label,
    .fi-fo-radio-label {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        font-size: 0.95rem !important;
    }

    /* ── Color picker: bigger swatch ─────────────────────────────────────── */
    .fi-color-picker-preview {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
}

/* Dark mode: mobile nav + date picker bottom sheet */
@media (max-width: 1023px) {
    .dark .fi-topbar {
        background: #0f172a !important;
    }

    .dark .fi-fo-date-time-picker-panel {
        background: #1e293b !important;
        box-shadow: 0 -4px 32px rgb(0 0 0 / 0.45) !important;
    }

    .dark .fi-fo-date-time-picker-panel::before {
        background: #475569;
    }
}

/* ── PDF preview modal iframe ───────────────────────────────────────────── */
.efs-pdf-preview-modal {
    width: 100%;
    height: 80vh;
    min-height: 400px;
}

.efs-pdf-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    border-radius: 4px;
}

/* Mobile: full-height iframe, reduced padding */
@media (max-width: 1023px) {
    .efs-pdf-preview-modal {
        height: 75vh;
    }

    /* Move Filament notification list to bottom so it's thumb-reachable */
    .fi-no {
        top: auto !important;
        bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important;
        right: 0 !important;
        left: 0 !important;
        max-width: 100% !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        align-items: stretch !important;
        z-index: 9999 !important;
    }

    .fi-no-notification {
        width: 100% !important;
        max-width: 100% !important;
        background-color: #fff !important;
        color: #0f172a !important;
    }

    .fi-no-notification * {
        color: inherit;
    }

    .fi-no-notification [class*="text-success"] { color: #16a34a !important; }
    .fi-no-notification [class*="text-danger"]  { color: #dc2626 !important; }
    .fi-no-notification [class*="text-warning"] { color: #d97706 !important; }
    .fi-no-notification [class*="text-info"]    { color: #0284c7 !important; }
}

/* ── Mobile bottom navigation ──────────────────────────────────────────── */
.efs-mobile-nav {
    display: none;
}

@media (max-width: 1023px) {
    /* Floating glassmorphism pill */
    .efs-mobile-nav {
        display: flex;
        position: fixed;
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        left: 14px;
        right: 14px;
        z-index: 50;
        height: 68px;
        padding: 0 6px;
        border-radius: 28px;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(20px) saturate(1.6);
        -webkit-backdrop-filter: blur(20px) saturate(1.6);
        border: 1px solid rgba(226, 232, 240, 0.7);
        box-shadow:
            0 8px 32px rgba(15, 23, 42, 0.12),
            0 2px 8px  rgba(15, 23, 42, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
        overflow: visible;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    }

    /* Push page content above the pill */
    .fi-main {
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    }

    /* Slide down + fade on scroll */
    .efs-mobile-nav--hidden {
        transform: translateY(calc(100% + 20px));
        opacity: 0;
    }
}

.efs-mobile-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #94a3b8;
    text-decoration: none;
    padding: 6px 4px 8px;
    margin: 8px 2px;
    border-radius: 20px;
    transition: color 0.18s ease, background-color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.efs-mobile-nav__item--active {
    color: #4f7598;
    background-color: rgba(79, 117, 152, 0.12);
}

/* Active indicator dot below icon */
.efs-mobile-nav__item--active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #4f7598;
}

.efs-mobile-nav__icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.efs-mobile-nav__icon svg {
    width: 24px;
    height: 24px;
}

.efs-mobile-nav__item--active .efs-mobile-nav__icon svg {
    stroke-width: 2.2;
}

.efs-mobile-nav__label {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
}

.efs-mobile-nav__item--active .efs-mobile-nav__label {
    font-weight: 700;
}

/* Dark mode */
.dark .efs-mobile-nav {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(51, 65, 85, 0.6);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        0 2px 8px  rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dark .efs-mobile-nav__item {
    color: #64748b;
}

.dark .efs-mobile-nav__item--active {
    color: #7eb8d4;
    background-color: rgba(126, 184, 212, 0.12);
}

.dark .efs-mobile-nav__item--active::after {
    background: #7eb8d4;
}

/* ── FAB spacer slot keeps nav items balanced ─────────────────────────── */
.efs-mobile-nav__fab-slot {
    flex: 1;
    pointer-events: none;
}

/* ── FAB Wrapper ─────────────────────────────────────────────────────────── */
.efs-fab-wrap {
    display: none;
}

@media (max-width: 1023px) {
    .efs-fab-wrap {
        display: block;
    }

    /* ── Backdrop ─────────────────────────────────────────────────────────── */
    .efs-fab-backdrop {
        position: fixed;
        inset: 0;
        z-index: 51;
        background: rgb(15 23 42 / 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .efs-fab-wrap--open .efs-fab-backdrop {
        opacity: 1;
    }

    /* ── Main FAB button ─────────────────────────────────────────────────── */
    .efs-fab {
        position: fixed;
        bottom: calc(27px + env(safe-area-inset-bottom, 0px));
        left: 50%;
        transform: translateX(-50%);
        z-index: 53;
        width: 3.25rem;
        height: 3.25rem;
        border-radius: 50%;
        background: #4f7598;
        border: 3px solid rgba(255, 255, 255, 0.9);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 20px rgb(79 117 152 / 0.55), 0 2px 6px rgb(79 117 152 / 0.3);
        -webkit-tap-highlight-color: transparent;
        transition: background 0.15s, transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s, opacity 0.25s ease;
    }

    .efs-fab:active {
        transform: translateX(-50%) scale(0.93);
    }

    /* FAB hidden on scroll-down */
    .efs-fab-wrap--scroll-hidden .efs-fab {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%) translateY(20px);
    }

    .efs-fab svg {
        width: 1.5rem;
        height: 1.5rem;
        color: #fff;
        position: absolute;
        transition: opacity 0.15s, transform 0.2s cubic-bezier(.34,1.56,.64,1);
    }

    .efs-fab__close { opacity: 0; transform: rotate(-90deg) scale(0.6); }
    .efs-fab__plus  { opacity: 1; transform: rotate(0deg) scale(1); }

    .efs-fab-wrap--open .efs-fab {
        background: #334155;
        box-shadow: 0 4px 16px rgb(15 23 42 / 0.35);
    }

    .efs-fab-wrap--open .efs-fab__close { opacity: 1; transform: rotate(0deg) scale(1); }
    .efs-fab-wrap--open .efs-fab__plus  { opacity: 0; transform: rotate(90deg) scale(0.6); }

    /* ── Speed-dial menu ─────────────────────────────────────────────────── */
    .efs-fab-menu {
        position: fixed;
        bottom: calc(100px + env(safe-area-inset-bottom, 0px));
        left: 50%;
        transform: translateX(-50%);
        z-index: 52;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.625rem;
        pointer-events: none;
    }

    .efs-fab-wrap--open .efs-fab-menu {
        pointer-events: auto;
    }

    .efs-fab-menu__item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-decoration: none;
        opacity: 0;
        transform: translateY(12px) scale(0.88);
        transition:
            opacity 0.18s ease,
            transform 0.22s cubic-bezier(.34,1.56,.64,1);
        transition-delay: calc(var(--fab-i, 0) * 0.06s);
        pointer-events: none;
    }

    .efs-fab-wrap--open .efs-fab-menu__item {
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .efs-fab-menu__label {
        background: #fff;
        color: #1e293b;
        font-size: 0.8rem;
        font-weight: 600;
        padding: 0.35rem 0.75rem;
        border-radius: 0.5rem;
        white-space: nowrap;
        box-shadow: 0 2px 8px rgb(15 23 42 / 0.15);
    }

    .efs-fab-menu__icon {
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 50%;
        background: var(--fab-color, #4f7598);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);
        flex-shrink: 0;
    }

    .efs-fab-menu__icon svg {
        width: 1.2rem;
        height: 1.2rem;
        stroke: #fff;
    }

    /* Dark mode FAB */
    .dark .efs-fab {
        background: #4f7598;
        box-shadow: 0 4px 16px rgb(0 0 0 / 0.4);
    }

    .dark .efs-fab-wrap--open .efs-fab {
        background: #1e293b;
    }

    .dark .efs-fab-menu__label {
        background: #1e293b;
        color: #e2e8f0;
        box-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
    }
}
/* ────────────────────────────────────────────────────────────────────────── */

/* Dark mode icon tiles — keep gradient but softer */
.dark .efs-stat--cash .fi-wi-stats-overview-stat-label-ctn > :first-child {
    background: linear-gradient(135deg, rgb(59 130 246 / 0.35), rgb(29 78 216 / 0.35));
    color: #93c5fd;
    box-shadow: none;
}
.dark .efs-stat--receivable .fi-wi-stats-overview-stat-label-ctn > :first-child {
    background: linear-gradient(135deg, rgb(249 115 22 / 0.35), rgb(194 65 12 / 0.35));
    color: #fdba74;
    box-shadow: none;
}
.dark .efs-stat--expense .fi-wi-stats-overview-stat-label-ctn > :first-child {
    background: linear-gradient(135deg, rgb(248 113 113 / 0.35), rgb(185 28 28 / 0.35));
    color: #fca5a5;
    box-shadow: none;
}
.dark .efs-stat--profit .fi-wi-stats-overview-stat-label-ctn > :first-child {
    background: linear-gradient(135deg, rgb(52 211 153 / 0.35), rgb(4 120 87 / 0.35));
    color: #86efac;
    box-shadow: none;
}
.dark .efs-stat--profit-negative .fi-wi-stats-overview-stat-label-ctn > :first-child {
    background: linear-gradient(135deg, rgb(248 113 113 / 0.35), rgb(185 28 28 / 0.35));
    color: #fca5a5;
    box-shadow: none;
}
.dark .efs-stat--compliance .fi-wi-stats-overview-stat-label-ctn > :first-child {
    background: linear-gradient(135deg, rgb(167 139 250 / 0.35), rgb(109 40 217 / 0.35));
    color: #c4b5fd;
    box-shadow: none;
}

.dark .efs-stat-pill--good {
    background: rgb(34 197 94 / 0.2);
    color: #bbf7d0;
    border-color: rgb(74 222 128 / 0.34);
}

.dark .efs-stat-pill--bad {
    background: rgb(239 68 68 / 0.18);
    color: #fecaca;
    border-color: rgb(248 113 113 / 0.34);
}

/* ── Dark mode: nilai utama card harus terang & terbaca ── */
.dark .efs-stat--cash .fi-wi-stats-overview-stat-value {
    color: #93c5fd;
}

.dark .efs-stat--receivable .fi-wi-stats-overview-stat-value {
    color: #fdba74;
}

.dark .efs-stat--expense .fi-wi-stats-overview-stat-value {
    color: #fca5a5;
}

.dark .efs-stat--profit .fi-wi-stats-overview-stat-value {
    color: #86efac;
}

.dark .efs-stat--profit-negative .fi-wi-stats-overview-stat-value {
    color: #fca5a5;
}

.dark .efs-stat--compliance .fi-wi-stats-overview-stat-value {
    color: #c4b5fd;
}

/* ── Dark mode: judul card & deskripsi ── */
.dark .efs-stat--cash .fi-wi-stats-overview-stat-description,
.dark .efs-stat--receivable .fi-wi-stats-overview-stat-description,
.dark .efs-stat--expense .fi-wi-stats-overview-stat-description,
.dark .efs-stat--profit .fi-wi-stats-overview-stat-description,
.dark .efs-stat--profit-negative .fi-wi-stats-overview-stat-description,
.dark .efs-stat--compliance .fi-wi-stats-overview-stat-description {
    color: var(--efs-text-body);
    border-top-color: var(--efs-border-soft);
}

.dark .efs-stat-title-text {
    color: var(--efs-text-strong);
}

/* ── Dark mode: nilai compliance (lebih besar, perlu terang) ── */
.dark .fi-wi-stats-overview .fi-wi-stats-overview-stat-value {
    color: var(--efs-text-strong);
}

/* ── Mobile DatePicker fix ──────────────────────────────────────────────────
   1. Prevent iOS/Android auto-zoom: any focused input must be >= 16px
   2. Scale down flatpickr calendar to fit small screens without scrolling
   ─────────────────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* Prevent auto-zoom on input focus (iOS zooms when font-size < 16px) */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="tel"],
    input[type="search"],
    input[type="date"],
    input[type="datetime-local"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Flatpickr calendar — compact on mobile */
    .flatpickr-calendar {
        width: 280px !important;
        font-size: 13px !important;
        padding: 8px !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 32px rgb(15 23 42 / 0.18) !important;
        /* Ensure it stays within viewport */
        max-width: calc(100vw - 24px) !important;
    }

    .flatpickr-months {
        padding: 0 0 6px !important;
    }

    .flatpickr-month {
        height: 36px !important;
        line-height: 36px !important;
    }

    .flatpickr-current-month {
        font-size: 13px !important;
        padding: 0 !important;
        line-height: 36px !important;
    }

    .flatpickr-current-month .flatpickr-monthDropdown-months {
        font-size: 13px !important;
        padding: 0 4px !important;
    }

    .flatpickr-current-month input.cur-year {
        font-size: 13px !important;
    }

    .flatpickr-weekdays {
        height: 28px !important;
    }

    .flatpickr-weekday {
        font-size: 11px !important;
        line-height: 28px !important;
    }

    .flatpickr-days {
        width: 100% !important;
    }

    .dayContainer {
        width: 100% !important;
        min-width: unset !important;
        max-width: unset !important;
    }

    .flatpickr-day {
        max-width: 36px !important;
        height: 34px !important;
        line-height: 34px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
    }

    .flatpickr-prev-month,
    .flatpickr-next-month {
        padding: 4px 8px !important;
    }

    .flatpickr-prev-month svg,
    .flatpickr-next-month svg {
        width: 14px !important;
        height: 14px !important;
    }
}

/* ── Share document modal — reset mobile overrides ──────────────────────── */
.efs-share-modal .fi-btn,
.efs-share-modal button {
    min-height: unset !important;
    padding-top: unset !important;
    padding-bottom: unset !important;
    font-size: unset !important;
}

.efs-share-modal input[type="text"] {
    font-size: 0.72rem !important;
    min-height: unset !important;
}
