.expense-index {
    --expense-brand: #5548e8;
    --expense-text: #202939;
    --expense-muted: #7b8798;
    --expense-border: #e5e9ef;
    color: var(--expense-text);
    padding-bottom: 28px;
}

.expense-index__title {
    color: #161d2d;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -.035em;
}

.expense-index .btn-primary {
    --bs-btn-bg: var(--expense-brand);
    --bs-btn-border-color: var(--expense-brand);
    --bs-btn-hover-bg: #4437d3;
    --bs-btn-hover-border-color: #4437d3;
    box-shadow: 0 4px 9px rgba(85, 72, 232, .18);
}

.expense-index__actions .btn {
    align-items: center;
    display: inline-flex;
    font-weight: 600;
    min-height: 42px;
    padding-inline: 15px;
}

.expense-kpi {
    border: 1px solid var(--expense-border) !important;
    border-radius: 12px;
    min-height: 106px;
}

.expense-kpi .card-body {
    padding: 18px;
}

.expense-kpi__icon {
    align-items: center;
    border-radius: 12px;
    display: inline-flex;
    flex: 0 0 46px;
    font-size: 1.3rem;
    height: 46px;
    justify-content: center;
}

.expense-kpi__icon.is-primary { background: #edf0ff; color: #5146e5; }
.expense-kpi__icon.is-success { background: #e8fbf3; color: #0a9d70; }
.expense-kpi__icon.is-warning { background: #fff7df; color: #f59b0b; }
.expense-kpi__icon.is-orange { background: #fff1e8; color: #f46a20; }
.expense-kpi__icon.is-danger { background: #fff0f1; color: #ef4451; }

.expense-kpi__label,
.expense-kpi__detail,
.expense-kpi__value {
    display: block;
    line-height: 1.2;
    white-space: nowrap;
}

.expense-kpi__label {
    color: var(--expense-muted);
    font-size: .76rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.expense-kpi__value {
    color: #1d2636;
    font-size: 1.28rem;
    font-weight: 800;
}

.expense-kpi__value.is-success, .expense-kpi__detail.is-success { color: #078c64; }
.expense-kpi__value.is-warning, .expense-kpi__detail.is-warning { color: #e58700; }
.expense-kpi__value.is-orange, .expense-kpi__detail.is-orange { color: #e95b16; }
.expense-kpi__value.is-danger, .expense-kpi__detail.is-danger { color: #ed2939; }

.expense-kpi__detail {
    color: #9ba6b5;
    font-size: .73rem;
    margin-top: 4px;
}

.expense-filters,
.expense-table-card {
    border: 1px solid var(--expense-border) !important;
    border-radius: 12px;
}

.expense-period-navigation {
    align-items: center;
    background: #fff;
    border: 1px solid var(--expense-border);
    border-radius: 12px;
    box-shadow: 0 2px 7px rgba(24, 32, 48, .04);
    display: flex;
    justify-content: space-between;
    min-height: 58px;
    padding: 9px 12px;
}

.expense-period-navigation a,
.expense-period-navigation strong {
    align-items: center;
    display: inline-flex;
    gap: 7px;
}

.expense-period-navigation a {
    border: 1px solid #dfe4eb;
    border-radius: 8px;
    color: #596679;
    font-size: .78rem;
    font-weight: 700;
    min-height: 38px;
    padding: 7px 11px;
    text-decoration: none;
}

.expense-period-navigation a:hover { border-color: var(--expense-brand); color: var(--expense-brand); }
.expense-period-navigation strong { color: #202939; font-size: .95rem; text-transform: capitalize; }
.expense-period-navigation strong i { color: var(--expense-brand); font-size: 1.1rem; }

.expense-filters .form-control,
.expense-filters .form-select,
.expense-filters .input-group-text,
.expense-filters .btn {
    border-color: #dfe4eb;
    border-radius: 8px;
    font-size: .84rem;
    min-height: 42px;
}

.expense-filters .input-group > :not(:first-child) { border-bottom-left-radius: 0; border-top-left-radius: 0; }
.expense-filters .input-group > :not(:last-child) { border-bottom-right-radius: 0; border-top-right-radius: 0; }
.expense-filters .input-group-text { background: #fff; color: #677387; padding-inline: 11px; }
.expense-filter-date { min-width: 185px; }

.expense-selection {
    background: #f0efff;
    border-bottom: 1px solid #dcd8ff;
    color: #4437d3;
    min-height: 46px;
    padding: 8px 16px;
}

.expense-table-card {
    overflow: visible;
}

.expense-table-card .table-responsive {
    border-radius: 12px 12px 0 0;
    overflow-x: auto;
}

.expense-table {
    color: #354052;
    font-size: .78rem;
    min-width: 1480px;
}

.expense-table > :not(caption) > * > * {
    border-bottom-color: #edf0f4;
    box-shadow: none;
    padding: 14px 12px;
}

.expense-table thead th {
    background: #fafbfc;
    color: #596575;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .025em;
    padding-block: 14px;
    text-transform: uppercase;
    white-space: nowrap;
}

.expense-table tbody tr {
    transition: background-color .15s ease;
}

.expense-table tbody tr:hover { background: #fafbff; }
.expense-table tbody tr.is-pending { background: #fffdf7; }
.expense-table tbody tr.is-pending:hover { background: #fffaf0; }
.expense-table td { vertical-align: middle; }
.expense-table td > strong { color: #344053; font-size: .82rem; }
.expense-table td > small { color: #9aa5b4; display: block; line-height: 1.35; }
.expense-table__check { padding-left: 18px !important; width: 38px; }
.expense-table .form-check-input { border-color: #aeb7c3; height: 15px; margin: 0; width: 15px; }
.expense-table .form-check-input:checked { background-color: var(--expense-brand); border-color: var(--expense-brand); }
.expense-table__date { white-space: nowrap; }

.expense-supplier-avatar {
    align-items: center;
    background: #3167e8;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    flex: 0 0 30px;
    font-size: .68rem;
    font-weight: 800;
    height: 30px;
    justify-content: center;
}

.expense-supplier-avatar.is-1 { background: #e72f3c; }
.expense-supplier-avatar.is-2 { background: #ea3c91; }
.expense-supplier-avatar.is-3 { background: #ecad00; }
.expense-supplier-avatar.is-4 { background: #f47a1f; }
.expense-supplier-avatar.is-5 { background: #10abc3; }

.expense-category,
.expense-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: .7rem;
    font-weight: 700;
    gap: 4px;
    line-height: 1.2;
    padding: 5px 9px;
    white-space: nowrap;
}

.expense-category { background: #eaf0ff; color: #3e5ed6; }
.expense-pill.is-success { background: #e4faef; border: 1px solid #a5e9cc; color: #088b62; }
.expense-pill.is-warning { background: #fff4cc; border: 1px solid #f7d879; color: #c87500; }
.expense-pill.is-danger { background: #ffeaec; border: 1px solid #f3b9bf; color: #d83242; }
.expense-pill > i:empty { background: currentColor; border-radius: 50%; height: 6px; width: 6px; }

.expense-allocation {
    color: #7a8698 !important;
    margin-top: 5px;
    max-width: 210px;
}

.expense-allocation strong { color: #4a5567; }
.expense-amount { color: #354052; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.expense-total { color: #202939; font-size: .86rem; font-weight: 800; white-space: nowrap; }
.expense-vat { color: #7a8698; line-height: 1.5; white-space: nowrap; }

.expense-attachment {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 1rem;
    height: 30px;
    justify-content: center;
    text-decoration: none;
    width: 30px;
}

.expense-attachment.has-file { background: #e8fbf3; color: #07966b; }
.expense-attachment.is-missing { background: #fff1e8; color: #f07a27; }
.expense-action-view { background: #eef0ff; color: #5548e8; font-weight: 700; }
.expense-action-view:hover { background: #dedcff; color: #4437d3; }
.expense-action-more { padding-inline: 7px; }
.expense-table .btn-sm { border: 0; font-size: .72rem; padding: 6px 9px; white-space: nowrap; }
.expense-table .dropdown-menu { border-color: var(--expense-border); font-size: .8rem; min-width: 190px; }
.expense-table .dropdown-item { padding: 8px 12px; }

.expense-table-footer {
    border-top: 1px solid var(--expense-border);
    color: #778396;
    font-size: .78rem;
    padding: 13px 18px;
}

.expense-period-summary {
    background: #f8fafc;
    border-top: 1px solid var(--expense-border);
    color: #748195;
    font-size: .82rem;
    padding: 14px 18px;
}

.expense-period-summary strong { color: #344053; }
.expense-period-summary span:last-child strong { color: var(--expense-brand); font-size: 1.05rem; margin-left: 6px; }

.expense-table-footer strong { color: #344053; }

@media (max-width: 1199.98px) {
    .expense-index__actions { width: 100%; }
    .expense-index__actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 575.98px) {
    .expense-index__title { font-size: 1.45rem; }
    .expense-index__actions .btn { flex-basis: calc(50% - 4px); font-size: .78rem; padding-inline: 8px; }
    .expense-kpi { min-height: 96px; }
    .expense-filter-date { min-width: 0; }
    .expense-period-navigation span { display: none; }
}
