.expense-profile { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.expense-profile > div { min-width: 0; border-left: 4px solid var(--blue, #0099d8); border-radius: 7px; background: var(--light-blue, #e2eef8); padding: 12px 13px; }
.expense-profile span { display: block; color: #466476; font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.expense-profile strong { display: block; margin-top: .3rem; color: var(--deep-blue, #054163); overflow-wrap: anywhere; }
.expense-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: center; gap: 1rem; background: #f4fbfe; }
.expense-totals > div { min-width: 0; border-left: 4px solid var(--blue, #0099d8); padding: 4px 0 4px 12px; }
.expense-totals span, .expense-totals small { display: block; color: #466476; font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.expense-totals strong { display: block; margin-top: .25rem; color: var(--deep-blue, #054163); font-size: 1.15rem; }
.expense-totals small { justify-self: end; overflow-wrap: anywhere; text-align: right; }

.expense-workflow { display: grid; grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr); align-items: stretch; gap: 10px; margin: 0; }
.expense-workflow-step { display: flex; align-items: flex-start; gap: 12px; border: 1px solid #cbd8df; border-radius: 10px; background: var(--white, #fff); color: #526b7b; padding: 15px; transition: border-color .16s ease, background .16s ease, color .16s ease; }
.expense-workflow-step strong, .expense-workflow-step small { display: block; }
.expense-workflow-step small { margin-top: 4px; line-height: 1.45; }
.expense-workflow-number { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #e7eef2; color: #486372; font-weight: 800; }
.expense-workflow-step[data-state="active"] { border-color: var(--blue, #0099d8); box-shadow: 0 2px 10px rgba(0, 153, 216, .12); color: var(--deep-blue, #054163); }
.expense-workflow-step[data-state="active"] .expense-workflow-number { background: var(--deep-blue, #054163); color: #fff; }
.expense-workflow-step[data-state="complete"], .expense-workflow-step[data-state="ready"] { border-color: #75ad91; background: #f3faf6; color: #225f3e; }
.expense-workflow-step[data-state="complete"] .expense-workflow-number { background: #167441; color: #fff; }
.expense-workflow-step[data-state="ready"] .expense-workflow-number { background: #dff1e6; color: #167441; }
.expense-workflow-step[data-state="locked"] { background: #f8fafb; color: #7a8790; }
.expense-workflow-connector { align-self: center; height: 2px; background: #cbd8df; }

.expense-header-grid, .expense-line-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.expense-import-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; border-top: 1px solid #d7e4ea; padding-top: 1rem; }
.expense-import-tools strong { color: var(--deep-blue, #054163); }
.expense-import-tools p { max-width: 680px; color: var(--muted, #607889); line-height: 1.5; margin: .35rem 0 0; }
.expense-lines { display: grid; gap: 1rem; margin-top: 1rem; }
.expense-line-card { padding: 1rem; border: 1px solid #9fc8dc; border-left: 5px solid var(--blue, #0099d8); border-radius: 10px; background: linear-gradient(135deg, #fafdff 0%, #f1f8fc 100%); box-shadow: 0 3px 12px rgba(5, 65, 99, .07); }
.expense-line-card:nth-child(even) { border-left-color: #2b7195; background: linear-gradient(135deg, #ffffff 0%, #f5fafc 100%); }
.expense-line-card .section-head { padding-bottom: .65rem; border-bottom: 1px solid #cfe2ec; }
.expense-line-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.expense-wide { grid-column: span 2; }
.required-mark { color: var(--danger, #b42318); font-size: .78rem; font-weight: 800; }
.expense-line-currency { display: block; min-height: 42px; border: 1px solid #d5e0e6; border-radius: 7px; background: #edf3f7; color: #456070; line-height: 1.35; padding: 10px 11px; }

.expense-category-field { position: relative; }
.expense-category-options { position: absolute; z-index: 12; top: calc(100% - 1px); right: 0; left: 0; display: grid; max-height: 240px; overflow-y: auto; border: 1px solid var(--line, #d8e4ed); border-radius: 0 0 7px 7px; background: #fff; box-shadow: 0 12px 24px rgba(5, 65, 99, .16); }
.expense-category-option { width: 100%; min-height: 38px; justify-content: flex-start; border: 0; border-bottom: 1px solid #edf3f6; border-radius: 0; box-shadow: none; color: var(--ink, #071b29); font-weight: 600; padding: 9px 11px; text-align: left; transform: none; }
.expense-category-option:hover, .expense-category-option:focus { background: var(--light-blue, #e2eef8); box-shadow: none; color: var(--deep-blue, #054163); transform: none; }
.expense-category-empty { color: var(--muted, #607889); padding: 10px 11px; }

.expense-options { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin-top: 1rem; }
.expense-options label { font-size: .9rem; }
.expense-checkbox { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: .45rem; white-space: nowrap; }
.expense-checkbox input { width: auto; }
.expense-special-number, .expense-attachment { min-width: 230px; }
.expense-attachment { display: grid; gap: .35rem; }
.expense-attachment input { max-width: 360px; }
.expense-attachment .expense-attachment-input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.expense-file-picker { display: flex; align-items: center; min-height: 38px; max-width: 360px; border: 1px solid #c9d7e0; border-radius: 8px; background: #fff; color: #102f43; font-size: .9rem; overflow: hidden; cursor: pointer; }
.expense-file-picker-button { align-self: stretch; display: inline-flex; align-items: center; padding: 0 .8rem; border-right: 1px solid #9baab4; background: #f7f7f7; color: #102f43; font-weight: 700; white-space: nowrap; }
.expense-file-picker-empty { padding: 0 .7rem; color: #102f43; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.expense-attachment:focus-within .expense-file-picker { border-color: var(--blue, #0099d8); box-shadow: 0 0 0 3px rgba(0, 153, 216, .14); }
.expense-attachment-note { color: var(--muted, #607889); font-size: .76rem; line-height: 1.35; }
.expense-attachment-list { color: #385769; font-size: .8rem; line-height: 1.45; overflow-wrap: anywhere; }
.expense-calculation { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-top: 1rem; border-radius: 7px; background: #edf7fb; color: #456070; font-size: .8rem; padding: .85rem; }
.expense-calculation strong { display: block; margin-top: .2rem; color: #19384b; font-size: .98rem; overflow-wrap: anywhere; }
.expense-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e0eaef; }
.expense-row-actions .remove-expense-line { border-color: #e8b8b5; color: #b42318; }

.expense-progress { display: grid; gap: 8px; margin-top: 14px; border: 1px solid #abd3e6; border-radius: 8px; background: #f4fbfe; color: var(--deep-blue, #054163); padding: 12px 14px; }
.expense-progress.warn { border-color: #e4c580; background: #fff8e8; color: var(--warn, #a16207); }
.expense-progress-meta { display: flex; justify-content: space-between; gap: 1rem; }
.expense-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #dcebf2; }
.expense-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue, #0099d8); transition: width 180ms ease; }
.expense-progress.warn .expense-progress-track span { background: #d59a24; }
.expense-action-message { margin-top: 14px; }

.expense-success-view { display: grid; min-height: min(620px, calc(100vh - 120px)); place-items: center; padding: 28px; }
.expense-success-card { display: grid; justify-items: center; width: min(100%, 520px); gap: 12px; border: 1px solid #b9dfc7; border-radius: 16px; background: #fff; box-shadow: 0 16px 42px rgba(5, 65, 99, .12); color: var(--deep-blue, #054163); padding: 42px 34px; text-align: center; }
.expense-success-card h2, .expense-success-card p { margin: 0; }
.expense-success-card > p:not(.eyebrow) { color: var(--muted, #607889); font-size: .95rem; }
.expense-success-card strong { color: #126b3c; font-size: clamp(1.3rem, 3vw, 2rem); overflow-wrap: anywhere; }
.expense-success-card small { color: var(--muted, #607889); }
.expense-success-card button { margin-top: 10px; }
.expense-success-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; background: #dff4e7; color: #157343; font-size: 2rem; font-weight: 900; }

.expense-history-records { overflow: hidden; border: 1px solid #d7e4ea; border-radius: 9px; }
.expense-history-filters { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; margin: .9rem 0 1rem; }
.expense-history-filters label { display: grid; gap: .35rem; min-width: 175px; color: #456070; font-size: .82rem; font-weight: 700; }
.expense-history-filters input, .expense-history-filters select { min-height: 40px; }
.expense-history-table, .expense-history-detail-table { width: 100%; border-collapse: collapse; }
.expense-history-table th, .expense-history-table td, .expense-history-detail-table th, .expense-history-detail-table td { padding: .8rem .9rem; border-bottom: 1px solid #e2edf2; text-align: left; vertical-align: top; }
.expense-history-table th, .expense-history-detail-table th { background: #e2eef8; color: var(--deep-blue, #054163); font-size: .83rem; }
.expense-history-sort { display: inline-flex; align-items: center; gap: .35rem; min-height: auto; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: inherit; font: inherit; font-weight: 800; padding: 0; }
.expense-history-sort:hover, .expense-history-sort:focus-visible { background: transparent; box-shadow: none; color: var(--blue, #0099d8); transform: none; text-decoration: underline; }
.expense-history-table tbody tr { cursor: pointer; }
.expense-history-table tbody tr:hover { background: #f4fbfe; }
.expense-history-detail-row td { padding: 0; background: #fbfdff; }
.expense-history-detail { padding: 1rem; }
.expense-history-empty { margin: 0; color: var(--muted, #607889); padding: 1.2rem; text-align: center; }

.audit-summary { cursor: pointer; }
.audit-summary:hover { background: #eef8fc; }
.audit-detail-table { width: 100%; border-collapse: collapse; }
.audit-detail-table th, .audit-detail-table td { padding: .5rem; border-bottom: 1px solid #e2edf2; }
.report-settings-grid { display: grid; grid-template-columns: minmax(280px, 2fr) minmax(220px, 1fr); gap: 1rem; align-items: start; }
.report-meta { display: flex; justify-content: space-between; gap: 1rem; color: #607889; font-size: .85rem; }
.report-meta #retentionLabel { max-width: 65%; }

.workforce-view { padding-bottom: 24px; }
.workforce-profile { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.workforce-profile div, .workforce-balance-grid div { min-width: 0; }
.workforce-profile span, .workforce-balance-grid span { display: block; color: var(--muted, #607889); font-size: .76rem; font-weight: 700; letter-spacing: .03em; }
.workforce-profile strong, .workforce-balance-grid strong { display: block; margin-top: .3rem; overflow-wrap: anywhere; }
.workforce-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workforce-wide { grid-column: span 2; }
.workforce-balances { margin-top: 14px; }
.workforce-balance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.workforce-balance-grid div { border: 1px solid #e0eaef; border-radius: 7px; background: #fbfdff; padding: .7rem .8rem; }
.workforce-success { margin: 56px auto; }
.workforce-loading-card { min-height: 220px; }
.workforce-loading-card h3, .workforce-loading-card p { margin-top: 0; }
.workforce-loading-card > p:not(.eyebrow) { color: var(--muted, #607889); }
.workforce-loading-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.workforce-loading-fields span { height: 42px; border-radius: 7px; background: linear-gradient(90deg, #edf3f6 25%, #f7fafc 50%, #edf3f6 75%); background-size: 220% 100%; animation: workforce-loading 1.25s ease-in-out infinite; }
.workforce-history-section { margin-top: 26px; padding-top: 24px; border-top: 1px solid #d7e4ea; }
.workforce-history-block + .workforce-history-block { margin-top: 26px; padding-top: 24px; border-top: 1px solid #d7e4ea; }
.workforce-history-table tbody tr:nth-child(even) { background: #fbfdff; }
.workforce-type-notes { border: 1px solid #b9d5e8; border-left: 4px solid var(--blue); border-radius: 7px; background: var(--light-blue); padding: 12px 14px; }
.workforce-type-notes strong { color: var(--deep-blue); }
.workforce-type-notes p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.workforce-history-details summary { color: var(--deep-blue); cursor: pointer; font-weight: 700; }
.workforce-history-detail-list { display: grid; gap: 8px; margin: 10px 0 0; min-width: 280px; }
.workforce-history-detail-list div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px; }
.workforce-history-detail-list dt { color: var(--muted); font-weight: 700; }
.workforce-history-detail-list dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.workforce-history-no-details { margin: 10px 0 0; color: var(--muted); }

@keyframes workforce-loading { to { background-position: -120% 0; } }

@media (max-width: 800px) { .expense-profile, .expense-header-grid, .expense-line-grid, .report-settings-grid, .expense-totals, .workforce-profile, .workforce-grid, .workforce-balance-grid, .workforce-loading-fields { grid-template-columns: 1fr; } .expense-workflow { grid-template-columns: 1fr; } .expense-workflow-connector { width: 2px; height: 18px; justify-self: center; } .expense-wide, .workforce-wide { grid-column: auto; } .expense-calculation { grid-template-columns: repeat(2, minmax(0, 1fr)); } .expense-totals small { justify-self: start; text-align: left; } .report-meta { display: grid; } .report-meta #retentionLabel { max-width: none; } .expense-history-filters { align-items: stretch; } .expense-history-filters label, .expense-history-filters button { width: 100%; } .expense-history-records { overflow-x: auto; } .expense-history-table, .expense-history-detail-table { min-width: 760px; } }
 .expense-existing-attachment { display: block; color: #256a3a; font-size: .9em; margin-top: 4px; }

.expense-edit-picker-view { max-width: 980px; }
.expense-edit-picker-card { display: grid; max-width: 760px; gap: 14px; border-top: 4px solid var(--blue, #0099d8); box-shadow: 0 10px 26px rgba(5, 65, 99, .08); }
.expense-edit-picker-card label { display: grid; gap: 8px; color: #244d63; font-size: .92rem; font-weight: 800; }
.expense-edit-picker-card select { width: 100%; min-height: 46px; background: #fff; }
.expense-edit-picker-card .message { margin: 0; }
.expense-edit-picker-card .actions { justify-content: flex-end; }
