/*
 * CheckAway Abrechnung
 *
 * The module deliberately consumes the central CheckAway design tokens and
 * keeps every selector below the accounting namespace. Status meaning must
 * always be present as text in the markup; color is only a secondary cue.
 */

.accounting-page {
  --accounting-surface: var(--surface, #fff);
  --accounting-ink: var(--ink, #1f2933);
  --accounting-muted: var(--muted, #667085);
  --accounting-line: var(--line, #d9dee7);
  --accounting-brand: var(--brand, #95c11e);
  --accounting-brand-dark: var(--brand-dark, #5e7d0c);
  --accounting-soft: var(--soft, #f1f6e5);
  --accounting-success: var(--ok, #1f7a48);
  --accounting-warning: var(--warn, #9a6700);
  --accounting-danger: var(--danger, #b42318);
  color: var(--accounting-ink);
}

.accounting-page *,
.accounting-page *::before,
.accounting-page *::after {
  box-sizing: border-box;
}

.accounting-page [hidden],
.accounting-confirm-dialog [hidden],
.accounting-preview-dialog [hidden] {
  display: none !important;
}

.accounting-page :where(h1, h2, h3, p) {
  overflow-wrap: break-word;
}

.accounting-page > :where(section, article, form) + :where(section, article, form),
.accounting-page .panel > :where(section, article, form) + :where(section, article, form) {
  margin-top: 1.25rem;
}

.accounting-page :where(a, button, input, select, textarea, summary):focus-visible,
.accounting-confirm-dialog :where(button, input, select, textarea):focus-visible,
.accounting-preview-dialog :where(a, button, input):focus-visible {
  outline: 3px solid var(--focus, #3157d5);
  outline-offset: 2px;
}

.accounting-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.accounting-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.accounting-workspace-head h1,
.accounting-workspace-head h2,
.accounting-workspace-head p {
  margin-top: 0;
}

.accounting-workspace-head .accounting-workspace-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
}

[data-accounting-measure-switch]:not(select),
.accounting-measure-switch {
  display: grid;
  min-width: min(24rem, 100%);
  gap: 0.35rem;
  padding: 0.75rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  background: var(--accounting-surface);
}

[data-accounting-measure-switch]:not(select) label,
.accounting-measure-switch label {
  margin: 0;
  color: var(--accounting-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

[data-accounting-measure-switch]:not(select) select,
.accounting-page select[data-accounting-measure-switch],
.accounting-measure-switch select {
  width: 100%;
  min-width: 0;
}

.accounting-context {
  padding: 0.85rem 1rem;
}

.accounting-measure-switcher {
  display: grid;
  grid-template-columns: minmax(14rem, 28rem) auto;
  align-items: end;
  gap: 0.75rem;
  margin: 0;
}

.accounting-measure-switcher label {
  margin: 0;
}

.accounting-measure-switcher .measure-switcher-status:empty {
  display: none;
}

.accounting-tabs {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  padding: 0.3rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  border: 1px solid var(--accounting-line);
  border-radius: 0.85rem;
  background: var(--accounting-surface);
}

.accounting-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.55rem 0.85rem;
  flex: 0 0 auto;
  border: 2px solid transparent;
  border-radius: 0.65rem;
  color: var(--accounting-ink);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.accounting-tabs a:hover,
.accounting-tabs a:focus-visible {
  background: var(--accounting-soft);
}

.accounting-tabs a[aria-current="page"] {
  border-color: var(--accounting-brand-dark);
  background: var(--accounting-soft);
  color: var(--accounting-brand-dark);
}

.accounting-tabs .accounting-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  min-height: 1.55rem;
  margin-left: 0.45rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--bg, #f6f7f9);
  color: var(--accounting-ink);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.accounting-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.25rem;
}

.accounting-summary-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.85rem;
  background: var(--accounting-surface);
  box-shadow: 0 0.15rem 0.5rem rgb(16 24 40 / 5%);
}

.accounting-summary-card dt,
.accounting-summary-card .accounting-summary-label {
  color: var(--accounting-muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.accounting-summary-card dd,
.accounting-summary-card .accounting-summary-value {
  margin: 0.35rem 0 0;
  color: var(--accounting-ink);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.accounting-summary-card p {
  margin: 0.45rem 0 0;
  color: var(--accounting-muted);
  font-size: 0.86rem;
}

.accounting-money,
.accounting-number,
.accounting-table .accounting-money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.accounting-money.is-negative {
  color: var(--accounting-danger);
}

.accounting-filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.accounting-filter-bar .accounting-filter-wide {
  grid-column: span 2;
}

.accounting-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.accounting-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.accounting-section-head > :first-child {
  min-width: 0;
}

.accounting-section-head h2,
.accounting-section-head h3,
.accounting-section-head p {
  margin-top: 0;
}

.accounting-section-head p:last-child {
  margin-bottom: 0;
}

.accounting-responsive-list {
  min-width: 0;
}

.accounting-table-view {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--accounting-line);
  border-radius: 0.8rem;
  background: var(--accounting-surface);
}

.accounting-table {
  width: max-content;
  min-width: 100%;
  max-width: none;
  border-collapse: collapse;
}

.accounting-table th,
.accounting-table td {
  min-width: 7.5rem;
  max-width: 24rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--accounting-line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
}

.accounting-table th {
  position: relative;
  background: var(--bg, #f6f7f9);
  color: var(--accounting-muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.accounting-table tbody tr:last-child td {
  border-bottom: 0;
}

.accounting-table tbody tr:hover {
  background: color-mix(in srgb, var(--accounting-soft) 55%, transparent);
}

.accounting-table tr.is-selected {
  box-shadow: inset 4px 0 0 var(--accounting-brand-dark);
  background: var(--accounting-soft);
}

.accounting-table .accounting-row-primary {
  display: block;
  color: var(--accounting-ink);
  font-weight: 700;
}

.accounting-table .accounting-row-secondary {
  display: block;
  margin-top: 0.2rem;
  color: var(--accounting-muted);
  font-size: 0.82rem;
}

.accounting-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.accounting-card-view {
  display: none;
}

.accounting-card-grid,
.accounting-receipt-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}

.accounting-record-card,
.accounting-receipt-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.72rem;
  border: 1px solid var(--accounting-line);
  border-left: 5px solid var(--accounting-muted);
  border-radius: 0.85rem;
  background: var(--accounting-surface);
  box-shadow: 0 0.15rem 0.5rem rgb(16 24 40 / 5%);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.accounting-record-card:hover,
.accounting-record-card:focus-within,
.accounting-receipt-card:hover,
.accounting-receipt-card:focus-within {
  border-color: color-mix(in srgb, var(--accounting-brand-dark) 48%, var(--accounting-line));
  box-shadow: 0 0.5rem 1.2rem rgb(16 24 40 / 11%);
  transform: translateY(-2px);
}

.accounting-receipt-card:has(.accounting-card-more[open]) {
  z-index: 40;
  transform: none;
}

.accounting-receipt-card-choice {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.accounting-receipt-card-choice input[type="checkbox"] {
  flex: 0 0 2.25rem;
  height: 2.25rem;
  margin: 0;
  min-height: 0;
  padding: 0;
  width: 2.25rem;
}

.accounting-receipt-bulk-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.7rem;
  background: var(--accounting-surface);
}

.accounting-receipt-bulk-actions > span {
  color: var(--accounting-muted);
}

.accounting-receipt-bulk-actions > button {
  margin-left: auto;
}

.accounting-receipt-attention {
  margin-bottom: 0;
}

.accounting-record-card[data-tone="success"],
.accounting-receipt-card[data-tone="success"] {
  border-left-color: var(--accounting-success);
}

.accounting-record-card[data-tone="warning"],
.accounting-receipt-card[data-tone="warning"] {
  border-left-color: var(--accounting-warning);
}

.accounting-record-card[data-tone="danger"],
.accounting-receipt-card[data-tone="danger"] {
  border-left-color: var(--accounting-danger);
}

.accounting-record-card[data-tone="info"],
.accounting-receipt-card[data-tone="info"] {
  border-left-color: var(--focus, #3157d5);
}

.accounting-record-card > header,
.accounting-receipt-card > header,
.accounting-receipt-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.accounting-receipt-card > .accounting-receipt-card-head {
  display: grid;
  grid-template-columns: 7.75rem minmax(0, 1fr) auto;
}

.accounting-receipt-card-title {
  min-width: 0;
}

.accounting-receipt-card-head > .accounting-status {
  justify-self: end;
}

.accounting-record-card h2,
.accounting-record-card h3,
.accounting-record-card p,
.accounting-receipt-card h2,
.accounting-receipt-card h3,
.accounting-receipt-card p {
  margin-top: 0;
}

.accounting-record-card h2,
.accounting-record-card h3,
.accounting-receipt-card h2,
.accounting-receipt-card h3 {
  margin-bottom: 0.2rem;
  overflow-wrap: anywhere;
}

.accounting-card-eyebrow {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--accounting-muted);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.accounting-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
}

.accounting-receipt-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
}

.accounting-fact-grid > div,
.accounting-receipt-card-facts > div {
  min-width: 0;
  padding: 0.52rem;
  border-radius: 0.6rem;
  background: var(--bg, #f6f7f9);
}

.accounting-fact-grid dt,
.accounting-receipt-card-facts dt {
  color: var(--accounting-muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.accounting-fact-grid dd,
.accounting-receipt-card-facts dd {
  margin: 0.2rem 0 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.accounting-record-card > footer,
.accounting-receipt-card > footer,
.accounting-receipt-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px solid var(--accounting-line);
}

.accounting-receipt-card > .accounting-receipt-card-footer {
  align-items: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14rem;
}

.accounting-receipt-card-footer > small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.accounting-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.accounting-receipt-card-actions {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  width: 100%;
}

.accounting-receipt-card-actions > .button,
.accounting-receipt-card-actions > .accounting-card-more {
  min-width: 0;
  width: 100%;
}

.accounting-receipt-card-actions > .accounting-card-more > summary {
  width: 100%;
  justify-content: center;
}

.accounting-receipt-number {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 1.8rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--accounting-soft);
  color: var(--accounting-brand-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.accounting-card-more {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.accounting-card-more > summary {
  display: inline-flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.6rem;
  background: var(--accounting-surface);
  color: var(--accounting-ink);
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.accounting-card-more > summary::-webkit-details-marker {
  display: none;
}

.accounting-card-more > summary::after {
  content: "⋯";
  color: var(--accounting-muted);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.accounting-card-more[open] > summary,
.accounting-card-more > summary:hover {
  border-color: color-mix(in srgb, var(--accounting-brand-dark) 52%, var(--accounting-line));
  background: var(--accounting-soft);
}

.accounting-card-more > :is(.accounting-card-actions, .accounting-card-menu) {
  box-sizing: border-box;
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
  max-width: none;
  min-width: 0;
  padding: 0.45rem;
  position: static;
  width: 100%;
  border: 1px solid var(--accounting-line);
  border-radius: 0.7rem;
  background: var(--accounting-surface);
  box-shadow: 0 0.8rem 2rem rgb(16 24 40 / 18%);
}

.accounting-card-more > :is(.accounting-card-actions, .accounting-card-menu) :is(a, button) {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.accounting-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.34rem 0.58rem;
  border: 1px solid var(--accounting-line);
  border-radius: 999px;
  background: var(--bg, #f6f7f9);
  color: var(--accounting-ink);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.accounting-status::before {
  content: "•";
  flex: 0 0 auto;
  color: var(--accounting-muted);
  font-size: 1.15em;
  line-height: 1;
}

.accounting-status[data-tone="success"] {
  border-color: color-mix(in srgb, var(--accounting-success) 45%, var(--accounting-line));
  background: color-mix(in srgb, var(--accounting-success) 10%, white);
}

.accounting-status[data-tone="success"]::before {
  content: "✓";
  color: var(--accounting-success);
}

.accounting-status[data-tone="warning"] {
  border-color: color-mix(in srgb, var(--accounting-warning) 45%, var(--accounting-line));
  background: color-mix(in srgb, var(--accounting-warning) 10%, white);
}

.accounting-status[data-tone="warning"]::before {
  content: "!";
  color: var(--accounting-warning);
}

.accounting-status[data-tone="danger"] {
  border-color: color-mix(in srgb, var(--accounting-danger) 45%, var(--accounting-line));
  background: color-mix(in srgb, var(--accounting-danger) 9%, white);
}

.accounting-status[data-tone="danger"]::before {
  content: "×";
  color: var(--accounting-danger);
}

.accounting-status[data-tone="info"] {
  border-color: color-mix(in srgb, var(--focus, #3157d5) 40%, var(--accounting-line));
  background: color-mix(in srgb, var(--focus, #3157d5) 8%, white);
}

.accounting-status[data-tone="info"]::before {
  content: "i";
  color: var(--focus, #3157d5);
}

.accounting-status-explanation {
  margin: 0.35rem 0 0;
  color: var(--accounting-muted);
  font-size: 0.84rem;
}

.accounting-split-editor {
  display: grid;
  gap: 0.8rem;
}

.accounting-money-field > span:not(.required-marker) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  width: 100%;
}

.accounting-money-field > span:not(.required-marker) > input {
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.accounting-money-field > span:not(.required-marker) > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--accounting-line);
  border-left: 0;
  border-radius: 0 0.55rem 0.55rem 0;
  background: var(--bg, #f6f7f9);
  color: var(--accounting-muted);
  font-weight: 750;
}

.accounting-disclosure,
.accounting-simplified-mileage,
.accounting-deposit-breakdown,
.accounting-deposit-transfer-create,
details[data-accounting-manual-deposit],
details[data-accounting-travel-details],
details[data-accounting-foreign-currency],
details[data-accounting-split-details],
details[data-accounting-split-allocation] {
  overflow: clip;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  background: var(--accounting-surface);
}

.accounting-disclosure > summary,
.accounting-simplified-mileage > summary,
.accounting-deposit-breakdown > summary,
.accounting-deposit-transfer-create > summary,
details[data-accounting-manual-deposit] > summary,
details[data-accounting-travel-details] > summary,
details[data-accounting-foreign-currency] > summary,
details[data-accounting-split-details] > summary,
details[data-accounting-split-allocation] > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
  color: var(--accounting-ink);
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.accounting-disclosure > summary::-webkit-details-marker,
.accounting-simplified-mileage > summary::-webkit-details-marker,
.accounting-deposit-breakdown > summary::-webkit-details-marker,
.accounting-deposit-transfer-create > summary::-webkit-details-marker,
details[data-accounting-manual-deposit] > summary::-webkit-details-marker,
details[data-accounting-travel-details] > summary::-webkit-details-marker,
details[data-accounting-foreign-currency] > summary::-webkit-details-marker,
details[data-accounting-split-details] > summary::-webkit-details-marker,
details[data-accounting-split-allocation] > summary::-webkit-details-marker {
  display: none;
}

.accounting-disclosure > summary::after,
.accounting-simplified-mileage > summary::after,
.accounting-deposit-breakdown > summary::after,
.accounting-deposit-transfer-create > summary::after,
details[data-accounting-manual-deposit] > summary::after,
details[data-accounting-travel-details] > summary::after,
details[data-accounting-foreign-currency] > summary::after,
details[data-accounting-split-details] > summary::after,
details[data-accounting-split-allocation] > summary::after {
  content: "▾";
  flex: 0 0 auto;
  transition: transform 160ms ease;
}

.accounting-disclosure[open] > summary::after,
.accounting-simplified-mileage[open] > summary::after,
.accounting-deposit-breakdown[open] > summary::after,
.accounting-deposit-transfer-create[open] > summary::after,
details[data-accounting-manual-deposit][open] > summary::after,
details[data-accounting-travel-details][open] > summary::after,
details[data-accounting-foreign-currency][open] > summary::after,
details[data-accounting-split-details][open] > summary::after,
details[data-accounting-split-allocation][open] > summary::after {
  transform: rotate(180deg);
}

.accounting-disclosure[open] > summary,
.accounting-simplified-mileage[open] > summary,
.accounting-deposit-breakdown[open] > summary,
.accounting-deposit-transfer-create[open] > summary,
details[data-accounting-manual-deposit][open] > summary,
details[data-accounting-travel-details][open] > summary,
details[data-accounting-foreign-currency][open] > summary,
details[data-accounting-split-details][open] > summary,
details[data-accounting-split-allocation][open] > summary {
  border-bottom: 1px solid var(--accounting-line);
  background: var(--bg, #f6f7f9);
}

.accounting-disclosure > :not(summary),
.accounting-simplified-mileage > :not(summary),
.accounting-deposit-breakdown > :not(summary),
.accounting-deposit-transfer-create > :not(summary),
details[data-accounting-manual-deposit] > :not(summary),
details[data-accounting-travel-details] > :not(summary),
details[data-accounting-foreign-currency] > :not(summary),
details[data-accounting-split-details] > :not(summary),
details[data-accounting-split-allocation] > :not(summary) {
  margin-right: 0.9rem;
  margin-left: 0.9rem;
}

.accounting-disclosure > :nth-child(2),
.accounting-simplified-mileage > :nth-child(2),
.accounting-deposit-breakdown > :nth-child(2),
.accounting-deposit-transfer-create > :nth-child(2),
details[data-accounting-manual-deposit] > :nth-child(2),
details[data-accounting-travel-details] > :nth-child(2),
details[data-accounting-foreign-currency] > :nth-child(2),
details[data-accounting-split-details] > :nth-child(2),
details[data-accounting-split-allocation] > :nth-child(2) {
  margin-top: 0.9rem;
}

.accounting-disclosure > :last-child,
.accounting-simplified-mileage > :last-child,
.accounting-deposit-breakdown > :last-child,
.accounting-deposit-transfer-create > :last-child,
details[data-accounting-manual-deposit] > :last-child,
details[data-accounting-travel-details] > :last-child,
details[data-accounting-foreign-currency] > :last-child,
details[data-accounting-split-details] > :last-child,
details[data-accounting-split-allocation] > :last-child {
  margin-bottom: 0.9rem;
}

.accounting-split-allocation-summary {
  align-items: flex-start;
}

.accounting-split-allocation-title {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.accounting-split-allocation-title h2 {
  margin: 0;
}

.accounting-split-allocation-summary small {
  color: var(--accounting-muted);
  font-weight: 500;
  line-height: 1.4;
}

[data-accounting-split-primary] {
  padding: 0.85rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  background: var(--accounting-surface);
}

[data-accounting-split-advanced] {
  display: grid;
  gap: 0.65rem;
}

.accounting-split-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 16rem);
  align-items: end;
  gap: 1rem;
  padding: 0.9rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  background: var(--bg, #f6f7f9);
}

.accounting-split-rows {
  display: grid;
  gap: 0.55rem;
}

.accounting-split-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(8rem, 0.65fr) auto;
  align-items: end;
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.7rem;
  background: var(--accounting-surface);
}

.accounting-split-remainder {
  display: flex;
  align-items: center;
  min-height: 2.6rem;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.65rem;
  background: var(--bg, #f6f7f9);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.accounting-split-remainder[data-state="balanced"] {
  border-color: var(--accounting-success);
  background: color-mix(in srgb, var(--accounting-success) 9%, white);
  color: var(--accounting-success);
}

.accounting-split-remainder[data-state="open"] {
  border-color: var(--accounting-warning);
  background: color-mix(in srgb, var(--accounting-warning) 9%, white);
}

.accounting-split-remainder[data-state="over"],
.accounting-split-remainder[data-state="invalid"] {
  border-color: var(--accounting-danger);
  background: color-mix(in srgb, var(--accounting-danger) 8%, white);
  color: var(--accounting-danger);
}

.accounting-step-list,
[data-accounting-step-list] {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.15rem;
  padding: 0;
  list-style: none;
}

.accounting-step-list > *,
[data-accounting-step-list] > * {
  min-width: 0;
}

.accounting-step-indicator,
[data-accounting-step-list] [data-accounting-step-target] {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 0.7rem;
  width: 100%;
  min-height: 3.55rem;
  height: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.9rem;
  background:
    linear-gradient(145deg, var(--accounting-surface) 58%, color-mix(in srgb, var(--accounting-soft) 58%, white));
  color: var(--accounting-ink);
  box-shadow: 0 0.18rem 0.55rem rgb(16 24 40 / 5%);
  font-weight: 720;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.accounting-step-indicator:hover,
[data-accounting-step-list] [data-accounting-step-target]:hover {
  border-color: color-mix(in srgb, var(--accounting-brand-dark) 52%, var(--accounting-line));
  box-shadow: 0 0.3rem 0.8rem rgb(16 24 40 / 9%);
  transform: translateY(-1px);
}

.accounting-step-indicator::before,
[data-accounting-step-list] [data-accounting-step-target]::before {
  content: attr(data-accounting-step-number);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  flex: 0 0 1.7rem;
  border: 2px solid color-mix(in srgb, var(--accounting-brand-dark) 42%, var(--accounting-line));
  border-radius: 50%;
  background: var(--accounting-surface);
  color: var(--accounting-brand-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.accounting-step-indicator small,
[data-accounting-step-list] [data-accounting-step-target] small {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  margin-left: auto;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accounting-muted) 10%, white);
  color: var(--accounting-muted);
  font-size: 0.68rem;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

.accounting-step-indicator[aria-current="step"],
[data-accounting-step-list] [data-accounting-step-target][aria-current="step"] {
  border-color: color-mix(in srgb, var(--accounting-brand-dark) 78%, var(--accounting-line));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accounting-soft) 62%, white), var(--accounting-soft));
  color: var(--accounting-brand-dark);
  font-weight: 750;
  box-shadow: 0 0.28rem 0.85rem color-mix(in srgb, var(--accounting-brand) 20%, transparent);
}

.accounting-step-indicator[aria-current="step"]::before,
[data-accounting-step-list] [data-accounting-step-target][aria-current="step"]::before {
  border-color: var(--accounting-brand-dark);
  background: var(--accounting-brand-dark);
  color: white;
}

.accounting-step-indicator[data-state="complete"]::before,
[data-accounting-step-list] [data-accounting-step-target][data-state="complete"]::before {
  content: "✓";
  border-color: var(--accounting-success);
  background: var(--accounting-success);
  color: white;
}

[data-accounting-step] {
  min-width: 0;
}

.accounting-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.accounting-travel-mode,
[data-accounting-travel-mode]:not(input):not(select) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
}

.accounting-travel-mode > label,
[data-accounting-travel-mode]:not(input):not(select) > label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  min-height: 3.25rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  background: var(--accounting-surface);
  cursor: pointer;
}

.accounting-travel-mode > label:has(:checked),
[data-accounting-travel-mode]:not(input):not(select) > label:has(:checked) {
  border-color: var(--accounting-brand-dark);
  background: var(--accounting-soft);
  color: var(--accounting-brand-dark);
}

[data-accounting-travel-mode-panel] {
  min-width: 0;
}

.accounting-trip {
  min-width: 0;
  margin: 0;
  padding: 0.8rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  background: var(--accounting-surface);
}

.accounting-trip + .accounting-trip {
  margin-top: 0.65rem;
}

.accounting-trip > legend {
  max-width: 100%;
  padding: 0 0.3rem;
  font-weight: 800;
}

.accounting-upload {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 2px dashed var(--accounting-line);
  border-radius: 0.85rem;
  background: var(--bg, #f6f7f9);
}

.accounting-upload:focus-within {
  border-color: var(--focus, #3157d5);
}

.accounting-upload-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.accounting-upload-help,
.accounting-file-summary {
  margin: 0;
  color: var(--accounting-muted);
  font-size: 0.86rem;
}

.accounting-file-summary {
  color: var(--accounting-ink);
  font-weight: 650;
}

.accounting-upload progress {
  width: min(28rem, 100%);
  min-height: 0.75rem;
}

.accounting-upload .info-text {
  color: var(--accounting-ink);
}

.accounting-upload .success-text {
  color: var(--accounting-success);
  font-weight: 650;
}

.accounting-upload .warning-text {
  color: var(--accounting-warning);
  font-weight: 650;
}

.accounting-upload .error-text {
  color: var(--accounting-danger);
  font-weight: 650;
}

.accounting-file-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.accounting-file-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.2rem;
  padding: 0.75rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.7rem;
  background: var(--panel, #fff);
}

.accounting-file-card a {
  font-weight: 750;
}

.accounting-file-card span {
  grid-column: 1;
  color: var(--accounting-muted);
  font-size: 0.86rem;
}

.accounting-file-card .accounting-file-remove {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.accounting-entry-mode-choice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 2rem;
  row-gap: 0.65rem;
}

.accounting-entry-mode-choice > .check-row {
  flex: 0 1 auto;
}

.accounting-rate-settings {
  align-items: start;
}

.accounting-rate-settings > label {
  align-content: start;
}

.accounting-receipt-details {
  display: grid;
  gap: 0.85rem;
}

[data-accounting-manual-deposit] .accounting-split-row {
  padding: 0.65rem;
}

.accounting-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.accounting-document-preview {
  min-height: 26rem;
  overflow: hidden;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  background: var(--bg, #f6f7f9);
}

.accounting-document-preview iframe,
.accounting-document-preview img,
.accounting-document-preview object {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 26rem;
  border: 0;
  object-fit: contain;
}

.accounting-job {
  position: relative;
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  background: var(--accounting-surface);
}

.accounting-job-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.accounting-job-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}

.accounting-job-status::before {
  content: "•";
  color: var(--accounting-muted);
}

.accounting-job-status[data-state="queued"]::before,
.accounting-job-status[data-state="pending"]::before {
  content: "…";
  color: var(--accounting-warning);
}

.accounting-job-status[data-state="processing"]::before,
.accounting-job-status[data-state="running"]::before,
.accounting-job-status[data-state="generating"]::before,
.accounting-job-status[data-state="retry"]::before,
.accounting-job-status[data-state="retrying"]::before {
  content: "↻";
  color: var(--focus, #3157d5);
}

.accounting-job-status[data-state="completed"]::before,
.accounting-job-status[data-state="complete"]::before,
.accounting-job-status[data-state="ready"]::before,
.accounting-job-status[data-state="succeeded"]::before {
  content: "✓";
  color: var(--accounting-success);
}

.accounting-job-status[data-state="failed"]::before,
.accounting-job-status[data-state="cancelled"]::before,
.accounting-job-status[data-state="expired"]::before {
  content: "!";
  color: var(--accounting-danger);
}

.accounting-job-message {
  margin: 0;
  color: var(--accounting-muted);
}

.accounting-job progress {
  width: 100%;
  height: 0.7rem;
  accent-color: var(--accounting-brand-dark);
}

.accounting-job[data-state="completed"] progress,
.accounting-job[data-state="complete"] progress,
.accounting-job[data-state="ready"] progress,
.accounting-job[data-state="succeeded"] progress,
.accounting-job[data-state="manual_review"] progress,
.accounting-job[data-state="failed"] progress,
.accounting-job[data-state="cancelled"] progress,
.accounting-job[data-state="expired"] progress,
[data-accounting-export][data-job-state="completed"] progress,
[data-accounting-export][data-job-state="complete"] progress,
[data-accounting-export][data-job-state="ready"] progress,
[data-accounting-export][data-job-state="succeeded"] progress,
[data-accounting-export-card][data-job-state="completed"] progress,
[data-accounting-export-card][data-job-state="complete"] progress,
[data-accounting-export-card][data-job-state="ready"] progress,
[data-accounting-export-card][data-job-state="succeeded"] progress {
  display: none;
}

.accounting-job-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.accounting-skeleton {
  display: grid;
  gap: 0.55rem;
}

.accounting-skeleton-line {
  position: relative;
  min-height: 0.8rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--accounting-line);
}

.accounting-skeleton-line:nth-child(2) {
  width: 82%;
}

.accounting-skeleton-line:nth-child(3) {
  width: 64%;
}

.accounting-skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 70%), transparent);
  animation: accounting-skeleton-pulse 1.4s ease-in-out infinite;
}

@keyframes accounting-skeleton-pulse {
  to {
    transform: translateX(100%);
  }
}

.accounting-export-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.8rem;
  background: var(--accounting-surface);
}

.accounting-export-card[data-expiry-state="expiring"] {
  border-color: var(--accounting-warning);
}

.accounting-export-card[data-expiry-state="expired"] {
  border-color: var(--accounting-danger);
  background: color-mix(in srgb, var(--accounting-danger) 4%, white);
}

.accounting-export-card[data-job-state="completed"],
.accounting-export-card[data-job-state="complete"],
.accounting-export-card[data-job-state="ready"],
.accounting-export-card[data-job-state="succeeded"],
[data-accounting-export-card][data-job-state="completed"],
[data-accounting-export-card][data-job-state="complete"],
[data-accounting-export-card][data-job-state="ready"],
[data-accounting-export-card][data-job-state="succeeded"] {
  border-color: color-mix(in srgb, var(--accounting-success) 45%, var(--accounting-line));
}

.accounting-export-countdown {
  color: var(--accounting-muted);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.accounting-export-card[data-expiry-state="expiring"] .accounting-export-countdown {
  color: var(--accounting-warning);
}

.accounting-export-card[data-expiry-state="expired"] .accounting-export-countdown {
  color: var(--accounting-danger);
}

.accounting-page a.is-disabled,
.accounting-page [aria-disabled="true"],
.accounting-confirm-dialog [aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
  pointer-events: none;
}

.accounting-question-thread {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.accounting-question {
  padding: 0.8rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.7rem;
  background: var(--accounting-surface);
}

.accounting-question[data-visibility="internal"] {
  border-left: 5px solid var(--accounting-warning);
  background: color-mix(in srgb, var(--accounting-warning) 5%, white);
}

.accounting-question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  color: var(--accounting-muted);
  font-size: 0.8rem;
}

.accounting-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.accounting-timeline > li {
  position: relative;
  padding: 0 0 1rem 1.65rem;
}

.accounting-timeline > li::before {
  content: "";
  position: absolute;
  top: 0.28rem;
  left: 0.25rem;
  width: 0.65rem;
  height: 0.65rem;
  border: 2px solid var(--accounting-brand-dark);
  border-radius: 50%;
  background: var(--accounting-surface);
}

.accounting-timeline > li::after {
  content: "";
  position: absolute;
  top: 1rem;
  bottom: 0;
  left: 0.55rem;
  width: 1px;
  background: var(--accounting-line);
}

.accounting-timeline > li:last-child::after {
  display: none;
}

.accounting-timeline time {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--accounting-muted);
  font-size: 0.8rem;
}

.accounting-empty-state {
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px dashed var(--accounting-line);
  border-radius: 0.85rem;
  background: var(--bg, #f6f7f9);
  text-align: center;
}

.accounting-empty-state h2,
.accounting-empty-state h3,
.accounting-empty-state p {
  margin-top: 0;
}

.accounting-empty-state p {
  color: var(--accounting-muted);
}

.accounting-hold-notice,
.accounting-self-review-notice,
.accounting-sensitive-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--accounting-warning);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--accounting-warning) 8%, white);
}

.accounting-hold-notice::before,
.accounting-self-review-notice::before,
.accounting-sensitive-notice::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  flex: 0 0 1.6rem;
  border-radius: 50%;
  background: var(--accounting-warning);
  color: white;
  font-weight: 800;
}

.accounting-sensitive-notice {
  border-color: var(--accounting-danger);
  background: color-mix(in srgb, var(--accounting-danger) 6%, white);
}

.accounting-sensitive-notice::before {
  background: var(--accounting-danger);
}

.accounting-deposit-summary,
[data-accounting-deposit-balance] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem 0.8rem;
  margin: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--accounting-line);
  border-left: 5px solid var(--accounting-warning);
  border-radius: 0.8rem;
  background: var(--accounting-surface);
}

.accounting-deposit-summary[data-state="balanced"],
[data-accounting-deposit-balance][data-state="balanced"] {
  border-left-color: var(--accounting-success);
  background: color-mix(in srgb, var(--accounting-success) 5%, white);
}

.accounting-deposit-summary[data-state="negative"],
[data-accounting-deposit-balance][data-state="negative"] {
  border-left-color: var(--focus, #3157d5);
  background: color-mix(in srgb, var(--focus, #3157d5) 4%, white);
}

.accounting-deposit-summary :where(h2, h3, p),
[data-accounting-deposit-balance] :where(h2, h3, p) {
  margin: 0;
}

.accounting-deposit-amount,
[data-accounting-deposit-amount] {
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.accounting-deposit-ledger,
[data-accounting-deposit-ledger] {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  list-style: none;
}

.accounting-deposit-ledger > li,
[data-accounting-deposit-ledger] > li {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(8rem, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--accounting-line);
}

.accounting-deposit-ledger > li:last-child,
[data-accounting-deposit-ledger] > li:last-child {
  border-bottom: 0;
}

.accounting-deposit-transfer,
[data-accounting-deposit-transfer] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(8rem, 0.7fr);
  align-items: end;
  gap: 0.75rem;
}

.accounting-deposit-transfer .accounting-filter-wide,
[data-accounting-deposit-transfer] .accounting-filter-wide {
  grid-column: 1 / -1;
}

.accounting-deposit-transfers-panel {
  display: grid;
  gap: 0.7rem;
}

.accounting-deposit-transfer-form[data-accounting-deposit-transfer] {
  display: block;
}

.accounting-deposit-balance .accounting-details {
  grid-column: 1 / -1;
  margin: 0;
}

.accounting-deposit-balance > .muted {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.82rem;
}

.accounting-confirm-dialog {
  width: min(34rem, calc(100vw - 2rem));
  max-height: min(42rem, calc(100vh - 2rem));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0.9rem;
  background: var(--surface, #fff);
  color: var(--ink, #1f2933);
  box-shadow: 0 1.5rem 4rem rgb(16 24 40 / 30%);
}

.accounting-confirm-dialog::backdrop {
  background: rgb(16 24 40 / 58%);
}

.accounting-confirm-dialog.is-fallback-open {
  position: fixed;
  z-index: 10000;
  inset: 50% auto auto 50%;
  display: block;
  transform: translate(-50%, -50%);
}

.accounting-dialog-open::before {
  content: "";
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgb(16 24 40 / 58%);
}

.accounting-confirm-dialog-panel {
  display: grid;
  max-height: inherit;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.accounting-confirm-dialog-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line, #d9dee7);
}

.accounting-confirm-dialog-panel > header h2,
.accounting-confirm-dialog-panel > header p {
  margin: 0;
}

.accounting-confirm-dialog-panel > header .eyebrow {
  margin-bottom: 0.2rem;
  color: var(--muted, #667085);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.accounting-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line, #d9dee7);
  border-radius: 50%;
  background: var(--surface, #fff);
  color: var(--ink, #1f2933);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.accounting-confirm-dialog-body {
  overflow-y: auto;
  padding: 1.1rem;
}

.accounting-confirm-dialog-body p:first-child {
  margin-top: 0;
}

.accounting-confirm-amount {
  padding: 0.8rem;
  border: 1px solid var(--line, #d9dee7);
  border-radius: 0.65rem;
  background: var(--bg, #f6f7f9);
  font-size: 1.15rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.accounting-confirm-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--line, #d9dee7);
  background: var(--bg, #f6f7f9);
}

.accounting-ocr-suggestions {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--accounting-info) 4%, white);
}

.accounting-ocr-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
}

.accounting-ocr-field {
  display: grid;
  align-content: start;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--accounting-line);
  border-left-width: 0.3rem;
  border-radius: 0.75rem;
  background: var(--accounting-surface);
}

.accounting-ocr-field[data-confidence="high"] {
  border-left-color: var(--accounting-success);
}

.accounting-ocr-field[data-confidence="medium"] {
  border-left-color: var(--accounting-warning);
}

.accounting-ocr-field[data-confidence="low"] {
  border-left-color: var(--accounting-danger);
}

.accounting-ocr-field > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.accounting-ocr-field-status,
[data-accounting-ocr-field-status] {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.25rem 0.48rem;
  border-radius: 999px;
  background: var(--bg, #f6f7f9);
  color: var(--accounting-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: normal;
  word-break: normal;
}

.accounting-ocr-field[data-confidence="high"] .accounting-ocr-field-status,
.accounting-ocr-field[data-confidence="high"] [data-accounting-ocr-field-status] {
  color: var(--accounting-success);
}

.accounting-ocr-field[data-confidence="medium"] .accounting-ocr-field-status,
.accounting-ocr-field[data-confidence="medium"] [data-accounting-ocr-field-status] {
  color: var(--accounting-warning);
}

.accounting-ocr-field[data-confidence="low"] .accounting-ocr-field-status,
.accounting-ocr-field[data-confidence="low"] [data-accounting-ocr-field-status] {
  color: var(--accounting-danger);
}

.accounting-ocr-field p {
  margin: 0;
  overflow-wrap: break-word;
  font-size: 1.05rem;
  font-weight: 700;
}

.accounting-ocr-applied {
  outline: 0.2rem solid color-mix(in srgb, var(--accounting-success) 55%, transparent);
  outline-offset: 0.1rem;
}

.accounting-preview-dialog {
  --accounting-surface: var(--surface, #fff);
  --accounting-ink: var(--ink, #1f2933);
  --accounting-muted: var(--muted, #667085);
  --accounting-line: var(--line, #d9dee7);
  --accounting-brand: var(--brand, #95c11e);
  --accounting-brand-dark: var(--brand-dark, #5e7d0c);
  --accounting-soft: var(--soft, #f1f6e5);
  --accounting-success: var(--ok, #1f7a48);
  --accounting-warning: var(--warn, #9a6700);
  --accounting-danger: var(--danger, #b42318);
  width: min(92rem, calc(100vw - 2rem));
  height: min(58rem, calc(100vh - 2rem));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0.9rem;
  background: var(--surface, #fff);
  color: var(--ink, #1f2933);
  box-shadow: 0 1.5rem 4rem rgb(16 24 40 / 30%);
}

.accounting-preview-dialog::backdrop {
  background: rgb(16 24 40 / 68%);
}

.accounting-preview-dialog.is-fallback-open {
  position: fixed;
  z-index: 10000;
  inset: 50% auto auto 50%;
  display: block;
  transform: translate(-50%, -50%);
}

.accounting-preview-shell {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.accounting-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--accounting-line);
}

.accounting-preview-head h2,
.accounting-preview-head p {
  margin: 0;
}

.accounting-preview-head .eyebrow {
  margin-bottom: 0.15rem;
  color: var(--accounting-muted);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.accounting-preview-head-actions,
.accounting-preview-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.accounting-preview-toolbar {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--accounting-line);
  background: var(--bg, #f6f7f9);
}

.accounting-preview-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.accounting-preview-toolbar input {
  width: 4.5rem;
  min-height: 2rem;
}

.accounting-browser-analysis-controls {
  display: flex;
  flex: 1 0 100%;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.accounting-browser-analysis-controls progress {
  width: min(14rem, 100%);
}

.accounting-preview-layout {
  display: grid;
  min-height: 0;
  grid-template-columns: 12rem minmax(0, 1fr);
}

.accounting-preview-thumbnails {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  min-height: 0;
  padding: 0.75rem;
  overflow: auto;
  border-right: 1px solid var(--accounting-line);
  background: var(--bg, #f6f7f9);
}

.accounting-preview-thumbnail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.55rem;
  background: var(--accounting-surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.accounting-preview-thumbnail-image {
  display: block;
  width: 100%;
  height: 6.5rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.35rem;
  background: white;
  object-fit: contain;
}

.accounting-preview-thumbnail-caption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
}

.accounting-preview-thumbnail-label {
  overflow-wrap: anywhere;
}

.accounting-preview-thumbnail:hover,
.accounting-preview-thumbnail.is-current {
  border-color: var(--focus, #3157d5);
  background: color-mix(in srgb, var(--focus, #3157d5) 8%, white);
}

.accounting-preview-thumbnail-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--bg, #f6f7f9);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.accounting-preview-stage {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: #46505f;
}

.accounting-preview-analysis-visual {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  justify-items: center;
  width: min(25rem, calc(100% - 2rem));
  gap: 0.55rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid color-mix(in srgb, var(--accounting-brand) 72%, white);
  border-radius: 1.1rem;
  background: rgb(255 255 255 / 94%);
  color: var(--accounting-ink);
  box-shadow:
    0 1.25rem 3.5rem rgb(5 16 28 / 34%),
    0 0 2.25rem color-mix(in srgb, var(--accounting-brand) 34%, transparent);
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.accounting-preview-analysis-visual strong {
  font-size: 1.05rem;
}

.accounting-preview-analysis-visual > span:last-child {
  color: var(--accounting-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.accounting-preview-analysis-aura {
  display: grid;
  place-items: center;
  width: 6.6rem;
  height: 6.6rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accounting-brand) 16%, white);
  box-shadow:
    0 0 0 0 color-mix(in srgb, var(--accounting-brand) 34%, transparent),
    0 0 1.35rem color-mix(in srgb, var(--accounting-brand) 58%, transparent);
  animation: accounting-checky-pulse 1.65s ease-in-out infinite;
}

.accounting-preview-analysis-aura img {
  display: block;
  width: 4.75rem;
  height: 4.75rem;
  filter: drop-shadow(0 0 0.65rem color-mix(in srgb, var(--accounting-brand) 55%, transparent));
}

@keyframes accounting-checky-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 0 color-mix(in srgb, var(--accounting-brand) 36%, transparent),
      0 0 1.1rem color-mix(in srgb, var(--accounting-brand) 44%, transparent);
    transform: scale(0.97);
  }

  50% {
    box-shadow:
      0 0 0 1rem transparent,
      0 0 2rem color-mix(in srgb, var(--accounting-brand) 68%, transparent);
    transform: scale(1.045);
  }
}

.accounting-preview-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-width: min(100%, 42rem);
  min-height: 36rem;
  border: 0;
  background: white;
  transform-origin: center;
}

.accounting-preview-render {
  position: relative;
  flex: none;
  margin: auto;
  transform-origin: center;
  background: white;
}

.accounting-preview-canvas {
  display: block;
}

.accounting-preview-text-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: transparent;
  user-select: text;
}

.accounting-preview-dialog.is-expanded {
  position: fixed;
  z-index: 10001;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

/*
 * Shared foundations for the server-rendered accounting workflows.
 *
 * These classes are emitted by several independent renderers. Keeping their
 * layout here prevents each page from inventing its own grid, spacing, and
 * card behavior.
 */

.accounting-page > :where(section, article, form) + :where(section, article, form) {
  margin-top: 0;
}

.accounting-form,
.accounting-guided-flow {
  display: grid;
  min-width: 0;
  gap: 0.9rem;
}

.accounting-guided-flow > .panel {
  margin-bottom: 0;
}

.accounting-form > *,
.accounting-form label,
.accounting-grid > * {
  min-width: 0;
}

.accounting-form :is(input, select, textarea) {
  min-width: 0;
  max-width: 100%;
}

.accounting-form label > small {
  display: block;
  margin-top: 0.15rem;
  color: var(--accounting-muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
}

.accounting-form label:has(> .required-marker) > :is(.accounting-input-unit, small),
.accounting-form label.accounting-money-field:has(> .required-marker) > span:not(.required-marker) {
  grid-column: 1 / -1;
}

.accounting-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.accounting-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.accounting-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.accounting-grid > :where(.wide, .accounting-filter-wide, .accounting-grid-wide) {
  grid-column: 1 / -1;
}

.accounting-summary-grid,
.accounting-ocr-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.accounting-step-list,
[data-accounting-step-list] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
}

.accounting-metrics {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

@media (min-width: 761px) {
  .accounting-dashboard-card .accounting-metrics {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  }
}

.accounting-metric {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 0.25rem;
  padding: 0.8rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  background: var(--accounting-surface);
  box-shadow: 0 0.12rem 0.4rem rgb(16 24 40 / 4%);
}

.accounting-metric:only-child {
  grid-column: 1 / -1;
}

.accounting-metric > span {
  color: var(--accounting-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.accounting-metric > strong {
  color: var(--accounting-ink);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.accounting-metric > small {
  color: var(--accounting-muted);
  font-size: 0.78rem;
}

.accounting-actions,
.accounting-inline-form,
.accounting-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.accounting-actions {
  justify-content: flex-end;
}

.accounting-actions > *,
.accounting-pagination > * {
  min-width: 0;
}

.accounting-pagination {
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.accounting-pagination > :first-child {
  margin-right: auto;
}

.accounting-inline-reason {
  display: grid;
  min-width: min(15rem, 100%);
  gap: 0.4rem;
}

.accounting-details {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(7.5rem, 0.8fr) minmax(0, 1.2fr);
  gap: 0;
  margin: 0;
}

.accounting-details > dt,
.accounting-details > dd {
  min-width: 0;
  margin: 0;
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--accounting-line);
  overflow-wrap: anywhere;
}

.accounting-details > dt {
  padding-right: 0.65rem;
  color: var(--accounting-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.accounting-details > dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.accounting-details > :nth-last-child(-n+2) {
  border-bottom: 0;
}

.accounting-empty,
.accounting-empty-state {
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px dashed var(--accounting-line);
  border-radius: 0.85rem;
  background: var(--bg, #f6f7f9);
  text-align: center;
}

.accounting-empty :where(h2, h3, p),
.accounting-empty-state :where(h2, h3, p) {
  margin-top: 0;
}

.accounting-empty :where(h2, h3),
.accounting-empty-state :where(h2, h3) {
  font-size: 1.1rem;
}

.accounting-empty p:last-child,
.accounting-empty-state p:last-child {
  margin-bottom: 0;
  color: var(--accounting-muted);
}

.accounting-settings-group,
.accounting-position-options {
  overflow: clip;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  background: var(--accounting-surface);
}

.accounting-settings-group + .accounting-settings-group {
  margin-top: 0.65rem;
}

.accounting-settings-group > summary,
.accounting-position-options > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.85rem;
  padding: 0.7rem 0.85rem;
  color: var(--accounting-ink);
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.accounting-settings-group > summary::-webkit-details-marker,
.accounting-position-options > summary::-webkit-details-marker {
  display: none;
}

.accounting-settings-group > summary::after,
.accounting-position-options > summary::after {
  content: "▾";
  flex: 0 0 auto;
  transition: transform 160ms ease;
}

.accounting-settings-group[open] > summary::after,
.accounting-position-options[open] > summary::after {
  transform: rotate(180deg);
}

.accounting-settings-group[open] > summary,
.accounting-position-options[open] > summary {
  border-bottom: 1px solid var(--accounting-line);
  background: var(--bg, #f6f7f9);
}

.accounting-settings-group > :not(summary),
.accounting-position-options > :not(summary) {
  margin-right: 0.85rem;
  margin-left: 0.85rem;
}

.accounting-settings-group > :nth-child(2),
.accounting-position-options > :nth-child(2) {
  margin-top: 0.8rem;
}

.accounting-settings-group > :last-child,
.accounting-position-options > :last-child {
  margin-bottom: 0.8rem;
}

.accounting-export-options,
.accounting-export-list {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.accounting-export-list {
  align-items: start;
}

.accounting-export-option {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin: 0;
  padding: 0.9rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.8rem;
  background: var(--accounting-surface);
}

.accounting-export-option > div {
  min-width: 0;
  flex: 1;
}

.accounting-export-option :where(strong, p) {
  overflow-wrap: anywhere;
}

.accounting-export-option p {
  margin: 0.3rem 0 0;
  color: var(--accounting-muted);
}

.accounting-export-option > .button {
  width: 100%;
  margin-top: auto;
}

.accounting-export-list > .accounting-export-card {
  min-width: 0;
  min-height: 100%;
}

.accounting-export-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.accounting-export-card > header > div {
  min-width: 0;
}

.accounting-export-card > header p {
  margin: 0.25rem 0 0;
  color: var(--accounting-muted);
  font-size: 0.84rem;
}

.accounting-export-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.8rem;
  margin: 0;
  padding: 0.7rem;
  border-radius: 0.65rem;
  background: var(--accounting-soft);
}

.accounting-export-context > div {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(6.5rem, 0.42fr) minmax(0, 1fr);
  gap: 0.4rem;
}

.accounting-export-context :where(dt, dd) {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.accounting-export-context dt {
  color: var(--accounting-muted);
  font-weight: 650;
}

.accounting-export-context dd {
  font-weight: 700;
}

.accounting-amount-row {
  display: grid;
  min-width: 0;
  align-items: end;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.accounting-currency-choice input {
  text-transform: uppercase;
}

.accounting-input-unit {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.accounting-input-unit > input {
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.accounting-input-unit > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--accounting-line);
  border-left: 0;
  border-radius: 0 0.55rem 0.55rem 0;
  background: var(--bg, #f6f7f9);
  color: var(--accounting-muted);
  font-weight: 750;
}

.accounting-foreign-fields {
  display: grid;
  width: min(100%, 52rem);
  gap: 0.7rem;
  padding: 0.8rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  background: var(--bg, #f6f7f9);
}

.accounting-foreign-fields > p {
  margin: 0;
}

.accounting-split-allocation {
  display: grid;
  min-width: 0;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.8rem;
  background: var(--bg, #f6f7f9);
}

.accounting-split-allocation-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.65fr);
  align-items: flex-start;
  gap: 0.75rem 1rem;
}

.accounting-split-allocation-title h2 {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
}

.accounting-split-allocation-summary output {
  display: block;
  width: 100%;
  max-width: 34rem;
  justify-self: end;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.65rem;
  background: var(--accounting-surface);
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.accounting-split-allocation-summary output:empty {
  display: none;
}

.accounting-split-allocation-summary output[data-state="balanced"] {
  border-color: color-mix(in srgb, var(--accounting-success) 32%, var(--accounting-line));
  background: color-mix(in srgb, var(--accounting-success) 7%, white);
  color: var(--accounting-success);
}

.accounting-split-allocation-summary output[data-state="open"] {
  border-color: color-mix(in srgb, var(--accounting-warning) 32%, var(--accounting-line));
  background: color-mix(in srgb, var(--accounting-warning) 7%, white);
  color: var(--accounting-warning);
}

.accounting-split-allocation-summary output[data-state="over"],
.accounting-split-allocation-summary output[data-state="invalid"] {
  border-color: color-mix(in srgb, var(--accounting-danger) 32%, var(--accounting-line));
  background: color-mix(in srgb, var(--accounting-danger) 7%, white);
  color: var(--accounting-danger);
}

.accounting-split-allocation > [data-accounting-split-primary] {
  padding: 0;
  border: 0;
  background: transparent;
}

.accounting-split-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.65rem;
}

.accounting-split-row > legend {
  max-width: 100%;
  padding: 0 0.3rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.accounting-split-row > .accounting-grid,
.accounting-split-row > .accounting-position-options {
  min-width: 0;
}

.accounting-split-fields {
  align-items: start;
  gap: 0.8rem 1rem;
}

.accounting-split-fields > label {
  min-width: 0;
}

.accounting-split-kind {
  order: 10;
}

.accounting-split-category {
  order: 20;
}

.accounting-split-travel {
  order: 30;
  grid-column: 1 / -1;
}

.accounting-split-funding {
  order: 40;
}

.accounting-split-assigned {
  order: 50;
}

.accounting-split-requested {
  order: 60;
}

.accounting-split-advance {
  order: 70;
  grid-column: 1 / -1;
}

.accounting-split-row.is-primary .accounting-split-assigned {
  grid-column: 1 / -1;
}

.accounting-split-row.is-additional .accounting-split-funding {
  grid-column: 1 / -1;
}

.accounting-allocation-options {
  display: grid;
  min-width: 0;
  gap: 0.65rem;
}

.accounting-allocation-options > * {
  margin: 0;
}

.accounting-primary-assigned-editor {
  display: none;
}

.accounting-split-allocation:has([data-accounting-split-details][open]) .accounting-primary-assigned-editor {
  display: grid;
  max-width: none;
}

.accounting-form-errors:not([hidden]) {
  padding: 0.75rem;
  border: 1px solid var(--accounting-danger);
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--accounting-danger) 7%, white);
  color: var(--accounting-danger);
}

.accounting-danger-zone {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--accounting-line);
}

.accounting-sensitive-summary {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.65rem;
  background: var(--bg, #f6f7f9);
}

.accounting-deposit-confirmation,
.accounting-page form[action="/expenses/handoff"] > fieldset {
  display: grid;
  min-width: 0;
  gap: 0.65rem;
  margin: 0;
  padding: 0.8rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
}

.accounting-deposit-overview {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
}

.accounting-deposit-overview > .accounting-section-head {
  margin-bottom: 0;
}

.accounting-deposit-overview > .accounting-section-head p {
  margin-bottom: 0;
  font-size: 0.86rem;
}

.accounting-deposit-confirmation > legend,
.accounting-page form[action="/expenses/handoff"] > fieldset > legend {
  max-width: 100%;
  padding: 0 0.3rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.accounting-deposit-transfers-panel .table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.accounting-deposit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.accounting-deposit-head p {
  margin: 0.1rem 0 0;
  color: var(--accounting-muted);
  font-size: 0.84rem;
}

.accounting-deposit-breakdown,
.accounting-deposit-transfer-create,
.accounting-handoff-controls {
  overflow: clip;
  border: 1px solid var(--accounting-line);
  border-radius: 0.75rem;
  background: var(--accounting-surface);
}

.accounting-deposit-breakdown {
  grid-column: 1 / -1;
  margin-top: 0.15rem;
}

.accounting-deposit-breakdown > summary,
.accounting-deposit-transfer-create > summary,
.accounting-handoff-controls > summary {
  min-height: 2.4rem;
  padding: 0.48rem 0.65rem;
  font-weight: 750;
  cursor: pointer;
}

.accounting-deposit-breakdown > .accounting-details,
.accounting-deposit-transfer-create > form,
.accounting-handoff-controls > :not(summary) {
  margin: 0 0.75rem 0.75rem;
}

.accounting-deposit-transfer-create {
  margin-bottom: 0.75rem;
}

.accounting-deposit-transfer-form[data-accounting-deposit-transfer] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.accounting-page form[action="/expenses/handoff"] {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.accounting-page form[action="/expenses/handoff"] > :where(
    .table-wrap,
    .accounting-responsive-list,
    .accounting-pagination,
    .accounting-actions,
    .accounting-handoff-controls
  ) {
  grid-column: 1 / -1;
}

.accounting-handoff-controls > .accounting-grid {
  padding-top: 0.2rem;
}

.accounting-choice-card {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 0.6rem;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--accounting-line);
  border-radius: 0.7rem;
}

.accounting-choice-card > legend {
  padding: 0 0.25rem;
  font-weight: 800;
}

.accounting-mobile-camera {
  display: none;
}

@media (max-width: 1050px) {
  .accounting-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accounting-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accounting-preview-grid {
    grid-template-columns: 1fr;
  }

  .accounting-document-preview,
  .accounting-document-preview iframe,
  .accounting-document-preview img,
  .accounting-document-preview object {
    min-height: 22rem;
  }

  .accounting-preview-layout {
    grid-template-columns: 8rem minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .accounting-workspace-head,
  .accounting-section-head,
  .accounting-record-card > header,
  .accounting-record-card > footer,
  .accounting-receipt-card > header,
  .accounting-receipt-card > footer,
  .accounting-receipt-card-head,
  .accounting-receipt-card-footer,
  .accounting-job-head {
    align-items: stretch;
    flex-direction: column;
  }

  .accounting-workspace-head .accounting-workspace-actions,
  .accounting-filter-actions,
  .accounting-card-actions,
  .accounting-receipt-card-actions,
  .accounting-table-actions {
    justify-content: stretch;
  }

  .accounting-receipt-card > .accounting-receipt-card-head {
    align-items: start;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .accounting-receipt-card-title {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .accounting-receipt-card-head > .accounting-status {
    grid-column: 2;
    grid-row: 1;
  }

  .accounting-receipt-card > .accounting-receipt-card-footer {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .accounting-receipt-card-actions,
  .accounting-receipt-bulk-actions > button {
    margin-left: 0;
    width: 100%;
  }

  .accounting-workspace-actions .button,
  .accounting-filter-actions .button,
  .accounting-card-actions .button {
    width: 100%;
  }

  [data-accounting-measure-switch]:not(select),
  .accounting-measure-switch {
    width: 100%;
    min-width: 0;
  }

  .accounting-measure-switcher {
    grid-template-columns: 1fr;
  }

  .accounting-tabs {
    margin-right: -1rem;
    margin-left: -1rem;
    padding-right: 1rem;
    padding-left: 1rem;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .accounting-filter-bar,
  .accounting-summary-grid,
  .accounting-card-grid,
  .accounting-receipt-card-grid,
  .accounting-fact-grid,
  .accounting-receipt-card-facts,
  .accounting-step-list,
  [data-accounting-step-list],
  .accounting-deposit-transfer,
  [data-accounting-deposit-transfer] {
    grid-template-columns: 1fr;
  }

  .accounting-grid.two,
  .accounting-grid.three,
  .accounting-export-options,
  .accounting-export-list,
  .accounting-export-context,
  .accounting-page form[action="/expenses/handoff"] {
    grid-template-columns: minmax(0, 1fr);
  }

  .accounting-summary-grid,
  .accounting-metrics,
  .accounting-step-list,
  [data-accounting-step-list] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accounting-ocr-field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .accounting-form,
  .accounting-guided-flow {
    gap: 0.65rem;
  }

  .accounting-guided-flow > [data-accounting-step].panel {
    padding: 0.75rem;
  }

  .accounting-guided-flow [data-accounting-step] .accounting-section-head {
    gap: 0.45rem;
    margin-bottom: 0.55rem;
  }

  .accounting-guided-flow [data-accounting-step] h2 {
    margin-bottom: 0.3rem;
    font-size: 1.08rem;
  }

  .accounting-step-list,
  [data-accounting-step-list] {
    gap: 0.35rem;
    margin-bottom: 0.65rem;
  }

  .accounting-step-indicator,
  [data-accounting-step-list] [data-accounting-step-target] {
    min-height: 3.2rem;
    gap: 0.4rem;
    padding: 0.5rem 0.6rem;
    font-size: 0.82rem;
  }

  .accounting-step-indicator::before,
  [data-accounting-step-list] [data-accounting-step-target]::before {
    width: 1.4rem;
    height: 1.4rem;
    flex-basis: 1.4rem;
    font-size: 0.7rem;
  }

  .accounting-step-indicator small,
  [data-accounting-step-list] [data-accounting-step-target] small {
    margin-left: 0;
    font-size: 0.64rem;
  }

  .accounting-preview-analysis-visual {
    width: min(21rem, calc(100% - 1rem));
    padding: 0.9rem;
  }

  .accounting-preview-analysis-aura {
    width: 5.25rem;
    height: 5.25rem;
  }

  .accounting-preview-analysis-aura img {
    width: 3.8rem;
    height: 3.8rem;
  }

  .accounting-summary-card,
  .accounting-metric,
  .accounting-export-option,
  .accounting-export-card {
    padding: 0.7rem;
  }

  .accounting-metric {
    gap: 0.15rem;
  }

  .accounting-metric > span {
    font-size: 0.74rem;
  }

  .accounting-metric > strong {
    font-size: 1.02rem;
  }

  .accounting-amount-row {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .accounting-travel-mode,
  [data-accounting-travel-mode]:not(input):not(select) {
    grid-template-columns: minmax(0, 1fr);
  }

  .accounting-card-more {
    margin-left: 0;
  }

  .accounting-card-more > :is(.accounting-card-actions, .accounting-card-menu) {
    min-width: 0;
  }

  .accounting-foreign-fields,
  .accounting-split-allocation {
    width: 100%;
    gap: 0.55rem;
    padding: 0.65rem;
  }

  .accounting-split-allocation-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .accounting-split-allocation-summary output {
    max-width: none;
    justify-self: stretch;
  }

  .accounting-split-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
  }

  .accounting-split-fields > :is(
    .accounting-split-kind,
    .accounting-split-category,
    .accounting-split-travel,
    .accounting-split-funding,
    .accounting-split-assigned,
    .accounting-split-requested,
    .accounting-split-advance
  ) {
    grid-column: 1;
  }

  .accounting-split-row {
    gap: 0.5rem;
    padding: 0.55rem;
  }

  .accounting-settings-group > summary,
  .accounting-position-options > summary {
    min-height: 2.5rem;
    padding: 0.55rem 0.65rem;
  }

  .accounting-settings-group > :not(summary),
  .accounting-position-options > :not(summary) {
    margin-right: 0.65rem;
    margin-left: 0.65rem;
  }

  .accounting-settings-group > :nth-child(2),
  .accounting-position-options > :nth-child(2) {
    margin-top: 0.65rem;
  }

  .accounting-settings-group > :last-child,
  .accounting-position-options > :last-child {
    margin-bottom: 0.65rem;
  }

  .accounting-upload {
    gap: 0.55rem;
    padding: 0.7rem;
  }

  .accounting-upload-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .accounting-upload-actions .button,
  .accounting-mobile-camera {
    width: 100%;
  }

  .accounting-mobile-camera {
    display: inline-flex;
  }

  .accounting-details {
    grid-template-columns: minmax(0, 1fr) minmax(5.5rem, auto);
    font-size: 0.88rem;
  }

  .accounting-details > dt,
  .accounting-details > dd {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }

  .accounting-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .accounting-actions > :where(form, .button),
  .accounting-actions > form > .button,
  .accounting-page form[action="/expenses/handoff"] .accounting-actions > .button {
    width: 100%;
  }

  .accounting-deposit-confirmation,
  .accounting-page form[action="/expenses/handoff"] > fieldset {
    padding: 0.65rem;
  }

  .accounting-filter-bar .accounting-filter-wide {
    grid-column: auto;
  }

  .accounting-responsive-list .accounting-table-view {
    display: block;
  }

  .accounting-responsive-list .accounting-card-view {
    display: none;
  }

  .accounting-responsive-list[data-accounting-view="table"] .accounting-table-view {
    display: block;
  }

  .accounting-responsive-list[data-accounting-view="table"] .accounting-card-view {
    display: none;
  }

  .accounting-responsive-list[data-accounting-view="cards"] .accounting-table-view {
    display: none;
  }

  .accounting-responsive-list[data-accounting-view="cards"] .accounting-card-view {
    display: block;
  }

  [data-accounting-responsive-list][data-accounting-view="stacked"] {
    overflow: visible;
  }

  [data-accounting-responsive-list][data-accounting-view="stacked"] [data-accounting-table-view],
  [data-accounting-responsive-list][data-accounting-view="stacked"] table,
  [data-accounting-responsive-list][data-accounting-view="stacked"] tbody,
  [data-accounting-responsive-list][data-accounting-view="stacked"] tr,
  [data-accounting-responsive-list][data-accounting-view="stacked"] td {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  [data-accounting-responsive-list][data-accounting-view="stacked"] table {
    border: 0;
    background: transparent;
  }

  [data-accounting-responsive-list][data-accounting-view="stacked"] thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  [data-accounting-responsive-list][data-accounting-view="stacked"] tbody {
    display: grid;
    gap: 0.8rem;
  }

  [data-accounting-responsive-list][data-accounting-view="stacked"] tbody tr {
    overflow: hidden;
    border: 1px solid var(--accounting-line);
    border-radius: 0.8rem;
    background: var(--accounting-surface);
  }

  [data-accounting-responsive-list][data-accounting-view="stacked"] tbody td {
    display: grid;
    grid-template-columns: minmax(7rem, 38%) minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    padding: 0.7rem 0.8rem;
    overflow-wrap: anywhere;
    border-bottom: 1px solid var(--accounting-line);
  }

  [data-accounting-responsive-list][data-accounting-view="stacked"] tbody td:last-child {
    border-bottom: 0;
  }

  [data-accounting-responsive-list][data-accounting-view="stacked"] tbody td::before {
    content: attr(data-label);
    color: var(--accounting-muted);
    font-size: 0.82rem;
    font-weight: 750;
  }

  [data-accounting-responsive-list][data-accounting-view="stacked"] tbody td[colspan] {
    grid-template-columns: 1fr;
  }

  [data-accounting-responsive-list][data-accounting-view="stacked"] tbody td[colspan]::before {
    display: none;
  }

  .accounting-split-total,
  .accounting-split-row {
    grid-template-columns: 1fr;
  }

  .accounting-split-row .button {
    width: 100%;
  }

  .accounting-step-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .accounting-step-actions .button {
    width: 100%;
  }

  .accounting-deposit-summary,
  [data-accounting-deposit-balance] {
    grid-template-columns: 1fr;
  }

  .accounting-deposit-head {
    align-items: flex-start;
  }

  .accounting-deposit-amount,
  [data-accounting-deposit-amount] {
    white-space: normal;
  }

  .accounting-deposit-ledger > li,
  [data-accounting-deposit-ledger] > li {
    grid-template-columns: 1fr;
  }

  .accounting-document-preview,
  .accounting-document-preview iframe,
  .accounting-document-preview img,
  .accounting-document-preview object {
    min-height: 18rem;
  }

  .accounting-question-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .accounting-confirm-dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .accounting-confirm-dialog-actions .button {
    width: 100%;
  }

  .accounting-preview-dialog {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .accounting-preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .accounting-preview-head-actions .button {
    flex: 1;
  }

  .accounting-preview-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .accounting-preview-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .accounting-preview-thumbnails {
    display: flex;
    max-height: 5rem;
    padding: 0.5rem;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--accounting-line);
  }

  .accounting-preview-thumbnail {
    width: auto;
    min-width: 8rem;
    flex: 0 0 auto;
  }

  .accounting-preview-thumbnail-image {
    height: 2.5rem;
  }

  .accounting-preview-stage iframe {
    min-height: 24rem;
  }
}

@media (max-width: 360px) {
  .accounting-receipt-card > .accounting-receipt-card-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .accounting-receipt-card-head > .accounting-status {
    grid-column: 1;
    grid-row: 3;
    justify-self: end;
  }

  .accounting-receipt-card-title {
    grid-column: 1;
    grid-row: 2;
  }
}

@media (min-width: 761px) {
  .accounting-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }

  .accounting-tabs a {
    width: 100%;
  }

  .accounting-responsive-list .accounting-table-view {
    display: block;
  }

  .accounting-responsive-list .accounting-card-view {
    display: none;
  }

  .accounting-responsive-list[data-accounting-view="cards"] .accounting-table-view {
    display: none;
  }

  .accounting-responsive-list[data-accounting-view="cards"] .accounting-card-view {
    display: block;
  }

  .accounting-responsive-list[data-accounting-view="table"] .accounting-card-view {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .accounting-skeleton-line::after {
    animation: none;
    background: transparent;
  }

  .accounting-page *,
  .accounting-page *::before,
  .accounting-page *::after,
  .accounting-confirm-dialog *,
  .accounting-confirm-dialog *::before,
  .accounting-confirm-dialog *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .accounting-preview-dialog *,
  .accounting-preview-dialog *::before,
  .accounting-preview-dialog *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .accounting-preview-analysis-aura {
    box-shadow: 0 0 1.2rem color-mix(in srgb, var(--accounting-brand) 48%, transparent);
    transform: none;
  }
}

@media print {
  .accounting-page .accounting-tabs,
  .accounting-page .accounting-filter-bar,
  .accounting-page .accounting-workspace-actions,
  .accounting-page .accounting-table-actions,
  .accounting-page .accounting-card-actions,
  .accounting-page .accounting-card-more,
  .accounting-page .accounting-upload,
  .accounting-page .accounting-job-actions,
  .accounting-page .accounting-export-countdown,
  .accounting-confirm-dialog,
  .accounting-preview-dialog {
    display: none !important;
  }

  .accounting-page .accounting-table-view {
    display: block !important;
    overflow: visible;
    border-color: #777;
  }

  .accounting-page .accounting-card-view {
    display: none !important;
  }

  .accounting-page .accounting-table {
    width: 100%;
    min-width: 0;
  }

  .accounting-page .accounting-summary-card,
  .accounting-page .accounting-record-card,
  .accounting-page .accounting-receipt-card,
  .accounting-page .accounting-export-card {
    break-inside: avoid;
    box-shadow: none;
  }
}
