.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.page-head h1 {
  margin: 0;
}

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

.statement-head .page-actions {
  justify-content: flex-start;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.eyebrow a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 650;
}

.eyebrow a:hover {
  text-decoration: underline;
}

.page-actions,
.action-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: flex-end;
}

.action-row label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 9rem;
  font-size: 0.75rem;
  font-weight: 650;
}

.button,
.auth-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-h);
  min-height: var(--control-h);
  padding: 0 0.7rem;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 650;
  font-size: 0.8125rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button:hover,
.auth-form button:hover {
  background: var(--brand-hover);
}

.button-secondary {
  background: var(--surface);
  color: var(--brand);
}

.button-secondary:hover {
  background: #f6f8fb;
}

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

.button-danger:hover {
  background: #7c2727;
}

.panel,
.setup-panel,
.formula,
.hero-panel,
.auth-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.65rem;
}

.auth-panel {
  padding: 1.1rem 1.15rem 1rem;
}

.auth-panel h1,
.hero-panel h1 {
  margin-bottom: 0.35rem;
}

.panel h2,
.setup-panel h2,
.formula summary {
  margin: 0 0 0.4rem;
}

.formula summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--brand);
}

.section-label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.available-section {
  margin-bottom: 0.75rem;
}

.available-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.available-card {
  display: flex;
  flex: 1 1 15rem;
  flex-direction: column;
  gap: 0.12rem;
  max-width: 18.5rem;
  min-height: 6.1rem;
  padding: 0.6rem 0.7rem 0.55rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.available-card:hover {
  border-color: #c5d0de;
  border-left-color: var(--brand);
}

.available-name {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--muted);
}

.available-name .sub {
  display: inline;
  margin-left: 0.2rem;
}

.available-value {
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--ink);
}

.available-label,
.available-meta {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}

.available-label {
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.available-meta {
  margin-top: auto;
  font-weight: 500;
}

.filter-bar,
.toolbar,
.filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.45rem 0.6rem;
  margin-bottom: 0.6rem;
}

.toolbar label,
.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 650;
}

.filter-grid .field,
.toolbar .field,
.filter-bar .field {
  flex: 1 1 9rem;
  min-width: 8.25rem;
  max-width: 16rem;
}

.filter-grid .form-actions,
.toolbar .form-actions,
.form-actions-inline {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
}

.check {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  min-height: var(--control-h);
  font-weight: 600;
  font-size: 0.8125rem;
}

.check-line {
  min-height: var(--control-h);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 0.65rem;
}

.panel .table-scroll,
.panel .table-scroll:last-child {
  margin-bottom: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.data-table th,
.data-table td {
  padding: 0.32rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table th {
  position: sticky;
  top: 0;
  background: #f7f8fa;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.data-table tbody tr:last-child td,
.data-table tbody tr:last-child th {
  border-bottom: 0;
}

.data-table tbody tr[data-href] {
  cursor: pointer;
}

.data-table tbody tr[data-href]:hover,
.data-table tbody tr:hover {
  background: #f6f8fb;
}

.data-table .num,
.kpi-grid dd,
.detail-grid dd,
.available-value {
  font-variant-numeric: tabular-nums lining-nums;
}

.data-table .num,
.kpi-grid dd {
  text-align: right;
}

.data-table th.num {
  text-align: right;
}

.data-table .emphasis,
.data-table th.emphasis {
  background: #f3f6fa;
  font-weight: 700;
  color: var(--ink);
}

.data-table tbody tr:hover .emphasis {
  background: #e8eef5;
}

.data-table th .sub {
  display: inline;
  margin-left: 0.25rem;
}

.data-table a {
  font-weight: 650;
  text-decoration: none;
}

.data-table a:hover {
  text-decoration: underline;
}

.actions {
  white-space: nowrap;
}

.actions form {
  display: inline;
  margin-left: 0.45rem;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 1rem !important;
  white-space: normal !important;
}

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

.pill {
  display: inline-block;
  padding: 0.02rem 0.38rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.pill-pending,
.pill-warn,
.pill-duplicate,
.pill-unidentified,
.pill-missing { background: #f8f1e3; color: var(--warn); }
.pill-initiated { background: #e7eef6; color: #1c3d66; }
.pill-posted,
.pill-reconciled,
.pill-approved,
.pill-ok { background: #e7f3ec; color: var(--ok); }
.pill-entered { background: #e7eef6; color: #1c3d66; }
.pill-void,
.pill-ready { background: #eef1f4; color: #5c6772; }
.pill-danger,
.pill-error { background: #f8e8e8; color: var(--danger); }

.cell-input,
.stack-form input,
.stack-form select,
.cell-form input,
.cell-form select {
  width: 100%;
  min-width: 7rem;
}

.review-table select[name$="-gl_account"] {
  color: var(--ink);
  font-weight: 400;
}

.review-table select[name$="-gl_account"]:has(option[value=""]:checked),
.review-table select[name$="-gl_account"] option[value=""] {
  color: var(--danger);
  font-weight: 700;
}

.review-table select[name$="-gl_account"] option:not([value=""]) {
  color: var(--ink);
  font-weight: 400;
}

.review-table td,
.compare-table td,
.preview-table td {
  white-space: normal;
  vertical-align: top;
}

.review-table .actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  white-space: normal;
}

.save-status {
  font-size: 0.75rem;
  line-height: 1.3;
}

.save-status.is-saving {
  color: #6b7280;
}

.save-status.is-saved {
  color: #15803d;
}

.save-status.is-failed {
  color: #dc2626;
}

.save-retry {
  border: 0;
  padding: 0;
  background: none;
  color: #dc2626;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  text-decoration: underline;
  cursor: pointer;
}

.review-table .actions form,
.review-table .actions .button {
  margin-left: 0;
}

.util-high { color: var(--warn); font-weight: 700; }
.util-over { color: var(--danger); font-weight: 700; }

.meter {
  display: block;
  height: 0.28rem;
  margin-top: 0.25rem;
  border-radius: 999px;
  background: #e6ebf0;
  overflow: hidden;
  min-width: 3.5rem;
}

.meter-fill {
  display: block;
  height: 100%;
  background: var(--brand);
}

.meter-fill.util-high { background: var(--warn); }
.meter-fill.util-over { background: var(--danger); }

.kpi-grid,
.detail-grid,
.form-grid,
.side-grid {
  display: grid;
  gap: 0.5rem 0.65rem;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0.65rem;
}

.kpi-grid div,
.detail-grid {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.45rem 0.6rem;
}

.kpi-lead {
  grid-column: span 2;
  border-left: 3px solid var(--brand);
}

.kpi-lead dd {
  font-size: 1.45rem;
  line-height: 1.1;
}

.detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.65rem;
}

.detail-grid div {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.kpi-grid dt,
.detail-grid dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-grid dd,
.detail-grid dd {
  margin: 0.12rem 0 0;
  font-size: 0.95rem;
  font-weight: 650;
  text-align: left;
}

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

.field-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 0 0 0.55rem;
  padding: 0.55rem 0.7rem 0.7rem;
}

.field-group legend {
  padding: 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-group .form-grid {
  margin: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.label-line label,
.field > label,
.field-group label,
.auth-form label,
.action-row label {
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.2;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="reset"]),
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="reset"]):not([type="file"]),
select {
  height: var(--control-h);
  min-height: var(--control-h);
  padding: 0 0.5rem;
  line-height: calc(var(--control-h) - 2px);
}

input[type="file"] {
  height: var(--control-h);
  min-height: var(--control-h);
  padding: 0.15rem 0.45rem;
  line-height: 1.2;
}

select {
  appearance: none;
  padding-right: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235d6b7c' d='M1.2 1.4 6 6.2 10.8 1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  background-size: 0.65rem;
}

textarea {
  min-height: 4.25rem;
  padding: 0.4rem 0.5rem;
  resize: vertical;
  line-height: 1.4;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 2px solid transparent;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
}

.field-error,
.errorlist,
.form-error {
  color: var(--danger);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
}

.form-error,
.form-grid > .form-error,
.form-grid > .errorlist,
.filter-grid > .form-error {
  grid-column: 1 / -1;
}

.form-actions {
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
}

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

.stack-form,
.cell-form {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 9.5rem;
}

.stack-form .form-actions,
.cell-form .form-actions {
  margin-top: 0.15rem;
  padding-top: 0;
  border-top: 0;
}

.side-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.side-grid .form-grid {
  grid-template-columns: 1fr;
}

.info-tip {
  text-transform: none;
  letter-spacing: 0;
}

.card-list {
  list-style: none;
  margin: 0 0 0.55rem;
  padding: 0;
}

.card-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  align-items: center;
  padding: 0.28rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
}

.card-list form {
  margin: 0;
}

.panel ul,
.panel ol {
  margin: 0.15rem 0 0;
  padding-left: 1.1rem;
}

.panel li + li {
  margin-top: 0.12rem;
}

.result-count {
  color: var(--muted);
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
}

.pager {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 0.45rem 0 0.65rem;
  font-size: 0.8125rem;
}

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

.audit-list > li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}

.audit-list > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.audit-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  font-size: 0.8125rem;
}

.audit-list ul {
  margin: 0.25rem 0 0;
  padding-left: 1.05rem;
}

.audit-field {
  font-weight: 700;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.auth-form {
  display: grid;
  gap: 0.65rem;
}

.auth-form label {
  display: grid;
  gap: 0.2rem;
}

.auth-form button {
  justify-self: start;
  margin-top: 0.15rem;
}

@media (max-width: 1100px) {
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 800px) {
  .kpi-grid,
  .side-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .available-value,
  .kpi-lead dd {
    font-size: 1.3rem;
  }
}

@media (max-width: 640px) {
  .available-card {
    flex-basis: 100%;
    max-width: none;
  }

  .kpi-grid,
  .detail-grid,
  .form-grid,
  .side-grid,
  .field-group.slot-grid {
    grid-template-columns: 1fr;
  }

  .kpi-lead {
    grid-column: 1 / -1;
  }

  .filter-grid .field,
  .toolbar .field,
  .filter-bar .field {
    max-width: none;
    flex-basis: 100%;
  }
}

@media (min-width: 1280px) {
  .available-value {
    font-size: 1.65rem;
  }
}

.doc-search {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.45rem 0.6rem;
}

.doc-search .field {
  flex: 1 1 16rem;
  max-width: 24rem;
}

.doc-search-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: 0.75rem;
  max-height: calc(100vh - 1.5rem);
  overflow: auto;
}

.doc-toc .toc {
  font-size: 0.78rem;
  line-height: 1.35;
}

.doc-toc .toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-toc .toc ul ul {
  margin-left: 0.7rem;
}

.doc-toc .toc li {
  margin: 0.22rem 0;
}

.doc-toc .toc a {
  color: var(--brand);
  text-decoration: none;
}

.doc-toc .toc a:hover {
  text-decoration: underline;
}

.doc-body h1,
.doc-body h2,
.doc-body h3 {
  scroll-margin-top: 3rem;
}

.doc-body h1 {
  font-size: 1.15rem;
  margin: 1rem 0 0.45rem;
}

.doc-body h2 {
  font-size: 0.98rem;
  margin: 1.15rem 0 0.4rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.doc-body h3 {
  font-size: 0.88rem;
  margin: 0.9rem 0 0.3rem;
}

.doc-body > :first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.doc-body p,
.doc-body ul,
.doc-body ol {
  margin: 0.35rem 0 0.7rem;
}

.doc-body ul,
.doc-body ol {
  padding-left: 1.2rem;
}

.doc-body li + li {
  margin-top: 0.2rem;
}

.doc-body a {
  text-underline-offset: 0.12em;
}

.doc-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}

.doc-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84em;
}

.doc-body pre {
  overflow-x: auto;
  margin: 0.45rem 0 0.8rem;
  padding: 0.55rem 0.65rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.doc-body pre code {
  font-size: 0.78rem;
}

.table-scroll {
  overflow-x: auto;
  margin: 0.45rem 0 0.8rem;
}

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.doc-body th,
.doc-body td {
  padding: 0.35rem 0.45rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.doc-body th {
  background: #f7f8fa;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.45rem 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

mark.doc-hit {
  background: #f3e2a4;
  color: inherit;
  padding: 0;
}

mark.doc-hit.is-current {
  background: #e2b340;
  outline: 1px solid var(--warn);
}

input[type="date"] {
  cursor: pointer;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Crect x='1.5' y='2.5' width='13' height='12' rx='1.5' fill='none' stroke='%235d6b7c' stroke-width='1.4'/%3E%3Cpath stroke='%235d6b7c' stroke-width='1.4' d='M1.5 6.2h13M5 1.2v2.6M11 1.2v2.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 0.95rem;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  display: none;
}

.vendor-list {
  position: fixed;
  z-index: 40;
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(28, 39, 51, 0.12);
  max-height: 16rem;
  overflow: auto;
}

.vendor-list [role="option"] {
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.vendor-list [role="option"][aria-selected="true"] {
  background: var(--brand-soft);
}

.gl-list {
  max-width: calc(100vw - 16px);
  max-height: 23rem;
}

.gl-list [role="option"] {
  white-space: nowrap;
  line-height: 1.35;
}

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

.reconcile-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--line);
}

.reconcile-row:last-child {
  border-bottom: 0;
}

.reconcile-fact,
.reconcile-actions,
.reconcile-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.55rem;
  align-items: center;
  min-width: 0;
}

.reconcile-fact {
  flex: 1 1 18rem;
}

.reconcile-actions {
  flex: 1 1 16rem;
  justify-content: flex-end;
}

.reconcile-actions form {
  flex: 1 1 14rem;
  justify-content: flex-end;
}

.reconcile-actions select,
.reconcile-actions input {
  width: auto;
  min-width: 0;
  max-width: 14rem;
  flex: 1 1 8rem;
}

.reconcile-fact strong,
.reconcile-fact time,
.reconcile-fact span {
  white-space: normal;
}

.balance-sheet {
  display: grid;
  grid-template-columns: minmax(12rem, 20rem) 8.5rem;
  gap: 0.28rem 1rem;
  margin: 0;
}

.balance-sheet div {
  display: contents;
}

.balance-sheet dt,
.balance-sheet dd {
  margin: 0;
  padding: 0.18rem 0;
  border-bottom: 1px solid var(--line);
}

.balance-sheet dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.statement-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  overflow-anchor: none;
}

.statement-table tr.is-saved td,
.statement-table tr.is-saved th {
  background: #e7f3ec;
}

.statement-table .row-error {
  margin: 0.28rem 0 0;
  color: var(--warn);
  font-size: 0.75rem;
  line-height: 1.3;
}

.statement-table .row-saved-note {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ok);
  font-size: 0.75rem;
  font-weight: 650;
}

.statement-table .button:disabled,
.statement-table .linkish:disabled {
  opacity: 0.55;
  cursor: progress;
}

.statement-table col.col-date { width: 6.1rem; }
.statement-table col.col-merchant { width: 14%; }
.statement-table col.col-type { width: 4.8rem; }
.statement-table col.col-amount { width: 7.1rem; }
.statement-table col.col-status { width: 7.2rem; }
.statement-table col.col-gl { width: 30%; }
.statement-table col.col-action { width: 8.6rem; }

.statement-table th,
.statement-table td {
  padding: 0.38rem 0.35rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}

.statement-table tbody th {
  overflow-wrap: anywhere;
}

.statement-table th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.statement-table .num,
.statement-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.statement-table .sub {
  display: block;
}

.statement-table .pill {
  display: inline;
  white-space: normal;
  overflow-wrap: anywhere;
}

.statement-table select,
.statement-table input,
.statement-table .button {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.statement-table .button {
  white-space: normal;
}

.status-banner {
  border: 1px solid var(--line);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius);
  background: #f8f1e3;
  padding: 0.75rem 0.85rem 0.2rem;
  margin-bottom: 0.75rem;
}

.status-banner h2 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
}

.status-banner-ready {
  border-left-color: var(--ok);
  background: #e7f3ec;
}

.status-banner-done {
  border-left-color: var(--brand);
  background: var(--brand-soft);
}

.difference-clear { color: var(--ok); }
.difference-open { color: var(--warn); font-weight: 700; }

.doc-warnings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.doc-warnings li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.inline-attach {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.inline-attach select {
  min-width: 14rem;
}

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-toc {
    position: static;
    max-height: 14rem;
  }
}

.format-choice {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  align-items: center;
}

.format-choice legend {
  width: 100%;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 650;
}

.choice-list {
  max-height: 16rem;
  overflow: auto;
  display: grid;
  gap: 0.15rem;
}

.choice-list label {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-size: 0.8125rem;
  font-weight: 600;
}

.data-table th.report-title {
  text-transform: none;
  font-weight: 650;
}

.report-subtotal th,
.report-subtotal td {
  font-weight: 700;
  background: #f6f8fb;
}

.row-unassigned th,
.row-unassigned td {
  background: #fbf6ee;
}

.report-grand {
  margin: 0.75rem 0 0;
  font-weight: 700;
}

.receipt-preview {
  display: block;
  max-width: 100%;
  max-height: 40rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.confidence-low {
  color: var(--warn);
  font-weight: 700;
}

.scan-flags {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--warn);
}

.unmatched-report .page-head .report-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
}

.unmatched-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.6rem;
  font-weight: 650;
}

.unmatched-sheet {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.unmatched-sheet th,
.unmatched-sheet td {
  padding: 0.18rem 0.4rem;
  text-align: left;
  vertical-align: top;
}

.unmatched-sheet th {
  border-bottom: 1px solid var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.unmatched-sheet td {
  border-bottom: 1px solid var(--line);
}

.unmatched-sheet .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media print {
  body.report-page .sidebar,
  body.report-page .mobile-bar,
  body.report-page .nav-scrim,
  body.report-page .site-footer,
  body.report-page .report-controls,
  .unmatched-report .page-head .report-controls {
    display: none;
  }

  body.unmatched-report {
    background: #fff;
  }

  body.unmatched-report .app-shell,
  body.unmatched-report .app-body,
  body.unmatched-report .site-main {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
  }

  @page {
    size: letter;
    margin: 0.5in;
  }
}
