/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root { font-family: system-ui, sans-serif; color: #202124; background: #f6f7f9; }
[hidden] { display: none !important; }
body { margin: 0; }
.container { max-width: 980px; margin: 0 auto; padding: 3rem 1.25rem; }
.document-container { box-sizing: border-box; max-width: none; width: 100%; }
.document-workspace { display: grid; grid-template-columns: minmax(0, calc(100% - var(--pdf-width))) var(--pdf-width); gap: 1rem; align-items: start; }
.workspace-content { background: white; border: 1px solid #e0e3e8; border-radius: 12px; min-width: 0; padding: 1.25rem; }
.pdf-pane { background: #202124; border-radius: 12px; min-width: 0; position: sticky; top: 1rem; overflow: hidden; }
.pdf-toolbar { align-items: center; background: #2d2f33; color: white; display: flex; gap: .7rem; min-height: 42px; padding: 0 .6rem; }
.pdf-toolbar label { align-items: center; display: flex; flex: 1; font-size: .8rem; gap: .5rem; justify-content: flex-end; }
.pdf-toolbar input[type="range"] { max-width: 120px; }
.split-toggle { background: #484b52; font-size: 1.4rem; line-height: 1; padding: .25rem .6rem; }
.pdf-pane iframe { border: 0; display: block; height: calc(100vh - 8rem); min-height: 560px; width: 100%; }
.pdf-fallback { background: #2d2f33; color: white; display: block; font-size: .8rem; padding: .6rem; text-align: center; }
.pdf-fallback:visited { color: white; }
.pdf-collapsed { grid-template-columns: minmax(0, 1fr) 42px; }
.pdf-collapsed .pdf-toolbar { min-height: 100%; padding: 0; }
.pdf-collapsed .pdf-toolbar label, .pdf-collapsed iframe, .pdf-collapsed .pdf-fallback { display: none; }
.pdf-collapsed .preview-page-toolbar, .pdf-collapsed .pdf-page-scroll { display: none; }
.pdf-collapsed .split-toggle { height: 100%; width: 42px; }
.page-header { display: flex; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.header-action,
.page-header > a, .page-header > form button, .page-header > form input[type="submit"],
.page-heading > a, .page-heading > form button, .page-heading > form input[type="submit"],
.inbound-email-page .page-heading > form button,
.roadmap-header > a,
.budgets-header > details > summary,
.budget-detail-header .budget-actions > a, .budget-detail-header .budget-actions > form button {
  align-items: center;
  background: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  border-radius: 5px;
  box-sizing: border-box;
  color: var(--accent-primary-ink, #fff8ef);
  display: inline-flex;
  font-size: .83rem;
  font-weight: 650;
  height: 2.5rem;
  justify-content: center;
  line-height: 1.2;
  padding: 0 .9rem;
  text-decoration: none;
  white-space: nowrap;
}
.header-action:hover,
.page-header > a:hover, .page-heading > a:hover, .roadmap-header > a:hover,
.budgets-header > details > summary:hover,
.budget-detail-header .budget-actions > a:hover { background: #8f3a16; border-color: #8f3a16; color: white; text-decoration: none; }
.page-header > form, .page-heading > form, .budget-detail-header .budget-actions > form { margin: 0; }
.page-header > form button, .page-heading > form button, .page-header > form input[type="submit"], .page-heading > form input[type="submit"], .budget-detail-header .budget-actions > form button { cursor: pointer; }
.section-heading { align-items: center; display: flex; justify-content: space-between; gap: 1rem; }
.view-toggle { display: flex; gap: .4rem; }
.view-toggle button.active { background: #536dfe; color: white; }
.link-button, .button-link {
  align-items: center;
  background: var(--surface-200);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--ink);
  display: inline-flex;
  font-size: .85rem;
  font-weight: 650;
  justify-content: center;
  line-height: 1.2;
  padding: .65rem .9rem;
  text-decoration: none;
}
.link-button:hover, .button-link:hover { background: var(--surface-300); color: var(--ink); text-decoration: none; }
.primary-link, .roadmap-primary-link {
  align-items: center;
  background: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  border-radius: 5px;
  color: var(--accent-primary-ink, #fff8ef);
  display: inline-flex;
  font-size: .83rem;
  font-weight: 650;
  justify-content: center;
  padding: .65rem .9rem;
  text-decoration: none;
}
.primary-link:hover, .roadmap-primary-link:hover { background: #8f3a16; color: white; text-decoration: none; }
.eyebrow { color: #536dfe; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin: .3rem 0 .7rem; }
.document-title { overflow-wrap: anywhere; }
h2 { margin-top: 2.5rem; }
.panel, .document-card { background: white; border: 1px solid #e0e3e8; border-radius: 12px; padding: 1.25rem; box-shadow: 0 2px 8px #1018280a; }
.panel { margin: 1.5rem 0; }
input[type="text"], input[type="file"], input[type="email"], input[type="password"], select, textarea { box-sizing: border-box; border: 1px solid #b8bec8; border-radius: 7px; font: inherit; padding: .7rem; width: 100%; }
.stack { display: grid; gap: .8rem; max-width: 700px; }
.page-actions, .document-controls, .card-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .6rem; }
.document-controls { justify-content: flex-end; }
.project-filter select { min-width: 170px; }
.inline-form { align-items: start; display: flex; flex-wrap: wrap; gap: .8rem; max-width: 700px; }
.inline-form input[type="text"] { flex: 1 1 280px; }
textarea { font-family: ui-monospace, monospace; font-size: .85rem; }
button, input[type="submit"] { background: #536dfe; border: 0; border-radius: 7px; color: white; cursor: pointer; font: inherit; font-weight: 650; padding: .65rem 1rem; width: fit-content; }
button.secondary, input.secondary { background: #e9edf5; color: #273142; }
.notice, .alert { border-radius: 7px; padding: .8rem 1rem; }
.notice { background: #e2f6e9; color: #155b2b; }
.alert { background: #fff0f0; color: #9e2525; }
.hint, .document-card p { color: #667085; font-size: .9rem; }
.document-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.project-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.project-card { background: white; border: 1px solid #e0e3e8; border-radius: 12px; display: flex; flex-direction: column; gap: 1rem; justify-content: space-between; padding: 1.25rem; }
.project-card h3 { margin-top: 0; }
.project-card p { color: #667085; margin-bottom: 0; }
.card-actions { justify-content: space-between; }
.table-wrap { overflow-x: auto; }
.document-table { background: white; border: 1px solid #e0e3e8; border-collapse: collapse; border-radius: 12px; overflow: hidden; width: 100%; }
.document-table th, .document-table td { border-bottom: 1px solid #e0e3e8; padding: .9rem 1rem; text-align: left; vertical-align: middle; }
.document-table th { background: #f6f7f9; color: #667085; font-size: .8rem; text-transform: uppercase; }
.document-table tr:last-child td { border-bottom: 0; }
.document-card h3 { margin-top: 0; }
pre { background: #f6f7f9; border-radius: 7px; overflow: visible; padding: .8rem; white-space: pre-wrap; }
.status { border-radius: 999px; font-size: .8rem; padding: .25rem .55rem; text-transform: capitalize; }
.status.success { background: #e2f6e9; color: #155b2b; }
.status.failure { background: #fff0f0; color: #9e2525; }
.pdf-facts { align-items: center; display: flex; flex-wrap: wrap; gap: .7rem; }
.project-assignment { align-items: center; display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; max-width: 480px; }
.project-assignment select { flex: 1 1 220px; }
.empty-state { color: #667085; }
.auth-container { max-width: 440px; padding-top: 10vh; }
.auth-panel h1 { font-size: 2.4rem; }
.account-bar { align-items: center; background: white; border-bottom: 1px solid #e0e3e8; display: flex; gap: 1rem; justify-content: flex-end; padding: .6rem 1.25rem; }
.account-bar form { margin: 0; }
.account-bar button { padding: .45rem .75rem; }
.flash-message { margin: .75rem auto; max-width: 980px; }
@media (max-width: 760px) { .document-workspace { display: block; } .pdf-pane { margin-top: 1.5rem; position: static; } .pdf-pane iframe { height: 70vh; min-height: 420px; } .page-header { display: block; } }

/* AP queue visual language: warm paper, ink, and restrained review colors. */
:root {
  --ink: #241c14;
  --ink-muted: #6b5f4c;
  --surface-100: #f5efe2;
  --surface-200: #fffcf5;
  --surface-300: #e9ddc3;
  --border: #d6c7a1;
  --accent-primary: #a8461c;
  --accent-primary-soft: #f2ded0;
  --accent-secondary: #2c5878;
  --accent-secondary-soft: #dce8ee;
  --accent-tertiary: #52673c;
  --accent-tertiary-soft: #e2e8d0;
  --accent-warning: #96690f;
  --accent-warning-soft: #f2e2bb;
  --accent-danger: #8f3223;
  --accent-danger-soft: #f0d6cc;
  color: var(--ink);
  background: var(--surface-100);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body { background: var(--surface-100); color: var(--ink); }
a { color: var(--accent-secondary); }
button, input, textarea, select { font-family: inherit; }
button, input[type="submit"] { background: var(--accent-primary); border-radius: 5px; font-size: .85rem; }
button.secondary, input.secondary { background: var(--surface-200); border: 1px solid var(--border); color: var(--ink); }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="file"], select, textarea {
  background: var(--surface-200); border-color: var(--border); border-radius: 5px; color: var(--ink); font-size: .88rem;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-secondary); outline-offset: 2px;
}
h1, h2, h3, h4 { color: var(--ink); }
h1, h2 { font-family: Jost, "Century Gothic", Futura, system-ui, sans-serif; font-weight: 500; }
h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h2 { font-size: 1.25rem; }
.eyebrow { color: var(--ink-muted); font-family: Jost, "Century Gothic", Futura, system-ui, sans-serif; font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
.panel, .document-card, .project-card { background: var(--surface-200); border-color: var(--border); border-radius: 8px; box-shadow: 0 1px 2px #241c141a; }
.notice { background: var(--accent-tertiary-soft); color: var(--accent-tertiary); }
.alert { background: var(--accent-danger-soft); color: var(--accent-danger); }
.hint, .document-card p, .project-card p { color: var(--ink-muted); }
.status, .badge { align-items: center; border-radius: 999px; display: inline-flex; font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace; font-size: .65rem; font-weight: 600; letter-spacing: .035em; line-height: 1.25; padding: .25rem .5rem; text-transform: uppercase; white-space: nowrap; }
.status.success, .badge-success { background: var(--accent-tertiary-soft); color: var(--accent-tertiary); }
.status.failure, .badge-danger { background: var(--accent-danger-soft); color: var(--accent-danger); }
.badge-warning { background: var(--accent-warning-soft); color: #6b4a08; }
.account-bar { background: var(--surface-200); border-color: var(--border); color: var(--ink-muted); font-size: .8rem; }
.account-bar a { color: var(--accent-secondary); font-weight: 600; text-decoration: none; }
.account-bar a:hover { text-decoration: underline; }

.inbound-email-page { margin: 1.5rem auto; max-width: 1100px; padding: 0 1rem; }
.inbound-email-page .page-heading, .inbound-email-heading { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; }
.inbound-email-page .page-heading { margin-bottom: 1.25rem; }
.inbound-email-page h1 { margin: .2rem 0; }
.inbound-email-page h2 { font-size: 1rem; margin: .6rem 0 .25rem; }
.inbound-email-page p { margin: .35rem 0; }
.inbound-email-page .panel { background: var(--surface-100); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 1rem; padding: 1rem; }
.inbound-email-card { overflow-wrap: anywhere; }
.inbound-email-heading { align-items: center; }
.status-pill { background: var(--surface-200); border-radius: 999px; display: inline-block; font-size: .72rem; font-weight: 700; padding: .2rem .55rem; }
.inbound-attachments { border-top: 1px solid var(--border); margin-top: .8rem; }
.inbound-attachment { align-items: center; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .75rem; padding: .65rem 0; }
.inbound-attachment p { flex-basis: 100%; }
.error-text { color: #a32e21; white-space: pre-wrap; }
.muted { color: var(--ink-muted); }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .08em; }
.empty-state { padding: 2rem; text-align: center; }
.settings-container { max-width: 760px; }
.settings-panel { margin-top: 1.5rem; }
.settings-panel h2 { margin-top: 0; }
.settings-panel .stack { max-width: 520px; }
.settings-panel label { color: var(--ink-muted); display: block; font-size: .78rem; font-weight: 650; margin-bottom: .35rem; }
.flash-message { max-width: 100%; margin: 0; border-radius: 0; text-align: center; }

.queue-container { max-width: 1440px; padding: 2.2rem clamp(1rem, 3vw, 2.75rem) 3rem; }
.queue-header { align-items: center; display: flex; justify-content: space-between; gap: 2rem; margin-bottom: 1.5rem; }
.queue-header h1 { margin: .15rem 0 .35rem; }
.queue-header .eyebrow { margin: 0; }
.queue-description { color: var(--ink-muted); font-size: .9rem; margin: 0; max-width: 620px; }
.review-count, .rail-summary { align-items: center; background: var(--surface-200); border: 1px solid var(--ink); border-radius: 9px; box-shadow: 3px 3px 0 var(--ink); display: flex; flex-direction: column; min-width: 112px; padding: .65rem 1rem; }
.review-count strong, .rail-summary strong { color: var(--accent-warning); font: 500 1.8rem/1 "IBM Plex Mono", ui-monospace, monospace; }
.review-count span, .rail-summary span { color: var(--ink-muted); font: 600 .62rem/1.4 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .04em; margin-top: .3rem; text-transform: uppercase; }
.queue-nav-row { align-items: center; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin-bottom: 1.2rem; padding-bottom: .85rem; }
.queue-tabs { display: flex; }
.queue-tabs a { background: var(--surface-200); border: 1px solid var(--border); color: var(--ink-muted); font-size: .8rem; font-weight: 600; padding: .55rem .85rem; text-decoration: none; }
.queue-tabs a:first-child { border-radius: 5px 0 0 5px; }
.queue-tabs a:last-child { border-radius: 0 5px 5px 0; }
.queue-tabs a + a { border-left: 0; }
.queue-tabs a.active { background: var(--accent-primary); border-color: var(--accent-primary); color: #fff8ef; }
.queue-tabs span { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .68rem; margin-left: .3rem; opacity: .8; }
.queue-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .6rem; }
.queue-search { align-items: center; display: flex; gap: .45rem; }
.queue-search input[type="search"] { min-width: 210px; padding: .55rem .7rem; }
.queue-search select { min-width: 150px; padding: .55rem .7rem; }
.queue-search input[type="submit"] { padding: .58rem .8rem; }
.applied-filters { align-items: center; background: var(--surface-100); border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .45rem; padding: .7rem 1rem; }
.applied-filter { background: var(--surface-300); border: 1px solid var(--border); border-radius: 999px; color: var(--ink); font-size: .75rem; padding: .2rem .55rem; }
.queue-pdf-status, .queue-supplier { color: var(--ink-muted); font-size: .8rem; margin: .35rem 0; }
.queue-supplier strong { color: var(--ink); }
.upload-menu { position: relative; }
.upload-menu > summary { background: var(--accent-primary); border-radius: 5px; color: #fff8ef; cursor: pointer; font-size: .82rem; font-weight: 650; list-style: none; padding: .62rem .85rem; white-space: nowrap; }
.upload-menu > summary::-webkit-details-marker { display: none; }
.upload-menu > summary::before { content: "+  "; }
.upload-popover { background: var(--surface-200); border: 1px solid var(--border); border-radius: 7px; box-shadow: 0 8px 24px #241c1426; min-width: 300px; padding: 1rem; position: absolute; right: 0; top: calc(100% + .5rem); z-index: 5; }
.upload-popover .stack { gap: .6rem; }
.upload-drop-zone { background: var(--surface-100); border: 1px dashed var(--border); border-radius: 6px; display: grid; gap: .45rem; padding: .8rem; transition: border-color .15s, background .15s; }
.upload-drop-zone.is-dragging { background: var(--surface-300); border-color: var(--accent-primary); }
.upload-drop-zone label { font-size: .8rem; font-weight: 650; }
.upload-drop-zone input { max-width: 100%; }

.account-menu { position: relative; }
.account-menu > summary { align-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--ink); cursor: pointer; display: flex; font-size: 1.15rem; height: 2rem; justify-content: center; list-style: none; width: 2rem; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu-popover { background: var(--surface-200); border: 1px solid var(--border); border-radius: 7px; box-shadow: 0 8px 24px #241c1426; display: grid; gap: .2rem; min-width: 180px; padding: .4rem; position: absolute; right: 0; top: calc(100% + .45rem); z-index: 10; }
.account-menu:hover .account-menu-popover, .account-menu:focus-within .account-menu-popover, .account-menu[open] .account-menu-popover { display: grid; }
details.account-menu:hover:not([open]) > .account-menu-popover { display: grid; }
.account-menu-popover a, .account-menu-popover button { background: transparent; border: 0; border-radius: 4px; color: var(--ink); cursor: pointer; display: block; font-size: .82rem; font-weight: 600; padding: .65rem .7rem; text-align: left; text-decoration: none; width: 100%; }
.account-menu-popover a:hover, .account-menu-popover button:hover { background: var(--surface-100); text-decoration: none; }
.feedback-dialog { background: var(--surface-200); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 20px 60px #241c1440; box-sizing: border-box; color: var(--ink); max-width: min(540px, calc(100vw - 2rem)); padding: 1.4rem; width: 100%; }
.feedback-dialog::backdrop { background: #241c1477; backdrop-filter: blur(2px); }
.dialog-heading, .dialog-actions { align-items: center; display: flex; gap: .7rem; justify-content: space-between; }
.dialog-heading h2 { margin: 0; }
.dialog-heading button { font-size: 1.15rem; line-height: 1; padding: .45rem .65rem; }
.dialog-actions { justify-content: flex-end; margin-top: .3rem; }
.dialog-actions input[type="submit"] { background: var(--accent-primary); border: 0; border-radius: 5px; color: white; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 650; padding: .65rem 1rem; }
.feedback-container { max-width: 1120px; }
.feedback-container .page-header { align-items: center; }
.feedback-container .page-header h1 { margin-bottom: .3rem; }
.feedback-container .panel h2 { margin-top: 0; }
.preference-form, .feedback-review-form { align-items: end; display: flex; flex-wrap: wrap; gap: .8rem; }
.preference-form label, .feedback-review-form label { color: var(--ink-muted); font-size: .82rem; font-weight: 650; }
.preference-form input[type="checkbox"], .feedback-review-form input[type="checkbox"] { accent-color: var(--accent-primary); height: 1.1rem; width: 1.1rem; }
.feedback-review-form > div:first-child { display: grid; gap: .3rem; min-width: 200px; }
.checkbox-setting { align-items: center; display: flex; gap: .45rem; }
.feedback-table td { max-width: 420px; }
.data-table { display: grid; gap: .65rem; }
.data-table-search, .data-table-bulk-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .55rem; }
.data-table-search { background: var(--surface-100); border: 1px solid var(--border); border-radius: 7px; padding: .65rem; }
.data-table-search-field { flex: 1 1 260px; }
.data-table-search input[type="search"] { width: 100%; }
.data-table-search select, .data-table-bulk-actions select { min-width: 145px; padding: .52rem .65rem; }
.data-table-search input[type="submit"], .data-table-bulk-actions input[type="submit"] { padding: .55rem .8rem; }
.data-table-clear { color: var(--ink-muted); font-size: .82rem; padding: .4rem; }
.data-table-form { display: grid; gap: .6rem; }
.data-table-bulk-actions { background: var(--surface-100); border: 1px solid var(--border); border-radius: 7px; padding: .55rem .7rem; }
.data-table-select-all { align-items: center; display: inline-flex; font-size: .8rem; gap: .4rem; }
.data-table-select-all input, .data-table-grid input[type="checkbox"] { accent-color: var(--accent-primary); height: 1rem; width: 1rem; }
.data-table-selected-count { color: var(--ink-muted); font-size: .78rem; margin-right: auto; }
.data-table-grid th:first-child, .data-table-grid td:first-child { text-align: center; width: 2.8rem; }
.data-table-grid tbody tr:hover { background: var(--surface-100); }
.data-table-empty { color: var(--ink-muted); padding: 1.5rem !important; text-align: center !important; }
.inbound-email-page .data-table-grid { min-width: 1120px; }
.feedback-detail { font-size: 1.05rem; line-height: 1.65; overflow-wrap: anywhere; }
.feedback-detail p { margin: 0; }
.feedback-attachments { display: flex; flex-wrap: wrap; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.feedback-attachment-item { max-width: 100%; }
.feedback-attachment-item p { margin: .35rem 0 0; overflow-wrap: anywhere; }
.feedback-image-preview { background: var(--surface-100); border: 1px solid var(--border); border-radius: 6px; display: block; height: auto; max-height: 320px; max-width: min(100%, 480px); object-fit: contain; }
.feedback-attachment-editor { border: 1px solid var(--border); border-radius: 8px; padding: 1rem; }
.feedback-attachment-editor legend { font-weight: 700; padding: 0 .35rem; }
.feedback-attachment-remove { align-items: center; display: flex; gap: .5rem; margin-top: .5rem; }
.feedback-attachment-remove label { margin: 0; }
.feedback-upload { display: grid; gap: .4rem; }
.feedback-upload-drop-zone { background: var(--surface-100); border: 1px dashed var(--border); border-radius: 8px; display: grid; gap: .5rem; padding: 1rem; transition: background .15s, border-color .15s; }
.feedback-upload-drop-zone.is-dragging { background: var(--surface-300); border-color: var(--accent-primary); }
.feedback-upload-drop-zone strong { font-size: .9rem; }
.feedback-upload-drop-zone span, .feedback-upload-status { color: var(--ink-muted); font-size: .78rem; }
.feedback-upload-drop-zone input { max-width: 100%; }
.feedback-upload-drop-zone:focus-within { outline: 2px solid var(--accent-secondary); outline-offset: 2px; }
.feedback-upload-list { display: grid; gap: .35rem; list-style: none; margin: .2rem 0 0; padding: 0; }
.feedback-upload-file { align-items: center; background: var(--surface-100); border: 1px solid var(--border); border-radius: 6px; display: flex; gap: .75rem; justify-content: space-between; min-width: 0; padding: .4rem .6rem; }
.feedback-upload-file span { overflow-wrap: anywhere; }
.feedback-upload-file button { flex: 0 0 auto; font-size: .75rem; padding: .25rem .5rem; }
.feedback-upload-status { margin: 0; }
.feedback-comments { display: grid; gap: .7rem; margin: 1rem 0; }
.feedback-comment { background: var(--surface-100); border-left: 3px solid var(--accent-secondary); border-radius: 4px; padding: .6rem .8rem; }
.feedback-comment p { margin: 0 0 .45rem; }
.feedback-comment small { color: var(--ink-muted); }
.comment-form { margin-top: 1rem; }
.api-hint { margin-top: 1rem; }
.feedback-success { animation: feedback-arrival .55s ease-out; overflow: visible; position: relative; }
.feedback-success::after { animation: feedback-spark 1.25s ease-out both; background: radial-gradient(circle, #f3b33d 0 2px, transparent 3px), radial-gradient(circle, #a8461c 0 2px, transparent 3px), radial-gradient(circle, #52673c 0 2px, transparent 3px), radial-gradient(circle, #2c5878 0 2px, transparent 3px); background-position: 8% 100%, 36% 100%, 69% 100%, 94% 100%; background-repeat: no-repeat; content: ""; height: 90px; left: 0; pointer-events: none; position: absolute; right: 0; top: 0; }
@keyframes feedback-arrival { 0% { transform: scale(.96); } 55% { transform: scale(1.015); } 100% { transform: scale(1); } }
@keyframes feedback-spark { 0% { opacity: 1; background-position: 8% 100%, 36% 100%, 69% 100%, 94% 100%; } 100% { opacity: 0; background-position: 3% -40%, 32% -20%, 73% -35%, 98% -15%; } }
@media (prefers-reduced-motion: reduce) { .feedback-success, .feedback-success::after { animation: none; } }

.advanced-feedback-trigger { align-items: center; background: var(--surface-200) !important; border: 1px solid var(--border) !important; border-radius: 50% !important; color: var(--accent-primary) !important; display: inline-flex; height: 2.15rem; justify-content: center; padding: .42rem !important; width: 2.15rem !important; }
.advanced-feedback-trigger svg { fill: none; height: 1.25rem; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 1.25rem; }
.advanced-feedback-active { overflow: hidden; }
.advanced-feedback-mode { background: #fffcf54a; inset: 0; position: fixed; z-index: 10000; }
.advanced-feedback-mode.is-editing { background: #241c14dd; }
.advanced-feedback-original { height: 100%; left: 0; object-fit: fill; position: absolute; top: 0; width: 100%; }
.advanced-feedback-surface { height: 100%; inset: 0; position: absolute; touch-action: none; width: 100%; }
.advanced-feedback-surface.is-selecting { cursor: default; }
.advanced-feedback-surface.is-drawing { cursor: crosshair; }
.advanced-feedback-toolbar, .advanced-feedback-compose { background: var(--surface-200); border: 1px solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 #241c1433; left: 50%; max-width: min(1140px, calc(100vw - 1.5rem)); position: absolute; transform: translateX(-50%); z-index: 2; }
.advanced-feedback-toolbar { align-items: center; display: grid; gap: .6rem; padding: .65rem .8rem; top: .65rem; width: max-content; }
.advanced-feedback-guidance { display: flex; flex-wrap: wrap; gap: .3rem .7rem; justify-content: center; }
.advanced-feedback-guidance strong { font-size: .8rem; }
.advanced-feedback-guidance span { color: var(--ink-muted); font-size: .75rem; }
.advanced-feedback-tools { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; }
.advanced-feedback-tools button { font-size: .72rem; padding: .42rem .6rem; }
.advanced-feedback-tools button.active { background: var(--accent-secondary); color: white; }
.markup-color-control, .markup-size-control { align-items: center; color: var(--ink-muted); display: inline-flex; font-size: .68rem; gap: .25rem; white-space: nowrap; }
.markup-color-control input[type="color"] { background: transparent; border: 1px solid var(--border); border-radius: 4px; height: 1.65rem; padding: .1rem; width: 2rem; }
.markup-size-control select { font-size: .68rem; padding: .35rem .4rem; width: auto; }
.advanced-feedback-compose { align-items: end; bottom: .7rem; display: grid; gap: .55rem; grid-template-columns: minmax(180px, .75fr) minmax(280px, 1.5fr) auto; padding: .65rem .8rem; width: min(1140px, calc(100vw - 1.5rem)); }
.advanced-feedback-text-tool, .advanced-feedback-note { display: grid; gap: .25rem; }
.advanced-feedback-compose label { color: var(--ink-muted); font-size: .7rem; font-weight: 650; }
.advanced-feedback-compose input[type="text"], .advanced-feedback-compose textarea { font-size: .78rem; padding: .48rem .6rem; }
.advanced-feedback-compose textarea { height: 3.2rem; min-height: 3.2rem; resize: vertical; }
.advanced-feedback-submit { align-items: center; display: grid; gap: .4rem; justify-items: end; }
.advanced-feedback-submit span { color: var(--ink-muted); font: .66rem "IBM Plex Mono", ui-monospace, monospace; }
.advanced-feedback-submit input[type="submit"] { white-space: nowrap; }
.markup-text { fill: #a83219; font-family: system-ui, sans-serif; font-weight: 500; paint-order: stroke; pointer-events: all; stroke: #fff8e8; stroke-linejoin: round; stroke-width: 2.5px; }
.markup-arrow, .markup-drawing { fill: none; stroke: #b64924; stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.markup-arrow { pointer-events: stroke; }
.markup-drawing { pointer-events: stroke; }
.markup-arrow.is-selected, .markup-drawing.is-selected { filter: drop-shadow(0 0 4px #2c5878); stroke: #2c5878; }
.markup-shape { fill: none; pointer-events: all; stroke: #b64924; stroke-width: 4; }
.markup-shape.is-selected { filter: drop-shadow(0 0 4px #2c5878); stroke: #2c5878 !important; }
.advanced-markup-text-editor { background: #fff8e8; border: 2px solid var(--accent-warning); border-radius: 5px; box-shadow: 0 3px 12px #241c1455; box-sizing: border-box; color: var(--ink); max-width: min(360px, calc(100vw - 24px)); min-width: min(220px, calc(100vw - 24px)); padding: .55rem .7rem; pointer-events: auto; position: absolute; transform: translateY(-100%); width: min(360px, calc(100vw - 24px)); z-index: 10001; }
.markup-text.is-selected { fill: #241c14; filter: none; stroke: #fff8e8; stroke-width: 2.5px; }
.markup-text-selection { fill: #f2e2bbf2; pointer-events: none; stroke: #96690f; stroke-width: 1.5px; }
.saved-markup-stage { aspect-ratio: 16 / 9; background: var(--surface-100); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; position: relative; width: 100%; }
.saved-markup-screenshot { display: block; height: 100%; inset: 0; object-fit: contain; position: absolute; width: 100%; }
.saved-markup-stage > svg { height: 100%; inset: 0; position: absolute; width: 100%; }
.saved-markup-fullsize-link { cursor: zoom-in; inset: 0; position: absolute; z-index: 1; }
.saved-markup-panel .hint { margin-bottom: 0; }
.advanced-feedback-review { max-width: 1680px; }
.advanced-feedback-workspace { align-items: start; display: grid; grid-template-columns: minmax(210px, var(--queue-width, 290px)) 8px minmax(0, 1fr); }
.advanced-feedback-workspace > .column-resizer, .advanced-feedback-review-grid > .column-resizer { align-self: stretch; min-height: 6rem; }
.advanced-feedback-queue { max-height: calc(100vh - 190px); overflow: auto; position: sticky; top: 1rem; }
.advanced-feedback-queue h2 { align-items: center; display: flex; justify-content: space-between; }
.queue-count { background: var(--surface-100); border-radius: 999px; color: var(--ink-muted); font-size: .75rem; padding: .15rem .5rem; }
.advanced-feedback-filters { display: grid; gap: .5rem; margin-bottom: .8rem; }
.advanced-feedback-filters input, .advanced-feedback-filters select { min-width: 0; width: 100%; }
.advanced-feedback-filters input[type="submit"] { width: auto; }
.advanced-feedback-list { display: grid; gap: .45rem; }
.advanced-feedback-list-item { background: var(--surface-100); border: 1px solid var(--border); border-radius: 7px; color: var(--ink); display: grid; gap: .3rem; padding: .65rem; text-decoration: none; }
.advanced-feedback-list-item:hover, .advanced-feedback-list-item.is-active { border-color: var(--accent-primary); text-decoration: none; }
.advanced-feedback-list-item.is-active { box-shadow: inset 3px 0 var(--accent-primary); }
.advanced-feedback-list-title { font-size: .9rem; font-weight: 700; overflow-wrap: anywhere; }
.advanced-feedback-list-meta, .advanced-feedback-list-note { color: var(--ink-muted); font-size: .74rem; overflow-wrap: anywhere; }
.advanced-feedback-review { min-width: 0; }
.advanced-feedback-detail { display: block; min-width: 0; }
.advanced-feedback-review-grid { align-items: start; display: grid; grid-template-columns: minmax(280px, var(--markup-width, 540px)) 8px minmax(300px, 1fr); }
.advanced-feedback-markup { min-width: 0; }
.advanced-feedback-panel-heading, .advanced-feedback-status-heading { align-items: center; display: flex; gap: .6rem; justify-content: space-between; }
.advanced-feedback-panel-heading h2 { overflow-wrap: anywhere; }
.advanced-feedback-panel-heading .link-button { flex: 0 0 auto; font-size: .75rem; padding: .4rem .55rem; }
.advanced-feedback-review-sidebar { display: grid; gap: 1rem; min-width: 0; }
.advanced-feedback-review-actions h2 { margin-bottom: .7rem; }
.advanced-feedback-empty { min-height: 260px; }
.saved-markup-missing { align-items: center; display: flex; justify-content: center; }
.saved-markup-missing p { color: var(--ink-muted); }
@media (max-width: 1050px) {
  .advanced-feedback-review-grid { grid-template-columns: 1fr; }
  .advanced-feedback-review-grid > .column-resizer { display: none; }
}
@media (max-width: 900px) {
  .advanced-feedback-workspace { grid-template-columns: minmax(200px, var(--queue-width, 260px)) minmax(0, 1fr); }
  .advanced-feedback-queue { max-height: calc(100vh - 150px); }
  .advanced-feedback-workspace > .column-resizer { display: none; }
}
@media (max-width: 650px) {
  .advanced-feedback-workspace { grid-template-columns: 1fr; }
  .advanced-feedback-queue { max-height: none; position: static; }
  .advanced-feedback-list { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}
.account-bar .notification-bell { align-items: center; background: transparent; border-radius: 50%; color: var(--ink-muted); display: inline-flex; height: 2rem; justify-content: center; position: relative; text-decoration: none; width: 2rem; }
.notification-bell svg { fill: none; height: 1.35rem; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 1.35rem; }
.account-bar .notification-bell.has-unread { background: var(--accent-danger-soft); color: var(--accent-danger); }
.notification-badge { align-items: center; background: var(--accent-danger); border: 1px solid var(--surface-200); border-radius: 999px; color: white; display: flex; font-size: .55rem; font-weight: 700; height: 1rem; justify-content: center; min-width: 1rem; padding: 0 .2rem; position: absolute; right: -.25rem; top: -.2rem; }
.api-guide-container { max-width: 1040px; }
.api-guide-container .panel { margin-bottom: 1rem; }
.api-guide-container pre, .api-token-issued pre, .api-explorer-result { background: var(--surface-100); border: 1px solid var(--border); border-radius: 6px; max-width: 100%; overflow: auto; padding: .85rem; white-space: pre; }
.api-guide-steps { display: grid; gap: .55rem; padding-left: 1.3rem; }
.api-token-scopes { border: 1px solid var(--border); border-radius: 6px; display: grid; gap: .35rem; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .75rem; }
.api-token-scopes legend { font-weight: 650; padding: 0 .25rem; }
.api-token-scopes .hint { grid-column: 1 / -1; margin: 0; }
.api-token-scopes label { align-items: center; display: flex; font-size: .82rem; gap: .4rem; min-width: 0; }
.api-token-scopes input { flex: 0 0 auto; }
@media (max-width: 600px) { .api-token-scopes { grid-template-columns: minmax(0, 1fr); } }
.api-token-issued { border-color: var(--accent-secondary); }
.api-token-issued code { overflow-wrap: anywhere; }
.api-explorer-fields { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: .9rem 0; }
.api-explorer-fields label { display: grid; font-size: .8rem; font-weight: 650; gap: .3rem; }
.api-explorer-comment { display: grid; font-size: .8rem; font-weight: 650; gap: .3rem; max-width: 700px; }
.api-explorer-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .65rem 0; }
.api-explorer-result { max-height: 32rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.roadmap-container { max-width: 1280px; }
.roadmap-header { align-items: center; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin-bottom: 1.4rem; }
.roadmap-header h1 { margin: .2rem 0 .45rem; }
.roadmap-header .eyebrow { margin: 0; }
.roadmap-header .hint { margin: 0; max-width: 680px; }
.roadmap-tallies { display: grid; gap: .65rem; grid-template-columns: repeat(4, minmax(100px, 1fr)); margin-bottom: 1rem; }
.roadmap-tally { align-items: center; background: var(--surface-200); border: 1px solid var(--border); border-radius: 7px; display: flex; justify-content: space-between; padding: .65rem .8rem; }
.roadmap-tally span { color: var(--ink-muted); font-size: .74rem; font-weight: 650; }
.roadmap-tally strong { color: var(--accent-primary); font: 500 1.35rem "IBM Plex Mono", ui-monospace, monospace; }
.roadmap-filters { border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 1.6rem; padding-bottom: .75rem; }
.roadmap-filters a { background: var(--surface-200); border: 1px solid var(--border); color: var(--ink-muted); font-size: .78rem; font-weight: 650; padding: .5rem .75rem; text-decoration: none; }
.roadmap-filters a:first-child { border-radius: 5px 0 0 5px; }
.roadmap-filters a:last-child { border-radius: 0 5px 5px 0; }
.roadmap-filters a + a { border-left: 0; }
.roadmap-filters a.active { background: var(--accent-primary); border-color: var(--accent-primary); color: white; }
.roadmap-priority-group { margin: 1.5rem 0 2.2rem; }
.roadmap-priority-group > header { align-items: baseline; display: flex; gap: .65rem; margin-bottom: .7rem; }
.roadmap-priority-group > header h2 { margin: 0; }
.roadmap-priority-group > header span { color: var(--ink-muted); font-size: .75rem; }
.roadmap-card { background: var(--surface-200); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 1px 2px #241c141a; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); margin-bottom: .8rem; scroll-margin-top: 1rem; }
.roadmap-card-main { min-width: 0; padding: 1.1rem 1.2rem; }
.roadmap-item-heading { align-items: center; display: flex; flex-wrap: wrap; gap: .55rem; }
.roadmap-item-heading h3 { flex: 1 1 250px; font-family: Jost, system-ui, sans-serif; font-size: 1.1rem; font-weight: 500; margin: .15rem 0; }
.roadmap-priority-tag { background: var(--accent-primary-soft); border-radius: 5px; color: var(--accent-primary); font: 600 .7rem "IBM Plex Mono", ui-monospace, monospace; padding: .22rem .42rem; }
.roadmap-status { border-radius: 999px; font-size: .66rem; font-weight: 700; padding: .28rem .55rem; text-transform: uppercase; }
.roadmap-status.planned { background: var(--surface-300); color: var(--ink-muted); }
.roadmap-status.progress { background: var(--accent-secondary-soft); color: var(--accent-secondary); }
.roadmap-status.done { background: var(--accent-tertiary-soft); color: var(--accent-tertiary); }
.roadmap-description { color: var(--ink); font-size: .85rem; line-height: 1.55; margin: .65rem 0; }
.roadmap-description p { margin: 0; }
.roadmap-item-actions { align-items: center; color: var(--ink-muted); display: flex; gap: .5rem; font-size: .75rem; }
.roadmap-status-update { align-items: center; display: flex; flex-wrap: wrap; gap: .28rem; margin-top: .85rem; }
.roadmap-status-update form { margin: 0; }
.roadmap-status-update button.roadmap-status-button { background: var(--surface-100); border: 1px solid var(--border); border-radius: 4px; color: var(--ink-muted); font-size: .68rem; padding: .36rem .5rem; }
.roadmap-status-update button.roadmap-status-button.active { background: var(--accent-secondary); border-color: var(--accent-secondary); color: white; }
.roadmap-updated { color: var(--ink-muted); font-size: .68rem; margin: .5rem 0 0; }
.roadmap-thread { background: var(--surface-100); border-left: 1px solid var(--border); min-width: 0; padding: .9rem 1rem; scroll-margin-top: 1rem; }
.roadmap-thread h4 { font: 600 .68rem "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .04em; margin: 0 0 .65rem; text-transform: uppercase; }
.roadmap-comment-list { display: grid; gap: .8rem; list-style: none; margin: 0 0 .8rem; padding: 0; }
.roadmap-comment { align-items: flex-start; display: flex; gap: .55rem; }
.roadmap-avatar { align-items: center; background: var(--accent-secondary-soft); border-radius: 50%; color: var(--accent-secondary); display: flex; flex: 0 0 1.65rem; font-size: .7rem; font-weight: 700; height: 1.65rem; justify-content: center; }
.roadmap-comment-content { min-width: 0; }
.roadmap-comment-meta { align-items: center; display: flex; flex-wrap: wrap; gap: .35rem; }
.roadmap-comment-meta strong { font-size: .72rem; overflow-wrap: anywhere; }
.roadmap-comment-meta time { color: var(--ink-muted); font-size: .64rem; }
.roadmap-comment-type { border-radius: 999px; font: 600 .58rem "IBM Plex Mono", ui-monospace, monospace; padding: .15rem .38rem; text-transform: uppercase; }
.roadmap-comment-type.note { background: var(--surface-300); color: var(--ink); }
.roadmap-comment-type.question { background: var(--accent-secondary-soft); color: var(--accent-secondary); }
.roadmap-comment-type.challenge { background: var(--accent-warning-soft); color: #6b4a08; }
.roadmap-comment-content > p { font-size: .75rem; line-height: 1.45; margin: .2rem 0 0; overflow-wrap: anywhere; }
.roadmap-comment-content > p p { margin: 0; }
.roadmap-no-comments { font-size: .73rem; margin: .2rem 0 .65rem; }
.roadmap-comment-form { border-top: 1px solid var(--border); display: grid; gap: .32rem; padding-top: .65rem; }
.roadmap-comment-form label { color: var(--ink-muted); font-size: .66rem; font-weight: 650; }
.roadmap-comment-form select, .roadmap-comment-form textarea { font-size: .75rem; padding: .45rem .55rem; }
.roadmap-comment-form input[type="submit"] { font-size: .72rem; padding: .48rem .65rem; }
.comment-thread { margin: .55rem 0; padding-left: .65rem; position: relative; }
.comment-thread-toggle { background: transparent; border: 0; bottom: 0; cursor: pointer; left: -.35rem; padding: 0; position: absolute; top: 0; width: .7rem; }
.comment-thread-toggle::after { background: var(--border); content: ""; display: block; height: 100%; left: calc(50% - 1px); position: absolute; top: 0; width: 2px; }
.comment-thread-toggle:hover::after, .comment-thread-toggle:focus-visible::after { background: var(--accent-secondary); width: 3px; }
.comment-thread summary { align-items: center; cursor: pointer; display: flex; flex-wrap: wrap; gap: .35rem; font-size: .72rem; }
.comment-thread-message { font-size: .78rem; line-height: 1.45; margin: .35rem 0; overflow-wrap: anywhere; }
.comment-thread-message p { margin: .25rem 0; }
.comment-edited { color: var(--ink-muted); font-size: .66rem; font-style: italic; }
.comment-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .4rem; margin: .35rem 0; }
.comment-actions button, .comment-actions input[type="submit"], .comment-edit-actions button { background: transparent; border: 0; color: var(--accent-secondary); cursor: pointer; font: inherit; font-size: .68rem; padding: 0; text-decoration: underline; width: auto; }
.comment-edit > summary { color: var(--accent-secondary); display: inline; font-size: .68rem; text-decoration: underline; }
.comment-edit form, .comment-thread-reply { display: grid; gap: .35rem; margin: .45rem 0; }
.comment-edit-actions { align-items: center; display: flex; gap: .65rem; }
.comment-edit-actions form { margin: 0; }
.comment-thread-reply[hidden] { display: none; }
.mention-hint { color: var(--ink-muted); font-size: .65rem; margin: .08rem 0 .15rem; }
.mention-picker { display: grid; gap: .28rem; position: relative; }
.mention-picker-suggestions:not([hidden]) { background: var(--surface-200); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 8px 24px #241c1426; display: grid; left: 0; max-height: 190px; overflow-y: auto; position: absolute; right: 0; top: calc(100% - 1.5rem); z-index: 20; }
.mention-picker-option { background: transparent; border: 0; border-radius: 0; color: var(--ink); font-size: .78rem; padding: .55rem .7rem; text-align: left; width: 100%; }
.mention-picker-option:hover, .mention-picker-option[aria-selected="true"] { background: var(--accent-secondary-soft); color: var(--accent-secondary); }
.mention-picker-empty { color: var(--ink-muted); font-size: .75rem; padding: .6rem .7rem; }
.comment-mention { background: transparent; border: 0; color: #1456a0; cursor: pointer; font: inherit; font-weight: 700; padding: 0; text-decoration: none; width: auto; }
.comment-mention:hover { color: #0c3970; text-decoration: underline; }
.roadmap-empty h2 { margin: 0 0 .55rem; }
.roadmap-empty p { color: var(--ink-muted); }
.roadmap-edit-panel { margin-top: 1rem; }
#roadmap-editor:not(:empty) { align-items: center; background: #17130f80; display: grid; inset: 0; overflow-y: auto; padding: 1.5rem; position: fixed; z-index: 30; }
#roadmap-editor .roadmap-edit-panel { margin: 0 auto; max-width: 760px; width: min(100%, 760px); }
.roadmap-edit-form { max-width: 720px; }
.roadmap-edit-form label { color: var(--ink-muted); display: block; font-size: .78rem; font-weight: 650; margin-bottom: .3rem; }
.roadmap-edit-row { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; }
.notifications-container { max-width: 1000px; }
.mark-all-read { margin: 0 0 1rem; }
.notification-list { display: grid; gap: .65rem; }
.notification-card { align-items: start; background: var(--surface-200); border: 1px solid var(--border); border-radius: 7px; display: grid; gap: .8rem; grid-template-columns: .6rem minmax(0, 1fr) auto; padding: .9rem 1rem; }
.notification-card.unread { border-left: 4px solid var(--accent-danger); }
.notification-dot { background: transparent; border-radius: 50%; height: .55rem; margin-top: .3rem; width: .55rem; }
.notification-card.unread .notification-dot { background: var(--accent-danger); }
.notification-content { min-width: 0; }
.notification-content > p { font-size: .83rem; margin: 0; }
.notification-content blockquote { background: var(--surface-100); border-left: 2px solid var(--border); color: var(--ink-muted); font-size: .78rem; margin: .5rem 0; padding: .4rem .6rem; white-space: pre-wrap; }
.notification-content time { color: var(--ink-muted); font-size: .68rem; }
.notification-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; }
.notification-actions form { margin: 0; }
.notification-actions button { font-size: .68rem; padding: .42rem .55rem; }
.notification-open { font-size: .72rem; font-weight: 650; }
@media (max-width: 760px) {
  .advanced-feedback-toolbar { max-height: 35vh; overflow-y: auto; top: .35rem; }
  .advanced-feedback-compose { bottom: .35rem; grid-template-columns: 1fr 1fr; max-height: 38vh; overflow-y: auto; }
  .advanced-feedback-note { grid-column: 1 / -1; }
  .advanced-feedback-submit { align-items: center; display: flex; grid-column: 1 / -1; justify-content: space-between; }
  .roadmap-tallies { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
  .roadmap-card { display: block; }
  .roadmap-thread { border-left: 0; border-top: 1px solid var(--border); }
  .roadmap-edit-row { grid-template-columns: 1fr; }
  .notification-card { grid-template-columns: .6rem minmax(0, 1fr); }
  .notification-actions { grid-column: 2; }
}
.upload-drop-zone span { color: var(--ink-muted); font-size: .7rem; }
.queue-list { background: var(--surface-200); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 1px 2px #241c141a; overflow: hidden; }
.queue-list-header { align-items: center; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; padding: .9rem 1rem; }
.queue-list-header h2 { margin: 0; }
.queue-list-header p { color: var(--ink-muted); font-size: .78rem; margin: .2rem 0 0; }
.view-toggle { border: 1px solid var(--border); border-radius: 5px; gap: 0; overflow: hidden; }
.view-toggle button { border-radius: 0; font-size: .75rem; padding: .45rem .75rem; }
.view-toggle button.active { background: var(--accent-primary); color: #fff8ef; }
.queue-card-grid { gap: 0; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.queue-card { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; padding: 1rem; }
.queue-card:not(:nth-child(3n)) { border-right: 1px solid var(--border); }
.queue-card-top, .queue-card-meta { align-items: center; display: flex; justify-content: space-between; gap: .6rem; }
.queue-date, .queue-card-meta { color: var(--ink-muted); font: .68rem "IBM Plex Mono", ui-monospace, monospace; }
.queue-card h3 { font-size: .95rem; line-height: 1.35; margin: .8rem 0 .3rem; overflow-wrap: anywhere; }
.queue-card h3 a { color: var(--ink); text-decoration: none; }
.queue-card h3 a:hover { color: var(--accent-primary); text-decoration: underline; }
.queue-project { font-size: .78rem !important; margin: 0 0 .9rem; }
.queue-card-meta { border-top: 1px solid var(--surface-300); padding-top: .65rem; }
.queue-table th { background: var(--surface-100); border-bottom: 2px solid var(--ink); color: var(--ink-muted); font: 600 .65rem "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .04em; }
.queue-table td { font-size: .8rem; }
.queue-table tbody tr:hover { background: var(--surface-100); }
.queue-empty { padding: 4rem 1rem; text-align: center; }
.template-link { font-size: .78rem; margin: -.6rem 0 1rem; text-align: right; }
.project-form-panel h2 { margin-top: 0; }
.project-list-heading { margin: 0 0 1rem; }
.project-list-heading h2 { margin: 0; }
.project-table-actions { align-items: center; display: flex; gap: .75rem; }
.project-table-actions form { margin: 0; }
.bulk-template-controls { align-items: center; background: var(--surface-100); border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .6rem; padding: .75rem 1rem; }
.funding-register-section { margin-bottom: 1.25rem; }
.bulk-template-controls label { font-size: .78rem; font-weight: 650; }
.bulk-template-controls select { max-width: 260px; padding: .5rem; }
.bulk-template-controls input[type="submit"] { padding: .55rem .8rem; }
.bulk-delete-dialog { background: var(--surface-200); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 16px 48px #17120f66; color: var(--ink); max-width: 420px; padding: 1.25rem; width: calc(100% - 3rem); }
.bulk-delete-dialog::backdrop { background: #17120f99; }
.bulk-delete-dialog h2 { margin-top: 0; }
.bulk-delete-dialog p { color: var(--ink-muted); font-size: .85rem; }
.bulk-delete-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }
.bulk-delete-actions .danger { background: #a83232; }
.queue-card-top input[type="checkbox"] { width: auto; }
.queue-table input[type="checkbox"] { width: auto; }
.template-container { max-width: 1000px; }
.page-heading { align-items: center; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1.2rem; }
.page-heading h1 { margin: .15rem 0 .35rem; }
.page-heading p { color: var(--ink-muted); font-size: .85rem; margin: 0; }
.template-panel { background: var(--surface-200); border: 1px solid var(--border); border-radius: 8px; margin: 1rem 0; padding: 1rem; }
.template-panel h2 { margin-top: 0; }
.template-form { display: grid; gap: .6rem; }
.template-form > label { font-size: .82rem; font-weight: 650; }
.template-form .checkbox-label { align-items: center; display: flex; gap: .5rem; }
.template-form .checkbox-label input { width: auto; }
.template-form .hint { margin: 0 0 .3rem; }
.template-form textarea { font: .8rem/1.5 "IBM Plex Mono", ui-monospace, monospace; }
.template-list { display: grid; gap: .65rem; }
.template-row { align-items: flex-start; border-top: 1px solid var(--border); display: flex; gap: 1rem; justify-content: space-between; padding-top: .8rem; }
.template-row h3, .template-result h4 { margin: 0 0 .25rem; }
.template-row p, .template-row ul { color: var(--ink-muted); font-size: .78rem; margin: .2rem 0; }
.template-row ul { padding-left: 1.2rem; }
.template-actions { align-items: center; display: flex; gap: .4rem; }
.template-actions form { margin: 0; }
.template-results-section { display: grid; gap: .6rem; }
.template-review-controls { align-items: center; display: flex; flex-wrap: wrap; gap: .4rem; }
.template-review-controls .hint { flex: 1 1 auto; margin: 0; }
.template-review-controls .hint:first-child { flex-basis: 100%; }
.template-review-controls button { font-size: .68rem; padding: .4rem .55rem; }
.template-result { border-top: 1px solid var(--border); padding-top: .7rem; }
.template-result h4 { align-items: center; display: flex; gap: .5rem; }
.template-json-link { font-size: .72rem; font-weight: 500; margin-left: auto; }
.template-result-field { background: var(--surface-100); border: 1px solid var(--border); border-radius: 6px; margin: .4rem 0; padding: 0; transition: border-color .12s, background .12s; }
.template-result-field:hover { background: var(--surface-200); border-color: var(--accent-secondary); }
.template-field-heading { align-items: start; display: grid; gap: .25rem; grid-template-columns: minmax(0, 1fr) auto; }
.template-field-details { min-width: 0; }
.template-field-details > summary { align-items: center; cursor: pointer; display: grid; gap: .15rem .45rem; grid-template-columns: 12px minmax(65px, auto) minmax(0, 1fr); list-style: none; padding: .65rem .55rem; }
.template-field-details > summary::-webkit-details-marker { display: none; }
.template-field-details > summary::before { color: var(--accent-secondary); content: "›"; font-size: 1rem; grid-column: 1; grid-row: 1 / span 2; transition: transform .12s; }
.template-field-details[open] > summary::before { transform: rotate(90deg); }
.template-field-details > summary strong { font-size: .76rem; grid-column: 2; grid-row: 1; overflow-wrap: anywhere; }
.template-field-value { font-size: .76rem; grid-column: 3; grid-row: 1; overflow-wrap: anywhere; }
.template-field-quality { color: var(--ink-muted); font: .62rem "IBM Plex Mono", ui-monospace, monospace; grid-column: 2 / -1; grid-row: 2; }
.template-field-details-body { border-top: 1px solid var(--border); padding: .65rem; }
.template-field-details-body > .hint:first-child { margin-top: 0; }
.field-focus-button { align-self: center; background: var(--surface-200); border: 1px solid var(--border); color: var(--accent-secondary); font-size: .62rem; margin-right: .45rem; min-width: 54px; padding: .35rem .45rem; }
.field-focus-button[aria-pressed="true"] { background: var(--accent-secondary); color: white; }
.field-focus-button:disabled { color: var(--ink-muted); cursor: default; opacity: .65; }
.template-result-field blockquote { border-left: 2px solid var(--accent-warning); font-size: .75rem; margin: .4rem 0; padding-left: .55rem; }
.template-result-field .hint { margin: .25rem 0; }
.position-evidence { font-size: .75rem; margin: .45rem 0; }
.position-evidence summary { color: var(--ink-muted); cursor: pointer; }
.position-evidence pre { background: var(--surface-200); max-height: 12rem; overflow: auto; padding: .5rem; white-space: pre-wrap; }
.template-feedback-form { align-items: center; display: grid; gap: .5rem; grid-template-columns: minmax(90px, .8fr) minmax(120px, 1.5fr) auto auto; }
.template-feedback-form label { font-size: .73rem; }
.template-feedback-form > label:first-of-type { grid-column: 1; grid-row: 1; }
.template-feedback-form .learn-label { align-items: center; display: flex; gap: .25rem; }
.template-feedback-form .learn-label { grid-column: 1 / 3; grid-row: 2; }
.template-feedback-form .learn-label input { width: auto; }
.template-feedback-form input[type="text"] { grid-column: 2; grid-row: 1; min-width: 0; width: 100%; }
.template-feedback-form input[type="submit"] { grid-column: 4; grid-row: 1 / span 2; }
.template-feedback-form .select-source-button { font-size: .72rem; grid-column: 3; grid-row: 1; padding: .55rem; }
.template-feedback-form .selection-status { color: var(--accent-tertiary); font-size: .68rem; grid-column: 2 / -1; }
.queue-empty h3 { margin: .9rem 0 .25rem; }
.queue-empty p { color: var(--ink-muted); font-size: .85rem; margin: 0; }
.empty-mark { align-items: center; background: var(--surface-100); border: 1px solid var(--border); border-radius: 50%; color: var(--accent-primary); display: inline-flex; font: 600 .65rem "IBM Plex Mono", ui-monospace, monospace; height: 48px; justify-content: center; width: 48px; }
.sr-only { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

.review-shell { display: grid; grid-template-columns: minmax(0, var(--queue-width)) 8px minmax(0, var(--pdf-width)) 8px minmax(320px, 1fr); grid-template-rows: 44px minmax(0, 1fr); height: calc(100vh - 52px); min-height: 620px; overflow: hidden; transition: grid-template-columns .18s ease-out; }
.review-shell.is-resizing { transition: none; }
.review-controls-bar { align-items: center; background: var(--surface-200); border-bottom: 1px solid var(--border); display: flex; gap: .5rem; grid-column: 1 / -1; grid-row: 1; min-width: 0; padding: .35rem .6rem; z-index: 4; }
.review-controls-bar .split-toggle { background: var(--surface-100); border: 1px solid var(--border); color: var(--ink); flex: 0 0 auto; font-size: 1rem; height: 30px; padding: .2rem .55rem; }
.review-controls-bar span { color: var(--ink-muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-rail { min-width: 0; overflow: hidden; transition: opacity .12s ease, visibility 0s; }
.queue-collapsed .queue-rail { opacity: 0; pointer-events: none; transition: opacity .12s ease, visibility 0s linear .18s; visibility: hidden; }
.queue-collapsed { --queue-width: 0px; }
.pdf-collapsed { --pdf-width: 42px; }
.column-resizer { background: var(--border); border: 0; border-radius: 0; cursor: col-resize; min-width: 0; padding: 0; position: relative; touch-action: none; width: 8px; z-index: 3; }
.column-resizer::after { background: var(--accent-secondary); content: ""; inset: 0 3px; opacity: 0; position: absolute; transition: opacity .15s; }
.column-resizer:hover::after, .column-resizer:focus-visible::after, .is-resizing .column-resizer::after { opacity: .7; }
.is-resizing, .is-resizing * { cursor: col-resize !important; user-select: none !important; }
.queue-rail { background: var(--surface-100); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; padding: 1.1rem .8rem .8rem; }
.rail-heading { padding: .15rem .35rem .75rem; }
.rail-heading .eyebrow { margin: 0; }
.rail-heading h1 { font-size: 1.45rem; margin: .25rem 0; }
.rail-heading p:last-child { color: var(--ink-muted); font-size: .75rem; margin: 0; }
.preview-width-control { color: var(--ink-muted); display: grid; font-size: .68rem; gap: .2rem; margin-top: .8rem; }
.preview-width-control input[type="range"] { max-width: none; width: 100%; }
.rail-summary { align-self: flex-start; border-radius: 8px; box-shadow: 2px 2px 0 var(--ink); min-width: 82px; padding: .45rem .8rem; }
.rail-summary strong { font-size: 1.5rem; }
.rail-summary span { font-size: .55rem; }
.rail-list-heading { align-items: center; color: var(--ink-muted); display: flex; font: 600 .64rem "IBM Plex Mono", ui-monospace, monospace; justify-content: space-between; letter-spacing: .04em; margin: 1.1rem .35rem .45rem; text-transform: uppercase; }
.rail-list-heading a, .rail-links a { color: var(--accent-secondary); font-family: inherit; text-decoration: none; }
.review-queue-list { flex: 1; min-height: 0; overflow: auto; }
.review-queue-item { border-bottom: 1px solid var(--border); border-left: 3px solid transparent; color: var(--ink); display: block; padding: .7rem .55rem; text-decoration: none; }
.review-queue-item:hover { background: var(--surface-300); }
.review-queue-item.selected { background: var(--accent-primary-soft); border-left-color: var(--accent-primary); }
.review-queue-item strong { display: block; font-size: .76rem; line-height: 1.3; margin: .4rem 0 .2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-queue-project, .review-queue-foot { color: var(--ink-muted); font-size: .66rem; }

/* Project budgets */
.budgets-page { max-width: 1500px; }
.budgets-header, .budget-detail-header, .section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem; }
.budgets-header { margin-bottom: 1.25rem; }
.budgets-header-actions { align-items: center; display: flex; flex-wrap: nowrap; gap: .55rem; }
.budgets-header h1, .budget-detail h2 { margin: 0; }
.budgets-header .hint, .budget-detail-header .hint { margin: .3rem 0; }
.budget-create { position: relative; }
.budget-create > summary { list-style: none; cursor: pointer; }
.budget-create > summary::-webkit-details-marker { display: none; }
.budget-create[open] > section { position: absolute; z-index: 5; right: 0; top: 2.8rem; width: min(760px, calc(100vw - 2rem)); padding: 1.25rem; box-shadow: 0 12px 36px #241c142e; }
.budget-create section h2 { margin-top: 0; }
.budget-project-picker { margin: 0 0 1rem; }
.budget-project-picker select { min-width: 260px; }
.budget-workspace { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.budget-list { padding: .5rem 0; overflow: hidden; }
.budget-search { display: flex; gap: .45rem; padding: .5rem .75rem .8rem; border-bottom: 1px solid var(--border); }
.budget-search input[type=search] { min-width: 0; flex: 1; }
.budget-list-item { display: block; padding: .85rem .9rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
.budget-list-item:hover, .budget-list-item.selected { background: var(--accent-primary-soft); border-left-color: var(--accent-primary); }
.budget-list-top, .budget-list-bottom { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.budget-list-item strong, .budget-list-item .hint { display: block; margin-top: .25rem; }
.budget-list-item code { color: var(--ink-muted); }
.budget-meter { display: block; height: 6px; margin: .55rem 0 .3rem; overflow: hidden; border-radius: 5px; background: var(--surface-300); }
.budget-meter span { display: block; height: 100%; background: var(--accent-secondary); }
.budget-list-bottom { font-size: .78rem; }
.budget-detail { min-width: 0; display: grid; gap: 1rem; }
.budget-detail-header { padding: .25rem .1rem; }
.budget-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.budget-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.budget-kpis article { display: grid; gap: .35rem; padding: .9rem 1rem; }
.budget-kpis article > span { color: var(--ink-muted); font-size: .78rem; }
.budget-kpis strong { font-size: 1.4rem; overflow-wrap: anywhere; }
.budget-kpis small { color: var(--ink-muted); }
.over-budget { color: var(--accent-danger); }
.budget-invoices { padding: 1rem; }
.budget-invoices h3 { margin: 0; }
.budget-invoices .hint { margin: .25rem 0 .8rem; }
.table-scroll { overflow-x: auto; }
.budget-invoices table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.budget-invoices th, .budget-invoices td { padding: .65rem .55rem; border-bottom: 1px solid var(--border); text-align: left; }
.budget-invoices th { color: var(--ink-muted); font-size: .7rem; text-transform: uppercase; }
.budget-invoices .numeric { text-align: right; white-space: nowrap; }
.roadmap-status.active { background: var(--accent-tertiary-soft); color: var(--accent-tertiary); }
.roadmap-status.upcoming { background: var(--accent-secondary-soft); color: var(--accent-secondary); }
.roadmap-status.closed, .roadmap-status.needs_review { background: var(--surface-300); color: var(--ink-muted); }
.roadmap-status.pending_approval { background: var(--accent-warning-soft); color: #6b4a08; }
.roadmap-status.approved, .roadmap-status.paid { background: var(--accent-tertiary-soft); color: var(--accent-tertiary); }
.budget-suppliers { padding: 1rem; }
.budget-suppliers h3 { margin: 0; }
.budget-suppliers .hint { margin: .25rem 0 .8rem; }
.supplier-spend { margin: .7rem 0; }
.supplier-spend > div:first-child { display: flex; justify-content: space-between; gap: .75rem; font-size: .85rem; }
.supplier-spend > div:first-child span { white-space: nowrap; font-variant-numeric: tabular-nums; }
.supplier-spend .budget-meter { margin: .35rem 0 0; }
.allocation-form { padding: 1rem; }
.allocation-form summary { cursor: pointer; font-weight: 600; }
.allocation-form[open] summary { margin-bottom: 1rem; }
.budget-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
.budget-form-grid > div { min-width: 0; }
.budget-form-grid label { display: block; margin-bottom: .3rem; font-size: .85rem; font-weight: 600; }
.budget-form-grid input, .budget-form-grid select, .budget-form-grid textarea { width: 100%; }
.budget-form-wide { grid-column: 1 / -1; }
.budget-form .dialog-actions { justify-content: flex-end; }
.budget-edit-panel { max-width: 780px; padding: 1.25rem; }
.empty-budget-list { padding: 1rem; text-align: center; }
.budget-detail-empty { min-height: 300px; display: grid; place-content: center; text-align: center; }
.budget-report-filters { margin: 0 0 1rem; padding: 1rem; align-items: end; }
.budget-report-summary { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: .85rem 1rem; }
.budget-report-summary .budget-actions { margin-left: auto; }
.budget-report-tree { display: grid; gap: .65rem; }
.budget-report-category { padding: .7rem .9rem; }
.budget-report-category > summary, .budget-report-code > summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; list-style: none; }
.budget-report-category > summary::-webkit-details-marker, .budget-report-code > summary::-webkit-details-marker { display: none; }
.budget-report-code { margin: .65rem 0 .25rem 1rem; padding: .7rem .8rem; border-left: 2px solid var(--border); }
.budget-report-code .table-scroll { margin-top: .6rem; }
.budget-report-code table { width: 100%; border-collapse: collapse; }
.budget-report-code th, .budget-report-code td { padding: .55rem; border-bottom: 1px solid var(--border); text-align: left; }
.budget-report-code .numeric { text-align: right; white-space: nowrap; }
@media (max-width: 980px) {
  .budget-workspace { grid-template-columns: 1fr; }
  .budget-list { max-height: 420px; overflow-y: auto; }
}
@media (max-width: 700px) {
  .budgets-header, .budget-detail-header { flex-direction: column; }
  .budgets-header-actions { box-sizing: border-box; flex-wrap: wrap; justify-content: flex-end; width: 100%; }
  .budget-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .budget-form-grid { grid-template-columns: 1fr; }
  .budget-form-wide { grid-column: auto; }
  .budget-actions { flex-wrap: wrap; }
  .budget-report-summary { align-items: flex-start; flex-direction: column; }
  .budget-report-summary .budget-actions { margin-left: 0; }
}
.review-queue-foot { display: flex; font-family: "IBM Plex Mono", ui-monospace, monospace; justify-content: space-between; margin-top: .45rem; }
.rail-links { border-top: 1px solid var(--border); display: flex; gap: 1rem; padding: .75rem .35rem .1rem; }
.rail-links a { font-size: .74rem; font-weight: 600; }
.review-preview { background: #e9e3d7; border-left: 1px solid var(--border); border-radius: 0; display: flex; flex-direction: column; height: 100%; min-width: 0; position: relative; }
.review-preview:fullscreen { background: var(--surface-200); height: 100vh; width: 100vw; }
.preview-page-toolbar { align-items: center; background: var(--surface-200); display: flex; gap: .7rem; justify-content: center; padding: .35rem; }
.preview-page-toolbar button { font-size: .8rem; padding: .25rem .55rem; }
.evidence-legend { align-items: center; color: var(--ink-muted); display: inline-flex; font-size: .62rem; gap: .25rem; }
.evidence-legend i { border: 1px solid; display: inline-block; height: .55rem; width: .7rem; }
.evidence-legend .label-swatch { background: #f2ae3555; border-color: #a86600; }
.evidence-legend .value-swatch { background: #41b88344; border-color: #087c51; }
.pdf-page-scroll { flex: 1; min-height: 0; overflow: auto; padding: .75rem; }
.pdf-page-stage { margin: 0 auto; max-width: 100%; position: relative; width: 100%; }
.pdf-page-stage img { background: #fff; box-shadow: 0 2px 12px #0003; display: block; height: auto; max-width: 100%; width: 100%; }
.pdf-text-layer { color: transparent; height: 100%; inset: 0; overflow: hidden; pointer-events: none; position: absolute; user-select: none; width: 100%; }
.pdf-text-layer span { color: transparent; font-size: 1px; line-height: 1; overflow: hidden; position: absolute; white-space: pre; }
.pdf-text-layer[hidden] { display: none; }
.pdf-page-stage.mapping-active img { cursor: crosshair; }
.pdf-evidence-overlay { height: 100%; inset: 0; overflow: visible; pointer-events: none; position: absolute; width: 100%; }
.pdf-evidence-overlay rect { vector-effect: non-scaling-stroke; }
.pdf-evidence-overlay .label-box { fill: #f2ae3555; stroke: #a86600; stroke-width: 2px; }
.pdf-evidence-overlay .value-box { fill: #41b88344; stroke: #087c51; stroke-width: 2px; }
.pdf-evidence-overlay .selection-box { fill: #4978ff55; stroke: #1647cf; stroke-dasharray: 5 3; stroke-width: 2px; }
.selecting-source { cursor: crosshair; touch-action: none; }
.pdf-preview-status { color: var(--ink); font-size: .75rem; margin: .35rem auto 0; max-width: 36rem; text-align: center; }
.review-preview .pdf-fallback { background: var(--surface-200); border-top: 1px solid var(--border); color: var(--accent-secondary); font-size: .72rem; text-decoration: none; }
.review-panel { background: var(--surface-200); min-width: 0; overflow: auto; padding: 0 1rem 2rem; }
.review-panel-header { align-items: flex-start; background: var(--surface-200); border-bottom: 1px solid var(--border); display: flex; gap: .7rem; justify-content: space-between; margin: 0 -1rem; padding: 1rem; position: sticky; top: 0; z-index: 2; }
.review-panel-header .eyebrow { margin: 0 0 .2rem; }
.review-panel-header h2 { font-size: 1.15rem; margin: 0; overflow-wrap: anywhere; }
.review-header-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; }
.review-header-actions form { margin: 0; }
.review-header-actions button { font-size: .7rem; padding: .45rem .6rem; }
.review-section { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.invoice-schema-page { max-width: 1200px; }
.invoice-schema-form { display: grid; gap: 1rem; }
.invoice-schema-layout { align-items: start; display: flex; gap: 1rem; }
.invoice-schema-editor { flex: 1 1 0; min-width: 0; }
.invoice-schema-fields { display: grid; gap: .5rem; }
.invoice-schema-field-section { margin: 1rem 0; }
.invoice-schema-field-section h2 { font-size: 1rem; margin: 0 0 .5rem; }
.invoice-schema-field { align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; display: grid; gap: .65rem; grid-template-columns: 28px minmax(100px, 1fr) 100px 110px auto 2.2rem; padding: .65rem; }
.invoice-schema-delete { justify-self: end; }
.invoice-schema-drag-handle { background: transparent; border: 0; color: var(--ink-muted); cursor: grab; font-size: 1.25rem; line-height: 1; padding: .2rem; touch-action: none; }
.invoice-schema-drag-handle:active { cursor: grabbing; }
.invoice-schema-field.is-dragging { opacity: .45; }
.invoice-schema-resize-handle { align-self: stretch; background: var(--border); border-radius: 4px; cursor: col-resize; flex: 0 0 8px; min-height: 15rem; touch-action: none; }
.invoice-schema-resize-handle:hover, .invoice-schema-resize-handle.is-resizing { background: var(--accent-primary); }
.invoice-schema-preview { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-sizing: border-box; flex: 0 0 420px; max-width: 100%; min-width: 280px; overflow: auto; padding: 1rem; width: 420px; }
.invoice-schema-preview h2 { font-size: 1rem; margin: 0 0 .3rem; }
.invoice-schema-preview .hint { font-size: .7rem; margin: 0 0 .8rem; }
.invoice-schema-preview-fields { display: grid; gap: .8rem; }
.invoice-schema-preview-value { background: var(--surface-100); border: 1px solid var(--border); border-radius: 5px; min-height: 2rem; width: 100%; }
.invoice-schema-preview .invoice-data-actions { margin-top: .3rem; }
.invoice-schema-preview button:disabled { cursor: default; }
.invoice-schema-toggle { align-items: center; display: flex; font-size: .72rem; gap: .3rem; white-space: nowrap; }
.invoice-schema-toggle input[type="checkbox"] { width: auto; }
.invoice-schema-add-field, .invoice-data-field { display: grid; gap: .45rem; }
.invoice-schema-add-field { align-items: center; border-top: 1px solid var(--border); grid-template-columns: minmax(150px, 1fr) 130px auto; margin-top: 1.25rem; padding-top: 1rem; }
.invoice-schema-add-field h2 { font-size: 1rem; grid-column: 1 / -1; margin: 0; }
.invoice-schema-actions { display: flex; justify-content: flex-end; margin-top: 1rem; }
.invoice-data-form { display: grid; gap: .8rem; margin-top: .8rem; }
.invoice-data-field { align-items: start; border-bottom: 1px solid var(--border); display: grid; gap: .45rem .8rem; grid-template-columns: minmax(115px, .75fr) minmax(0, 1.25fr); padding-bottom: .8rem; }
.invoice-data-label { align-content: start; display: grid; gap: .2rem; }
.invoice-data-field label { font-size: .8rem; font-weight: 650; }
.required-mark { color: var(--accent-danger); font-weight: 800; padding-left: .1rem; }
.invoice-data-field input, .invoice-data-field textarea, .invoice-data-field .invoice-note { grid-column: 2; margin: 0; min-width: 0; }
.invoice-data-field textarea { min-height: 5rem; }
.invoice-data-actions { grid-column: 1 / -1; }
.invoice-data-field .hint { margin: 0; }
.invoice-data-field > .hint { grid-column: 2; }
.invoice-data-field > .transfer-review-issue { grid-column: 1 / -1; margin: 0; }
.invoice-data-actions, .invoice-data-exports { display: flex; flex-wrap: wrap; gap: .5rem; }
.invoice-export-page { margin-inline: auto; max-width: 1200px; }
.invoice-export-panel { padding: 1.2rem; margin: 1rem 0; }
.invoice-export-filters, .invoice-export-fields, .invoice-export-document-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; }
.invoice-export-fields label, .invoice-export-document-list label { display: flex; align-items: center; gap: .5rem; }
.invoice-export-document-list { max-height: 360px; overflow-y: auto; padding: .75rem; border: 1px solid var(--border); border-radius: .5rem; }
.invoice-data-actions input { width: auto; }
.invoice-data-exports form { margin: 0; }
.invoice-comments-list { display: grid; gap: .65rem; margin: .8rem 0; }
.invoice-comment { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .7rem; }
.invoice-comment header { align-items: baseline; display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; }
.invoice-comment header time { color: var(--ink-muted); font-size: .72rem; }
.invoice-comment p { margin: .55rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.invoice-comment-form { display: grid; gap: .5rem; }
.invoice-comment-form input[type="submit"] { justify-self: end; }
@media (max-width: 900px) { .invoice-schema-layout { flex-direction: column; } .invoice-schema-editor, .invoice-schema-preview { box-sizing: border-box; flex-basis: auto; width: 100%; } .invoice-schema-resize-handle { display: none; } }
@media (max-width: 650px) { .invoice-schema-field { grid-template-columns: 28px minmax(0, 1fr) 2.2rem; } .invoice-schema-field .invoice-schema-drag-hint { grid-column: 1; grid-row: 1 / span 4; } .invoice-schema-field select, .invoice-schema-field .invoice-schema-toggle { grid-column: 2; justify-content: flex-start; } .invoice-schema-field .invoice-schema-delete { grid-column: 3; grid-row: 1; } }
.review-facts .project-fact { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); }
.review-facts .project-fact dt, .review-facts .project-fact dd { grid-column: 1; }
.review-facts .project-fact dd { width: 100%; }
.project-fact dd { min-width: 0; }
.project-assignment-display { align-items: center; display: flex; gap: .35rem; min-height: 1.8rem; }
.project-value-text { overflow-wrap: anywhere; }
.project-value-edit { align-items: center; background: transparent; border: 0; color: var(--ink-muted); display: inline-flex; flex: 0 0 auto; height: 1.65rem; justify-content: center; padding: .25rem; width: 1.65rem; }
.project-value-edit:hover { background: var(--surface-300); color: var(--ink); }
.project-value-edit svg { fill: none; height: .85rem; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: .85rem; }
.project-edit-form { align-items: center; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; width: 100%; }
.project-edit-form select { flex: 1 1 100%; height: 2.45rem; min-width: 0; width: 100%; }
.project-edit-form button, .project-edit-form input[type="submit"] { align-items: center; background: var(--surface-200); border: 1px solid var(--border); border-radius: 5px; color: var(--ink); display: inline-flex; font-size: .8rem; height: 2.45rem; justify-content: center; min-width: 6.5rem; padding: 0 .8rem; width: auto; }
.project-edit-form button:hover, .project-edit-form input[type="submit"]:hover { background: var(--surface-300); }
.project-edit-form[hidden], .project-assignment-display[hidden] { display: none; }
.document-identity { display: grid; gap: .45rem; }
.document-name-form { align-items: end; display: grid; gap: .45rem; grid-template-columns: 1fr auto; }
.document-name-form label { color: var(--ink-muted); font: 600 .58rem "IBM Plex Mono", ui-monospace, monospace; grid-column: 1 / -1; letter-spacing: .04em; text-transform: uppercase; }
.document-name-form input[type="text"] { min-width: 0; }
.document-name-form input[type="submit"] { width: auto; }
.document-identity > .hint, .suggested-filename > .hint { margin: 0; }
.suggested-filename { border-top: 1px solid var(--border); padding-top: .5rem; }
.suggested-filename > summary { color: var(--accent-secondary); cursor: pointer; font-weight: 650; }
.suggested-filename-value { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; margin-top: .5rem; }
.suggested-filename-value span { overflow-wrap: anywhere; }
.project-picker { display: grid; flex: 1 1 100%; gap: .45rem; min-width: 0; }
.project-picker label { color: var(--ink-muted); font-size: .75rem; font-weight: 650; }
.project-picker input[type="search"] { min-width: 0; width: 100%; }
.project-picker .hint { margin: 0; }
.project-picker-selected { display: flex; flex-wrap: wrap; gap: .35rem; }
.project-picker-selected:empty::before { color: var(--ink-muted); content: "No projects assigned"; font-size: .8rem; }
.project-picker-chip { align-items: center; background: var(--surface-200); border: 1px solid var(--border); border-radius: 5px; display: inline-flex; gap: .3rem; max-width: 100%; padding: .15rem .3rem .15rem .5rem; }
.project-picker-chip span { overflow-wrap: anywhere; }
.project-edit-form .project-picker-chip button { border: 0; flex: 0 0 auto; height: 1.3rem; min-width: 1.3rem; padding: 0; }
.project-picker-results { border: 1px solid var(--border); border-radius: 5px; max-height: 13rem; overflow-y: auto; padding: .2rem; }
.project-edit-form .project-picker-result { background: transparent; border: 0; display: block; height: auto; min-height: 2rem; min-width: 0; text-align: left; width: 100%; }
.project-picker-results .hint { padding: .4rem; }
.invoice-filename-format { background: var(--surface-100); border: 1px solid var(--border); border-radius: 8px; display: grid; gap: .55rem; margin-bottom: 1rem; padding: .8rem; position: relative; }
.invoice-filename-format p { margin: 0; }
.invoice-filename-help summary { cursor: pointer; list-style: none; }
.invoice-filename-help summary::-webkit-details-marker { display: none; }
.invoice-filename-help summary:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
.invoice-filename-help h2 { align-items: center; display: flex; gap: .4rem; margin: 0; }
.invoice-filename-help h2 span { align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; color: var(--ink-muted); display: inline-flex; font-size: .75rem; font-weight: 700; height: 1.2rem; justify-content: center; width: 1.2rem; }
.invoice-filename-help p { background: var(--surface); border: 1px solid var(--border); border-radius: 5px; color: var(--ink); font-size: .8rem; line-height: 1.45; margin-top: .5rem; padding: .65rem; }
.filename-preview-result { background: var(--surface); border: 1px solid var(--border); border-radius: 5px; display: block; font-weight: 650; min-height: 2.2rem; overflow-wrap: anywhere; padding: .5rem; }
.invoice-filename-format-field-picker { display: flex; }
.invoice-filename-format-field-picker select { max-width: 22rem; }
.invoice-data-field input[type="number"] { text-align: right; }
.invoice-data-actions { justify-content: flex-end; }
.invoice-data-actions input { text-transform: capitalize; }
.icon-button { align-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--ink-muted); display: inline-flex; height: 2.2rem; justify-content: center; padding: .4rem; width: 2.2rem; }
.icon-button:hover { background: var(--surface-100); color: var(--ink); }
.icon-button svg { fill: none; height: .9rem; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: .9rem; }
.danger-icon-button { color: var(--accent-danger); }
.danger-icon-button:hover { color: var(--accent-danger); }
.review-section h3 { font: 600 .68rem "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .04em; margin: 0 0 .75rem; text-transform: uppercase; }
.review-facts { display: grid; gap: .6rem .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.review-facts div { min-width: 0; }
.review-facts dt { color: var(--ink-muted); font: 600 .58rem "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .04em; margin-bottom: .2rem; text-transform: uppercase; }
.review-facts dd { font-size: .78rem; margin: 0; overflow-wrap: anywhere; }
.review-form { margin-top: .8rem; max-width: none; }
.review-form select { flex: 1 1 120px; }
.review-form input[type="submit"] { padding: .58rem .75rem; }
.review-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .65rem; }
.review-actions button { font-size: .75rem; padding: .55rem .7rem; }
.button-danger { background: var(--accent-danger); }
.review-details > summary { color: var(--accent-secondary); cursor: pointer; font-weight: 650; font-size: .82rem; list-style: none; }
.review-details > summary::-webkit-details-marker { display: none; }
.review-details > summary span { color: var(--accent-tertiary); float: right; font: 600 .62rem "IBM Plex Mono", ui-monospace, monospace; text-transform: uppercase; }
.review-section-heading { align-items: center; display: flex; gap: .6rem; justify-content: space-between; }
.review-view-tabs { display: flex; gap: .45rem; padding: .8rem 0 .2rem; position: sticky; top: 4.2rem; z-index: 1; background: var(--surface-200); }
.review-view-tabs button { flex: 1; }
.workflow-tabs { border-bottom: 1px solid var(--border); }
.workflow-tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 5px 5px 0 0; color: var(--ink-muted); padding: .8rem .65rem; }
.workflow-tabs button:hover { background: var(--surface-100); color: var(--ink); }
.workflow-tabs button.is-active { background: var(--accent-secondary-soft); border-bottom-color: var(--accent-secondary); color: var(--accent-secondary); font-weight: 750; }
.workflow-tabs button:focus-visible { outline: 2px solid var(--accent-secondary); outline-offset: -2px; }
.review-view-panel { scroll-margin-top: 8.5rem; }

.mapping-chooser-actions, .mapping-workspace-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; }
.mapping-chooser-actions { margin: .65rem 0; }
.mapping-workspace, .mapping-manager { background: var(--surface-200); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 40px #241c1433; box-sizing: border-box; color: var(--ink); max-height: 94dvh; max-width: 96vw; padding: 1rem; }
.mapping-workspace { width: 1260px; }
.mapping-manager { width: 680px; }
.mapping-workspace::backdrop, .mapping-manager::backdrop { background: #241c1466; }
.mapping-workspace-header { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin-bottom: .8rem; }
.mapping-workspace-header h3 { font-family: inherit; font-size: 1.15rem; letter-spacing: normal; margin: 0 0 .45rem; text-transform: none; }
.mapping-workspace label { display: block; font-size: .85rem; font-weight: 650; margin-bottom: .45rem; }
.mapping-workspace-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); }
.mapping-workspace-reference, .mapping-workspace-fields { max-height: 65dvh; min-width: 0; overflow: auto; }
.mapping-workspace-stage { position: relative; touch-action: none; }
.mapping-workspace-stage img { display: block; width: 100%; }
.mapping-workspace-stage svg { height: 100%; inset: 0; overflow: visible; position: absolute; width: 100%; }
.mapping-workspace-stage:focus-visible { outline: 2px solid var(--accent-secondary); outline-offset: -2px; }
.mapping-workspace-overlay { pointer-events: none; }
.mapping-workspace-overlay rect { fill: var(--accent-secondary-soft); fill-opacity: .35; stroke: var(--accent-secondary); stroke-width: 2; }
.mapping-workspace-overlay rect.is-active { fill: var(--accent-warning-soft); stroke: var(--accent-warning); stroke-width: 4; }
.mapping-workspace-overlay text { fill: var(--ink); font: 14px sans-serif; paint-order: stroke; stroke: var(--surface-200); stroke-width: 4; }
.mapping-workspace-fields .mapping-preview-field { background: var(--surface-100); border: 1px solid var(--border); border-radius: 5px; color: var(--ink); display: grid; gap: .45rem; margin-bottom: .65rem; padding: .65rem; text-align: left; white-space: normal; width: 100%; }
.mapping-preview-field.is-active { border-color: var(--accent-secondary); box-shadow: inset 3px 0 var(--accent-secondary); }
.mapping-preview-field button { max-width: 100%; text-align: left; white-space: normal; }
.mapping-preview-field p { margin: .45rem 0 0; overflow-wrap: anywhere; }
.mapping-workspace-actions { justify-content: flex-end; margin-top: .8rem; }
.mapping-manager-row { align-items: center; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .65rem; justify-content: space-between; padding: .8rem 0; }
.mapping-manager-row strong { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .mapping-workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .mapping-workspace-reference { max-height: 46dvh; }
  .mapping-workspace-fields { max-height: none; overflow: visible; }
  .mapping-chooser-actions > button { flex: 1 1 auto; }
}
.review-view-panel { min-width: 0; }
.extraction-candidate-card, .invoice-mapping-tools { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 1px 4px #0001; display: grid; gap: .7rem; margin-top: .8rem; padding: .8rem; }
.extraction-candidate-card h4, .invoice-mapping-tools h4, .invoice-mapping-tools h5 { margin: 0; }
.mapped-extraction-form { display: grid; gap: .6rem; }
.mapped-invoice-lines { display: grid; gap: .7rem; }
.mapped-invoice-line { background: var(--surface-100); border: 1px solid var(--border); border-radius: 6px; display: grid; gap: .65rem; min-width: 0; padding: .7rem; }
.mapped-invoice-line legend { font-size: .82rem; font-weight: 650; padding: 0 .25rem; }
.mapped-invoice-line .invoice-data-field { border: 0; display: grid; gap: .3rem; grid-template-columns: minmax(0, 1fr); padding: 0; }
.mapped-invoice-line .invoice-data-label { margin: 0; }
.remove-mapped-line { justify-self: end; }
.invoice-mapping-save { border-top: 1px solid var(--border); display: grid; gap: .5rem; padding-top: .7rem; }
.pdf-evidence-overlay .field-location-highlight { fill: var(--accent-primary-soft); fill-opacity: .7; stroke: var(--accent-primary); stroke-width: 3px; }
.field-group-heading { align-items: center; display: flex; gap: .5rem; justify-content: space-between; }
.field-group-heading h5 { margin: 0; }
.mapped-field-input-row { align-items: center; display: flex; gap: .4rem; min-width: 0; }
.mapped-field-input-row > input, .mapped-field-input-row > textarea { flex: 1 1 auto; min-width: 0; width: 100%; }
.field-location-toggle { flex: 0 0 auto; }
.field-location-toggle .eye-slash { display: none; }
.field-location-toggle:not([aria-pressed="true"]) .eye-slash { display: block; }
.group-location-toggle { height: 1.8rem; padding: .25rem; width: 1.8rem; }
.apply-extraction-template { border: 1px solid var(--border); border-radius: 8px; display: grid; gap: .5rem; margin-top: .8rem; padding: .8rem; }
.extraction-line-values { margin: 0; padding-left: 1.5rem; }
.review-section-heading h3 { margin: 0; }
.review-section-heading a { font-size: .7rem; font-weight: 600; }
.review-section-heading > span { color: var(--ink-muted); font: .7rem "IBM Plex Mono", ui-monospace, monospace; }
.review-panel pre { font-size: .68rem; max-height: 240px; overflow: auto; }
.review-panel .empty-state { font-size: .78rem; }
.pdf-collapsed iframe, .pdf-collapsed .pdf-fallback { display: none; }

@media (max-width: 1050px) {
  .queue-nav-row { align-items: flex-start; }
  .queue-actions { flex: 1 1 100%; justify-content: space-between; }
  .review-shell { grid-template-columns: minmax(0, var(--queue-width)) 8px minmax(0, var(--pdf-width)) 8px minmax(240px, 1fr); }
}
@media (max-width: 760px) {
  .queue-container { padding-top: 1.2rem; }
  .queue-list-header { align-items: flex-start; flex-wrap: wrap; gap: .6rem; }
  .queue-header { align-items: flex-start; }
  .review-count { min-width: 82px; }
  .queue-nav-row, .queue-actions { display: grid; width: 100%; }
  .queue-tabs { width: 100%; }
  .queue-tabs a { flex: 1; text-align: center; }
  .queue-search { display: grid; grid-template-columns: 1fr 1fr; }
  .queue-search input[type="search"] { grid-column: 1 / -1; min-width: 0; }
  .upload-menu { justify-self: start; }
  .queue-card:not(:nth-child(3n)) { border-right: 0; }
  .queue-card { border-bottom: 1px solid var(--border); }
  .review-shell { display: flex; flex-direction: column; height: auto; min-height: 0; overflow: visible; }
  .review-controls-bar { flex: 0 0 44px; }
  .column-resizer { display: none; }
  .queue-rail { border-bottom: 1px solid var(--border); border-right: 0; max-height: 340px; }
  .review-queue-list { max-height: 190px; }
  .review-preview { height: 72vh; min-height: 480px; }
  .preview-width-control { display: none; }
  .review-panel { overflow: visible; }
  .review-shell { transition: none; }
  .pdf-collapsed .review-preview { height: auto; min-height: 44px; }
  .pdf-collapsed iframe, .pdf-collapsed .pdf-fallback,
  .pdf-collapsed .preview-page-toolbar, .pdf-collapsed .pdf-page-scroll { display: none; }
  .account-bar { justify-content: space-between; }
  .template-feedback-form { grid-template-columns: minmax(0, 1fr) auto; }
  .template-feedback-form > label:first-of-type { grid-column: 1 / -1; grid-row: 1; }
  .template-feedback-form input[type="text"] { grid-column: 1 / -1; grid-row: 2; }
  .template-feedback-form .learn-label { grid-column: 1 / -1; grid-row: 3; }
  .template-feedback-form input[type="submit"] { grid-column: 2; grid-row: 4; }
  .template-feedback-form .select-source-button { grid-column: 1 / -1; grid-row: 4; }
  .template-feedback-form input[type="submit"] { grid-column: 2; grid-row: 5; }
  .template-feedback-form .selection-status { grid-column: 1 / -1; grid-row: 6; }
}

@media (prefers-reduced-motion: reduce) { .review-shell, .queue-rail { transition: none; } }

.workflow-page { min-height: calc(100vh - 56px); padding: 1.2rem; }
.workflow-header { align-items: center; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; margin: 0 auto 1rem; max-width: 1800px; }
.workflow-header h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin: .2rem 0; }
.workflow-title-input { background: transparent; border: 0; font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 750; margin: .2rem 0; max-width: 520px; padding: .1rem; }
.workflow-header .hint { margin: .25rem 0; }
.workflow-back { color: #536dfe; font-weight: 650; text-decoration: none; }
.workflow-tools { align-items: center; display: flex; flex-wrap: wrap; gap: .4rem; }
.workflow-tools button, .workflow-import-label { font-size: .82rem; padding: .5rem .65rem; }
.workflow-arrow-label { align-items: center; display: flex; font-size: .8rem; gap: .35rem; }
.workflow-arrow-label select { padding: .45rem; width: auto; }
.workflow-lane-placement { align-items: center; display: inline-flex; font-size: .78rem; gap: .35rem; }
.workflow-lane-placement select { padding: .4rem .5rem; width: auto; }
.workflow-save-status { color: #667085; font-size: .78rem; min-width: 90px; text-align: right; }
.workflow-import-label { border-radius: 7px; cursor: pointer; display: inline-block; font-weight: 650; }
.workflow-workspace { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) 290px; margin: 0 auto; max-width: 1800px; }
.workflow-canvas-scroll { background: #e9edf3; border: 1px solid #d0d5dd; border-radius: 10px; height: min(74vh, 900px); min-height: 440px; overflow: auto; position: relative; }
.workflow-stage { min-height: 700px; position: relative; transform-origin: top left; }
.workflow-lanes { min-height: 100%; padding: 0; position: relative; }
.workflow-lane { border: 1px solid #d0d5dd; border-radius: 9px; box-sizing: border-box; overflow: visible; position: absolute; }
.workflow-lane-header { align-items: center; background: #ffffffed; border: 1px solid #d0d5dd; border-radius: 0 0 9px 0; box-shadow: 0 2px 5px #10182812; display: flex; flex: 0 0 auto; gap: .2rem; height: 36px; left: -1px; max-width: min(85vw, 48rem); padding: 0 .3rem; position: absolute; top: -1px; width: max-content; z-index: 2; }
.workflow-lane-resize { background: #536dfe55; border: 0; border-radius: 99px; cursor: ns-resize; height: 8px; left: 50%; padding: 0; position: absolute; bottom: -5px; transform: translateX(-50%); width: 72px; z-index: 4; }
.workflow-lane-resize:hover, .workflow-lane-resize:focus-visible { background: #536dfe; outline: 2px solid white; }
.workflow-lane:has(.workflow-lane-resize[data-orientation="vertical"]) .workflow-lane-resize { cursor: ew-resize; height: 72px; left: auto; right: -5px; top: 50%; transform: translateY(-50%); width: 8px; }
.workflow-lane-header input[data-lane-field="title"] { background: transparent; border: 0; flex: 0 0 auto; font-size: .9rem; font-weight: 700; min-width: 0; padding: .35rem .25rem; }
.workflow-lane-header input[type="color"] { background: transparent; border: 0; border-radius: 4px; cursor: pointer; height: 1.35rem; padding: 0; width: 1.45rem; }
.workflow-lane-header input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.workflow-lane-header input[type="color"]::-webkit-color-swatch { border: 1px solid #98a2b3; border-radius: 3px; }
.workflow-lane-header .workflow-icon-button { font-size: 1rem; line-height: 1; padding: .15rem .3rem; }
.workflow-icon-button { background: transparent; color: #667085; font-size: 1.1rem; padding: .2rem .45rem; }
.workflow-icon-button:hover { background: #fff0f0; color: #9e2525; }
.workflow-card { background: white; border: 1px solid #c8ced8; border-radius: 9px; box-shadow: 0 3px 9px #10182818; box-sizing: border-box; min-height: 90px; min-width: 180px; overflow: auto; position: absolute; resize: both; z-index: 1; }
.workflow-card.selected { border-color: #536dfe; box-shadow: 0 0 0 2px #536dfe55, 0 4px 12px #10182820; }
.workflow-card-head { align-items: center; background: #f9fafb; border-bottom: 1px solid #eaecf0; cursor: grab; display: flex; gap: .35rem; padding: .35rem; }
.workflow-card-head:active { cursor: grabbing; }
.workflow-card-head select { border: 0; font-size: 1rem; padding: .3rem; width: 45px; }
.workflow-card-head input { border: 0; font-size: .88rem; font-weight: 700; min-width: 0; padding: .35rem; }
.workflow-card textarea { border: 0; font-family: inherit; font-size: .82rem; height: calc(100% - 45px); min-height: 55px; resize: none; width: 100%; }
.workflow-card-move-grip { align-items: center; background: #ffffffd9; border: 1px solid #98a2b3; border-radius: 99px; color: #667085; cursor: grab; display: flex; justify-content: center; opacity: .7; position: absolute; touch-action: none; user-select: none; z-index: 3; }
.workflow-card-move-grip:hover { opacity: 1; }
.workflow-card-move-grip::after { content: "⋮"; font-size: .72rem; font-weight: 800; line-height: 1; }
.workflow-card-move-grip-left, .workflow-card-move-grip-right { height: 34px; top: 50%; transform: translateY(-50%); width: 11px; }
.workflow-card-move-grip-left { left: 2px; }
.workflow-card-move-grip-right { right: 2px; }
.workflow-card-move-grip-bottom { bottom: 2px; height: 11px; left: 50%; transform: translateX(-50%); width: 34px; }
.workflow-card-move-grip-bottom::after { content: "⋯"; }
.workflow-card-grip { bottom: 2px; color: #98a2b3; font-size: .8rem; pointer-events: none; position: absolute; right: 5px; }
.workflow-image-card { overflow: auto; }
.workflow-image-card-head { background: #ffffffed; border: 1px solid #c8ced8; border-radius: 0 0 8px 0; box-shadow: 0 2px 5px #10182818; cursor: default; left: -1px; max-width: calc(100% - 1rem); padding: .15rem .25rem; position: absolute; top: -1px; width: max-content; z-index: 2; }
.workflow-image-card-head input { font-size: .8rem; padding: .2rem .25rem; }
.workflow-image-card-head .workflow-icon-button { font-size: .95rem; padding: .1rem .25rem; }
.workflow-card-image { cursor: zoom-in; display: block; height: calc(100% - 2px); left: 1px; object-fit: contain; position: absolute; top: 1px; width: calc(100% - 2px); }
.workflow-image-card .workflow-card-grip { z-index: 1; }
.workflow-image-dialog { background: #111827; border: 0; border-radius: 10px; height: min(90vh, 1200px); max-height: 90vh; max-width: min(94vw, 1600px); padding: 2.75rem .75rem .75rem; width: min(94vw, 1600px); }
.workflow-image-dialog::backdrop { background: #101828cc; }
.workflow-image-dialog form { position: absolute; right: .75rem; top: .6rem; }
.workflow-image-dialog-close { background: white; color: #101828; }
.workflow-image-dialog img { height: 100%; object-fit: contain; width: 100%; }
.workflow-drag-over .workflow-canvas-scroll { outline: 4px solid #536dfe; outline-offset: -5px; }
.workflow-drag-over .workflow-canvas-scroll::after { background: #536dfeeb; border-radius: 8px; color: white; content: "Drop image to add it to the canvas"; font-weight: 700; left: 50%; padding: .8rem 1rem; pointer-events: none; position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 5; }
.workflow-arrows { height: 100%; left: 0; overflow: visible; pointer-events: none; position: absolute; top: 0; width: 100%; z-index: 2; }
.workflow-comments { align-self: start; background: white; border: 1px solid #e0e3e8; border-radius: 10px; max-height: min(74vh, 900px); overflow: auto; padding: 1rem; }
.workflow-comments h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
.workflow-comment-list { display: grid; gap: .7rem; }
.workflow-comment { border-bottom: 1px solid #eaecf0; padding: .4rem 0 .7rem; }
.workflow-comment p { margin: .2rem 0 .45rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.workflow-comment header { color: #667085; font-size: .75rem; }
.workflow-comment[hidden] { display: none; }
.workflow-card-comment-filter { display: block; font-size: .78rem; font-weight: 700; margin: .5rem 0 .25rem; }
.workflow-comments > select { width: 100%; }
.workflow-comment small { color: #667085; font-size: .7rem; }
.workflow-comment-target { background: #eef2ff; border-radius: 99px; margin-left: .4rem; padding: .15rem .4rem; }
.workflow-comment-target { border: 0; color: #3448ba; cursor: pointer; font-size: .7rem; font-weight: 700; }
.workflow-comment-form { display: grid; gap: .55rem; margin-top: 1rem; }
.workflow-comment-form textarea { font-family: inherit; font-size: .85rem; }
.workflow-comment-form input[type="submit"] { width: 100%; }
.workflow-comment-selection { color: #536dfe; font-size: .75rem; margin: 0; }
.workflow-delete { margin: 1rem auto; display: block; }
.comment-thread { margin: .45rem 0; padding-left: .65rem; position: relative; }
.comment-thread details > summary { align-items: center; color: #667085; cursor: pointer; display: flex; flex-wrap: wrap; font-size: .73rem; gap: .3rem; list-style-position: inside; }
.comment-thread-message { font-size: .85rem; margin: .45rem 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.comment-thread-message p { margin: .2rem 0; }
.comment-thread-reply { display: grid; gap: .35rem; margin: .45rem 0; }
.comment-thread-reply input[type="submit"] { justify-self: end; }
.roadmap-progress { background: #f8f9fc; border: 1px solid #e0e3e8; border-radius: 8px; margin-top: .8rem; padding: .7rem; }
.roadmap-progress > header { align-items: center; display: flex; justify-content: space-between; }
.roadmap-progress h4 { font-size: .85rem; margin: 0; }
.roadmap-progress > header span { color: #667085; font-size: .72rem; }
.roadmap-progress progress { height: .65rem; margin: .55rem 0; width: 100%; }
.roadmap-progress-list { display: grid; gap: .4rem; list-style: none; margin: .2rem 0 .6rem; padding: 0; }
.roadmap-progress-list li { align-items: center; border-bottom: 1px solid #eaecf0; display: flex; gap: .5rem; justify-content: space-between; padding: .25rem 0 .4rem; }
.roadmap-progress-item-name { flex: 1; font-size: .82rem; overflow-wrap: anywhere; }
.roadmap-progress-editor { margin-top: .35rem; }
.roadmap-progress-list [hidden], .roadmap-progress-editor [hidden] { display: none !important; }
.roadmap-progress-list li { align-items: center; }
.roadmap-progress-item-name { min-width: 0; }
.roadmap-progress-name-field { flex: 1 1 auto; min-width: 120px; }
.roadmap-progress-status-field { flex: 0 0 130px; }
.roadmap-progress-delete { align-items: center; background: transparent; border: 0; border-radius: 50%; color: #667085; cursor: pointer; display: inline-flex; font-size: 1.2rem; height: 1.8rem; justify-content: center; line-height: 1; padding: 0; width: 1.8rem; }
.roadmap-progress-delete:hover { background: #fee4e2; color: #b42318; }
.roadmap-progress-actions { display: flex; justify-content: flex-end; margin-top: .5rem; }
.roadmap-progress-actions button { font-size: .75rem; padding: .4rem .7rem; width: auto; }
.roadmap-progress-edit-actions { display: flex; gap: .4rem; }
.roadmap-progress-new-row { border-bottom: 0 !important; }
.roadmap-progress-new-row input { flex: 1 1 auto; min-width: 120px; }
.workflow-index { max-width: 1200px; }
.workflow-board-list { display: grid; gap: .7rem; }
.workflow-board-card { align-items: center; background: white; border: 1px solid #e0e3e8; border-radius: 10px; display: flex; gap: 1rem; justify-content: space-between; padding: 1rem; }
.workflow-board-card h2 { font-size: 1.1rem; margin: 0 0 .35rem; }
.workflow-board-card h2 a { color: #202124; text-decoration: none; }
.workflow-board-card p { margin: 0; }

@media (max-width: 980px) {
  .workflow-workspace { grid-template-columns: minmax(0, 1fr); }
  .workflow-comments { max-height: none; }
  .workflow-canvas-scroll { height: 65vh; }
}
@media (max-width: 600px) {
  .workflow-page { padding: .65rem; }
  .workflow-header { align-items: flex-start; }
  .workflow-tools { gap: .3rem; }
  .workflow-tools button, .workflow-import-label { font-size: .75rem; padding: .45rem; }
  .workflow-canvas-scroll { height: 58vh; min-height: 360px; }
  .workflow-board-card { align-items: flex-start; flex-direction: column; }
}

/* Amounts share one alignment in editable and approved invoice views. */
.money-value { text-align: right; font-variant-numeric: tabular-nums; }
.invoice-data-summary { margin: .8rem 0; }
.invoice-data-summary > div { display: grid; grid-template-columns: minmax(115px, .75fr) minmax(0, 1.25fr); gap: .8rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.invoice-data-summary dt { color: var(--ink-muted); font-size: .8rem; }
.invoice-data-summary dd { margin: 0; overflow-wrap: anywhere; }
.invoice-note { white-space: pre-wrap; }
.document-budget-allocation { display: flex; justify-content: space-between; gap: .8rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.document-budget-allocation .hint { display: block; }
.document-allocation-amount { display: grid; justify-items: end; gap: .45rem; }
.document-allocation-form { margin-top: .8rem; }
.document-allocation-form summary { cursor: pointer; font-weight: 600; margin-bottom: .8rem; }
.document-allocation-form .budget-form-grid { gap: .65rem; }
.invoice-line-card { border: 1px solid var(--border); border-radius: 8px; margin: .75rem 0; padding: .8rem; }
.invoice-line-card h4 { margin: 0; }
.invoice-line-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); align-items: end; gap: .65rem; }
.invoice-line-fields > div, .invoice-line-fields > label { display: grid; gap: .25rem; min-width: 0; }
.invoice-line-fields input { min-width: 0; width: 100%; }
.invoice-line-preview { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: .8rem; }
.invoice-line-preview-card { background: var(--surface-100); }
.invoice-line-preview-card input { background: white; }
.invoice-line-coding { border-top: 1px solid var(--border); margin-top: .65rem; padding-top: .65rem; }
.invoice-line-codings { display: grid; gap: .35rem; list-style: none; margin: 0 0 .6rem; padding: 0; }
.invoice-line-codings li { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; }
.invoice-line-code-form { align-items: end; display: grid; gap: .45rem; grid-template-columns: minmax(0, 1fr); }
.invoice-line-code-form label { font-size: .8rem; font-weight: 600; }
.invoice-line-code-form select, .invoice-line-code-form input { min-width: 0; width: 100%; }
.invoice-line-code-row { align-items: end; display: grid; gap: .45rem; grid-template-columns: minmax(160px, 1fr) minmax(100px, .45fr); }
.invoice-line-budget-form { margin-top: .65rem; }
.invoice-line-budget-form > summary { color: var(--link, #2457a7); cursor: pointer; font-weight: 600; }
.invoice-line-delete { align-items: center; display: inline-flex; height: 2.25rem; justify-content: center; min-width: 2.25rem; padding: .25rem; }
.budget-line-values { display: grid; gap: .25rem; }
.budget-setup-tab-list { border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.budget-setup-tab { background: transparent; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: var(--ink-muted); cursor: pointer; flex: 1 1 9rem; font: inherit; font-weight: 650; margin-bottom: -1px; padding: .75rem 1rem; }
.budget-setup-tab[aria-selected="true"] { border-bottom-color: var(--link, #2457a7); color: var(--ink); }
.budget-setup-tab:focus-visible { outline: 2px solid var(--link, #2457a7); outline-offset: -2px; }
.budget-setup-tab-panel[hidden] { display: none; }
.budget-setup-tab-panel:focus-visible { outline: 2px solid var(--link, #2457a7); outline-offset: 2px; }
.budget-setup-panel { padding: 1rem 1.15rem; }
.budget-setup-panel-header { align-items: center; display: grid; gap: .75rem 1rem; grid-template-columns: minmax(0, 1fr) auto; }
.budget-setup-panel-header h2 { font-size: 1.2rem; margin: 0; }
.budget-setup-panel-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
.budget-setup-actions { margin-left: auto; position: relative; }
.budget-setup-actions[open] { grid-column: 1 / -1; grid-row: 2; margin-left: 0; }
.budget-setup-actions > summary { cursor: pointer; list-style: none; }
.budget-setup-actions > summary::-webkit-details-marker { display: none; }
.budget-setup-action-form { background: white; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px #1018281a; margin-top: .5rem; padding: .9rem; position: absolute; right: 0; top: 100%; width: min(620px, calc(100vw - 3rem)); z-index: 5; }
.budget-setup-actions > .budget-setup-action-form { box-shadow: none; margin-top: .65rem; position: static; width: auto; }
.budget-setup-actions:not([open]) > .budget-setup-action-form { display: none; }
.budget-segment-form { align-items: end; display: grid; gap: .65rem; grid-template-columns: minmax(180px, 1fr) minmax(100px, .4fr) auto; }
.budget-segment-form > div { display: grid; gap: .25rem; }
.budget-segment-form label, .budget-import-form label { font-size: .82rem; font-weight: 600; }
.budget-segment-form input[type="text"] { height: 2.5rem; padding: .55rem .7rem; }
.budget-segment-form input[type="submit"], .budget-setup-submit input[type="submit"], .budget-import-form input[type="submit"] { justify-self: end; width: auto; }
.budget-setup-table { margin-top: .75rem; }
.budget-table-actions-heading { text-align: right; }
.budget-table-actions { align-items: center; display: flex; gap: .5rem; justify-content: flex-end; }
.budget-table-actions > form { margin: 0; }
.budget-table-actions > form button { padding: .4rem .65rem; width: auto; }
.budget-code-edit-icon { align-items: center; background: transparent; border: 1px solid transparent; border-radius: 5px; color: var(--ink-muted); cursor: pointer; display: inline-flex; height: 2.25rem; justify-content: center; padding: .45rem; width: 2.25rem; }
.budget-code-edit-icon:hover, .budget-code-edit-icon:focus-visible { background: var(--surface-100); border-color: var(--border); color: var(--ink); }
.budget-code-edit-icon svg { fill: none; height: 1.1rem; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; width: 1.1rem; }
.budget-code-edit-dialog { max-height: calc(100vh - 2rem); overflow-y: auto; }
.budget-code-edit-dialog::backdrop { background: #241c1477; backdrop-filter: blur(2px); }
.budget-code-edit-dialog .dialog-heading h2 { font-size: 1.1rem; }
.budget-code-edit-form { margin-top: 1rem; }
.budget-code-edit-fields { display: grid; gap: .8rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.budget-code-edit-fields label { display: grid; font-size: .82rem; font-weight: 600; gap: .3rem; }
.budget-code-edit-fields input, .budget-code-edit-fields select { min-width: 0; width: 100%; }
.budget-code-edit-dialog .dialog-actions { margin-top: 1rem; }
.budget-code-modal-delete { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: .85rem; }
.budget-code-modal-delete input[type="submit"] { background: transparent; border: 0; color: #a83232; cursor: pointer; font: inherit; font-size: .82rem; padding: .25rem; }
.budget-segment-edit-form { align-items: end; display: grid; gap: .65rem; grid-template-columns: minmax(180px, 1fr) minmax(100px, .4fr) auto auto; }
.budget-segment-edit-form > div { display: grid; gap: .25rem; }
.budget-segment-edit-form label { font-size: .82rem; font-weight: 600; }
.budget-segment-edit-form input[type="text"] { height: 2.5rem; padding: .55rem .7rem; }
.budget-segment-edit-form input[type="submit"] { justify-self: end; width: auto; }
.budget-segment-edit-form a { height: 2.5rem; padding: 0 .7rem; }
.budget-segment-edit-delete { display: flex; justify-content: flex-end; margin-top: .55rem; }
.budget-segment-edit-delete form { margin: 0; }
.budget-segment-edit-delete button { background: #a83232; }
.budget-code-table { margin-top: .75rem; }
.budget-code-table th a { color: inherit; display: inline-flex; gap: .25rem; text-decoration: none; }
.budget-code-table th a:hover { text-decoration: underline; }
.budget-code-table th small { color: var(--ink-muted); font-weight: 400; }
.budget-import-dialog { max-width: min(620px, calc(100vw - 2rem)); width: 100%; }
.budget-import-form { display: grid; gap: .7rem; margin-top: 1rem; }
.budget-import-form > label { font-size: .82rem; font-weight: 600; }
.budget-import-file-row { align-items: center; display: flex; flex-wrap: wrap; gap: .55rem; min-width: 0; }
.budget-import-file-row input[type="file"] { flex: 1 1 16rem; min-width: 0; }
.budget-import-template { flex: 0 0 auto; font-size: .8rem; padding: .45rem .65rem; }
.budget-import-form .dialog-actions { border-top: 1px solid var(--border); margin-top: .3rem; padding-top: .85rem; }
.budget-template-list { margin-bottom: 0; padding-left: 1.2rem; }
.budget-template-list > li + li { margin-top: .75rem; }
.budget-template-list ul { color: var(--ink-muted); font-size: .88rem; margin-top: .3rem; }
.budget-setup-submit { display: flex; justify-content: flex-end; }
@media (max-width: 700px) {
  .budget-setup-panel-header { align-items: flex-start; }
  .budget-segment-form { grid-template-columns: 1fr; }
  .budget-segment-edit-form { grid-template-columns: 1fr; }
  .budget-setup-panel-actions { align-items: flex-end; }
  .budget-table-actions { flex-direction: column; align-items: flex-end; }
  .budget-code-edit-fields { grid-template-columns: 1fr; }
}
@media (max-width: 760px) { .invoice-line-code-row { grid-template-columns: 1fr; } }

.budget-code-toolbar{align-items:end;background:var(--surface-muted,#f8f8f6);border:1px solid var(--border-color,var(--border,#ddd));border-radius:.65rem;display:flex;flex-wrap:wrap;gap:.85rem 1.25rem;justify-content:space-between;margin:1rem 0;padding:.8rem 1rem}
.budget-code-status-filter,.budget-code-search{align-items:end;display:flex;gap:.55rem;margin:0}
.budget-code-status-filter label,.budget-code-search label{color:var(--ink-muted);font-size:.82rem;font-weight:600;white-space:nowrap}
.budget-code-status-filter select{min-width:11rem;width:auto}
.budget-code-search input{min-width:16rem;width:min(22rem,35vw)}
.budget-code-search [data-budget-code-list-target="count"]{color:var(--ink-muted);font-size:.82rem;white-space:nowrap}
.budget-template-form-actions{display:flex;align-items:end;gap:.75rem;margin:1rem 0}
.budget-template-form{display:grid;gap:1rem;margin:1rem 0}
.budget-template-row{display:grid;grid-template-columns:repeat(2,minmax(12rem,1fr));gap:.5rem 1rem;padding:1rem;border:1px solid var(--border-color,#ddd);border-radius:.5rem;margin:.75rem 0}
.budget-template-form-actions{justify-content:flex-end}
@media(max-width:700px){.budget-template-row{grid-template-columns:1fr}.budget-code-toolbar{align-items:stretch;flex-direction:column}.budget-code-status-filter,.budget-code-search{align-items:stretch;flex-direction:column}.budget-code-status-filter select,.budget-code-search input{min-width:0;width:100%}}

.budget-code-pagination{display:flex;gap:.6rem;justify-content:flex-end;margin:1rem 0 0}
.budget-code-pagination span{align-self:center;color:var(--ink-muted);font-size:.85rem;min-width:6rem;text-align:center;white-space:nowrap}
.budget-apply-destination{background:var(--surface-muted,#f8f8f6);border-radius:.5rem;margin:0;padding:.7rem .85rem}
.budget-csv-help{align-items:center;display:flex;flex-wrap:wrap;gap:.45rem .75rem;margin-top:.45rem}
.budget-csv-help small{display:block}
.budget-apply-confirm label{align-items:center;display:flex;gap:.5rem}
.budget-apply-confirm input[type="checkbox"]{margin:0;width:auto}

.budget-template-columns{display:flex;flex-wrap:wrap;gap:.75rem 1.25rem;border:0;padding:0;margin:0}
.budget-template-columns legend{font-weight:600;margin-bottom:.4rem}
.budget-template-columns label{display:flex;align-items:center;gap:.35rem}
.budget-template-editor-table{min-width:45rem}
.budget-template-editor-table td select,.budget-template-editor-table td input{min-width:9rem;width:100%}
.budget-template-form-actions{justify-content:flex-end}
.budget-template-details{border-top:1px solid var(--border-color,#ddd);padding:.75rem 0}
.budget-template-details summary{cursor:pointer}
.budget-template-details .table-wrap{margin-top:.75rem}
.budget-template-preview{background:var(--surface-muted,#f8f8f6);border:1px solid var(--border-color,#ddd);border-radius:.65rem;padding:1rem;overflow:hidden}
.budget-template-preview h3{margin-top:0}
.budget-template-preview .table-wrap{max-height:20rem;overflow:auto}
.budget-template-editor-table .budget-template-row{display:table-row;padding:0;border:0;margin:0}
@media(max-width:760px){.budget-template-editor-table{min-width:42rem}}
.invoice-mapping-list { display: grid; gap: .8rem; }
.invoice-mapping-card { background: var(--surface-200); border: 1px solid var(--border); border-radius: 8px; padding: .8rem; }
.invoice-mapping-card h5 { margin: 0; }
.field-rows { display: grid; gap: .85rem; }
.field-row { align-items: start; display: grid; gap: .45rem 1rem; grid-template-columns: minmax(10rem, .8fr) minmax(0, 2fr); }
.field-row > label { font-size: .9rem; font-weight: 600; padding-top: .45rem; }
.field-row input:not([type="checkbox"]), .field-row select, .field-row textarea { box-sizing: border-box; min-width: 0; width: 100%; }
.field-row .hint { margin: .35rem 0 0; }
.field-rows .field-row + .form-actions, .field-rows + .form-actions { display: flex; gap: .5rem; justify-content: flex-end; }
.document-supplier-profile { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 1rem; }
.document-supplier-profile h3 { margin: 0 0 .35rem; }
.document-supplier-profile > .hint { margin-top: 0; }
.document-supplier-form { grid-template-columns: minmax(8rem, .75fr) minmax(0, 1fr) auto; }
.review-create-supplier { margin-top: .75rem; }
.review-create-supplier summary { cursor: pointer; font-weight: 600; }
.review-create-supplier form { margin-top: .75rem; }
.invoice-supplier-identity-note { background: var(--surface-100); border-left: 3px solid var(--accent-primary); padding: .55rem .7rem; }
.bulk-template-controls select[name="supplier_id"] { max-width: 18rem; }
@media (max-width: 640px) {
  .field-row, .document-supplier-form { grid-template-columns: minmax(0, 1fr); }
  .field-row > label { padding-top: 0; }
  .document-supplier-form input[type="submit"] { justify-self: end; width: auto; }
}
.invoice-mapping-field-list { display: grid; gap: .25rem; margin: .55rem 0 0; padding-left: 1.2rem; }
.invoice-mapping-save [hidden] { display: none; }
