.production-theme #expenses { min-width: 0; }
.production-theme #expenses .expenses-grid { display: block; }
.production-theme #expenses .expenses-ledger { padding: 24px; border: 0; box-shadow: none; border-radius: 0; }
.production-theme #expenses .panel-head { flex-wrap: wrap; gap: 16px; }
.production-theme #expenses .panel-head h3 { font-size: 21px; overflow-wrap: anywhere; }
.production-theme #expenses .inline-actions { flex-wrap: wrap; }
.production-theme #expenses .panel-head .inline-actions button { display: inline-flex; align-items: center; gap: 6px; }
.expense-workspace-tabs { display: flex; gap: 24px; border-bottom: 1px solid #dce3e1; margin-bottom: 20px; }
.production-theme .expense-workspace-tabs button { display: flex; align-items: center; gap: 8px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 14px 0; background: none; color: #66736f; white-space: nowrap; }
.production-theme .expense-workspace-tabs button[aria-selected="true"] { color: #0e756d; border-bottom-color: #0e756d; }
.expense-workspace-tabs svg, .expense-workspace-tools svg, .expense-project-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.expense-workspace-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 18px 0; border-bottom: 1px solid #dce3e1; margin-bottom: 20px; gap: 16px; }
.expense-workspace-metrics > div { display: flex; flex-direction: column; min-width: 0; padding-right: 12px; border-right: 1px solid #dce3e1; }
.expense-workspace-metrics > div:last-child { border: 0; }
.expense-workspace-metrics span, .expense-workspace-metrics small { color: #63716d; font-size: 12px; }
.expense-workspace-metrics strong { font-size: 22px; margin: 6px 0; overflow-wrap: anywhere; }
.production-theme #expenses .expense-filters { display: grid; grid-template-columns: minmax(160px, 1.3fr) minmax(130px, .8fr) minmax(110px, .6fr) minmax(190px, 1.4fr); gap: 10px; }
.production-theme #expenses .expense-filters > * { min-width: 0; width: 100%; }
.expense-workspace-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0 10px; }
.expense-workspace-tools > span { margin-right: auto; font-size: 12px; }
.expense-workspace-tools button { display: inline-flex; align-items: center; gap: 6px; }
.production-theme #expenseWorkspaceTable { max-width: 100%; overflow: auto; border: 1px solid #dce3e1; border-radius: 4px; }
.production-theme #expenses .expense-table { width: 100%; min-width: 980px; table-layout: fixed; margin: 0; }
.production-theme #expenses .expense-table th, .production-theme #expenses .expense-table td { width: auto; padding: 12px 10px; font-size: 13px; vertical-align: middle; text-align: right; overflow-wrap: anywhere; }
.production-theme #expenses .expense-table th:first-child, .production-theme #expenses .expense-table td:first-child { width: 28%; text-align: left; }
.production-theme #expenses .expense-table th:last-child, .production-theme #expenses .expense-table td:last-child { width: 92px; }
.production-theme #expenses .expense-table thead th { color: #56645e; font-size: 11px; background: #f3f5f4; }
.production-theme #expenses .expense-table small { display: block; font-size: 11px; color: #697770; margin-top: 4px; }
.production-theme #expenses .expense-table small.danger-text { color: #b42332; }
.production-theme .expense-group-row { background: #f0f4f2; }
.production-theme .expense-group-row td { font-weight: 650; }
.production-theme .expense-group-toggle { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 0; text-align: left; }
.expense-group-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }
.production-theme #expenses .expense-group-toggle small { display: inline; margin: 0; font-weight: 400; }
.production-theme .expense-row-title { border: 0; border-radius: 0; background: none; padding: 0; text-align: left; color: inherit; width: 100%; }
.production-theme .expense-row-title:hover { color: #0e756d; text-decoration: underline; }
.production-theme #expenses .expense-actual-input { width: 100%; min-width: 0; text-align: right; font-size: 13px; padding: 6px; }
.production-theme #expenses .expense-group-add td { padding: 5px 12px; text-align: left; }
.expense-group-add button { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.expense-group-add svg { width: 15px; height: 15px; }
.production-theme #expenses .expense-table tfoot { background: #f3f5f4; font-weight: 700; }
.production-theme #expenses .expense-table .expense-workspace-empty { text-align: center; padding: 56px 16px; }
.production-theme #expenses .expense-group-overdue { background: #fff2f3; color: #b42332; }
.production-theme #expenses .expense-group-today { background: #fff9e9; color: #92651c; }
.production-theme #expenses .expense-date { text-align: left; }
.production-theme #expenses .expense-group-balance { width: auto; }
.expense-workspace-details { margin: 24px 0; border-top: 1px solid #dce3e1; padding-top: 16px; }
.expense-workspace-details summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.production-theme #expenses .expense-insights { margin-top: 20px; border: 0; padding: 0; box-shadow: none; }
.expense-workspace-details > label { margin: 20px 0; width: 230px; }
.production-theme .expense-editor-dialog { width: min(840px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid #dce3e1; border-radius: 6px; overflow: auto; }
.expense-editor-dialog::backdrop { background: rgb(15 26 23 / 45%); }
.production-theme .expense-editor-dialog .expense-editor { border: 0; border-radius: 0; padding: 24px; box-shadow: none; }
.production-theme .expense-editor-dialog .panel-head { position: sticky; top: -24px; z-index: 2; background: white; padding: 12px 0; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.expense-editor-dialog .panel-head h3 { font-size: 18px; overflow-wrap: anywhere; }
.expense-editor-dialog .panel-head > button { flex-shrink: 0; }
.production-theme .expense-editor-dialog .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.expense-editor-dialog .form-grid > label { min-width: 0; }
.expense-editor-dialog .form-grid input, .expense-editor-dialog .form-grid select { width: 100%; min-width: 0; }
.expense-extra { border-top: 1px solid #dce3e1; margin-top: 18px; padding: 14px 0; }
.expense-extra summary { cursor: pointer; margin-bottom: 14px; }
.production-theme .expense-editor-dialog .expense-form-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 16px; }
.production-theme .expense-editor-dialog .expense-payment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.production-theme .expense-editor-dialog .expense-payments { border-top: 1px solid #dce3e1; margin-top: 24px; padding-top: 16px; }
.expense-project-link { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.expense-project-link span { font-size: 13px; color: #66736f; }
.expense-project-link button { display: flex; align-items: center; gap: 8px; }
@media (max-width: 1000px) {
  .production-theme #expenses .expense-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expense-workspace-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .production-theme #expenses .expenses-ledger { padding: 12px; }
  .expense-workspace-tabs { gap: 18px; }
  .production-theme .expense-workspace-tabs button { font-size: 13px; }
  .expense-workspace-metrics strong { font-size: 18px; }
  .production-theme .expense-editor-dialog .expense-editor { padding: 16px; }
  .production-theme .expense-editor-dialog .form-grid, .production-theme .expense-editor-dialog .expense-payment-grid { grid-template-columns: minmax(0, 1fr); }
  .production-theme .expense-editor-dialog { max-height: calc(100dvh - 20px); }
}
