@import url("filmerp-tokens.92e72fe47d55.css");

.session-timeout-warning {
  position: fixed;
  z-index: 1400;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 430px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: #fff;
  box-shadow: 0 8px 24px rgba(29, 35, 39, .18);
  color: var(--body-fg);
}

.session-timeout-warning[hidden] {
  display: none;
}

.session-timeout-warning div {
  display: grid;
  gap: 3px;
}

.session-timeout-warning span {
  color: var(--muted);
  font-size: 13px;
}

.session-timeout-warning button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 720px) {
  .session-timeout-warning {
    right: 12px;
    bottom: 12px;
    left: 12px;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    max-width: none;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  width: 100%;
  min-width: 320px;
  min-height: 100vh;
  padding-left: var(--sidebar-width);
  background: var(--body-bg);
  color: var(--body-fg);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  transition: padding-left .18s ease;
}

body.sidebar-collapsed {
  --sidebar-width: var(--sidebar-collapsed);
}

a {
  color: var(--secondary);
}

.app-sidebar {
  position: fixed;
  z-index: 1000;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  background: var(--header-bg);
  color: #f0f0f1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #2c3338;
  transition: width .18s ease, transform .18s ease;
}

.sidebar-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--topbar-height);
  padding: 6px 9px 6px 12px;
  border-bottom: 1px solid #3c434a;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
}

.sidebar-logo-viewport {
  display: flex;
  align-items: center;
  width: 142px;
  height: 36px;
  overflow: hidden;
  transition: width .18s ease;
}

.brand-logo {
  display: block;
  width: 142px;
  height: auto;
  max-width: none;
  flex: 0 0 auto;
}

.sidebar-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-toggle,
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: #c3c4c7;
  flex: 0 0 auto;
}

.sidebar-toggle {
  position: relative;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  border-color: #50575e;
  background: #2c3338;
  color: #fff;
}

.sidebar-floating-tooltip {
  position: fixed;
  z-index: 1300;
  max-width: 240px;
  padding: 6px 9px;
  border: 1px solid #50575e;
  border-radius: 3px;
  background: #1d2327;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: opacity .12s ease, transform .12s ease;
  white-space: nowrap;
}

.sidebar-floating-tooltip.is-visible {
  opacity: 1;
  transform: translate(0, -50%);
}

.sidebar-toggle-collapsed,
.sidebar-toggle-mobile,
.sidebar-toggle-mark {
  display: none;
}

.sidebar-toggle-mark {
  width: 30px;
  height: 30px;
}

.sidebar-nav {
  min-height: 0;
  padding: 12px 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: #50575e transparent;
  scrollbar-width: thin;
}

.sidebar-section + .sidebar-section {
  margin-top: 16px;
}

.sidebar-section-label {
  min-height: 24px;
  padding: 3px 18px;
  color: #8c8f94;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  width: 100%;
  margin: 2px 0;
  padding: 8px 18px;
  border-radius: 0;
  color: #dcdcde;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.sidebar-link:hover,
.sidebar-link:focus-visible {
  background: #2c3338;
  color: #fff;
}

.sidebar-link.active {
  background: var(--primary);
  color: #fff;
}

.sidebar-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer {
  margin-top: auto;
  padding: 8px 0;
  border-top: 1px solid #3c434a;
}

.sidebar-logout-form {
  display: block !important;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.app-sidebar .sidebar-logout-button {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: #dcdcde;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.app-sidebar .sidebar-logout-button:hover,
.app-sidebar .sidebar-logout-button:focus-visible {
  background: #2c3338;
  color: #fff;
}

body.sidebar-collapsed .sidebar-header {
  justify-content: center;
  padding-inline: 10px;
}

body.sidebar-collapsed .sidebar-brand,
body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-section-label {
  display: none;
}

body.sidebar-collapsed .sidebar-toggle-expanded {
  display: none;
}

body.sidebar-collapsed .sidebar-toggle-collapsed {
  display: none;
}

body.sidebar-collapsed .sidebar-toggle-mark {
  display: block;
}

body.sidebar-collapsed .sidebar-toggle {
  width: 38px;
  height: 38px;
}

body.sidebar-collapsed .sidebar-nav,
body.sidebar-collapsed .sidebar-footer {
  padding-inline: 0;
}

body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding-inline: 0;
}

body.sidebar-collapsed .sidebar-logout-button {
  justify-content: center;
}


.app-header {
  position: sticky;
  z-index: 800;
  top: 0;
  min-height: var(--topbar-height);
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  color: var(--body-fg);
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-page-title {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header-user {
  max-width: min(260px, 35vw);
  margin-left: auto;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-menu-toggle,
.sidebar-overlay {
  display: none;
}

main {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 24px 28px;
}

h1,
h2,
h3 {
  color: var(--body-fg);
  font-weight: 600;
}

h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 18px;
}

.three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.stack {
  display: grid;
  gap: 18px;
}

.card,
.toolbar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.card {
  padding: 16px;
}

.toolbar {
  padding: 14px;
  margin-bottom: 18px;
}

.metric {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
}

.metric.small {
  font-size: 20px;
}

.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.danger,
.negative {
  color: var(--danger);
  font-weight: 700;
}

.positive {
  color: var(--success);
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.page-heading h1 {
  margin: 0 0 6px;
  font-size: 23px;
}

.action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar form.inline-form {
  grid-template-columns: minmax(240px, 1fr) auto;
}

.toolbar form.avails-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.avails-form .avails-checklist {
  grid-column: span 2;
}

.avails-form > button {
  grid-column: 1 / -1;
  min-width: 230px;
  justify-self: start;
}

.toolbar select[multiple] {
  min-height: 120px;
}

.table-scroll {
  overflow-x: auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-header h2 {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef0f2;
  color: #111827;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.available,
.status-pill.ready,
.status-pill.accepted,
.status-pill.sent {
  background: #d1fae5;
  color: #065f46;
}

.status-pill.blocked,
.status-pill.no_rights,
.status-pill.missing,
.status-pill.rejected,
.status-pill.overdue {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill.warning,
.status-pill.ordered,
.status-pill.in_progress {
  background: #fef3c7;
  color: #92400e;
}

.summary-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.summary-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.summary-row dt {
  color: var(--muted);
  font-weight: 700;
}

.summary-row dd {
  margin: 0;
}

.notice {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: #fff;
}

.notice.success {
  border-left-color: var(--success);
}

.notice.warning {
  border-left-color: var(--primary);
}

.notice.danger {
  border-left-color: var(--danger);
}

.messages {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.messages .notice {
  margin: 0;
}

.messages .success {
  border-left-color: var(--success);
}

.messages .warning {
  border-left-color: var(--primary);
}

.messages .error {
  border-left-color: var(--danger);
}

.messages .message {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: #fff;
}

.status-pill.sent,
.status-pill.approved,
.status-pill.paid {
  background: #d1fae5;
  color: #065f46;
}

.status-pill.draft {
  background: #eef0f2;
  color: #111827;
}

.status-pill.disputed {
  background: #fee2e2;
  color: #991b1b;
}

.status-pill.processed,
.status-pill.imported {
  background: #d1fae5;
  color: #065f46;
}

.status-pill.needs_review,
.status-pill.uploaded {
  background: #fef3c7;
  color: #92400e;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 9px 7px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

td.num,
th.num {
  text-align: right;
  white-space: nowrap;
}

tfoot th {
  color: var(--body-fg);
  background: #f0f2f4;
}

form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  align-items: end;
  gap: 10px;
}

label {
  display: grid;
  gap: 5px;
  color: #50575e;
  font-size: 12px;
  font-weight: 650;
}

input,
select,
textarea {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #8c8f94;
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--body-fg);
  font: inherit;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--focus-color);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 13px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-control);
  background: var(--primary);
  color: var(--button-fg);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

button:hover,
.button:hover {
  background: var(--secondary);
  color: var(--button-fg);
}

button:disabled,
.button[aria-disabled="true"] {
  background: #aeb5bc;
  color: #fff;
  cursor: not-allowed;
  opacity: .72;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  background: #fff;
}

.workflow-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 10px 14px;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
}

.workflow-steps li a {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.workflow-steps li:last-child {
  border-right: 0;
}

.workflow-steps span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 1px solid #bbc2c9;
  border-radius: 50%;
  flex: 0 0 auto;
}

.workflow-steps .current {
  color: var(--body-fg);
  box-shadow: inset 0 -3px 0 var(--primary);
}

.workflow-steps .current span {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--button-fg);
}

.workflow-steps .done {
  color: #065f46;
  background: #f0fdf7;
}

.workflow-steps .done span {
  border-color: #047857;
}

.settlement-selector form {
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(125px, .75fr)) auto;
}

.settlement-selector .settlement-plan {
  grid-column: 1 / -1;
}

.settlement-selector .settlement-open {
  grid-column: -2 / -1;
  grid-row: 1;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 60px 24px;
  border: 1px dashed #bbc2c9;
  background: #fff;
  text-align: center;
}

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

.empty-state-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state .button {
  margin-top: 6px;
}

.workbench-section {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.source-intake-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.source-intake-shortcut h2 {
  margin: 0 0 3px;
}

.settlement-concepts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
  border: 1px solid var(--border);
  background: #fff;
}

.settlement-concepts > div {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}

.settlement-concepts > div:last-child {
  border-right: 0;
}

.settlement-concepts span {
  color: var(--muted);
  font-size: 12px;
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.readiness-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 74px;
  padding: 13px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.readiness-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex: 0 0 auto;
  color: #fff;
  font-weight: 800;
}

.readiness-item.ready .readiness-mark { background: var(--success); }
.readiness-item.warning .readiness-mark { background: #b7791f; }
.readiness-item.blocked .readiness-mark { background: var(--danger); }

.intake-grid {
  margin-bottom: 20px;
}

.intake-card {
  min-width: 0;
}

form.single-upload {
  grid-template-columns: minmax(200px, 1fr) auto;
}

.recent-links {
  display: grid;
  gap: 0;
  margin-top: 14px;
  border-top: 1px solid var(--border);
}

.recent-links a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.invoice-upload-form {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.invoice-upload-form .check-label {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  min-height: 38px;
}

.invoice-upload-form .check-label input {
  min-width: auto;
}

.inline-action-form {
  display: block;
}

.source-tables {
  gap: 28px;
}

.source-tables > div {
  min-width: 0;
}

.source-tables h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.settlement-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin: 0 0 16px;
  border: 1px solid var(--border);
}

.settlement-totals div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}

.settlement-totals div:last-child {
  border-right: 0;
}

.settlement-totals span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.settlement-totals strong {
  font-size: 19px;
}

.statement-finalize-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.statement-finalize-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.statement-finalize-form legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.recipient-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.recipient-options label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  background: #f8f9fa;
}

.recipient-options input {
  min-width: auto;
}

.button.secondary,
button.secondary,
.button.export,
button.export {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 13px;
}

.button.secondary:hover,
button.secondary:hover,
.button.export:hover,
button.export:hover {
  border-color: var(--secondary);
  background: var(--color-primary-soft);
  color: var(--secondary);
}

.button.ghost,
button.ghost,
.text-action {
  min-height: 30px;
  padding: 4px 6px;
  border-color: transparent;
  background: transparent;
  color: var(--primary);
}

.button.ghost:hover,
button.ghost:hover,
.text-action:hover {
  border-color: transparent;
  background: var(--color-primary-soft);
  color: var(--secondary);
}

.catalog-export {
  margin: 0 0 20px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.catalog-export h2 {
  margin: 0;
}

.catalog-export-form {
  display: grid;
  grid-template-columns: minmax(320px, 1.5fr) minmax(210px, .65fr) minmax(250px, .85fr) auto;
  gap: 18px;
  align-items: start;
  margin-top: 16px;
}

.catalog-export-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.catalog-export-form legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.catalog-export-title-tools {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr);
  gap: 10px;
  align-items: end;
}

.catalog-master-check,
.catalog-title-list label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-master-check {
  min-height: 38px;
  font-weight: 700;
  white-space: nowrap;
}

.catalog-master-check input,
.catalog-title-list input,
.segmented-control input {
  min-width: auto;
}

.catalog-search {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.catalog-search input {
  width: 100%;
}

.catalog-title-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 12px;
  max-height: 156px;
  margin-top: 9px;
  padding: 8px;
  border: 1px solid var(--border);
  overflow-y: auto;
}

.catalog-title-list.disabled {
  background: #f6f7f7;
  color: var(--muted);
  opacity: .72;
}

.catalog-title-list label {
  min-width: 0;
  padding: 4px;
}

.catalog-title-list label > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-title-list small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  border: 1px solid var(--border);
}

.segmented-control label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: grid;
  min-height: 38px;
  padding: 7px 9px;
  place-items: center;
  color: var(--body-fg);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.segmented-control label + label span {
  border-left: 1px solid var(--border);
}

.segmented-control input:checked + span {
  background: var(--primary);
  color: #fff;
}

.segmented-control input:focus-visible + span {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.catalog-period {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.catalog-period label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.catalog-period input {
  width: 100%;
}

.catalog-export-action {
  display: grid;
  gap: 7px;
  align-self: end;
}

.catalog-export-action small {
  max-width: 190px;
  color: var(--muted);
  line-height: 1.35;
}

.cost-scope-panel {
  grid-column: 1 / -1;
  margin: 2px 0;
  padding: 12px;
  border: 1px solid var(--border);
}

.cost-scope-panel legend {
  padding: 0 6px;
  color: var(--body-fg);
  font-weight: 700;
}

.wizard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}

.contract-wizard fieldset {
  margin: 0;
}

.contract-wizard legend {
  padding: 0 8px;
  color: var(--body-fg);
  font-size: 17px;
  font-weight: 700;
}

.form-grid.three-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.contract-wizard label,
.full-field {
  display: grid;
  gap: 5px;
  font-weight: 700;
}

.contract-wizard input:not([type="checkbox"]),
.contract-wizard textarea,
.contract-wizard select {
  width: 100%;
}

.contract-wizard small {
  color: var(--muted);
  font-weight: 400;
}

.choice-panel {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  background: #f8f9fa;
}

.choice-panel ul,
#id_territories,
#id_exploitation_fields,
#id_pa_cost_categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 14px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.choice-panel li label,
#id_territories label,
#id_exploitation_fields label,
#id_pa_cost_categories label,
.contract-wizard .check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.choice-panel input[type="checkbox"] {
  min-width: auto;
}

.disabled-choice {
  opacity: .45;
}

.full-field {
  margin-top: 16px;
}

.wizard-preview {
  position: sticky;
  top: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.money-flow {
  margin: 0;
  padding: 0;
  list-style: none;
}

.money-flow li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  position: relative;
  padding: 8px 0 15px;
}

.money-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 38px;
  bottom: 0;
  border-left: 1px solid var(--border);
}

.money-flow span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--button-fg);
  font-weight: 700;
}

.money-flow small {
  display: block;
}

.wizard-preview button {
  width: 100%;
}

.dashboard-document-tasks {
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: #fff;
  box-shadow: var(--shadow);
}

.dashboard-document-tasks .section-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.dashboard-document-task-list {
  display: grid;
}

.dashboard-document-task-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.dashboard-document-task-list article:last-child {
  border-bottom: 0;
}

.dashboard-document-task-list article > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dashboard-document-task-list strong,
.dashboard-document-task-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-document-task-list small {
  color: var(--muted);
}

.dashboard-document-task-list .status-pill {
  justify-self: start;
}

.title-command-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.title-command-bar form {
  display: flex;
  align-items: end;
  gap: 10px;
  width: min(650px, 100%);
}

.title-command-bar form label {
  flex: 1 1 auto;
}

.portfolio-summary {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
}

.portfolio-summary strong {
  color: var(--body-fg);
  font-size: 22px;
}

.title-worklist {
  display: grid;
  gap: 10px;
}

.title-work-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 125px minmax(360px, 2.4fr) 125px;
  align-items: center;
  gap: 18px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: #fff;
  box-shadow: var(--shadow);
}

.title-work-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.title-work-name a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--body-fg);
  font-size: 16px;
  text-decoration: none;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.title-cell-link {
  display: block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-work-name span,
.title-next-action small {
  color: var(--muted);
  font-size: 12px;
}

.progress-heading {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.progress-heading strong {
  color: var(--body-fg);
}

.progress-track {
  height: 5px;
  margin-top: 6px;
  overflow: hidden;
  background: #e6e9ec;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.title-stage-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.title-stage-strip li {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.title-stage-strip li span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid #c5cbd1;
  border-radius: 50%;
  background: #fff;
  font-weight: 700;
}

.title-stage-strip li.done {
  color: var(--success);
}

.title-stage-strip li.done span {
  border-color: var(--success);
  background: #ecfdf5;
}

.title-stage-strip li.attention {
  color: #8a5a00;
}

.title-stage-strip li.attention span {
  border-color: #d99a16;
  background: #fff7df;
  color: #8a5a00;
}

.title-next-action {
  display: grid;
  gap: 4px;
}

.title-next-action .button {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12px;
}

.portfolio-alerts {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.alert-summary-grid,
.stage-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0 20px;
  border: 1px solid var(--border);
  background: #fff;
}

.alert-summary-grid > div,
.stage-metrics > div {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}

.alert-summary-grid > div:last-child,
.stage-metrics > div:last-child {
  border-right: 0;
}

.alert-summary-grid strong,
.stage-metrics strong {
  font-size: 18px;
}

.alert-summary-grid span,
.stage-metrics span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.portfolio-tables > div {
  padding: 16px;
  border: 1px solid var(--border);
  background: #fff;
}

.back-link {
  display: inline-block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.title-workspace-heading {
  align-items: end;
}

.title-completion {
  display: grid;
  justify-items: end;
}

.title-completion strong {
  font-size: 28px;
}

.title-completion span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.title-workspace-heading .eyebrow {
  display: block;
  margin: 4px 0 2px;
}

.title-360-overview {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(260px, .8fr);
  margin-bottom: 18px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.title-360-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.title-360-metrics > div {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 76px;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}

.title-360-metrics > div.needs-attention {
  box-shadow: inset 0 3px 0 var(--danger);
}

.title-360-metrics strong {
  font-size: 20px;
}

.title-360-metrics span,
.title-360-tasks small {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.title-360-tasks {
  display: grid;
  align-content: start;
  gap: 0;
  padding: 12px 14px;
  background: #f8f9fa;
}

.title-360-tasks > strong {
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
}

.title-360-tasks a {
  display: grid;
  gap: 1px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  color: var(--body-fg);
  text-decoration: none;
}

.title-360-tasks a:last-child {
  border-bottom: 0;
}

.title-360-tasks a.danger span,
.title-360-tasks a.warning span {
  color: var(--danger);
}

.title-workflow-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 22px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.title-context-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: -4px 0 18px;
  padding: 10px 14px;
  overflow-x: auto;
  border: 1px solid var(--border);
  background: #fff;
  white-space: nowrap;
}

.title-context-bar strong {
  margin-right: auto;
}

.title-context-bar a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.avails-checklist {
  min-width: 0;
  max-height: 260px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.avails-checklist > div {
  display: grid;
  gap: 5px;
  max-height: 165px;
  margin-top: 8px;
  overflow-y: auto;
}

.avails-checklist label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.document-type-required {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-left: 4px solid #d99a16;
  background: #fff7df;
}

.required-caption::after {
  content: " *";
  color: var(--danger);
  font-weight: 700;
}

.title-workflow-nav a {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 0 8px;
  min-width: 0;
  padding: 12px 10px;
  border-right: 1px solid var(--border);
  color: var(--body-fg);
  text-decoration: none;
}

.title-workflow-nav a:last-child {
  border-right: 0;
}

.title-workflow-nav a > span {
  display: grid;
  grid-row: 1 / 3;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid #c5cbd1;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}

.title-workflow-nav a.done > span {
  border-color: var(--success);
  background: #ecfdf5;
  color: var(--success);
}

.title-workflow-nav a.pending {
  box-shadow: inset 0 -3px 0 #d4d8dc;
}

.title-workflow-nav a.attention {
  box-shadow: inset 0 -3px 0 #d99a16;
}

.title-workflow-nav a.attention > span {
  border-color: #d99a16;
  background: #fff7df;
  color: #8a5a00;
}

.title-workflow-nav strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-workflow-nav small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-workflow-section {
  scroll-margin-top: 70px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.workflow-section-heading {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.workflow-section-heading h2,
.workflow-section-heading p {
  margin: 0;
}

.workflow-section-heading p {
  color: var(--muted);
  font-size: 12px;
}

.workflow-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  background: var(--primary);
  color: var(--button-fg);
  font-weight: 700;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.data-grid > div {
  padding: 10px 12px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.data-grid .wide {
  grid-column: span 3;
}

.data-grid dt,
.compact-stats dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.data-grid dd,
.compact-stats dd {
  margin: 3px 0 0;
  font-weight: 600;
}

.split-summary {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  gap: 18px;
  margin-bottom: 16px;
}

.record-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.record-line > div:first-child,
td small {
  display: grid;
}

.statement-logic {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin: 0 0 16px;
  padding: 8px 12px;
  border-left: 4px solid var(--primary);
}

.statement-logic strong,
.statement-logic small {
  flex-basis: 100%;
}

.statement-logic span {
  color: var(--body-fg);
  font-size: 12px;
  font-weight: 600;
}

.statement-logic small,
.statement-term small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.statement-center-form {
  display: block;
}

.statement-actions,
.statement-status-control {
  display: flex;
  align-items: center;
  gap: 7px;
}

.statement-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.statement-status-control select {
  width: 168px;
  min-height: 32px;
  padding-block: 5px;
}

.compact-button,
.button.compact-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.statement-table {
  min-width: 930px;
}

.statement-table th:first-child,
.statement-table td:first-child {
  width: 32px;
  text-align: center;
}

.statement-table th:nth-child(2),
.statement-table td:nth-child(2) {
  min-width: 155px;
}

.statement-table th:nth-child(3),
.statement-table td:nth-child(3) {
  min-width: 110px;
}

.statement-table th:nth-child(4),
.statement-table td:nth-child(4) {
  min-width: 85px;
}

.statement-table th:nth-child(n+5):nth-child(-n+8),
.statement-table td:nth-child(n+5):nth-child(-n+8) {
  min-width: 112px;
}

.statement-table th:nth-child(9),
.statement-table td:nth-child(9) {
  min-width: 95px;
}

.statement-row-links {
  display: flex;
  gap: 9px;
  margin-top: 3px;
  font-size: 11px;
  white-space: nowrap;
}

.statement-period {
  white-space: nowrap;
}

.visually-hidden {
  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;
}

.statement-term,
.statement-term small {
  display: block;
  white-space: nowrap;
}

.statement-table .statement-term,
.statement-table .statement-term small {
  line-height: 1.25;
  white-space: normal;
}

.record-line span,
.record-line small,
td small {
  color: var(--muted);
  font-size: 11px;
}

.compact-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.compact-stats > div {
  padding: 10px;
  border: 1px solid var(--border);
}

.inline-empty {
  padding: 18px;
  border: 1px dashed #b8c0c7;
  color: var(--muted);
  background: #fafbfb;
}

.issue-list {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--danger);
  background: #fff5f5;
}

.data-columns h3 {
  margin-top: 0;
}

.pa-budget-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 10px;
}

.title-booking-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
  align-items: center;
  gap: 0;
  margin: -8px 0 18px;
  border: 1px solid var(--border);
  background: #f8f9fa;
}

.title-booking-band > div {
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  border-right: 1px solid var(--border);
}

.title-booking-band span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.title-booking-band .button {
  margin: 8px 10px;
}

.pa-budget-heading h3,
.pa-budget-heading p {
  margin: 0;
}

.pa-budget-heading p {
  color: var(--muted);
  font-size: 11px;
}

.pa-budget-currency-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  margin-bottom: 12px;
  border: 1px solid var(--border);
  background: #f8f9fa;
}

.pa-budget-currency-totals > div {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: stretch;
  border-right: 1px solid var(--border);
}

.pa-budget-currency-totals > div:last-child {
  border-right: 0;
}

.pa-budget-currency-totals > div > strong {
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 15px;
}

.pa-budget-currency-totals dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.pa-budget-currency-totals dl > div {
  padding: 9px 10px;
  border-left: 1px solid var(--border);
}

.pa-budget-currency-totals dl > div.unallocated {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  color: var(--danger);
}

.pa-budget-currency-totals dt {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.pa-budget-currency-totals dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.pa-budget-list {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin-bottom: 14px;
}

.pa-budget-summary {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
}

.pa-budget-summary > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  cursor: pointer;
  background: #f8f9fa;
  list-style-position: inside;
  min-width: 0;
}

.pa-budget-summary > .table-scroll {
  width: 100%;
  max-width: 100%;
}

.pa-budget-summary > summary > span:first-of-type {
  display: grid;
}

.pa-budget-summary > summary small {
  color: var(--muted);
}

.pa-budget-summary-total {
  font-weight: 700;
  white-space: nowrap;
}

.text-action {
  font-size: 12px;
  font-weight: 700;
}

.pa-budget-table {
  min-width: 760px;
}

.pa-budget-table tfoot th {
  border-top: 2px solid var(--border);
  background: #fff;
}

.pa-budget-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.pa-budget-empty > div {
  display: grid;
  gap: 3px;
}

.pa-budget-empty span {
  font-size: 12px;
}

.linked-records {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: #f8f9fa;
}

.linked-records summary {
  cursor: pointer;
  font-weight: 700;
}

.plan-summary {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  border: 1px solid var(--border);
  background: #f8f9fa;
}

.plan-summary > div {
  display: grid;
  gap: 2px;
  padding: 11px 13px;
  border-right: 1px solid var(--border);
}

.plan-summary > div:last-child {
  border-right: 0;
}

.plan-summary span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.waterfall-step-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.waterfall-step-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.waterfall-step-list li > span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--button-fg);
  font-size: 11px;
  font-weight: 700;
}

.waterfall-step-list li > div:nth-child(2) {
  display: grid;
}

.waterfall-step-list small {
  color: var(--muted);
}

.title-setup-form {
  display: block;
}

.title-setup-form fieldset {
  margin-top: 0;
}

.title-setup-form legend {
  padding: 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.setup-field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.setup-field-grid label {
  align-content: start;
}

.setup-field-grid input,
.setup-field-grid select,
.setup-field-grid textarea {
  width: 100%;
}

.setup-field-grid .span-all {
  grid-column: 1 / -1;
}

.form-submit-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
}

.pa-budget-form {
  display: block;
}

.compact-heading {
  margin-bottom: 12px;
}

.budget-header-grid {
  grid-template-columns: 2fr repeat(4, minmax(125px, 1fr));
}

.pa-budget-lines {
  display: grid;
  gap: 10px;
}

.pa-budget-line {
  border: 1px solid var(--border);
  background: #fff;
}

.pa-budget-line > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  background: #f8f9fa;
}

.pa-budget-line-body {
  padding: 14px;
  border-top: 1px solid var(--border);
}

.budget-line-grid {
  grid-template-columns: minmax(210px, 2fr) minmax(150px, 1fr) minmax(140px, 1fr) 95px;
}

.budget-line-grid .check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.budget-line-grid .check-label input {
  width: auto;
}

.budget-line-grid .budget-delete {
  color: var(--danger);
}

.document-intake {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.document-intake form {
  display: flex;
  align-items: end;
  flex: 1 1 auto;
  gap: 12px;
}

.document-intake form label {
  min-width: 280px;
  flex: 1 1 auto;
}

.document-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(95px, 1fr));
  border-left: 1px solid var(--border);
}

.document-summary div {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 0 16px;
  border-right: 1px solid var(--border);
}

.document-summary div:last-child {
  border-right: 0;
}

.document-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.document-summary strong {
  font-size: 22px;
}

.document-filters {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.document-filters a {
  padding: 8px 12px 7px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.document-filters a.active {
  border-bottom-color: var(--primary);
  color: var(--body-fg);
}

.document-workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 680px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.document-queue {
  min-width: 0;
  border-right: 1px solid var(--border);
  background: #f7f8f9;
}

.document-queue-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--body-fg);
  text-decoration: none;
}

.document-queue-item:hover,
.document-queue-item.active {
  background: #fff;
}

.document-queue-item.active {
  box-shadow: inset 4px 0 0 var(--primary);
}

.document-type-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #aab2bb;
  background: #fff;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.document-queue-copy {
  display: grid;
  min-width: 0;
}

.document-queue-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-queue-copy small {
  color: var(--muted);
}

.document-queue-item .status-pill {
  grid-column: 2;
  justify-self: start;
}

.document-review {
  min-width: 0;
  padding: 18px;
}

.document-review-heading,
.document-actions,
.report-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.document-review-heading h2 {
  overflow-wrap: anywhere;
  margin: 0 0 3px;
}

.document-actions {
  margin: 14px 0;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.document-classification {
  display: flex;
  align-items: end;
  gap: 8px;
}

.document-classification label {
  min-width: 230px;
}

.confidence {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.document-review-grid {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(0, 1.35fr);
  gap: 18px;
}

.document-pane-title {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.document-preview,
.document-data-pane {
  min-width: 0;
}

.document-preview iframe,
.document-preview img,
.file-preview-fallback {
  display: block;
  width: 100%;
  height: 600px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  background: #f1f3f5;
}

.document-preview img {
  object-fit: contain;
}

.file-preview-fallback {
  display: grid;
  place-content: center;
  gap: 6px;
  height: 280px;
  text-align: center;
}

.file-preview-fallback strong {
  color: var(--primary);
  font-size: 32px;
}

.document-cost-form {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.document-cost-form button {
  grid-column: 1 / -1;
}

.document-cost-form .check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.document-cost-form .check-label input {
  min-width: auto;
}

.document-note,
.processed-result,
.document-unrecognized {
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  background: #f8fafb;
}

.processed-result {
  display: grid;
  gap: 6px;
  border-left-color: var(--success);
}

.extracted-hints {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: #f8fafb;
  color: var(--muted);
  font-size: 12px;
}

.document-report-form {
  display: block;
}

.report-bulk-actions {
  justify-content: flex-start;
  align-items: end;
  margin-bottom: 10px;
}

.report-bulk-actions label {
  min-width: 220px;
}

.document-row-table table {
  min-width: 980px;
}

.document-row-table input[type="checkbox"] {
  min-width: auto;
}

.document-empty {
  padding: 30px 18px;
  color: var(--muted);
  text-align: center;
}

.document-empty.large {
  display: grid;
  min-height: 500px;
  place-content: center;
}

.document-intake-v2 {
  display: grid;
  grid-template-columns: minmax(520px, 1.4fr) minmax(210px, .65fr) auto;
  align-items: end;
}

.document-intake-v2 form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(190px, .7fr) auto;
}

.document-intake-v2 form label {
  min-width: 0;
}

.document-intake-v2 input[type="file"],
.document-intake-v2 select {
  width: 100%;
  max-width: 100%;
}

.document-intake-note {
  display: grid;
  flex: 0 1 320px;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.document-intake-note strong {
  color: var(--body-fg);
}

.document-list-panel,
.document-recognition-panel,
.document-result-panel,
.document-rows-panel,
.document-row-editor,
.document-source-panel,
.document-data-panel {
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.document-list-panel,
.document-rows-panel {
  overflow: hidden;
}

.document-list-panel .section-header,
.document-rows-panel .section-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.document-list-table {
  min-width: 870px;
}

.document-list-table td {
  vertical-align: middle;
}

.document-list-table strong,
.document-list-table small {
  display: block;
}

.document-list-table small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.document-list-table tr.selected td {
  background: #edf5ff;
}

.document-review-page-heading {
  align-items: end;
}

.back-link {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.back-link::before {
  content: "← ";
}

.document-recognition-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 14px;
  padding: 14px 18px;
}

.document-recognition-panel > div {
  display: grid;
  gap: 2px;
}

.document-recognition-panel > div strong {
  font-size: 18px;
}

.document-recognition-panel > div small,
.document-recognition-panel p {
  color: var(--muted);
  font-size: 12px;
}

.document-recognition-panel p {
  flex: 1 1 260px;
  margin: 0;
}

.document-type-correction {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.document-type-correction summary,
.document-reject-details summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 700;
}

.inline-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.inline-form label {
  min-width: 220px;
}

.document-review-layout,
.document-row-workspace {
  display: grid;
  grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
}

.document-source-panel,
.document-data-panel,
.document-row-editor {
  min-width: 0;
  padding: 18px;
}

.document-source-panel h2,
.document-data-panel h2 {
  margin-top: 0;
}

.document-source-panel iframe,
.document-source-panel img {
  display: block;
  width: 100%;
  height: 560px;
  border: 1px solid var(--border);
  object-fit: contain;
}

.document-result-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 18px;
  border-left: 4px solid var(--success);
}

.document-result-panel h2,
.document-result-panel p {
  margin: 0;
}

.document-report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.document-report-summary > div {
  display: grid;
  gap: 4px;
  padding: 14px 18px;
  border-right: 1px solid var(--border);
}

.document-report-summary > div:last-child {
  border-right: 0;
}

.document-report-summary span,
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.document-report-summary strong {
  font-size: 18px;
}

.document-row-workspace {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  margin-top: 14px;
}

.document-row-editor .section-header {
  align-items: start;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.document-row-editor .section-header h2 {
  margin: 3px 0 0;
}

.document-row-form .setup-field-grid {
  margin-top: 14px;
}

.document-assignment-form,
.document-next-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, .6fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #bfd7f5;
  border-left: 4px solid var(--primary);
  background: #f3f8fe;
}

.document-assignment-form > div,
.document-next-step {
  color: var(--body-fg);
}

.document-assignment-form > div strong,
.document-assignment-form > div small,
.document-next-step strong,
.document-next-step span {
  display: block;
}

.document-assignment-form > div small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.document-next-step {
  grid-template-columns: minmax(0, 1fr) auto;
}

.document-next-step .eyebrow {
  grid-column: 1;
}

.document-next-step strong {
  grid-column: 1;
}

.document-next-step a {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.document-reject-details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.document-rejection-form {
  display: grid;
  grid-template-columns: minmax(180px, .55fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 10px;
}

.document-rejection-result {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #e2c6c6;
  border-left: 4px solid var(--danger);
  background: #fff7f7;
}

.danger-button {
  border-color: var(--danger);
  background: var(--danger);
}

.danger-button:hover,
.danger-button:focus-visible {
  background: #b32d2e;
}

.title-heading-actions {
  align-items: center;
}

.title-delete-page {
  max-width: 1120px;
}

.title-delete-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
}

.title-delete-summary,
.title-delete-decision {
  margin: 0;
}

.title-delete-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.title-delete-counts > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.title-delete-counts > div:nth-child(4n) {
  border-right: 0;
}

.title-delete-counts > div:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.title-delete-counts strong {
  color: var(--text);
  font-size: 20px;
}

.title-delete-counts span {
  color: var(--muted);
  font-size: 12px;
}

.title-delete-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.title-delete-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}

.title-delete-option:has(input:checked) {
  border-color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
}

.title-delete-option input {
  margin-top: 3px;
}

.title-delete-option span {
  display: grid;
  gap: 6px;
}

.title-delete-option small {
  color: var(--muted);
  line-height: 1.45;
}

.title-delete-reason {
  display: grid;
  gap: 6px;
  padding: 0 16px 16px;
  font-weight: 700;
}

.title-delete-reason textarea {
  width: 100%;
  box-sizing: border-box;
  font-weight: 400;
}

.title-delete-confirmation {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 16px;
  font-weight: 700;
}

.title-delete-actions {
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .title-delete-counts,
  .title-delete-options {
    grid-template-columns: 1fr;
  }

  .title-delete-counts > div,
  .title-delete-counts > div:nth-child(4n),
  .title-delete-counts > div:nth-last-child(-n + 4) {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .title-delete-counts > div:last-child {
    border-bottom: 0;
  }
}

.document-row-source {
  position: sticky;
  top: 84px;
}

@media (max-width: 1200px) {
  .catalog-export-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-export-action {
    align-self: start;
  }

  .document-intake-v2 {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .document-intake-v2 form {
    grid-column: 1 / -1;
  }

  .document-intake-v2 .document-summary {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 720px) {
  body,
  body.sidebar-collapsed {
    --sidebar-width: 0px;
    padding-left: 0;
  }

  body.sidebar-mobile-open {
    overflow: hidden;
  }

  .toolbar form.avails-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .avails-form .avails-checklist {
    grid-column: span 1;
  }

  .avails-form > button {
    grid-column: 1 / -1;
  }

  .settlement-selector .settlement-plan,
  .settlement-selector .settlement-open {
    grid-column: auto;
    grid-row: auto;
  }

  .app-sidebar {
    width: var(--sidebar-expanded);
    max-width: calc(100vw - 48px);
    transform: translateX(-100%);
  }

  body.sidebar-mobile-open .app-sidebar {
    box-shadow: 8px 0 24px rgba(0, 0, 0, .22);
    transform: translateX(0);
  }

  .sidebar-header {
    padding: 8px 10px 8px 14px;
  }

  body.sidebar-collapsed .sidebar-header {
    justify-content: space-between;
    padding: 8px 10px 8px 14px;
  }

  body.sidebar-collapsed .sidebar-brand,
  body.sidebar-collapsed .sidebar-label,
  body.sidebar-collapsed .sidebar-section-label {
    display: flex;
  }

  body.sidebar-collapsed .sidebar-link {
    justify-content: flex-start;
    padding-inline: 12px;
  }

  .sidebar-toggle-expanded,
  .sidebar-toggle-collapsed,
  .sidebar-toggle-mark,
  body.sidebar-collapsed .sidebar-toggle-collapsed {
    display: none;
  }

  .sidebar-toggle-mobile {
    display: block;
  }

  .sidebar-toggle::after,
  body.sidebar-collapsed .sidebar-link::after {
    display: none;
  }

  .sidebar-overlay {
    position: fixed;
    z-index: 950;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(29, 35, 39, .52) !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }

  .sidebar-overlay:hover,
  .sidebar-overlay:focus,
  .sidebar-overlay:focus-visible,
  .sidebar-overlay:active {
    background: rgba(29, 35, 39, .52) !important;
    box-shadow: none !important;
    outline: 0;
  }

  body.sidebar-mobile-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .app-header {
    padding: 0 18px;
  }

  .mobile-menu-toggle {
    display: flex;
    border-color: var(--border);
    color: var(--body-fg);
  }

  .mobile-menu-toggle:hover,
  .mobile-menu-toggle:focus-visible {
    border-color: var(--primary);
    background: #f0f6fc;
    color: var(--primary);
  }

  .title-360-overview {
    grid-template-columns: 1fr;
  }

  .title-360-metrics > div:last-child {
    border-right: 0;
  }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .title-work-row {
    grid-template-columns: minmax(160px, 1fr) 125px;
  }
}

@media (max-width: 720px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-header {
    padding-inline: 14px;
  }

  main {
    min-width: 0;
    padding: 18px;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading .action-bar {
    width: 100%;
  }

  .page-heading .action-bar .button {
    flex: 1 1 auto;
  }

  .table-scroll {
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }

  .toolbar form,
  .booking-filter-band form,
  .security-filter {
    grid-template-columns: 1fr !important;
  }

  button,
  .button,
  .button.secondary,
  .button.export,
  .button.ghost,
  .danger-button,
  .compact-button,
  .text-action,
  .title-next-action .button,
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    min-height: 44px;
  }

  .catalog-export-form,
  .catalog-export-title-tools,
  .catalog-title-list,
  .catalog-period {
    grid-template-columns: 1fr;
  }

  .catalog-export-action small {
    max-width: none;
  }

  .two {
    grid-template-columns: 1fr;
  }

  .wizard-layout,
  .form-grid.three-fields {
    grid-template-columns: 1fr;
  }

  .title-command-bar,
  .title-command-bar form {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar form.avails-form,
  .document-intake-v2 {
    grid-template-columns: 1fr;
  }

  .avails-form .avails-checklist,
  .avails-form > button,
  .document-intake-v2 form,
  .document-intake-v2 .document-summary {
    grid-column: auto;
    grid-row: auto;
  }

  .avails-form > button {
    width: 100%;
    min-width: 0;
  }

  .dashboard-document-task-list article {
    align-items: stretch;
    flex-direction: column;
  }

  .title-work-row {
    grid-template-columns: 1fr;
  }

  .title-stage-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px 4px;
  }

  .title-next-action {
    grid-template-columns: 1fr;
  }

  .title-360-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .title-360-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .title-360-metrics > div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
  }

  .title-workflow-nav {
    grid-template-columns: 1fr 1fr;
  }

  .title-workflow-nav a:nth-child(even) {
    border-right: 0;
  }

  .title-workflow-nav a:nth-child(-n+4) {
    border-bottom: 1px solid var(--border);
  }

  .workflow-section-heading {
    grid-template-columns: 34px 1fr;
  }

  .workflow-section-heading > .button,
  .workflow-section-heading > .action-bar {
    grid-column: 1 / -1;
  }

  .data-grid,
  .split-summary,
  .plan-summary,
  .setup-field-grid,
  .budget-header-grid,
  .budget-line-grid {
    grid-template-columns: 1fr;
  }

  .setup-field-grid .span-all {
    grid-column: auto;
  }

  .data-grid .wide {
    grid-column: auto;
  }

  .alert-summary-grid,
  .stage-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .pa-budget-currency-totals {
    grid-template-columns: 1fr;
  }

  .title-booking-band {
    grid-template-columns: 1fr;
  }

  .title-booking-band > div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .pa-budget-currency-totals > div {
    grid-template-columns: 48px minmax(0, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .pa-budget-currency-totals > div:last-child {
    border-bottom: 0;
  }

  .pa-budget-summary > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pa-budget-summary > summary .text-action {
    grid-column: 1 / -1;
  }

  .pa-budget-empty {
    align-items: stretch;
    flex-direction: column;
  }

  .alert-summary-grid > div:nth-child(2),
  .stage-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .wizard-preview {
    position: static;
  }

  .choice-panel ul,
  #id_territories,
  #id_exploitation_fields,
  #id_pa_cost_categories {
    grid-template-columns: 1fr;
  }

  .card {
    overflow-x: auto;
  }

  .workflow-steps {
    grid-template-columns: 1fr 1fr;
  }

  .settlement-concepts {
    grid-template-columns: 1fr;
  }

  .settlement-concepts > div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .workflow-steps li:nth-child(2) {
    border-right: 0;
  }

  .workflow-steps li:nth-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }

  .settlement-selector form,
  .invoice-upload-form,
  form.single-upload,
  .statement-finalize-form {
    grid-template-columns: 1fr;
  }

  .document-intake,
  .document-intake form,
  .document-actions,
  .report-bulk-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .source-intake-shortcut {
    align-items: stretch;
    flex-direction: column;
  }

  .document-intake form label,
  .document-classification label,
  .report-bulk-actions label {
    min-width: 0;
  }

  .document-summary {
    border-top: 1px solid var(--border);
    border-left: 0;
    padding-top: 12px;
  }

  .document-workspace {
    grid-template-columns: 1fr;
  }

  .document-queue {
    max-height: 270px;
    overflow-y: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .document-review-grid,
  .document-cost-form {
    grid-template-columns: 1fr;
  }

  .document-preview iframe,
  .document-preview img {
    height: 440px;
  }

  .document-classification {
    align-items: stretch;
    flex: 1 1 auto;
  }

  .confidence {
    margin-left: 0;
  }

  .document-review-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-intake-v2 form,
  .document-review-layout,
  .document-row-workspace,
  .document-assignment-form,
  .document-next-step,
  .document-rejection-form {
    grid-template-columns: 1fr;
  }

  .document-intake-note {
    flex-basis: auto;
  }

  .document-recognition-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-type-correction {
    margin-left: 0;
  }

  .document-report-summary {
    grid-template-columns: 1fr;
  }

  .document-report-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .document-report-summary > div:last-child {
    border-bottom: 0;
  }

  .document-row-source {
    position: static;
  }

  .document-source-panel iframe,
  .document-source-panel img {
    height: 420px;
  }

  .document-next-step .eyebrow,
  .document-next-step strong,
  .document-next-step a {
    grid-column: auto;
    grid-row: auto;
  }

  .extracted-hints {
    flex-direction: column;
    gap: 5px;
  }

  .settlement-totals {
    grid-template-columns: 1fr 1fr;
  }

  .settlement-totals div:nth-child(2) {
    border-right: 0;
  }

  .settlement-totals div:nth-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }
}
