.ac-workspace, .ac-dialog { --ac-surface: #fffdf7; --ac-ink: #1d1d1b; --ac-muted: #55534d; --ac-line: #d8d1c2; --ac-gold: #805d08; color: var(--ac-ink); font-size: .875rem; line-height: 1.55; }
.dark .ac-workspace, .dark .ac-dialog { --ac-surface: #25231e; --ac-ink: #f7f1e4; --ac-muted: #d2cbbd; --ac-line: #575043; --ac-gold: #f8be20; }
.ac-workspace [hidden], .ac-dialog [hidden], #ac-legacy[hidden] { display: none !important; }
.ac-workspace h2, .ac-dialog h2 { font-size: 1.375rem; font-weight: 700; line-height: 1.3; }
.ac-dialog h3 { font-size: 1rem; font-weight: 700; margin: 1.5rem 0 .75rem; }
.ac-heading, .ac-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.ac-heading { align-items: flex-start; margin-bottom: 1.25rem; }
.ac-heading p { max-width: 70ch; margin-top: .5rem; color: var(--ac-muted); }
.ac-actions { justify-content: flex-start; margin: .75rem 0; }
.ac-workspace button, .ac-dialog button, .ac-dialog a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: .5rem .875rem; border: 1px solid var(--ac-line); border-radius: 8px; color: var(--ac-ink); background: var(--ac-surface); font-weight: 600; }
.ac-workspace button:hover, .ac-dialog button:hover, .ac-dialog a:hover { border-color: var(--ac-gold); }
.ac-workspace button:disabled, .ac-dialog button:disabled { opacity: .55; cursor: wait; }
.ac-dialog[aria-busy="true"] button { opacity: .55; cursor: wait; pointer-events: none; }
.ac-workspace :focus-visible, .ac-dialog :focus-visible { outline: 2px solid var(--ac-gold); outline-offset: 3px; }
.ac-panel { border: 1px solid var(--ac-line); border-radius: 12px; padding: 1rem; background: var(--ac-surface); margin-bottom: 1rem; }
.ac-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: .75rem 0 1rem; }
.ac-wide { grid-column: 1 / -1; }
.ac-workspace label, .ac-dialog label { display: flex; flex-direction: column; gap: .375rem; font-weight: 600; min-width: 0; }
.ac-workspace input, .ac-workspace select, .ac-dialog input, .ac-dialog select, .ac-dialog textarea { width: 100%; min-width: 0; min-height: 44px; padding: .5rem .625rem; border: 1px solid var(--ac-line); border-radius: 6px; color: var(--ac-ink); background: var(--ac-surface); font: inherit; font-weight: 400; accent-color: var(--ac-gold); }
.ac-workspace input::placeholder, .ac-dialog input::placeholder { color: var(--ac-muted); opacity: 1; }
.ac-workspace .ac-check, .ac-dialog .ac-check { flex-direction: row; align-items: center; min-height: 44px; }
.ac-check input { width: 18px; min-height: 18px; }
.ac-dialog input[type="checkbox"] { width: 18px; min-height: 18px; }
.ac-workspace small, .ac-dialog small { display: block; color: var(--ac-muted); font-size: .75rem; font-weight: 400; }
.ac-workspace summary { cursor: pointer; min-height: 44px; padding: .625rem 0; font-weight: 600; }
.ac-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin: 1.25rem 0; font-variant-numeric: tabular-nums; }
.ac-totals dt { color: var(--ac-muted); font-size: .8125rem; }
.ac-totals dd { font-weight: 700; font-size: 1.125rem; margin-top: .25rem; }
.ac-table-scroll { overflow: auto; max-height: 60vh; border: 1px solid var(--ac-line); border-radius: 8px; background: var(--ac-surface); }
.ac-workspace table, .ac-dialog table { width: 100%; min-width: 48rem; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
.ac-workspace caption { text-align: left; padding: .75rem; font-weight: 600; }
.ac-workspace th, .ac-dialog th { position: sticky; top: 0; background: var(--ac-surface); font-size: .75rem; }
.ac-workspace th, .ac-workspace td, .ac-dialog th, .ac-dialog td { padding: .75rem; border-bottom: 1px solid var(--ac-line); vertical-align: top; }
.ac-dialog { width: min(900px, calc(100vw - 24px)); max-height: 90vh; overflow: auto; padding: 1.5rem; border: 1px solid var(--ac-line); border-radius: 12px; background: var(--ac-surface); }
.ac-dialog::backdrop { background: rgb(0 0 0 / .55); }
.ac-dialog > .ac-heading { position: sticky; top: 0; z-index: 3; padding: .5rem 0 .75rem; background: var(--ac-surface); border-bottom: 1px solid var(--ac-line); }
#ac-admin-dialog { width: min(1280px, calc(100vw - 24px)); }
#ac-admin-dialog table { min-width: 70rem; }
#ac-admin-dialog td:first-child { min-width: 16rem; }
#ac-admin-dialog td:nth-child(2) { min-width: 20rem; }
#ac-rows td:first-child, #ac-rows td:nth-child(6), #ac-rows td:nth-child(7), #ac-rows td:nth-child(8) { white-space: nowrap; }
#ac-rows td:nth-child(6), #ac-rows td:nth-child(7), #ac-rows td:nth-child(8) { text-align: right; }
#ac-feedback { min-height: 1.5rem; margin-bottom: .75rem; }
#ac-legacy button[onclick="openNewExpenseReportModal()"], #ac-legacy #btn-add-expense-project { display: none !important; }
@media (max-width: 680px) { .ac-fields { grid-template-columns: 1fr; } .ac-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ac-dialog { padding: 1rem; } .ac-heading { gap: .5rem; } }
