:root {
  --app-bg: #f5f4f0;
  --app-surface: #ffffff;
  --app-surface-muted: #f3f6f6;
  --app-sidebar: #edf2f2;
  --app-sidebar-hover: #dcecef;
  --app-primary: #39758a;
  --app-primary-hover: #2c5d6d;
  --app-primary-soft: #dcecef;
  --app-accent: #d8a35d;
  --app-text: #1c292e;
  --app-text-muted: #68777d;
  --app-border: #d8deda;
  --app-success: #33765b;
  --app-danger: #b8473d;
  --app-radius-sm: 8px;
  --app-radius: 14px;
  --app-radius-lg: 20px;
  --app-shadow: 0 12px 34px rgba(28, 41, 46, 0.055);
  --app-header-height: 72px;
  --app-sidebar-width: 264px;
  --app-sidebar-half-width: 132px;
}

.posting-templates-workspace {
  max-width: 1180px;
  margin-inline: auto;
}

.posting-template-form-surface,
.posting-template-list-surface,
.system-template-reference {
  margin-top: 24px;
}

.posting-template-form {
  padding: 26px;
}

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

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

.template-variable-help,
.posting-template-lines,
.posting-template-preview {
  margin-top: 22px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  overflow: hidden;
}

.template-variable-help summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  color: var(--app-primary-hover);
  background: var(--app-primary-soft);
  cursor: pointer;
  list-style: none;
}

.template-variable-help summary .bi-chevron-down { margin-left: auto; }
.template-variable-help > div { padding: 16px 18px; color: var(--app-text-muted); line-height: 1.65; }
.template-variable-help code { padding: 2px 5px; border-radius: 4px; background: var(--app-surface-muted); }

.posting-template-lines { padding: 20px; overflow: visible; }
.posting-template-lines-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.posting-template-lines-heading h3, .posting-template-preview h3 { margin: 0; }
.posting-template-lines-heading p, .posting-template-preview p { margin: 3px 0 0; color: var(--app-text-muted); }
.posting-template-line-labels,
.posting-template-line {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(150px, 1fr) minmax(150px, 1fr) 44px;
  gap: 12px;
  align-items: center;
}
.posting-template-line-labels { padding: 0 4px 8px; color: var(--app-text-muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.posting-template-line { padding: 10px 0; border-top: 1px solid var(--app-border); }
.posting-template-line select, .posting-template-line input { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--app-border); border-radius: var(--app-radius-sm); background: var(--app-surface); }

.posting-template-preview { display: grid; grid-template-columns: 1fr minmax(180px, 240px); gap: 20px; padding: 20px; }
.posting-template-preview-result { grid-column: 1 / -1; }
.posting-template-preview-values { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.posting-template-preview-values span { display: grid; min-width: 120px; padding: 9px 12px; border-radius: var(--app-radius-sm); background: var(--app-surface-muted); font-variant-numeric: tabular-nums; }
.posting-template-preview-values small { color: var(--app-text-muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.posting-template-preview-table { border: 1px solid var(--app-border); border-radius: var(--app-radius-sm); overflow: hidden; }
.posting-template-preview-table > div { display: grid; grid-template-columns: 1fr 150px 150px; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--app-border); }
.posting-template-preview-table > div:first-child { border-top: 0; }
.posting-template-preview-table span:nth-child(n+2) { text-align: right; font-variant-numeric: tabular-nums; }
.posting-template-preview-table .is-heading { color: var(--app-text-muted); background: var(--app-surface-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.posting-template-preview-table .is-total { font-weight: 800; background: var(--app-surface-muted); }
.posting-template-preview-status { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.posting-template-preview-status.is-balanced { color: var(--app-success); }
.posting-template-preview-status.is-unbalanced { color: var(--app-danger); }

.posting-template-settings-list {
  display: grid;
}

.posting-template-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  border-top: 1px solid var(--app-border, #d8e0df);
}

.posting-template-settings-item > div:first-child {
  display: grid;
  gap: 4px;
}

.posting-template-settings-item span,
.posting-template-settings-item small {
  color: var(--app-muted, #65757b);
}

.posting-template-settings-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-template-reference {
  padding: 0;
  overflow: hidden;
}

.system-template-reference summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  cursor: pointer;
  list-style: none;
}

.system-template-reference summary span {
  display: grid;
  gap: 3px;
}

.system-template-reference > p,
.system-template-reference > ul {
  margin-inline: 24px;
}

.system-template-reference > ul {
  padding-bottom: 22px;
}

@media (max-width: 760px) {
  .posting-template-form-grid { grid-template-columns: 1fr; }
  .posting-template-settings-item { align-items: flex-start; flex-direction: column; }
  .posting-template-settings-actions { width: 100%; justify-content: flex-end; }
  .posting-template-line-labels { display: none; }
  .posting-template-line { grid-template-columns: 1fr 1fr 44px; }
  .posting-template-line select { grid-column: 1 / -1; }
  .posting-template-preview { grid-template-columns: 1fr; }
  .posting-template-preview-result { grid-column: 1; overflow-x: auto; }
}

/* Momsrapport */
.vat-toolbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(180px, .85fr) minmax(190px, 1fr) auto;
  align-items: end;
  gap: 1rem;
}

.vat-toolbar [hidden] { display: none !important; }

.vat-custom-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(145px, 1fr));
  gap: .75rem;
}

.vat-refresh-action {
  min-height: 46px;
}

.vat-content {
  display: grid;
  gap: 1.5rem;
}

.vat-declaration-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "a b"
    "c d"
    "e h"
    "e i"
    "e f"
    "e g";
  align-items: stretch;
  border: 2px solid #52666b;
  background: #52666b;
  gap: 2px;
}

.vat-section-a { grid-area: a; }
.vat-section-b { grid-area: b; }
.vat-section-c { grid-area: c; }
.vat-section-d { grid-area: d; }
.vat-section-e { grid-area: e; }
.vat-section-f { grid-area: f; }
.vat-section-g { grid-area: g; }
.vat-section-h { grid-area: h; }
.vat-section-i { grid-area: i; }

.vat-summary-card {
  display: grid;
  grid-template-columns: minmax(140px, .7fr) minmax(220px, 1.5fr) minmax(150px, .6fr);
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  color: #fff;
  background: linear-gradient(120deg, #214f60, #347f94);
  border-radius: 18px;
}

.vat-summary-card span {
  color: rgba(255,255,255,.72);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.vat-summary-card strong { font-size: 1.15rem; }
.vat-summary-card b { font-size: 1.55rem; text-align: right; }
.vat-summary-card small { grid-column: 2 / -1; color: rgba(255,255,255,.9); }
.vat-summary-card.is-refund { background: linear-gradient(120deg, #166044, #278863); }
.vat-summary-card.is-zero { background: linear-gradient(120deg, #4b5563, #6b7280); }

.vat-section {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #edf3f1;
}

.vat-section > h3 {
  margin: 0;
  padding: .65rem .8rem;
  min-height: 48px;
  color: #152c31;
  background: #cbdedc;
  border-bottom: 2px solid #52666b;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.vat-box + .vat-box { border-top: 1px solid #91a3a4; }

.vat-box-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(130px, 1fr) minmax(105px, .32fr) 18px;
  align-items: center;
  gap: .55rem;
  min-height: 58px;
  padding: .45rem .55rem;
  color: var(--app-text);
  background: #f7faf9;
  border: 0;
  text-align: left;
}

.vat-box-toggle:not(:disabled):hover,
.vat-box-toggle:not(:disabled):focus-visible,
.vat-box.is-open > .vat-box-toggle { background: #e8f1ef; }
.vat-box-toggle:disabled { cursor: default; }
.vat-box.is-empty .vat-box-label,
.vat-box.is-empty .vat-box-amount { color: #89979d; }

.vat-box-code {
  display: inline-grid;
  place-items: center;
  align-self: stretch;
  width: 36px;
  min-height: 36px;
  color: #162c31;
  background: #d2e3e1;
  border: 1px solid #718689;
  border-radius: 0;
  font-weight: 850;
}

.vat-box-label { font-size: .78rem; font-weight: 650; line-height: 1.25; }
.vat-box-amount {
  align-self: stretch;
  display: grid;
  place-items: center end;
  min-height: 36px;
  padding: .35rem .55rem;
  text-align: right;
  background: #fff;
  border: 1px solid #718689;
  font-size: .94rem;
  font-variant-numeric: tabular-nums;
}
.vat-number { text-align: right; font-variant-numeric: tabular-nums; }
.vat-box-toggle > i { color: #39798d; transition: transform .2s ease; }
.vat-box.is-open > .vat-box-toggle > i { transform: rotate(180deg); }
.vat-box.is-total > .vat-box-toggle { background: #dceae7; }
.vat-box.is-total .vat-box-code { color: #fff; background: #345f67; }
.vat-box.is-total .vat-box-amount { border-width: 2px; border-color: #345f67; font-size: 1.05rem; }

.vat-box-details { overflow-x: auto; border-top: 1px solid var(--app-border); }
.vat-box-details table { width: 100%; min-width: 800px; border-collapse: collapse; }
.vat-box-details th,
.vat-box-details td { padding: .8rem 1rem; border-bottom: 1px solid #e5ebea; vertical-align: middle; }
.vat-box-details th { color: var(--app-text-muted); background: #fafcfb; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.vat-box-details td:first-child { display: grid; gap: .15rem; }
.vat-box-details td:first-child span { color: var(--app-text-muted); font-size: .78rem; }
.vat-voucher-link { color: #236b82; background: none; border: 0; padding: 0; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.vat-code-badge {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  padding: .2rem .45rem;
  color: #24677c;
  background: #e4f1f4;
  border-radius: 8px;
  font-weight: 800;
}

.vat-step-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
}
.vat-step-actions form { margin: 0; }
.vat-step-actions form:has(.vat-confirmation) {
  display: grid;
  gap: 1rem;
}
.vat-confirmation {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  max-width: 680px;
  font-weight: 650;
}
.vat-confirmation input { margin-top: .2rem; }
.year-result-preview {
  min-height: 0;
  margin-top: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 12px;
}

.k1-contribution-row td {
  background: color-mix(in srgb, var(--surface-muted, #f3f6f6) 72%, transparent);
  color: var(--text-muted, #63737a);
  border-top: 0;
  padding-top: .35rem;
  padding-bottom: .35rem;
}

.year-end-manual-checklist {
  display: grid;
  gap: .65rem;
  margin: 1rem 0 1.25rem;
}
.year-result-preview h3,
.year-result-preview > p { padding-inline: 18px; }
.year-result-preview h3 { margin-top: 1rem; }
.vat-step-actions + .app-alert { margin-top: 1rem; }
.vat-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin: 1rem 0 1.5rem;
}
.vat-download-actions + .vat-step-actions {
  margin-top: 0;
  padding-top: 1.25rem;
  border-top: 1px solid #e3e9e7;
}

@media (max-width: 560px) {
  .vat-download-actions .secondary-action,
  .vat-step-actions form,
  .vat-step-actions .primary-action,
  .vat-step-actions .secondary-action { width: 100%; }
}

.field-help { display: block; margin-top: .35rem; color: var(--app-text-muted); font-size: .76rem; }

@media (max-width: 1050px) {
  .vat-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vat-refresh-action { justify-self: start; }
  .vat-declaration-form {
    grid-template-columns: 1fr;
    grid-template-areas: "a" "b" "c" "d" "e" "h" "i" "f" "g";
  }
}

@media (max-width: 680px) {
  .vat-toolbar { grid-template-columns: 1fr; }
  .vat-custom-range { grid-template-columns: 1fr; }
  .vat-summary-card { grid-template-columns: 1fr; }
  .vat-summary-card b { text-align: left; }
  .vat-box-toggle { grid-template-columns: 38px minmax(0, 1fr) 18px; gap: .55rem; }
  .vat-box-amount { grid-column: 2; place-items: center end; }
  .vat-box-toggle > i, .vat-box-toggle > span:last-child { grid-column: 3; grid-row: 1 / span 2; }
}

html {
  background: var(--app-bg);
}

body {
  background: var(--app-bg);
  color: var(--app-text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--app-text);
  font-family: inherit;
  letter-spacing: -0.02em;
}

a {
  color: var(--app-primary);
}

a:hover {
  color: var(--app-primary-hover);
}

#main {
  margin-top: var(--app-header-height);
  padding: 36px 42px 48px;
}

.header {
  height: var(--app-header-height);
  padding: 0 28px 0 22px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--app-border);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.app-brand {
  width: calc(var(--app-sidebar-width) - 22px);
  flex: 0 0 auto;
}

.logo {
  width: auto;
}

.logo span:not(.app-brand-mark) {
  color: var(--app-text);
  font-family: inherit;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.app-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  margin-right: 10px;
  place-items: center;
  border-radius: 11px;
  background: #18303d;
}

.app-brand-mark img {
  max-height: 22px;
  margin: 0;
  filter: brightness(0) invert(1);
}

.sidebar-toggle {
  display: grid;
  width: 38px;
  height: 38px;
  margin-left: auto;
  padding: 0;
  place-items: center;
  color: var(--app-text-muted);
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  color: var(--app-primary);
  background: var(--app-primary-soft);
}

.header .toggle-sidebar-btn {
  padding-left: 0;
  font-size: 24px;
}

.app-company-context {
  min-width: 0;
  padding-left: 24px;
  flex-direction: column;
  border-left: 1px solid var(--app-border);
  line-height: 1.2;
}

.app-company-context strong {
  max-width: 320px;
  overflow: hidden;
  color: var(--app-text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-context-label {
  margin-bottom: 3px;
  color: var(--app-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-nav .nav-profile {
  gap: 9px;
  padding: 6px 8px 6px 6px !important;
  color: var(--app-text);
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
}

.header-nav .nav-profile:hover,
.header-nav .nav-profile:focus-visible,
.header-nav .nav-profile[aria-expanded="true"] {
  color: var(--app-text);
  border-color: var(--app-border);
  background: var(--app-surface-muted);
}

.header-nav .nav-profile:focus-visible {
  outline: 3px solid rgba(57, 117, 138, .16);
  outline-offset: 2px;
}

.profile-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--app-primary);
}

.profile-name {
  font-weight: 650;
}

.profile-chevron {
  color: var(--app-text-muted);
  font-size: 11px;
  transition: transform 160ms ease;
}

.nav-profile[aria-expanded="true"] .profile-chevron {
  transform: rotate(180deg);
}

.profile-menu {
  width: min(328px, calc(100vw - 24px));
  margin-top: 10px !important;
  padding: 8px;
  overflow: hidden;
  border: 1px solid #d3dcda;
  border-radius: 16px;
  background: rgba(255, 255, 255, .99);
  box-shadow: 0 18px 48px rgba(28, 41, 46, .16);
}

.profile-menu-header {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
  margin-bottom: 7px;
  padding: 14px;
  border-radius: 11px;
  background: linear-gradient(135deg, #eef5f5, #f8f7f3);
}

.profile-menu-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: var(--app-primary-hover);
  font-size: 20px;
}

.profile-menu-header > div {
  min-width: 0;
}

.profile-menu-header small,
.profile-menu-header strong,
.profile-menu-header > div > span {
  display: block;
}

.profile-menu-header small {
  margin-bottom: 2px;
  color: var(--app-text-muted);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.profile-menu-header strong {
  overflow: hidden;
  color: var(--app-text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu-header > div > span {
  overflow: hidden;
  margin-top: 3px;
  color: var(--app-text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu-header > div > span i {
  margin-right: 5px;
  color: var(--app-primary);
}

.profile-menu .profile-menu-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  margin: 2px 0;
  padding: 9px 10px;
  color: var(--app-text);
  border-radius: 10px;
  white-space: normal;
}

.profile-menu .profile-menu-item:hover,
.profile-menu .profile-menu-item:focus {
  color: var(--app-primary-hover);
  background: #f1f6f6;
}

.profile-menu-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 10px;
  background: var(--app-primary-soft);
  font-size: 16px;
}

.profile-menu-item > span:nth-child(2) {
  min-width: 0;
}

.profile-menu-item strong,
.profile-menu-item small {
  display: block;
}

.profile-menu-item strong {
  font-size: 13px;
  font-weight: 700;
}

.profile-menu-item small {
  margin-top: 1px;
  overflow: hidden;
  color: var(--app-text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu-arrow {
  color: #9aa8ab;
  font-size: 10px;
  transition: transform 140ms ease;
}

.profile-menu-item:hover .profile-menu-arrow,
.profile-menu-item:focus .profile-menu-arrow {
  transform: translateX(2px);
}

.profile-menu-footer {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--app-border);
}

.profile-menu-footer form {
  margin: 0;
}

.profile-menu .profile-menu-logout {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 10px 12px;
  color: var(--app-danger);
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.profile-menu .profile-menu-logout:hover,
.profile-menu .profile-menu-logout:focus {
  color: #96382f;
  background: #fbeeed;
}

.sidebar {
  top: var(--app-header-height);
  width: var(--app-sidebar-width);
  padding: 26px 16px;
  background: var(--app-sidebar);
  box-shadow: none;
  border-right: 1px solid #d3dddd;
  scrollbar-color: #aab8bb transparent;
}

.sidebar-nav .nav-heading {
  margin: 24px 12px 8px;
  color: #87969a;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
}

.sidebar-nav .nav-heading:first-child {
  margin-top: 0;
}

.sidebar-nav .nav-item {
  margin-bottom: 4px;
}

.sidebar-nav .nav-link,
.sidebar-nav .nav-link.collapsed {
  min-height: 44px;
  padding: 10px 12px;
  color: #44565d;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
}

.sidebar-nav .nav-link i,
.sidebar-nav .nav-link.collapsed i {
  color: #74868c;
  font-size: 17px;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:not(.collapsed) {
  color: #18303d;
  background: var(--app-sidebar-hover);
}

.sidebar-nav .nav-link:hover i,
.sidebar-nav .nav-link:not(.collapsed) i {
  color: var(--app-primary);
}

.sidebar-nav .nav-link-primary,
.sidebar-nav .nav-link-primary.collapsed {
  color: #fff;
  background: #18303d;
}

.sidebar-nav .nav-link-primary:hover,
.sidebar-nav .nav-link-primary:not(.collapsed) {
  color: #fff;
  background: #264858;
}

.sidebar-nav .nav-link-primary i,
.sidebar-nav .nav-link-primary.collapsed i,
.sidebar-nav .nav-link-primary:hover i,
.sidebar-nav .nav-link-primary:not(.collapsed) i {
  color: #dcecef;
}

.sidebar-nav .nav-content {
  padding: 5px 0 6px;
}

.sidebar-nav .nav-content a {
  padding: 9px 12px 9px 42px;
  color: #61737a;
  font-size: 13px;
  font-weight: 550;
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
  color: #18303d;
}

.sidebar-nav .nav-content a.active i {
  background: var(--app-primary);
}

.sidebar-company {
  margin: 0 4px 24px;
  padding: 13px 14px;
  border: 1px solid #d0dbdb;
  border-radius: 10px;
}

.sidebar-company span,
.sidebar-company strong {
  display: block;
}

.sidebar-company span {
  color: #7b8d92;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-company strong {
  margin-top: 3px;
  overflow: hidden;
  color: #18303d;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 1200px) {
  #main,
  #footer {
    margin-left: var(--app-sidebar-width);
  }
}

.card {
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
}

.card-body {
  padding: 0 24px 24px;
}

.card-title {
  padding: 24px 0 18px;
  color: var(--app-text);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
}

.btn {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: var(--app-radius-sm);
  font-weight: 650;
}

.btn-primary {
  border-color: var(--app-primary);
  background: var(--app-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--app-primary-hover);
  background: var(--app-primary-hover);
}

.form-control,
.form-select {
  min-height: 44px;
  border-color: var(--app-border);
  border-radius: var(--app-radius-sm);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(57, 117, 138, .14);
}

.table {
  color: var(--app-text);
  font-variant-numeric: tabular-nums;
}

.table > thead > tr > th {
  padding-top: 13px;
  padding-bottom: 13px;
  color: var(--app-text-muted);
  border-bottom-color: var(--app-border);
  background: var(--app-surface-muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.table > tbody > tr > td {
  padding-top: 13px;
  padding-bottom: 13px;
  border-bottom-color: var(--app-border);
  vertical-align: middle;
}

.dropdown-menu {
  border: 1px solid var(--app-border);
  border-radius: 12px;
  box-shadow: var(--app-shadow);
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--app-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.app-dashboard {
  --workspace-half-width: 720px;
  max-width: 1440px;
}

.dashboard-hero {
  display: flex;
  margin-bottom: 30px;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-hero h1 {
  margin: 0 0 7px;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 750;
  letter-spacing: -.045em;
}

.dashboard-hero p {
  max-width: 650px;
  margin: 0;
  color: var(--app-text-muted);
  font-size: 16px;
}

.dashboard-primary-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.dashboard-period-context {
  display: flex;
  margin: -16px 0 18px;
  align-items: center;
  gap: 8px;
  color: var(--app-text-muted);
  font-size: 13px;
}

.dashboard-period-context strong { color: #266247; }

.dashboard-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-metric-grid .metric-card { padding: 22px 18px; gap: 13px; }
.metric-value-vat { font-size: 23px; }

.asset-metric-content { min-width: 0; flex: 1; }
.asset-account-list { margin-top: 13px; padding-top: 9px; border-top: 1px solid var(--app-border); }
.asset-account-row { display: flex; padding: 5px 0; align-items: center; justify-content: space-between; gap: 14px; font-size: 11px; }
.asset-account-row > span { min-width: 0; }
.asset-account-row strong { margin-right: 6px; color: var(--app-primary); }
.asset-account-row small { overflow: hidden; color: var(--app-text-muted); text-overflow: ellipsis; white-space: nowrap; }
.asset-account-row b { flex: 0 0 auto; color: var(--app-text); font-size: 11px; font-variant-numeric: tabular-nums; }

.dashboard-finance-heading {
  display: flex;
  margin-bottom: 16px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-finance-heading h2 { margin: 0; font-size: 22px; font-weight: 750; }
.dashboard-finance-card {
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.dashboard-finance-totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--app-border);
  background: #f8faf9;
}

.dashboard-finance-totals > div { padding: 20px 24px; border-right: 1px solid var(--app-border); }
.dashboard-finance-totals > div:last-child { border-right: 0; }
.dashboard-finance-totals span, .dashboard-finance-totals strong, .dashboard-finance-totals small { display: block; }
.dashboard-finance-totals span { color: var(--app-text-muted); font-size: 12px; font-weight: 700; }
.dashboard-finance-totals strong { margin-top: 3px; color: var(--app-text); font-size: 27px; font-variant-numeric: tabular-nums; }
.dashboard-finance-totals small { margin-top: 3px; color: var(--app-text-muted); font-size: 11px; }
.dashboard-finance-totals .is-result { background: #e9f1f2; }
.dashboard-finance-totals .is-result strong { color: #18303d; }

.dashboard-combo-chart { padding: 20px 22px 22px; }
.dashboard-chart-toolbar { display: flex; min-height: 38px; align-items: flex-start; justify-content: space-between; gap: 16px; color: var(--app-text-muted); font-size: 11px; }
.dashboard-chart-toolbar div strong, .dashboard-chart-toolbar div span { display: block; }
.dashboard-chart-toolbar div strong { color: var(--app-text); font-size: 14px; }
.dashboard-chart-toolbar div span { margin-top: 2px; }
.dashboard-chart-canvas { position: relative; height: 245px; margin-top: 8px; }
.dashboard-month-strip { display: grid; margin-top: 18px; grid-auto-columns: minmax(142px, 1fr); grid-auto-flow: column; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; }
.dashboard-month-card { position: relative; min-height: 112px; padding: 13px 14px; overflow: hidden; border: 1px solid var(--app-border); border-radius: 12px; background: #fafbf9; scroll-snap-align: start; outline: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.dashboard-month-card::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 3px; background: #39758a; }
.dashboard-month-card.is-negative::before { background: #b9744b; }
.dashboard-month-card:hover, .dashboard-month-card:focus-visible, .dashboard-month-card.is-active { border-color: #9fbac2; box-shadow: 0 7px 20px rgba(24,48,61,.10); transform: translateY(-2px); }
.dashboard-month-card > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dashboard-month-card > div strong { font-size: 12px; text-transform: capitalize; }
.dashboard-month-card > div span { color: #39758a; font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; }
.dashboard-month-card.is-negative > div span { color: #a55f39; }
.dashboard-month-card dl { display: grid; margin: 13px 0 0; gap: 6px; }
.dashboard-month-card dl div { display: flex; justify-content: space-between; gap: 8px; }
.dashboard-month-card dt { color: var(--app-text-muted); font-size: 10px; }
.dashboard-month-card dd { margin: 0; color: var(--app-text); font-size: 10px; font-weight: 650; font-variant-numeric: tabular-nums; }

.dashboard-column-chart { padding: 18px 24px 22px; }
.dashboard-column-plot {
  display: grid;
  min-height: 310px;
  grid-template-columns: repeat(12, minmax(54px, 1fr));
  align-items: end;
  gap: 8px;
  overflow-x: auto;
}

.dashboard-column-month { display: grid; position: relative; min-width: 54px; grid-template-rows: 38px 190px 22px 20px; text-align: center; outline: none; }
.dashboard-column-month:focus-visible { border-radius: 8px; box-shadow: 0 0 0 2px var(--app-primary); }
.dashboard-column-values { display: grid; align-content: start; color: var(--app-text-muted); font-size: 9px; font-variant-numeric: tabular-nums; line-height: 1.35; }
.dashboard-column-values span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-column-values .is-revenue-value { color: #39758a; }
.dashboard-column-values .is-cost-value { color: #9a6b25; }
.dashboard-column-bars { display: flex; height: 190px; align-items: end; justify-content: center; gap: 4px; border-bottom: 1px solid #cbd5d2; }
.dashboard-column-bar { display: block; width: 16px; min-height: 2px; border-radius: 5px 5px 0 0; transition: height .2s ease; }
.dashboard-column-bar.is-revenue { background: #39758a; }
.dashboard-column-bar.is-cost { background: #d6a353; }
.dashboard-column-result { align-self: center; color: var(--app-text); font-size: 9px; font-weight: 700; white-space: nowrap; }
.dashboard-column-label { color: var(--app-text-muted); font-size: 11px; text-transform: capitalize; }

.dashboard-month-tooltip {
  display: none;
  position: absolute;
  z-index: 20;
  top: 42px;
  left: 50%;
  width: 220px;
  padding: 13px 14px;
  color: var(--app-text);
  border: 1px solid #d7dfdc;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(25, 43, 48, .2);
  text-align: left;
  transform: translateX(-50%);
}

.dashboard-column-month:hover .dashboard-month-tooltip,
.dashboard-column-month:focus .dashboard-month-tooltip { display: block; }
.dashboard-column-month:first-child .dashboard-month-tooltip { left: 0; transform: none; }
.dashboard-column-month:last-child .dashboard-month-tooltip { right: 0; left: auto; transform: none; }
.dashboard-month-tooltip > strong { display: block; margin-bottom: 8px; text-transform: capitalize; }
.dashboard-month-tooltip > span { display: grid; padding: 5px 0; grid-template-columns: 10px 1fr auto; align-items: center; gap: 7px; }
.dashboard-month-tooltip > span.is-result { margin-top: 4px; padding-top: 9px; border-top: 1px solid var(--app-border); }
.dashboard-month-tooltip i { width: 8px; height: 8px; border-radius: 3px; background: #18303d; }
.dashboard-month-tooltip i.is-revenue { background: #39758a; }
.dashboard-month-tooltip i.is-cost { background: #d6a353; }
.dashboard-month-tooltip small { color: var(--app-text-muted); }
.dashboard-month-tooltip b { font-size: 12px; font-variant-numeric: tabular-nums; }

.dashboard-actions-layout { grid-template-columns: 1fr; }
.dashboard-actions-layout .dashboard-todo-section { width: 100%; }

.dashboard-overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 24px;
}

.dashboard-todo-list,
.dashboard-chart {
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.dashboard-todo-item,
.dashboard-all-done {
  display: flex;
  min-height: 76px;
  padding: 15px 18px;
  align-items: center;
  gap: 14px;
  color: var(--app-text);
  border-bottom: 1px solid var(--app-border);
}

.dashboard-todo-item:last-child,
.dashboard-all-done:last-child { border-bottom: 0; }
.dashboard-todo-item:hover { color: var(--app-text); background: #f7faf9; }
.dashboard-todo-item > span:nth-child(2), .dashboard-all-done > span { flex: 1; }
.dashboard-todo-item strong, .dashboard-todo-item small,
.dashboard-all-done strong, .dashboard-all-done small { display: block; }
.dashboard-todo-item small, .dashboard-all-done small { margin-top: 3px; color: var(--app-text-muted); font-size: 12px; }

.dashboard-todo-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--app-primary);
  border-radius: 11px;
  background: var(--app-primary-soft);
}

.dashboard-todo-item.is-important .dashboard-todo-icon { color: #80571f; background: #f2e4cf; }
.dashboard-all-done { color: #266247; }
.dashboard-all-done > i { font-size: 24px; }

.dashboard-chart { padding: 18px; }
.dashboard-chart-legend { display: flex; margin-bottom: 14px; justify-content: flex-end; gap: 16px; color: var(--app-text-muted); font-size: 11px; }
.dashboard-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dashboard-chart-legend i { width: 9px; height: 9px; border-radius: 3px; }
.dashboard-chart-legend .is-revenue, .dashboard-chart-bar.is-revenue { background: #39758a; }
.dashboard-chart-legend .is-cost, .dashboard-chart-bar.is-cost { background: #d6a353; }
.dashboard-chart-row { display: grid; min-height: 28px; grid-template-columns: 34px 1fr; align-items: center; gap: 8px; }
.dashboard-chart-label { color: var(--app-text-muted); font-size: 11px; text-transform: capitalize; }
.dashboard-chart-bars { display: grid; gap: 3px; }
.dashboard-chart-bar { display: block; min-width: 2px; height: 6px; border-radius: 999px; }

.metric-card {
  display: flex;
  min-height: 156px;
  padding: 24px;
  align-items: flex-start;
  gap: 18px;
  border: 0;
  border-right: 1px solid var(--app-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.metric-card-featured {
  color: var(--app-text);
  border-color: #cbdcdf;
  background: #e9f1f2;
}

.metric-card:last-child {
  border-right: 0;
}

.metric-icon,
.quick-action-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--app-primary);
  border-radius: 12px;
  background: var(--app-primary-soft);
  font-size: 19px;
}

.metric-card-featured .metric-icon {
  color: #fff;
  background: #39758a;
}

.metric-label,
.metric-value,
.metric-help,
.metric-link {
  display: block;
}

.metric-label {
  margin-bottom: 5px;
  color: var(--app-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-card-featured .metric-label,
.metric-card-featured .metric-help {
  color: var(--app-text-muted);
}

.metric-value {
  color: var(--app-text);
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.metric-card-featured .metric-value {
  color: #18303d;
}

.metric-value-period {
  font-size: 19px;
}

.metric-help,
.metric-link {
  margin-top: 8px;
  color: var(--app-text-muted);
  font-size: 12px;
}

.metric-link {
  color: var(--app-primary);
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  margin-top: 12px;
  padding: 5px 9px;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.status-badge i {
  font-size: 6px;
}

.status-open {
  color: #266247;
  background: #d6eadf;
}

.status-closed {
  color: #80571f;
  background: #f2e4cf;
}

.dashboard-section {
  margin-top: 38px;
}

.section-heading {
  display: flex;
  margin-bottom: 16px;
  align-items: end;
  justify-content: space-between;
}

.section-heading h2,
.dashboard-empty-state h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.quick-action-card {
  display: flex;
  min-height: 94px;
  padding: 18px;
  align-items: center;
  gap: 15px;
  color: var(--app-text);
  border: 0;
  border-right: 1px solid var(--app-border);
  border-bottom: 1px solid var(--app-border);
  border-radius: 0;
  background: transparent;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.quick-action-card:hover {
  color: var(--app-text);
  border-color: var(--app-border);
  background: #f7faf9;
  box-shadow: none;
  transform: none;
}

.quick-action-card:nth-child(2n) {
  border-right: 0;
}

.quick-action-card:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.quick-action-card > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.quick-action-card strong,
.quick-action-card small {
  display: block;
}

.quick-action-card strong {
  margin-bottom: 2px;
  font-size: 15px;
}

.quick-action-card small {
  overflow: hidden;
  color: var(--app-text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-action-card > .bi-arrow-up-right {
  color: #91a09b;
}

.dashboard-empty-state {
  display: flex;
  padding: 26px;
  align-items: center;
  gap: 20px;
  border: 1px solid #c5dadd;
  border-radius: var(--app-radius);
  background: var(--app-primary-soft);
}

.dashboard-empty-state > div {
  flex: 1;
}

.dashboard-empty-state p {
  margin: 5px 0 0;
  color: var(--app-text-muted);
}

.empty-state-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--app-primary);
  border-radius: 14px;
  background: #fff;
  font-size: 22px;
}

.pagetitle .breadcrumb {
  margin-bottom: 18px;
  font-size: 13px;
}

.footer {
  color: var(--app-text-muted);
  border-top-color: var(--app-border);
}

@media (max-width: 1199px) {
  .sidebar {
    left: calc(var(--app-sidebar-width) * -1);
  }

  .toggle-sidebar .sidebar {
    left: 0;
  }

  .app-brand {
    width: auto;
  }

  .sidebar-toggle {
    margin-left: 14px;
  }

  #main {
    padding: 28px 24px 42px;
  }
}

@media (max-width: 820px) {
  .dashboard-grid,
  .quick-action-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-overview-layout { grid-template-columns: 1fr; gap: 0; }
  .dashboard-period-context { flex-wrap: wrap; margin-top: -8px; }
  .dashboard-finance-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-finance-totals { grid-template-columns: 1fr; }
  .dashboard-finance-totals > div { border-right: 0; border-bottom: 1px solid var(--app-border); }
  .dashboard-finance-totals > div:last-child { border-bottom: 0; }
  .dashboard-chart-toolbar { align-items: flex-start; flex-direction: column; }
  .dashboard-chart-canvas { height: 230px; }
  .dashboard-combo-chart { padding-right: 16px; padding-left: 16px; }

  .dashboard-hero,
  .dashboard-empty-state {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-primary-action,
  .dashboard-empty-state .btn {
    justify-content: center;
    align-self: stretch;
  }

  .dashboard-grid,
  .quick-action-grid {
    overflow: visible;
  }

  .metric-card,
  .metric-card:last-child,
  .quick-action-card,
  .quick-action-card:nth-child(2n),
  .quick-action-card:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--app-border);
  }

  .metric-card:last-child,
  .quick-action-card:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 575px) {
  :root {
    --app-header-height: 64px;
  }

  .header {
    padding: 0 14px;
  }

  .app-brand-mark {
    width: 34px;
    height: 34px;
  }

  #main {
    padding: 24px 16px 36px;
  }

  .dashboard-hero {
    margin-bottom: 22px;
  }

  .metric-card {
    min-height: 0;
    padding: 20px;
  }

  .quick-action-card small {
    white-space: normal;
  }
}

/* Transaction workspace */
.transaction-workspace {
  --workspace-half-width: 740px;
  max-width: 1480px;
}

.report-workspace {
  --workspace-half-width: 720px;
  max-width: 1440px;
}

@media (min-width: 1200px) {
  #main.app-dashboard,
  #main.transaction-workspace,
  #main.report-workspace {
    margin-left: max(
      var(--app-sidebar-width),
      calc(50% + var(--app-sidebar-half-width) - var(--workspace-half-width))
    );
  }

  .toggle-sidebar #main.app-dashboard,
  .toggle-sidebar #main.transaction-workspace,
  .toggle-sidebar #main.report-workspace {
    margin-left: max(0px, calc(50% - var(--workspace-half-width)));
  }
}

.transaction-page-header {
  display: flex;
  gap: 32px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 26px;
}

.page-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--app-primary);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.transaction-page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 720;
  letter-spacing: -0.045em;
}

.transaction-page-header p,
.transaction-section-heading p {
  margin: 0;
  color: var(--app-text-muted);
}

.period-context {
  min-width: 260px;
  padding: 13px 17px;
  border-left: 3px solid var(--app-accent);
  background: rgba(255, 255, 255, 0.55);
}

.period-context span,
.period-context strong {
  display: block;
}

.period-context span {
  margin-bottom: 3px;
  color: var(--app-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.period-context strong {
  font-size: 14px;
  font-weight: 700;
}

.app-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 14px 17px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background: var(--app-surface);
}

/* Alert headings and their explanatory text are separate template nodes.
   Keep their visual spacing independent of whitespace in the HTML source. */
.app-alert > div > strong + span {
  margin-left: .3em;
}

.app-alert-warning {
  border-color: #e8c68f;
  background: #fff9ee;
}

.vat-validation-issue > div { flex: 1; min-width: 0; }
.vat-validation-issue p { margin: .35rem 0 .75rem; color: var(--app-text-muted); }
.vat-validation-issue dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 1.5rem; margin: 0; }
.vat-validation-issue dl > div { min-width: 0; }
.vat-validation-issue dt { margin-bottom: .12rem; color: var(--app-text-muted); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.vat-validation-issue dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 720px) { .vat-validation-issue dl { grid-template-columns: 1fr; } }

.app-alert-success {
  border-color: #a9cdbc;
  background: #eff8f3;
}

.app-alert-error {
  border-color: #e2b2ac;
  background: #fff4f2;
}

.app-alert-error ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

#transactionFormErrors {
  scroll-margin-top: 1rem;
}

.transaction-form {
  display: grid;
  gap: 18px;
}
.transaction-form > [hidden] { display: none; }
.transaction-form > [data-transaction-start-section] { order: 1; }
.transaction-form > [data-voucher-metadata-section] { order: 2; }
.transaction-form > [data-posting-section] { order: 3; }
.transaction-form > [data-document-source-section] { order: 4; }
.transaction-form > .transaction-summary { order: 5; }
.transaction-form.is-document-first > [data-document-source-section] { order: 2; }
.transaction-form.is-document-first > [data-voucher-metadata-section] { order: 3; }
.transaction-form.is-document-first > [data-posting-section] { order: 4; }

.transaction-surface {
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.document-upload-content {
  padding: 24px;
}

.document-source-actions { display: flex; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.document-source-actions > div { display: grid; gap: 3px; }
.document-source-actions > div > span { color: var(--app-text-muted); font-size: 12px; }
.document-source-actions .secondary-action { flex: none; }
.document-source-count { display: inline-grid; min-width: 21px; height: 21px; place-items: center; margin-left: 2px; padding: 0 6px; border-radius: 999px; background: var(--app-primary-soft); font-size: 10px; }
.document-source-actions .secondary-action:disabled { cursor: not-allowed; opacity: .5; }
.existing-document-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 9px; }
.existing-document-option { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 12px; cursor: pointer; border: 1px solid var(--app-border); border-radius: var(--app-radius-sm); background: #fff; transition: border-color 150ms ease, background 150ms ease; }
.existing-document-option:has(input:checked) { border-color: #78aab5; background: var(--app-primary-soft); box-shadow: inset 0 0 0 1px #78aab5; }
.existing-document-option input { width: 17px; height: 17px; accent-color: var(--app-primary); }
.existing-document-option .voucher-document-icon { width: 34px; height: 34px; }
.existing-document-info { min-width: 0; }
.existing-document-info strong,
.existing-document-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.existing-document-info small { margin-top: 3px; color: var(--app-text-muted); }
.existing-document-check { display: grid; width: 25px; height: 25px; place-items: center; color: transparent; border-radius: 50%; background: #edf1ef; }
.existing-document-option:has(input:checked) .existing-document-check { color: #fff; background: var(--app-primary); }
.document-inbox-modal .modal-content { overflow: hidden; border: 0; border-radius: var(--app-radius); }
.document-inbox-modal .modal-header { padding: 20px 24px; }
.document-inbox-modal .modal-title { margin-top: 3px; font-size: 21px; }
.document-inbox-modal .modal-body { padding: 20px 24px 24px; background: #f7f9f8; }
.document-inbox-intro { margin: 0 0 15px; color: var(--app-text-muted); font-size: 13px; }
.document-inbox-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.document-inbox-layout .existing-document-grid { grid-template-columns: 1fr; }
.inbox-document-preview { position: sticky; top: 0; overflow: hidden; border: 1px solid var(--app-border); border-radius: var(--app-radius-sm); background: #fff; }
.inbox-document-preview > header { display: grid; gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--app-border); }
.inbox-document-preview > header span { color: var(--app-text-muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.inbox-document-preview > header strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.inbox-document-preview-canvas { display: grid; min-height: 330px; max-height: 390px; place-items: start center; overflow: auto; padding: 10px; background: #e9edeb; }
.inbox-document-preview-canvas img, .inbox-document-preview-canvas canvas { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 2px 9px rgb(20 35 40 / 14%); }
.inbox-document-preview-placeholder { align-self: center; color: #9aa9a6; font-size: 34px; }
.inbox-document-preview-canvas:has(img:not([hidden])) .inbox-document-preview-placeholder,
.inbox-document-preview-canvas:has(canvas:not([hidden])) .inbox-document-preview-placeholder,
.inbox-document-preview-canvas.is-loading .inbox-document-preview-placeholder { display: none; }
.document-inbox-modal .modal-footer { justify-content: space-between; padding: 14px 24px; }
.document-inbox-manage { text-decoration: none; }

.document-drop-zone {
  display: flex;
  min-height: 148px;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: pointer;
  border: 1px dashed #a9c4ca;
  border-radius: var(--app-radius);
  background: #f7fbfb;
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.document-drop-zone:hover,
.document-drop-zone.is-dragging {
  border-color: var(--app-primary);
  background: var(--app-primary-soft);
}

.document-drop-zone.is-dragging { transform: scale(.995); }
.document-drop-zone small { color: var(--app-text-muted); }
.document-upload-icon { color: var(--app-primary); font-size: 27px; }

.selected-document-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.document-preview-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
  min-height: 520px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: #f6f8f7;
}

.document-preview-workspace[hidden] { display: none; }

.document-preview-sidebar {
  padding: 18px 14px;
  border-right: 1px solid var(--app-border);
  background: #fbfcfb;
}

.document-preview-sidebar > .summary-label { display: block; padding: 0 5px 9px; }

.selected-document-list li button {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 13px;
  cursor: pointer;
  color: var(--app-text);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background: #fff;
  text-align: left;
}
.selected-document-row { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 5px; }
.selected-document-list li .remove-selected-document { display: grid; width: 34px; grid-template-columns: 1fr; padding: 0; place-items: center; color: var(--app-text-muted); }
.selected-document-list li .remove-selected-document:hover { color: #963f37; border-color: #e2b2ac; background: #fff4f2; }

.selected-document-list li button:hover,
.selected-document-list li button.is-active {
  border-color: #8fb8c1;
  background: var(--app-primary-soft);
}

.selected-document-list i { color: var(--app-primary); }
.selected-document-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-document-list small { color: var(--app-text-muted); }
.selected-document-list li.has-upload-error button { border-color: #e2b2ac; background: #fff4f2; }
.selected-document-list li.has-upload-error small { color: #963f37; }
.book-transaction:disabled { cursor: wait; opacity: .58; }

.document-preview-panel { display: flex; min-width: 0; flex-direction: column; }
.document-preview-panel > header { display: flex; min-height: 68px; gap: 16px; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--app-border); background: #fff; }
.document-preview-panel > header span,
.document-preview-panel > header strong { display: block; }
.document-preview-panel > header strong { max-width: 520px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-preview-canvas { display: block; min-height: 450px; max-height: 720px; flex: 1; overflow: auto; background: #e9edeb; }
.document-preview-canvas.is-pannable { cursor: grab; overscroll-behavior: contain; }
.document-preview-canvas.is-panning { cursor: grabbing; user-select: none; }
.document-preview-canvas.is-panning canvas { pointer-events: none; }
.document-preview-canvas img { display: block; max-width: 100%; max-height: 680px; margin: 20px auto; object-fit: contain; }
.document-pdf-pages { display: grid; width: 100%; min-height: 100%; gap: 18px; align-content: start; justify-items: center; padding: 20px; }
.document-pdf-pages[hidden] { display: none; }
.document-pdf-pages canvas { max-width: none; background: #fff; box-shadow: 0 3px 14px rgb(20 35 40 / 14%); }
.document-viewer-actions { display: flex; gap: 10px; align-items: center; }
.document-download-action { display: inline-flex; min-height: 40px; gap: 7px; align-items: center; padding: 8px 13px; color: var(--app-primary); border: 1px solid #b8d1d6; border-radius: var(--app-radius-sm); background: #fff; font-size: 12px; font-weight: 720; text-decoration: none; }
.document-download-action:hover { background: var(--app-primary-soft); color: var(--app-primary); }
.document-download-action[hidden] { display: none; }
.document-zoom-controls { display: inline-grid; grid-template-columns: 38px 68px 38px; align-items: center; overflow: hidden; border: 1px solid #b8d1d6; border-radius: var(--app-radius-sm); background: #fff; }
.document-zoom-controls[hidden] { display: none; }
.document-zoom-controls button { display: grid; width: 38px; height: 38px; padding: 0; cursor: pointer; place-items: center; color: var(--app-primary); border: 0; background: transparent; }
.document-zoom-controls button:hover { background: var(--app-primary-soft); }
.document-zoom-controls output { color: var(--app-text); font-size: 12px; font-weight: 720; text-align: center; }
.document-preview-error { align-self: center; margin: auto; color: #963f37; }

@media (max-width: 850px) {
  .document-source-actions { align-items: stretch; flex-direction: column; }
  .document-preview-workspace { grid-template-columns: 1fr; }
  .document-preview-sidebar { border-right: 0; border-bottom: 1px solid var(--app-border); }
  .document-preview-canvas { min-height: 420px; }
}

.posting-surface {
  overflow: visible;
}

.transaction-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--app-border);
}

.transaction-section-heading > div {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.section-number {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--app-primary);
  border-radius: 50%;
  background: var(--app-primary-soft);
  font-size: 11px;
  font-weight: 800;
}

.transaction-section-heading h2 {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 720;
}

.transaction-section-heading p {
  font-size: 13px;
}

.transaction-template-builder { padding: 24px; border-bottom: 1px solid var(--app-border); background: linear-gradient(145deg, #f7fbfa 0%, #fff 62%); }
.transaction-template-builder[hidden] { display: none; }
.transaction-start-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 24px; }
.transaction-start-card { display: grid; min-width: 0; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 18px; cursor: pointer; color: var(--app-text); border: 1px solid #cfdad7; border-radius: 12px; background: #fff; text-align: left; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.transaction-start-card:hover, .transaction-start-card:focus-visible, .transaction-start-card.is-active { border-color: var(--app-primary); box-shadow: 0 7px 22px rgba(25, 71, 81, .09); transform: translateY(-1px); }
.transaction-start-card:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; transform: none; }
.transaction-start-card.is-active { background: #f0f9f7; box-shadow: inset 0 0 0 1px var(--app-primary); }
.transaction-start-card > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.transaction-start-card strong { font-size: 14px; }
.transaction-start-card small { color: var(--app-text-muted); font-size: 11px; line-height: 1.4; }
.transaction-start-card > .bi { color: var(--app-primary); }
.transaction-start-icon { display: grid; width: 44px; height: 44px; place-items: center; color: var(--app-primary); border-radius: 11px; background: var(--app-primary-soft); font-size: 19px; }
.transaction-start-manual { grid-column: 1 / -1; width: fit-content; padding: 4px 2px; cursor: pointer; color: var(--app-primary); border: 0; background: transparent; font-size: 12px; font-weight: 720; text-decoration: underline; text-underline-offset: 3px; }
.transaction-start-manual:hover, .transaction-start-manual:focus-visible { color: var(--app-primary-hover); }
.transaction-template-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.transaction-template-intro .page-eyebrow { margin-bottom: 5px; font-size: 10px; }
.transaction-template-intro h3 { margin: 0 0 5px; font-size: 21px; }
.transaction-template-intro p { max-width: 760px; margin: 0; color: var(--app-text-muted); font-size: 13px; line-height: 1.5; }
.transaction-template-optional { flex: none; padding: 5px 9px; color: var(--app-text-muted); border-radius: 999px; background: #edf2f0; font-size: 10px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.transaction-template-toolbar { display: grid; gap: 12px; margin-top: 19px; }
.transaction-template-search { position: relative; display: block; }
.transaction-template-search > i { position: absolute; top: 50%; left: 14px; color: #71817f; transform: translateY(-50%); }
.transaction-template-search input { width: 100%; min-height: 46px; padding: 10px 14px 10px 42px; border: 1px solid #c5d3d0; border-radius: 10px; outline: none; background: #fff; }
.transaction-template-search input:focus { border-color: var(--app-primary); box-shadow: 0 0 0 3px rgba(52, 120, 143, .13); }
.transaction-template-categories { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.transaction-template-categories button { flex: none; padding: 7px 11px; cursor: pointer; color: #52615f; border: 1px solid #d2dcda; border-radius: 999px; background: #fff; font-size: 11px; font-weight: 700; }
.transaction-template-categories button:hover { border-color: #8fb8c1; background: var(--app-primary-soft); }
.transaction-template-categories button.is-active { color: #fff; border-color: var(--app-primary); background: var(--app-primary); }
.transaction-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.transaction-template-card { position: relative; display: grid; min-width: 0; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: start; padding: 14px; cursor: pointer; color: var(--app-text); border: 1px solid #d1dcda; border-radius: 11px; background: #fff; text-align: left; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.transaction-template-card[hidden] { display: none; }
.transaction-template-card:hover, .transaction-template-card:focus-visible { border-color: #76a9b5; box-shadow: 0 7px 20px rgba(26, 69, 77, .09); transform: translateY(-1px); }
.transaction-template-card.is-selected { border-color: var(--app-primary); background: #f0f9f7; box-shadow: inset 0 0 0 1px var(--app-primary); }
.transaction-template-card-icon { display: grid; width: 38px; height: 38px; place-items: center; color: var(--app-primary); border-radius: 10px; background: var(--app-primary-soft); font-size: 16px; }
.transaction-template-card-content { display: grid; min-width: 0; gap: 3px; }
.transaction-template-card-content small { color: var(--app-primary); font-size: 9px; font-weight: 780; letter-spacing: .05em; text-transform: uppercase; }
.transaction-template-card-content strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.transaction-template-card-content > span { display: -webkit-box; overflow: hidden; color: var(--app-text-muted); font-size: 10px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.transaction-template-card-accounts { grid-column: 2; color: #647774; font-size: 9px; font-weight: 700; }
.transaction-template-card-check { position: absolute; top: 10px; right: 10px; display: none; color: var(--app-primary); }
.transaction-template-card.is-selected .transaction-template-card-check { display: block; }
.transaction-template-card.is-selected .transaction-template-card-content { padding-right: 18px; }
.transaction-template-empty { margin: 16px 0 0; padding: 18px; color: var(--app-text-muted); border: 1px dashed var(--app-border); border-radius: 10px; text-align: center; }
.transaction-template-empty[hidden] { display: none; }
.transaction-template-unavailable { margin-top: 13px; color: var(--app-text-muted); font-size: 11px; }
.transaction-template-unavailable summary { width: fit-content; cursor: pointer; color: var(--app-primary); font-weight: 750; }
.transaction-template-unavailable p { margin: 8px 0; }
.transaction-template-unavailable ul { display: grid; gap: 5px; margin: 0; padding-left: 20px; }
.transaction-template-unavailable li span { margin-left: 5px; }
.transaction-template-calculator { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(210px, .7fr) minmax(210px, .75fr) minmax(300px, 1.1fr); gap: 16px; align-items: center; margin-top: 18px; padding: 17px; border: 1px solid #9fc6bd; border-radius: 12px; background: #eff8f5; }
.transaction-template-calculator[hidden] { display: none; }
.transaction-template-selected { display: grid; gap: 2px; min-width: 0; }
.transaction-template-selected > span, .transaction-template-total > span:first-child, .transaction-template-payment > span { color: #536b67; font-size: 10px; font-weight: 780; letter-spacing: .05em; text-transform: uppercase; }
.transaction-template-selected strong { font-size: 15px; }
.transaction-template-selected small { overflow: hidden; color: var(--app-text-muted); text-overflow: ellipsis; white-space: nowrap; }
.transaction-template-change { width: fit-content; margin-top: 4px; padding: 0; cursor: pointer; color: var(--app-primary); border: 0; background: transparent; font-size: 11px; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.transaction-template-builder.has-selection .transaction-template-intro,
.transaction-template-builder.has-selection .transaction-template-toolbar,
.transaction-template-builder.has-selection .transaction-template-grid,
.transaction-template-builder.has-selection > .transaction-template-empty,
.transaction-template-builder.has-selection > .transaction-template-unavailable { display: none; }
.transaction-template-builder.has-selection { padding-top: 18px; }
.transaction-template-builder.has-selection .transaction-template-calculator { margin-top: 0; }
.transaction-template-total { display: grid; gap: 6px; margin: 0; }
.transaction-template-payment { display: grid; gap: 6px; margin: 0; }
.transaction-template-payment[hidden] { display: none; }
.transaction-template-payment select, .analysis-template-payment select { min-width: 0; height: 44px; padding: 0 10px; border: 1px solid #9dbbb5; border-radius: 9px; outline: none; background: #fff; }
.analysis-template-payment { display: grid; flex: 0 1 280px; gap: 4px; color: var(--app-text-muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.transaction-template-amount-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; overflow: hidden; border: 1px solid #9dbbb5; border-radius: 9px; background: #fff; }
.transaction-template-amount-input:focus-within { border-color: var(--app-primary); box-shadow: 0 0 0 3px rgba(52, 120, 143, .13); }
.transaction-template-amount-input input { min-width: 0; height: 44px; padding: 0 5px 0 12px; border: 0; outline: none; background: transparent; font-size: 16px; font-weight: 720; text-align: right; }
.transaction-template-amount-input > span { padding: 0 12px 0 6px; color: var(--app-text-muted); font-size: 12px; font-weight: 700; }
.transaction-template-breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.transaction-template-breakdown > span { display: grid; gap: 3px; min-width: 0; padding-left: 10px; border-left: 1px solid #c3dcd5; }
.transaction-template-breakdown small { color: var(--app-text-muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.transaction-template-breakdown strong { font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.voucher-metadata {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
  gap: 24px;
  padding: 24px;
}

.app-field label,
.posting-field label {
  display: block;
  margin-bottom: 7px;
  color: #44535a;
  font-size: 12px;
  font-weight: 720;
}

.app-field input,
.posting-field input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  color: var(--app-text);
  border: 1px solid #cdd6d4;
  border-radius: var(--app-radius-sm);
  outline: none;
  background: #fff;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.posting-field {
  min-width: 0;
}

.posting-field select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 36px 0 13px;
  overflow: hidden;
  color: var(--app-text);
  border: 1px solid #cdd6d4;
  border-radius: var(--app-radius-sm);
  outline: none;
  background-color: #fff;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.posting-field select:focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(57, 117, 138, 0.13);
}

.app-field input::placeholder,
.posting-field input::placeholder {
  color: #9aa5a8;
}

.app-field input:focus,
.posting-field input:focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(57, 117, 138, 0.13);
}

.secondary-action,
.primary-action {
  display: inline-flex;
  min-height: 42px;
  gap: 9px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: var(--app-radius-sm);
  font-size: 14px;
  font-weight: 700;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.secondary-action {
  color: var(--app-primary);
  border: 1px solid #b8cfd4;
  background: #f7fbfb;
}

.secondary-action:hover {
  border-color: var(--app-primary);
  background: var(--app-primary-soft);
}

.primary-action {
  color: #fff;
  border: 1px solid var(--app-primary);
  background: var(--app-primary);
}

.primary-action:hover,
.primary-action:focus-visible {
  color: #fff;
  border-color: var(--app-primary-hover);
  background: var(--app-primary-hover);
}

.secondary-action:active,
.primary-action:active {
  transform: translateY(1px);
}

.posting-table {
  padding: 0 24px 18px;
}

.posting-table-header,
.posting-row {
  display: grid;
	grid-template-columns: minmax(170px, 1.1fr) minmax(190px, 1.35fr) minmax(110px, .6fr) minmax(110px, .6fr) 40px;
  gap: 12px;
  align-items: end;
}

.posting-table-header {
  padding: 13px 0 9px;
  color: var(--app-text-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.posting-row {
  padding: 13px 0;
  border-top: 1px solid #e7ebe9;
}

.posting-row:first-child {
  border-top: 0;
}

.posting-field label {
  display: none;
}

.account-field {
  position: relative;
}

.account-input[aria-expanded="true"] {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(57, 117, 138, 0.13);
}

.account-search-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  overflow-x: hidden;
  overflow-y: auto;
  width: max(100%, 340px);
  max-height: 310px;
  padding: 6px;
  border: 1px solid #cbd6d4;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(28, 41, 46, 0.16);
  backdrop-filter: blur(12px);
}

.account-search-option {
  display: grid;
  width: 100%;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 10px 11px;
  color: var(--app-text);
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}

.account-search-option + .account-search-option {
  margin-top: 2px;
}

.account-search-option:hover,
.account-search-option.is-active {
  background: var(--app-primary-soft);
}

.account-search-option strong {
  color: var(--app-primary-hover);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.account-search-option span {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-search-empty {
  padding: 17px 12px;
  color: var(--app-text-muted);
  font-size: 13px;
  text-align: center;
}

.amount-field input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.remove-posting-row {
  display: grid;
  width: 40px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: #859196;
  border: 0;
  border-radius: var(--app-radius-sm);
  background: transparent;
}

.remove-posting-row:hover,
.remove-posting-row:focus-visible {
  color: var(--app-danger);
  background: #fff0ee;
}

.transaction-summary {
  position: sticky;
  z-index: 5;
  bottom: 16px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 32px;
  align-items: center;
  padding: 17px 20px;
  border: 1px solid #cad5d3;
  border-radius: var(--app-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 46px rgba(28, 41, 46, 0.13);
  backdrop-filter: blur(14px);
}

.balance-indicator {
  display: flex;
  gap: 12px;
  align-items: center;
}

.balance-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--app-text-muted);
  border-radius: 50%;
  background: var(--app-surface-muted);
}

.summary-label,
.summary-amounts span {
  display: block;
  color: var(--app-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.balance-status {
  display: block;
  margin-top: 1px;
  font-size: 14px;
}

.summary-amounts {
  display: flex;
  gap: 28px;
  align-items: center;
}

.summary-amounts > div {
  min-width: 100px;
  text-align: right;
}

.summary-amounts strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.transaction-summary.is-balanced .balance-icon {
  color: var(--app-success);
  background: #e7f3ec;
}

.transaction-summary.is-balanced .balance-status {
  color: var(--app-success);
}

.transaction-summary.is-unbalanced .balance-icon {
  color: #9a641e;
  background: #fff3dd;
}

.transaction-summary.is-unbalanced .balance-status {
  color: #8a591b;
}

.book-transaction {
  min-width: 190px;
}

@media (max-width: 1050px) {
  .posting-table-header {
    display: none;
  }

  .posting-row {
	grid-template-columns: minmax(170px, 1fr) minmax(180px, 1.1fr) 1fr 1fr 40px;
  }

  .posting-field label {
    display: block;
  }

  .transaction-summary {
    grid-template-columns: 1fr auto;
  }

  .summary-amounts {
    grid-column: 1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .summary-amounts > div {
    text-align: left;
  }

  .book-transaction {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 820px) {
  .transaction-page-header,
  .posting-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .period-context {
    min-width: 0;
  }

  .voucher-metadata {
    grid-template-columns: 1fr;
  }

  .posting-row {
    grid-template-columns: 1fr 1fr 40px;
  }

  .account-field,
  .note-field {
    grid-column: 1 / -1;
  }

  .amount-field:nth-of-type(3) {
    grid-column: 1;
  }

  .amount-field:nth-of-type(4) {
    grid-column: 2;
  }

  .remove-posting-row {
    grid-column: 3;
	grid-row: 3;
  }
}

@media (max-width: 575px) {
  .transaction-page-header {
    margin-bottom: 20px;
  }

  .transaction-section-heading,
  .voucher-metadata {
    padding: 19px 17px;
  }

  .posting-table {
    padding: 0 17px 12px;
  }

  .transaction-summary {
    position: static;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .summary-amounts,
  .book-transaction {
    grid-column: 1;
    grid-row: auto;
  }

  .summary-amounts {
    justify-content: space-between;
  }

  .book-transaction {
    width: 100%;
  }

  .account-search-menu {
    width: 100%;
  }
}

@media (max-width: 1050px) {
  .transaction-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transaction-template-calculator { grid-template-columns: 1fr 1fr; }
  .transaction-template-breakdown { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
  .transaction-template-builder { padding: 19px 17px; }
  .transaction-start-methods { grid-template-columns: 1fr; padding: 19px 17px; }
  .transaction-start-manual { grid-column: auto; }
  .transaction-template-intro { flex-direction: column; gap: 10px; }
  .transaction-template-grid, .transaction-template-calculator { grid-template-columns: 1fr; }
  .transaction-template-breakdown { grid-column: auto; }
}

/* Booked transactions report */
.report-page-header {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 26px;
}

.report-page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 720;
  letter-spacing: -0.045em;
}

.report-page-header p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 16px;
}

.report-primary-action {
  flex: 0 0 auto;
}

.report-toolbar {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(280px, 1fr) auto auto;
  gap: 22px;
  align-items: end;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.report-toolbar select {
  width: 100%;
  height: 44px;
  padding: 0 38px 0 13px;
  color: var(--app-text);
  border: 1px solid #cdd6d4;
  border-radius: var(--app-radius-sm);
  outline: none;
  background-color: #fff;
}

.report-toolbar select:focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(57, 117, 138, 0.13);
}

.report-cancelled-toggle {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  min-height: 44px;
  color: var(--app-text-muted);
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
}

.report-cancelled-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--app-primary);
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap i {
  position: absolute;
  top: 50%;
  left: 14px;
  color: #849398;
  transform: translateY(-50%);
}

.search-input-wrap input {
  max-width: none;
  padding-left: 40px;
}

.report-summary {
  display: flex;
  gap: 28px;
  align-items: center;
  min-height: 44px;
  padding-left: 22px;
  border-left: 1px solid var(--app-border);
}

.report-summary div {
  min-width: 105px;
  text-align: right;
}

.report-summary span,
.report-summary strong {
  display: block;
}

.report-summary span {
  color: var(--app-text-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.report-summary strong {
  margin-top: 2px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.report-list-surface {
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.report-list-heading {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--app-border);
}

.report-list-heading h2 {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 720;
}

.report-list-heading p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 13px;
}

.report-status {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--app-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.report-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #95a1a4;
}

.report-status.is-loading .report-status-dot {
  background: var(--app-accent);
  animation: report-pulse 1.2s ease-in-out infinite;
}

.report-status.is-ready .report-status-dot {
  background: var(--app-success);
}

.report-status.is-error {
  color: var(--app-danger);
}

.report-status.is-error .report-status-dot {
  background: var(--app-danger);
}

@keyframes report-pulse {
  50% { opacity: .35; }
}

.report-table-wrap {
  min-height: 240px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.report-table th {
  padding: 12px 18px;
  color: var(--app-text-muted);
  border-bottom: 1px solid var(--app-border);
  background: #f6f8f7;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

.report-sort-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 3px 0;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.report-sort-button i {
  color: #9aa6a9;
  font-size: 12px;
}

.report-sort-button:hover,
.report-sort-button:focus-visible,
.report-sort-button.is-active {
  color: var(--app-primary-hover);
}

.report-sort-button.is-active i {
  color: var(--app-primary);
}

.report-table th:first-child,
.report-table td:first-child {
  width: 130px;
  padding-left: 24px;
}

.report-table th:nth-child(2),
.report-table td:nth-child(2) {
  width: 150px;
}

.report-table th.amount-column,
.report-table td.amount-column {
  width: 175px;
  text-align: right;
}

.report-table th.open-column,
.report-table td.open-column {
  width: 58px;
  padding-right: 18px;
  text-align: right;
}

.report-table td {
  height: 62px;
  padding: 12px 18px;
  border-bottom: 1px solid #e7ebe9;
  font-size: 14px;
  vertical-align: middle;
}

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

.report-table tbody tr {
  transition: background 130ms ease;
}

.report-table tbody tr:hover {
  background: #f7faf9;
}

.report-table tbody tr.is-cancelled {
  color: #7d898d;
  background: #faf8f7;
}

.report-table tbody tr.is-cancelled .voucher-link {
  color: #6f777a;
  background: #ece9e7;
  text-decoration: line-through;
}

.voucher-cancelled-badge {
  display: block;
  width: fit-content;
  margin-top: 4px;
  color: #9b4b43;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.voucher-link {
  padding: 5px 8px;
  color: var(--app-primary-hover);
  border: 0;
  border-radius: 6px;
  background: var(--app-primary-soft);
  font-size: 13px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.voucher-link:hover,
.voucher-link:focus-visible {
  color: #fff;
  background: var(--app-primary);
}

.report-date,
.amount-column {
  font-variant-numeric: tabular-nums;
}

.report-date {
  color: #536268;
}

.report-description {
  overflow: hidden;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.open-transaction {
  display: grid;
  width: 34px;
  height: 34px;
  margin-left: auto;
  padding: 0;
  place-items: center;
  color: #849398;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.open-transaction:hover,
.open-transaction:focus-visible {
  color: var(--app-primary);
  background: var(--app-primary-soft);
}

.report-loading-state,
.report-empty-state,
.report-error-state {
  min-height: 240px;
  align-items: center;
  justify-content: center;
}

.report-loading-state {
  display: flex;
  gap: 12px;
  color: var(--app-text-muted);
  font-size: 13px;
}

.report-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #d5dddc;
  border-top-color: var(--app-primary);
  border-radius: 50%;
  animation: report-spin .8s linear infinite;
}

@keyframes report-spin {
  to { transform: rotate(360deg); }
}

.report-empty-state {
  display: flex;
  gap: 20px;
  padding: 38px 24px;
}

.report-empty-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--app-primary);
  border-radius: 14px;
  background: var(--app-primary-soft);
  font-size: 22px;
}

.report-empty-state h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.report-empty-state p {
  margin: 0;
  color: var(--app-text-muted);
}

.report-empty-state .secondary-action {
  margin-left: 12px;
}

.report-error-state {
  display: flex;
  gap: 15px;
  padding: 38px 24px;
  color: var(--app-danger);
}

.report-error-state > i {
  font-size: 23px;
}

.report-error-state div {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.report-error-state span {
  color: var(--app-text-muted);
  font-size: 13px;
}

.report-modal .modal-content {
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  box-shadow: 0 26px 70px rgba(28, 41, 46, .22);
}

.report-modal .modal-header {
  align-items: flex-start;
  padding: 22px 24px;
  border-bottom-color: var(--app-border);
  background: #f8faf9;
}

.report-modal .modal-title {
  font-size: 20px;
  font-weight: 740;
}

.report-modal .modal-body {
  padding: 24px;
}

.report-modal .modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--app-border) !important;
  background: #f8faf9;
}

.voucher-detail-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 20px;
  padding: 17px 18px;
  border-left: 3px solid var(--app-accent);
  border-radius: 0 var(--app-radius-sm) var(--app-radius-sm) 0;
  background: #faf8f3;
}

.voucher-detail-meta div:last-child {
  text-align: right;
}

.voucher-detail-meta span,
.voucher-detail-meta strong {
  display: block;
}

.voucher-detail-meta span {
  margin-bottom: 4px;
  color: var(--app-text-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.voucher-detail-meta strong {
  font-size: 14px;
  font-weight: 700;
}

.voucher-detail-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--app-border);
  border-radius: 11px;
}

.report-modal table.voucher-detail-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  table-layout: fixed;
}

.report-modal table.voucher-detail-table th,
.report-modal table.voucher-detail-table td {
  padding: 13px 15px;
  border-bottom: 1px solid #e5eae8;
}

.report-modal table.voucher-detail-table th {
  color: var(--app-text-muted);
  background: #f5f8f7;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
}

.report-modal table.voucher-detail-table th.he,
.report-modal table.voucher-detail-table td.he {
  width: 17%;
  max-width: none !important;
  overflow: visible;
  text-align: right;
  text-overflow: clip;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.report-modal table.voucher-detail-table th:first-child,
.report-modal table.voucher-detail-table td:first-child {
  width: 34%;
}

.report-modal table.voucher-detail-table th:nth-child(2),
.report-modal table.voucher-detail-table td:nth-child(2) {
  width: 32%;
}

.report-modal table.voucher-detail-table tbody tr:last-child td {
  border-bottom: 1px solid var(--app-border);
}

.report-modal table.voucher-detail-table tfoot td {
  color: var(--app-text);
  border-bottom: 0;
  background: #f8faf9;
  font-weight: 750;
}

.voucher-account strong,
.voucher-account span {
  display: block;
}

.voucher-account strong {
  color: var(--app-primary-hover);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.voucher-account span {
  margin-top: 2px;
  color: var(--app-text-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.voucher-note {
  overflow-wrap: anywhere;
}

.voucher-detail-audit {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  color: var(--app-text-muted);
  font-size: 11px;
}

.voucher-detail-audit > span {
  margin-right: auto;
}

.voucher-copy-button,
.voucher-cancel-button,
.danger-outline-action {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  color: #b13d34;
  border: 1px solid #d75c52;
  border-radius: 10px;
  background: #fff;
  font-weight: 720;
}

.voucher-copy-button {
  color: var(--app-primary-hover);
  border-color: #a8c3cb;
  text-decoration: none;
}

.voucher-copy-button:hover,
.voucher-copy-button:focus-visible {
  color: #fff;
  background: var(--app-primary);
}

.voucher-cancel-button:hover,
.voucher-cancel-button:focus-visible,
.danger-outline-action:hover,
.danger-outline-action:focus-visible {
  color: #fff;
  background: #b9463d;
}

.voucher-cancel-button:disabled,
.danger-outline-action:disabled {
  opacity: .55;
  cursor: wait;
}

.voucher-cancellation-notice {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 13px 15px;
  color: #853c35;
  border: 1px solid #ebc4bf;
  border-radius: 10px;
  background: #fff6f4;
}

.voucher-cancellation-notice strong,
.voucher-cancellation-notice span {
  display: block;
}

.voucher-related-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 7px;
  padding: 0;
  color: #853c35;
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 740;
}

.voucher-related-link:hover,
.voucher-related-link:focus-visible {
  color: #5f2722;
  text-decoration: underline;
}

.voucher-cancellation-notice span {
  margin-top: 2px;
  font-size: 12px;
}

.cancellation-modal .modal-body > p {
  color: var(--app-text-muted);
}

.cancellation-modal .modal-dialog {
  height: calc(100dvh - 32px);
  margin-top: 16px;
  margin-bottom: 16px;
}

.cancellation-modal .modal-content {
  max-height: 100%;
  overflow: hidden;
}

.cancellation-modal .modal-content > form {
  display: flex;
  min-height: 0;
  max-height: 100%;
  flex: 1 1 auto;
  flex-direction: column;
}

.cancellation-modal .modal-header,
.cancellation-modal .modal-footer {
  flex: 0 0 auto;
}

.cancellation-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.cancellation-current-voucher {
  display: grid;
  grid-template-columns: 120px 130px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin: 22px 0 26px;
  padding: 18px 20px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: #f8faf9;
}

.cancellation-current-voucher span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cancellation-preview-stack {
  display: grid;
  gap: 16px;
  margin: 22px 0;
}

.cancellation-preview-card {
  overflow: hidden;
  border: 1px solid #cfd5d3;
  border-radius: 11px;
  background: #fff;
}

.cancellation-preview-card.is-reversal {
  border-color: #9fbfc8;
}

.cancellation-preview-heading {
  display: grid;
  grid-template-columns: 120px 130px minmax(0, 1fr) 24px;
  gap: 16px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  padding: 14px 20px;
  color: var(--app-text);
  border: 0;
  background: #fff;
  text-align: left;
}

.cancellation-preview-card.is-reversal .cancellation-preview-heading {
  background: #f7fbfc;
}

.cancellation-preview-heading strong {
  color: var(--app-primary-hover);
  font-variant-numeric: tabular-nums;
}

.cancellation-preview-heading span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cancellation-preview-heading i {
  justify-self: end;
}

.cancellation-preview-content {
  padding: 0 20px 14px;
}

.cancellation-lines-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cancellation-lines-table th,
.cancellation-lines-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--app-border);
  font-size: 13px;
}

.cancellation-lines-table th {
  color: var(--app-text-muted);
  font-size: 10px;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
}

.cancellation-lines-table th:first-child,
.cancellation-lines-table td:first-child {
  width: 42%;
}

.cancellation-lines-table th:nth-child(2),
.cancellation-lines-table td:nth-child(2) {
  width: 24%;
}

.cancellation-lines-table th.he,
.cancellation-lines-table td.he {
  width: 17%;
  max-width: none !important;
  overflow: visible;
  text-align: right;
  text-overflow: clip;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cancellation-lines-table tfoot td {
  border-bottom: 0;
  font-weight: 750;
}

.cancellation-original-caption {
  margin: 8px 0 -4px;
  color: var(--app-text-muted);
  font-size: 13px;
}

.cancellation-preflight-status {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
  color: var(--app-text-muted);
  font-size: 13px;
}

.cancellation-lock-warning {
  margin: 18px 0;
}

.cancellation-reasons {
  display: grid;
  gap: 4px;
  padding: 0;
  border: 0;
}

.cancellation-reasons legend {
  margin-bottom: 12px;
  font-size: 17px;
  font-weight: 740;
}

.cancellation-reasons label {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
}

.cancellation-reasons input {
  width: 19px;
  height: 19px;
  accent-color: var(--app-primary);
}

.cancellation-other-reason {
  margin-top: 12px;
}

.cancellation-other-reason textarea {
  width: 100%;
  max-width: none;
  resize: vertical;
}

#cancellationError {
  margin-top: 16px;
}

.cancellation-modal-footer {
  justify-content: space-between;
}

@media (max-width: 700px) {
  .cancellation-preview-heading {
    grid-template-columns: auto 1fr 22px;
  }

  .cancellation-preview-heading span:nth-of-type(1) {
    grid-column: 2;
  }

  .cancellation-preview-heading span:nth-of-type(2) {
    grid-column: 1 / -1;
  }

  .cancellation-preview-heading i {
    grid-column: 3;
    grid-row: 1;
  }

  .cancellation-preview-content {
    overflow-x: auto;
    padding-inline: 12px;
  }

  .cancellation-lines-table {
    min-width: 620px;
  }
}

.voucher-detail-audit i {
  color: var(--app-success);
  font-size: 14px;
}

.report-modal header.mh {
  display: flex;
  margin-bottom: 18px;
  padding-bottom: 16px;
  flex-direction: row;
  justify-content: space-between;
  border-bottom: 1px solid var(--app-border);
}

.report-modal header.mh .hd {
  font-size: 16px;
  font-weight: 700;
}

.report-modal header.mh .hdd {
  color: var(--app-text-muted);
  font-variant-numeric: tabular-nums;
}

.report-modal table.transsum th {
  color: var(--app-text-muted);
  background: #f6f8f7;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.report-error-inline {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 18px;
  color: var(--app-danger);
  border-radius: var(--app-radius-sm);
  background: #fff4f2;
}

.report-workspace [hidden],
.report-modal [hidden] {
  display: none !important;
}

@media (max-width: 1050px) {
  .report-toolbar {
    grid-template-columns: minmax(220px, .8fr) minmax(260px, 1.2fr);
  }

  .report-summary {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding: 16px 0 0;
    border-top: 1px solid var(--app-border);
    border-left: 0;
  }

  .report-summary div {
    text-align: left;
  }
}

@media (max-width: 700px) {
  .report-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .report-primary-action {
    align-self: flex-start;
  }

  .report-toolbar {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .report-summary {
    grid-column: 1;
  }

  .report-table thead {
    display: none;
  }

  .report-table,
  .report-table tbody,
  .report-table tr,
  .report-table td {
    display: block;
    width: 100% !important;
  }

  .report-table tr {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 14px;
    padding: 17px 58px 17px 18px;
    border-bottom: 1px solid var(--app-border);
  }

  .report-table td,
  .report-table th:first-child,
  .report-table td:first-child {
    height: auto;
    padding: 0;
    border: 0;
  }

  .report-table td:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .report-table td.report-date {
    display: block !important;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-size: 12px;
  }

  .report-table td.report-description {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
  }

  .report-table td.amount-column {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 5px;
    text-align: left;
  }

  .report-table td.open-column {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
  }

  .report-empty-state,
  .report-error-state {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-empty-state .secondary-action {
    margin-left: 0;
  }

  .report-modal header.mh {
    gap: 8px;
    flex-direction: column;
  }

  .report-modal .modal-body {
    padding: 18px;
  }

  .voucher-detail-meta {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .voucher-detail-meta div:last-child {
    text-align: left;
  }
}

/* General ledger */
.ledger-toolbar {
  grid-template-columns: minmax(230px, 300px) minmax(260px, 1fr) auto;
}

.ledger-toolbar-actions {
  display: flex;
  gap: 18px;
  align-items: end;
}

.ledger-summary {
  min-height: 44px;
}

.ledger-list-surface {
  overflow: visible;
}

.ledger-content {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: #f4f6f5;
}

.ledger-account-card {
  overflow: hidden;
  border: 1px solid #d5ddda;
  border-radius: 11px;
  background: var(--app-surface);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.ledger-account-card.is-open {
  border-color: #b8cdd1;
  box-shadow: 0 8px 24px rgba(28, 41, 46, .07);
}

.ledger-account-toggle {
  display: grid;
  width: 100%;
  min-height: 74px;
  grid-template-columns: minmax(240px, 1fr) auto 34px;
  gap: 24px;
  align-items: center;
  padding: 14px 18px;
  color: var(--app-text);
  border: 0;
  background: #fff;
  text-align: left;
}

.ledger-account-toggle:hover,
.ledger-account-toggle:focus-visible {
  background: #f8faf9;
}

.ledger-account-card.is-open .ledger-account-toggle {
  background: #f4f8f8;
}

.ledger-account-identity,
.ledger-account-code,
.ledger-account-identity strong,
.ledger-account-balances small,
.ledger-account-balances strong {
  display: block;
}

.ledger-account-identity {
  min-width: 0;
}

.ledger-account-code {
  margin-bottom: 3px;
  color: var(--app-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

.ledger-account-identity strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-account-balances {
  display: grid;
  grid-template-columns: repeat(2, minmax(125px, 1fr));
  gap: 30px;
}

.ledger-account-balances > span {
  text-align: right;
}

.ledger-account-balances small {
  margin-bottom: 2px;
  color: var(--app-text-muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ledger-account-balances strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ledger-account-toggle > i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 50%;
  background: var(--app-primary-soft);
  transition: transform 160ms ease;
}

.ledger-account-card.is-open .ledger-account-toggle > i {
  transform: rotate(180deg);
}

.ledger-account-details {
  border-top: 1px solid var(--app-border);
}

.ledger-rows-wrap {
  overflow-x: auto;
}

.ledger-rows-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  table-layout: fixed;
}

.ledger-rows-table th,
.ledger-rows-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #e7ebe9;
  font-size: 12px;
  vertical-align: middle;
}

.ledger-rows-table th {
  color: var(--app-text-muted);
  background: #f8faf9;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}

.ledger-sort-button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 3px 0;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.ledger-sort-button i {
  color: #96a3a7;
  font-size: 11px;
}

.ledger-sort-button:hover,
.ledger-sort-button:focus-visible,
.ledger-sort-button.is-active,
.ledger-sort-button.is-active i {
  color: var(--app-primary);
}

.ledger-rows-table th:first-child,
.ledger-rows-table td:first-child {
  width: 105px;
  padding-left: 18px;
}

.ledger-rows-table th:nth-child(2),
.ledger-rows-table td:nth-child(2) {
  width: 115px;
  color: #58676d;
  font-variant-numeric: tabular-nums;
}

.ledger-rows-table th:nth-child(3),
.ledger-rows-table td:nth-child(3) {
  width: auto;
}

.ledger-rows-table th.ledger-amount,
.ledger-rows-table td.ledger-amount {
  width: 135px;
  max-width: none;
  overflow: visible;
  text-align: right;
  text-overflow: clip;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

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

.ledger-rows-table tbody tr:not(.ledger-opening-row):hover {
  background: #fafcfb;
}

.ledger-opening-row td {
  color: #4e5e64;
  background: #f1f5f4;
  font-weight: 700;
}

.ledger-row-description {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-balance {
  color: var(--app-text);
  background: #fbfcfc;
  font-weight: 700;
}

.ledger-voucher-link {
  padding: 4px 7px;
  color: var(--app-primary-hover);
  border: 0;
  border-radius: 6px;
  background: var(--app-primary-soft);
  font-size: 11px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.ledger-voucher-link:hover,
.ledger-voucher-link:focus-visible {
  color: #fff;
  background: var(--app-primary);
}

@media (max-width: 1050px) {
  .ledger-toolbar {
    grid-template-columns: minmax(220px, .8fr) minmax(260px, 1.2fr);
  }

  .ledger-toolbar-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--app-border);
  }

  .ledger-summary {
    grid-column: auto;
    grid-row: auto;
    padding: 0;
    border: 0;
  }
}

@media (max-width: 700px) {
  .ledger-toolbar {
    grid-template-columns: 1fr;
  }

  .ledger-toolbar-actions {
    grid-column: 1;
    gap: 14px;
    align-items: stretch;
    flex-direction: column;
  }

  .ledger-toolbar-actions .secondary-action {
    width: 100%;
  }

  .ledger-content {
    padding: 10px;
  }

  .ledger-account-toggle {
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 12px;
    padding: 14px;
  }

  .ledger-account-balances {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 18px;
  }

  .ledger-account-balances > span {
    text-align: left;
  }

  .ledger-account-toggle > i {
    grid-column: 2;
    grid-row: 1;
  }
}

/* Balance report */
.balance-toolbar {
  grid-template-columns: minmax(230px, 300px) minmax(260px, 1fr) auto;
}

.balance-toolbar-copy span,
.balance-toolbar-copy strong {
  display: block;
}

.balance-toolbar-copy span {
  margin-bottom: 3px;
  color: var(--app-text-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.balance-toolbar-copy strong {
  font-size: 13px;
  font-weight: 680;
}

.balance-toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.balance-toolbar-actions .secondary-action {
  white-space: nowrap;
}

.balance-toolbar-actions a[aria-disabled="true"] {
  pointer-events: none;
  opacity: .55;
}

.balance-list-surface {
  overflow: visible;
}

.balance-content {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #f4f6f5;
}

.balance-class-card {
  overflow: hidden;
  border: 1px solid #d5ddda;
  border-radius: 11px;
  background: #fff;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.balance-class-card.is-open {
  border-color: #b8cdd1;
  box-shadow: 0 8px 24px rgba(28, 41, 46, .07);
}

.balance-class-toggle,
.balance-group-toggle,
.balance-account-toggle,
.balance-column-headings {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(120px, 150px)) 32px;
  gap: 16px;
  align-items: center;
}

.balance-class-toggle,
.balance-group-toggle,
.balance-account-toggle {
  border: 0;
  text-align: left;
}

.balance-class-toggle {
  min-height: 82px;
  padding: 15px 18px;
  color: var(--app-text);
  background: #fff;
}

.balance-class-toggle:hover,
.balance-class-toggle:focus-visible,
.balance-class-card.is-open > .balance-class-toggle {
  background: #f4f8f8;
}

.balance-identity,
.balance-class-code,
.balance-identity strong {
  display: block;
}

.balance-class-code {
  margin-bottom: 3px;
  color: var(--app-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.balance-identity strong {
  font-size: 16px;
}

.balance-values {
  display: contents;
}

.balance-values > span {
  text-align: right;
}

.balance-values small,
.balance-values strong {
  display: block;
}

.balance-values small {
  margin-bottom: 3px;
  color: var(--app-text-muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.balance-values strong,
.balance-number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.balance-values strong {
  font-size: 14px;
}

.balance-class-toggle > i,
.balance-group-toggle > i,
.balance-account-toggle > i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 50%;
  background: var(--app-primary-soft);
  transition: transform 160ms ease;
}

.balance-class-card.is-open > .balance-class-toggle > i,
.balance-group.is-open > .balance-group-toggle > i,
.balance-account.is-open > .balance-account-toggle > i {
  transform: rotate(180deg);
}

.balance-class-details {
  border-top: 1px solid var(--app-border);
}

.balance-column-headings {
  padding: 10px 18px;
  color: var(--app-text-muted);
  background: #f8faf9;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.balance-column-headings span:not(:first-child) {
  text-align: right;
}

.balance-group {
  border-top: 1px solid #e4e9e7;
}

.balance-column-headings + .balance-group {
  border-top: 0;
}

.balance-group-toggle,
.balance-account-toggle {
  min-height: 58px;
  padding: 10px 18px;
  color: var(--app-text);
}

.balance-group-toggle {
  background: #fbfcfc;
  font-weight: 700;
}

.balance-group-toggle:hover,
.balance-group-toggle:focus-visible,
.balance-group.is-open > .balance-group-toggle {
  background: #f4f7f6;
}

.balance-row-identity {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: baseline;
}

.balance-row-identity strong {
  flex: 0 0 auto;
  color: var(--app-primary-hover);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.balance-row-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.balance-number {
  text-align: right;
}

.balance-group-details {
  border-top: 1px solid #e9edeb;
}

.balance-account + .balance-account {
  border-top: 1px solid #edf0ef;
}

.balance-account-toggle {
  padding-left: 34px;
  background: #fff;
  font-size: 12px;
}

.balance-account-toggle:not(:disabled):hover,
.balance-account-toggle:not(:disabled):focus-visible,
.balance-account.is-open > .balance-account-toggle {
  background: #fafcfb;
}

.balance-account-toggle:disabled {
  color: inherit;
  cursor: default;
  opacity: 1;
}

.balance-transactions {
  overflow-x: auto;
  padding: 0 18px 14px 52px;
  background: #fafcfb;
}

.balance-transactions table {
  width: 100%;
  min-width: 700px;
  border: 1px solid #dfe6e3;
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  table-layout: fixed;
}

.balance-transactions th,
.balance-transactions td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5eae8;
  font-size: 11px;
}

.balance-transactions th {
  color: var(--app-text-muted);
  background: #f3f6f5;
  font-size: 9px;
  font-weight: 770;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
}

.balance-transactions th:first-child,
.balance-transactions td:first-child {
  width: 105px;
}

.balance-transactions th:nth-child(2),
.balance-transactions td:nth-child(2) {
  width: 115px;
  color: #58676d;
  font-variant-numeric: tabular-nums;
}

.balance-transactions th:last-child,
.balance-transactions td:last-child {
  width: 145px;
  text-align: right;
}

.balance-transactions tr:last-child td {
  border-bottom: 0;
}

.balance-voucher-link {
  padding: 4px 7px;
  color: var(--app-primary-hover);
  border: 0;
  border-radius: 6px;
  background: var(--app-primary-soft);
  font-size: 11px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.balance-voucher-link:hover,
.balance-voucher-link:focus-visible {
  color: #fff;
  background: var(--app-primary);
}

@media (max-width: 1100px) {
  .balance-toolbar {
    grid-template-columns: minmax(230px, 300px) 1fr;
  }

  .balance-toolbar-actions {
    grid-column: 1 / -1;
    padding-top: 16px;
    border-top: 1px solid var(--app-border);
  }

  .balance-class-toggle,
  .balance-group-toggle,
  .balance-account-toggle,
  .balance-column-headings {
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(105px, 125px)) 30px;
    gap: 10px;
  }
}

@media (max-width: 760px) {
  .balance-toolbar {
    grid-template-columns: 1fr;
  }

  .balance-toolbar-actions {
    grid-column: 1;
    align-items: stretch;
    flex-direction: column;
  }

  .balance-toolbar-actions .secondary-action {
    width: 100%;
  }

  .balance-content {
    padding: 10px;
  }

  .balance-column-headings {
    display: none;
  }

  .balance-class-toggle,
  .balance-group-toggle,
  .balance-account-toggle {
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 10px;
  }

  .balance-values {
    display: grid;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .balance-values > span {
    text-align: left;
  }

  .balance-class-toggle > i {
    grid-column: 2;
    grid-row: 1;
  }

  .balance-group-toggle .balance-number,
  .balance-account-toggle .balance-number {
    display: none;
  }

  .balance-account-toggle {
    padding-left: 26px;
  }

  .balance-transactions {
    padding-left: 26px;
  }
}

/* Income statement */
.result-toolbar {
  grid-template-columns: minmax(230px, 300px) minmax(270px, 1fr) auto;
}

.result-toolbar-copy span,
.result-toolbar-copy strong {
  display: block;
}

.result-toolbar-copy span {
  margin-bottom: 3px;
  color: var(--app-text-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.result-toolbar-copy strong {
  font-size: 13px;
  font-weight: 680;
}

.result-toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.result-toolbar-actions .secondary-action {
  white-space: nowrap;
}

.result-toolbar-actions a[aria-disabled="true"] {
  pointer-events: none;
  opacity: .55;
}

.result-list-surface {
  overflow: hidden;
}

.result-scroll-area {
  overflow-x: auto;
}

.result-content {
  display: grid;
  min-width: 720px;
  gap: 12px;
  padding: 16px;
  background: #f4f6f5;
}

.result-net-summary,
.result-class-toggle,
.result-group-toggle,
.result-account-toggle,
.result-column-headings {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(250px, 1fr) repeat(var(--result-period-count), minmax(115px, 145px)) 32px;
  gap: 14px;
  align-items: center;
}

.result-net-summary {
  grid-template-columns: minmax(250px, 1fr) repeat(var(--result-period-count), minmax(115px, 145px));
  padding: 17px 18px;
  color: #fff;
  border-radius: 11px;
  background: linear-gradient(120deg, #214c5c, #2f6f80);
  box-shadow: 0 10px 28px rgba(33, 76, 92, .16);
}

.result-net-summary > span:not(:first-child) {
  text-align: right;
}

.result-net-summary small,
.result-net-summary strong {
  display: block;
}

.result-net-summary small {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, .72);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.result-net-summary strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.result-net-summary > span:first-child strong {
  font-size: 16px;
}

.result-class-card {
  overflow: hidden;
  border: 1px solid #d5ddda;
  border-radius: 11px;
  background: #fff;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.result-class-card.is-open {
  border-color: #b8cdd1;
  box-shadow: 0 8px 24px rgba(28, 41, 46, .07);
}

.result-class-toggle,
.result-group-toggle,
.result-account-toggle {
  border: 0;
  color: var(--app-text);
  text-align: left;
}

.result-class-toggle {
  min-height: 74px;
  padding: 14px 18px;
  background: #fff;
}

.result-class-toggle:hover,
.result-class-toggle:focus-visible,
.result-class-card.is-open > .result-class-toggle {
  background: #f4f8f8;
}

.result-row-identity {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: baseline;
}

.result-class-toggle .result-row-identity {
  display: block;
}

.result-class-toggle .result-row-identity > strong {
  display: block;
  font-size: 16px;
}

.result-row-identity > strong {
  flex: 0 0 auto;
  color: var(--app-primary-hover);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.result-row-identity > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.result-class-toggle .result-number {
  font-size: 14px;
  font-weight: 700;
}

.result-period-label {
  color: var(--app-text-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .06em;
  text-align: right;
}

.result-class-toggle > i,
.result-group-toggle > i,
.result-account-toggle > i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 50%;
  background: var(--app-primary-soft);
  transition: transform 160ms ease;
}

.result-class-card.is-open > .result-class-toggle > i,
.result-group.is-open > .result-group-toggle > i,
.result-account.is-open > .result-account-toggle > i {
  transform: rotate(180deg);
}

.result-class-details {
  border-top: 1px solid var(--app-border);
}

.result-section-total,
.result-intermediate-total {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) repeat(var(--result-period-count), minmax(115px, 145px)) 32px;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding: 13px 18px;
  border-top: 1px solid #cbd5d2;
  background: #fff;
  font-size: 14px;
}

.result-section-total > strong:first-child,
.result-intermediate-total > strong:first-child {
  color: var(--app-text);
  font-weight: 780;
}

.result-section-total .result-number,
.result-intermediate-total .result-number {
  font-weight: 780;
}

.result-intermediate-total {
  margin: 4px 0 12px;
  border: 1px solid #cbd5d2;
  border-radius: 11px;
  background: #f8faf9;
}

.result-column-headings {
  padding: 10px 18px;
  color: var(--app-text-muted);
  background: #f8faf9;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.result-column-headings span:not(:first-child) {
  text-align: right;
}

.result-group {
  border-top: 1px solid #e4e9e7;
}

.result-column-headings + .result-group {
  border-top: 0;
}

.result-group-toggle,
.result-account-toggle {
  min-height: 56px;
  padding: 10px 18px;
  font-size: 12px;
}

.result-group-toggle {
  background: #fbfcfc;
  font-weight: 700;
}

.result-group-toggle:hover,
.result-group-toggle:focus-visible,
.result-group.is-open > .result-group-toggle {
  background: #f4f7f6;
}

.result-group-details {
  border-top: 1px solid #e9edeb;
}

.result-account + .result-account {
  border-top: 1px solid #edf0ef;
}

.result-account-toggle {
  padding-left: 34px;
  background: #fff;
}

.result-account-toggle:not(:disabled):hover,
.result-account-toggle:not(:disabled):focus-visible,
.result-account.is-open > .result-account-toggle {
  background: #fafcfb;
}

.result-account-toggle:disabled {
  color: inherit;
  cursor: default;
  opacity: 1;
}

.result-transactions {
  overflow-x: auto;
  padding: 0 18px 14px 52px;
  background: #fafcfb;
}

.result-transactions table {
  width: 100%;
  min-width: 700px;
  border: 1px solid #dfe6e3;
  border-radius: 8px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  table-layout: fixed;
}

.result-transactions th,
.result-transactions td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5eae8;
  font-size: 11px;
}

.result-transactions th {
  color: var(--app-text-muted);
  background: #f3f6f5;
  font-size: 9px;
  font-weight: 770;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
}

.result-transactions th:first-child,
.result-transactions td:first-child {
  width: 105px;
}

.result-transactions th:nth-child(2),
.result-transactions td:nth-child(2) {
  width: 115px;
  color: #58676d;
  font-variant-numeric: tabular-nums;
}

.result-transactions th:last-child,
.result-transactions td:last-child {
  width: 145px;
  text-align: right;
}

.result-transactions tr:last-child td {
  border-bottom: 0;
}

.result-voucher-link {
  padding: 4px 7px;
  color: var(--app-primary-hover);
  border: 0;
  border-radius: 6px;
  background: var(--app-primary-soft);
  font-size: 11px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.result-voucher-link:hover,
.result-voucher-link:focus-visible {
  color: #fff;
  background: var(--app-primary);
}

@media (max-width: 1100px) {
  .result-toolbar {
    grid-template-columns: minmax(230px, 300px) 1fr;
  }

  .result-toolbar-actions {
    grid-column: 1 / -1;
    padding-top: 16px;
    border-top: 1px solid var(--app-border);
  }
}

@media (max-width: 760px) {
  .result-toolbar {
    grid-template-columns: 1fr;
  }

  .result-toolbar-actions {
    grid-column: 1;
    align-items: stretch;
    flex-direction: column;
  }

  .result-toolbar-actions .secondary-action {
    width: 100%;
  }

  .result-content {
    padding: 10px;
  }
}

/* Settings overview */
.settings-page-header {
  display: flex;
  gap: 32px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.settings-page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 720;
  letter-spacing: -.045em;
}

.settings-page-header p {
  max-width: 680px;
  margin: 0;
  color: var(--app-text-muted);
  font-size: 16px;
}

.settings-company-context {
  min-width: 260px;
  padding: 14px 18px;
  border-left: 3px solid var(--app-accent);
  background: #faf8f3;
}

.settings-company-context span,
.settings-company-context strong {
  display: block;
}

.settings-company-context span {
  margin-bottom: 3px;
  color: var(--app-text-muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.settings-company-context strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-section {
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.settings-section-heading {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 17px;
}

.settings-section-heading h2 {
  margin: 0 0 3px;
  font-size: 17px;
  font-weight: 720;
}

.settings-section-heading p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 12px;
}

.settings-section-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--app-primary);
  border-radius: 10px;
  background: var(--app-primary-soft);
  font-size: 17px;
}

.settings-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-navigation-card {
  display: grid;
  min-height: 94px;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 17px;
  color: var(--app-text);
  border: 1px solid #d9e0de;
  border-radius: 11px;
  background: #fbfcfc;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.settings-navigation-card:hover,
.settings-navigation-card:focus-visible {
  color: var(--app-text);
  border-color: #aec8ce;
  background: #fff;
  box-shadow: 0 9px 24px rgba(28, 41, 46, .08);
  transform: translateY(-1px);
}

.settings-card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--app-primary-hover);
  border: 1px solid #d8e5e7;
  border-radius: 11px;
  background: #f1f7f8;
  font-size: 18px;
}

.settings-card-copy {
  min-width: 0;
}

.settings-card-copy strong,
.settings-card-copy small {
  display: block;
}

.settings-card-copy strong {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 720;
}

.settings-card-copy small {
  color: var(--app-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-navigation-card > .bi-arrow-right {
  color: #87969b;
  transition: color 140ms ease, transform 140ms ease;
}

.settings-navigation-card:hover > .bi-arrow-right,
.settings-navigation-card:focus-visible > .bi-arrow-right {
  color: var(--app-primary);
  transform: translateX(3px);
}

.settings-card-tag {
  padding: 4px 7px;
  color: var(--app-primary-hover);
  border-radius: 6px;
  background: var(--app-primary-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.settings-secondary-section {
  margin-bottom: 0;
}

.settings-wide-card {
  width: 100%;
}

@media (max-width: 850px) {
  .settings-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-company-context {
    width: 100%;
  }

  .settings-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .settings-section {
    padding: 18px;
  }

  .settings-navigation-card {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 14px;
  }

  .settings-card-icon {
    width: 38px;
    height: 38px;
  }

  .settings-card-tag {
    display: none;
  }
}

/* Public website and authentication */
.public-page {
  min-height: 100vh;
  background: #f7f6f2;
}

.public-site-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(1440px, calc(100% - 64px));
  height: 78px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(90, 108, 112, .18);
}

.public-brand {
  display: inline-flex;
  align-items: center;
  color: var(--app-text);
}

.public-brand:hover,
.public-brand:focus-visible {
  color: var(--app-text);
}

.public-brand strong {
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -.04em;
}

.public-site-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.public-site-nav a {
  padding: 9px 13px;
  color: #44565d;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 680;
}

.public-site-nav a:hover,
.public-site-nav a:focus-visible,
.public-site-nav a.is-active {
  color: var(--app-primary-hover);
  background: rgba(220, 236, 239, .6);
}

.public-site-nav .public-login-link {
  margin-left: 10px;
  border: 1px solid #cbd6d5;
  background: rgba(255, 255, 255, .65);
}

.public-site-nav .public-primary-link {
  padding-inline: 17px;
  color: #fff;
  background: var(--app-primary);
}

.public-site-nav .public-primary-link:hover,
.public-site-nav .public-primary-link:focus-visible {
  color: #fff;
  background: var(--app-primary-hover);
}

.public-main {
  overflow: hidden;
}

.public-hero {
  position: relative;
  display: grid;
  width: min(1320px, calc(100% - 64px));
  min-height: 660px;
  grid-template-columns: minmax(0, .92fr) minmax(520px, 1.08fr);
  gap: clamp(48px, 7vw, 110px);
  align-items: center;
  margin: 0 auto;
  padding: 76px 0 92px;
}

.public-hero::before {
  position: absolute;
  top: -210px;
  right: -370px;
  width: 760px;
  height: 760px;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 178, 186, .24), rgba(123, 178, 186, 0) 68%);
  pointer-events: none;
}

.public-eyebrow {
  display: block;
  margin-bottom: 13px;
  color: var(--app-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.public-hero-copy {
  position: relative;
  z-index: 1;
}

.public-hero-copy h1 {
  max-width: 680px;
  margin: 0 0 24px;
  font-size: clamp(44px, 5.3vw, 72px);
  font-weight: 730;
  line-height: 1.02;
  letter-spacing: -.065em;
}

.public-hero-copy > p {
  max-width: 600px;
  margin: 0;
  color: #5e7076;
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 1.65;
}

.public-hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 32px;
}

.public-cta-primary,
.public-cta-secondary {
  display: inline-flex;
  min-height: 48px;
  gap: 11px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 720;
}

.public-cta-primary {
  color: #fff;
  background: var(--app-primary);
  box-shadow: 0 9px 22px rgba(57, 117, 138, .18);
}

.public-cta-primary:hover,
.public-cta-primary:focus-visible {
  color: #fff;
  background: var(--app-primary-hover);
}

.public-cta-primary i {
  transition: transform 140ms ease;
}

.public-cta-primary:hover i,
.public-cta-primary:focus-visible i {
  transform: translateX(3px);
}

.public-cta-secondary {
  color: var(--app-text);
  border: 1px solid #ccd6d4;
  background: rgba(255, 255, 255, .72);
}

.public-cta-secondary:hover,
.public-cta-secondary:focus-visible {
  color: var(--app-primary-hover);
  border-color: #a9c2c6;
  background: #fff;
}

.public-trust-row {
  display: flex;
  gap: 18px;
  margin-top: 27px;
  flex-wrap: wrap;
  color: #5f7076;
  font-size: 11px;
  font-weight: 630;
}

.public-trust-row span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.public-trust-row i {
  color: var(--app-success);
}

.public-product-preview {
  position: relative;
  z-index: 1;
  padding: 18px;
  border: 1px solid rgba(184, 200, 199, .85);
  border-radius: 22px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 38px 90px rgba(33, 56, 64, .15);
  backdrop-filter: blur(14px);
  transform: rotate(.8deg);
}

.preview-window-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 0 2px 14px;
  color: var(--app-text-muted);
}

.preview-window-bar > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ccd5d4;
}

.preview-window-bar > span:first-child {
  background: #d7a663;
}

.preview-window-bar small {
  margin-left: auto;
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.preview-company-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  color: #fff;
  border-radius: 13px;
  background: #1e3d49;
}

.preview-company-row small,
.preview-company-row strong {
  display: block;
}

.preview-company-row small {
  margin-bottom: 2px;
  color: rgba(255, 255, 255, .65);
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.preview-company-row strong {
  font-size: 13px;
}

.preview-status {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 8px;
  color: #dff4e9;
  border-radius: 999px;
  background: rgba(94, 164, 126, .2);
  font-size: 9px;
  font-weight: 700;
}

.preview-status i {
  font-size: 6px;
}

.preview-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.preview-metrics article {
  min-width: 0;
  padding: 15px;
  border: 1px solid #e0e6e4;
  border-radius: 11px;
  background: #fbfcfc;
}

.preview-metrics span,
.preview-metrics strong,
.preview-metrics small {
  display: block;
}

.preview-metrics span {
  color: var(--app-text-muted);
  font-size: 8px;
  font-weight: 720;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.preview-metrics strong {
  margin: 9px 0 4px;
  overflow: hidden;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-metrics small {
  color: var(--app-success);
  font-size: 9px;
  font-weight: 680;
}

.preview-report-card {
  margin-top: 10px;
  padding: 17px 18px;
  border: 1px solid #e0e6e4;
  border-radius: 11px;
  background: #fff;
}

.preview-report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-report-heading small,
.preview-report-heading strong {
  display: block;
}

.preview-report-heading small {
  color: var(--app-text-muted);
  font-size: 8px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.preview-report-heading strong {
  margin-top: 2px;
  font-size: 12px;
}

.preview-report-heading i {
  color: var(--app-primary);
  font-size: 20px;
}

.preview-bars {
  display: flex;
  height: 105px;
  gap: 9%;
  align-items: end;
  padding: 18px 8% 0;
  border-bottom: 1px solid #dce3e1;
}

.preview-bars span {
  width: 16%;
  height: var(--bar-height);
  border-radius: 5px 5px 0 0;
  background: linear-gradient(#6ca0ad, #39758a);
}

.public-feature-section {
  padding: 100px max(32px, calc((100% - 1240px) / 2));
  background: #fff;
}

.public-section-heading {
  max-width: 650px;
  margin-bottom: 38px;
}

.public-section-heading h2,
.public-bottom-cta h2 {
  margin: 0 0 10px;
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 720;
  letter-spacing: -.045em;
}

.public-section-heading p,
.public-bottom-cta p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 16px;
}

.public-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.public-feature-grid article {
  position: relative;
  min-height: 230px;
  padding: 26px;
  border: 1px solid #dce3e1;
  border-radius: 15px;
  background: #fafbf9;
}

.public-workflow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-step-number {
  position: absolute;
  top: 27px;
  right: 26px;
  color: #8b9a9e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

.public-feature-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 29px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 12px;
  background: var(--app-primary-soft);
  font-size: 20px;
}

.public-feature-grid h3 {
  margin: 0 0 9px;
  font-size: 18px;
  font-weight: 720;
}

.public-feature-grid p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.public-invoicing-section {
  display: grid;
  width: min(1240px, calc(100% - 64px));
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin: 70px auto 0;
  padding: 31px 34px;
  border: 1px solid #cad8d7;
  border-radius: 18px;
  background: #f7faf9;
}

.public-invoicing-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 14px;
  background: var(--app-primary-soft);
  font-size: 23px;
}

.public-invoicing-section h2 {
  margin: 3px 0 7px;
  font-size: clamp(22px, 2.5vw, 31px);
  font-weight: 720;
  letter-spacing: -.035em;
}

.public-invoicing-section p {
  max-width: 790px;
  margin: 0;
  color: var(--app-text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.public-bottom-cta {
  display: flex;
  width: min(1240px, calc(100% - 64px));
  gap: 40px;
  align-items: center;
  justify-content: space-between;
  margin: 86px auto;
  padding: 40px 44px;
  border: 1px solid #cad8d7;
  border-radius: 18px;
  background: #edf4f3;
}

.public-site-footer {
  display: grid;
  width: min(1440px, calc(100% - 64px));
  min-height: 110px;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  margin: 0 auto;
  color: var(--app-text-muted);
  border-top: 1px solid var(--app-border);
  font-size: 12px;
}

.public-site-footer > span {
  text-align: center;
}

.public-site-footer nav {
  display: flex;
  gap: 18px;
}

.public-site-footer nav a {
  color: #52646a;
  font-weight: 650;
}

/* Login */
.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr);
}

.login-brand-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  padding: 46px clamp(42px, 6vw, 90px);
  color: #fff;
  overflow: hidden;
  flex-direction: column;
  background: #1c3b47;
}

.login-brand-panel::after {
  position: absolute;
  right: -210px;
  bottom: -230px;
  width: 580px;
  height: 580px;
  content: "";
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, .025), 0 0 0 140px rgba(255, 255, 255, .018);
}

.login-brand {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  color: #fff;
}

.login-brand:hover,
.login-brand:focus-visible {
  color: #fff;
}

.login-brand .app-brand-mark {
  background: rgba(255, 255, 255, .12);
}

.login-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 570px;
  margin: auto 0 48px;
}

.login-brand-copy .public-eyebrow {
  color: #9fd0d8;
}

.login-brand-copy h1 {
  margin: 0 0 22px;
  color: #fff;
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 720;
  line-height: 1.03;
  letter-spacing: -.06em;
}

.login-brand-copy p {
  margin: 0;
  color: rgba(255, 255, 255, .7);
  font-size: 17px;
  line-height: 1.7;
}

.login-brand-points {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
  color: rgba(255, 255, 255, .75);
  font-size: 12px;
}

.login-brand-points span {
  display: flex;
  gap: 9px;
  align-items: center;
}

.login-brand-points i {
  color: #9fd0d8;
  font-size: 15px;
}

.login-form-panel {
  display: grid;
  min-height: 100vh;
  padding: 48px;
  place-items: center;
  background: #f8f7f3;
}

.login-form-wrap {
  width: min(100%, 460px);
}

.login-back-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 54px;
  color: var(--app-text-muted);
  font-size: 12px;
  font-weight: 650;
}

.login-heading {
  margin-bottom: 27px;
}

.login-heading h2 {
  margin: 0 0 8px;
  font-size: 36px;
  font-weight: 730;
  letter-spacing: -.045em;
}

.login-heading p {
  margin: 0;
  color: var(--app-text-muted);
}

.public-form-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid;
  border-radius: 9px;
  font-size: 12px;
}

.public-form-alert.is-success {
  color: #2f694f;
  border-color: #c5ded1;
  background: #eff8f3;
}

.public-form-alert.is-error {
  color: #963d36;
  border-color: #e7c6c2;
  background: #fff3f1;
}

.public-form-alert.is-info {
  color: #346778;
  border-color: #c7dce1;
  background: #f0f7f8;
}

.public-auth-form {
  display: grid;
  gap: 20px;
}

.public-form-field label,
.public-label-row label {
  display: block;
  margin-bottom: 7px;
  color: #45575e;
  font-size: 12px;
  font-weight: 700;
}

.public-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.public-label-row a {
  font-size: 11px;
  font-weight: 680;
}

.public-input-wrap {
  position: relative;
}

.public-input-wrap i {
  position: absolute;
  top: 50%;
  left: 15px;
  color: #8a999d;
  transform: translateY(-50%);
}

.public-input-wrap input {
  width: 100%;
  height: 50px;
  padding: 0 15px 0 44px;
  color: var(--app-text);
  border: 1px solid #cdd7d5;
  border-radius: 9px;
  outline: none;
  background: #fff;
  font-size: 14px;
}

.public-input-wrap input:focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(57, 117, 138, .12);
}

.public-checkbox {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--app-text-muted);
  font-size: 12px;
  cursor: pointer;
}

.public-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--app-primary);
}

.public-auth-submit {
  display: flex;
  width: 100%;
  height: 50px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: #fff;
  border: 0;
  border-radius: 9px;
  background: var(--app-primary);
  font-size: 14px;
  font-weight: 720;
}

.public-auth-submit:hover,
.public-auth-submit:focus-visible {
  background: var(--app-primary-hover);
}

.login-signup-copy {
  margin: 25px 0 0;
  color: var(--app-text-muted);
  font-size: 12px;
  text-align: center;
}

.login-signup-copy a {
  font-weight: 720;
}

/* About */
.public-site-header + #main.about-main {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding-top: 70px;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
  margin-bottom: 72px;
}

.about-hero h1 {
  max-width: 820px;
  margin: 0 0 20px;
  font-size: clamp(38px, 4.5vw, 62px);
  font-weight: 720;
  line-height: 1.07;
  letter-spacing: -.06em;
}

.about-hero > div > p {
  max-width: 760px;
  margin: 0;
  color: var(--app-text-muted);
  font-size: 17px;
  line-height: 1.7;
}

.about-offer-card {
  padding: 25px;
  border: 1px solid #dfd5c3;
  border-radius: 15px;
  background: #faf7ef;
}

.about-offer-card > span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 20px;
  color: #8a612c;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.about-offer-card strong {
  display: block;
  margin-bottom: 9px;
  font-size: 17px;
}

.about-offer-card p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.about-principles {
  margin-bottom: 24px;
  padding: 32px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: #fff;
  box-shadow: var(--app-shadow);
}

.about-principles > header {
  margin-bottom: 25px;
}

.about-principles h2,
.about-portability h2,
.about-contact h2 {
  margin: 0 0 7px;
  font-size: 25px;
  font-weight: 720;
}

.about-principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.about-principle-grid article {
  min-height: 190px;
  padding: 21px;
  border: 1px solid #e0e6e4;
  border-radius: 12px;
  background: #fafbf9;
}

.about-principle-grid article > span {
  display: block;
  margin-bottom: 28px;
  color: var(--app-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.about-principle-grid h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 720;
}

.about-principle-grid p,
.about-portability p,
.about-contact p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 13px;
  line-height: 1.65;
}

.about-portability,
.about-contact {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-bottom: 24px;
  padding: 29px 32px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: #fff;
  box-shadow: var(--app-shadow);
}

.about-portability-icon {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--app-primary);
  border-radius: 14px;
  background: var(--app-primary-soft);
  font-size: 23px;
}

.about-contact {
  justify-content: space-between;
  background: #edf4f3;
}

.about-contact > a {
  display: inline-flex;
  min-height: 46px;
  gap: 9px;
  align-items: center;
  padding: 0 17px;
  color: #fff;
  border-radius: 9px;
  background: var(--app-primary);
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

@media (max-width: 1000px) {
  .public-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 62px;
  }

  .public-hero-copy {
    max-width: 760px;
  }

  .public-product-preview {
    max-width: 720px;
    transform: none;
  }

  .login-shell {
    grid-template-columns: minmax(330px, .8fr) minmax(440px, 1.2fr);
  }

  .about-hero {
    grid-template-columns: 1fr;
  }

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

  .public-invoicing-section {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .public-invoicing-section > a {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .public-site-header {
    width: calc(100% - 32px);
  }

  .public-site-nav > a:first-child {
    display: none;
  }

  .public-site-nav .public-login-link {
    margin-left: 0;
  }

  .public-hero {
    width: calc(100% - 36px);
    gap: 50px;
    padding: 50px 0 70px;
  }

  .public-hero-copy h1 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .public-feature-section {
    padding: 70px 18px;
  }

  .public-feature-grid,
  .about-principle-grid {
    grid-template-columns: 1fr;
  }

  .public-invoicing-section {
    width: calc(100% - 36px);
    grid-template-columns: 1fr;
    margin-top: 48px;
    padding: 26px;
  }

  .public-invoicing-section > a {
    grid-column: auto;
  }

  .public-bottom-cta {
    width: calc(100% - 36px);
    align-items: flex-start;
    padding: 30px;
    flex-direction: column;
  }

  .public-site-footer {
    width: calc(100% - 36px);
    grid-template-columns: 1fr auto;
  }

  .public-site-footer > span {
    display: none;
  }

  .login-shell {
    display: block;
  }

  .login-brand-panel {
    min-height: auto;
    padding: 28px 24px 36px;
  }

  .login-brand-copy {
    margin: 70px 0 25px;
  }

  .login-brand-copy h1 {
    font-size: 42px;
  }

  .login-brand-points {
    display: none;
  }

  .login-form-panel {
    min-height: auto;
    padding: 44px 24px 64px;
  }

  .login-back-link {
    margin-bottom: 38px;
  }

  .public-site-header + #main.about-main {
    padding: 48px 20px 60px;
  }

  .about-principles {
    padding: 23px;
  }

  .about-portability,
  .about-contact {
    align-items: flex-start;
    padding: 24px;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .public-brand strong {
    font-size: 17px;
  }

  .public-site-nav .public-login-link {
    border: 0;
    background: transparent;
  }

  .public-site-nav .public-primary-link {
    padding-inline: 12px;
  }

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

  .public-trust-row {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .preview-metrics article:nth-child(3) {
    display: none;
  }

  .public-site-footer nav a:first-child {
    display: none;
  }
}

/* Settings detail pages */
.settings-detail-workspace {
  padding-bottom: 72px;
}

.detail-page-header {
  display: flex;
  gap: 30px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 25px;
}

.detail-page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 720;
  letter-spacing: -.045em;
}

.detail-page-header p {
  max-width: 720px;
  margin: 0;
  color: var(--app-text-muted);
}

.detail-page-header .primary-action {
  flex: 0 0 auto;
}

.detail-back-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--app-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-back-link:hover {
  color: var(--app-primary);
}

.settings-summary-strip {
  display: grid;
  grid-template-columns: 150px 190px minmax(280px, 1fr);
  gap: 0;
  align-items: stretch;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background: rgba(255, 255, 255, .72);
}

.settings-summary-strip > div {
  display: grid;
  min-height: 76px;
  padding: 14px 18px;
  align-content: center;
  border-right: 1px solid var(--app-border);
}

.settings-summary-strip span,
.surface-count {
  color: var(--app-text-muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.settings-summary-strip strong {
  margin-top: 2px;
  font-size: 20px;
  font-weight: 740;
}

.settings-summary-strip p {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0;
  padding: 15px 20px;
  color: var(--app-text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.settings-summary-strip p i {
  color: var(--app-primary);
  font-size: 16px;
}

.settings-data-surface,
.settings-form-surface {
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.company-danger-zone {
  margin-top: 28px;
  border-color: #e2b2ac;
  box-shadow: none;
}

.company-danger-zone .settings-section-icon {
  color: var(--app-danger);
  background: #fff0ee;
}

.company-danger-zone-body {
  display: grid;
  gap: 18px;
  padding: 22px 24px;
}

.company-danger-zone-body > p {
  max-width: 760px;
  margin: 0;
  color: var(--app-text-muted);
  font-size: 13px;
  line-height: 1.65;
}

.company-delete-form {
  display: flex;
  gap: 16px;
  align-items: end;
}

.company-delete-form .app-field {
  width: min(100%, 480px);
}

.destructive-action {
  display: inline-flex;
  min-height: 44px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  color: #fff;
  border: 1px solid var(--app-danger);
  border-radius: var(--app-radius-sm);
  background: var(--app-danger);
  font-size: 13px;
  font-weight: 720;
}

.destructive-action:hover,
.destructive-action:focus-visible {
  border-color: #92372f;
  background: #92372f;
}

@media (max-width: 760px) {
  .company-delete-form {
    align-items: stretch;
    flex-direction: column;
  }
}

.settings-surface-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--app-border);
}

.settings-surface-heading h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 720;
}

.settings-surface-heading p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 13px;
}

.surface-count {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--app-primary-soft);
}

.settings-table-wrap {
  overflow-x: auto;
}

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

.settings-table th {
  padding: 13px 20px;
  color: #607077;
  border-bottom: 1px solid var(--app-border);
  background: #f6f8f7;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.settings-table td {
  padding: 14px 20px;
  color: var(--app-text);
  border-bottom: 1px solid #e8ecea;
  font-size: 13px;
}

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

.settings-table tbody tr:hover {
  background: #fafbf9;
}

.settings-table .numeric-cell {
  text-align: right;
  white-space: nowrap;
}

.history-info-panel { margin-bottom: 18px; }
.history-table .history-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.history-area { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: var(--app-primary-soft); color: var(--app-primary); font-size: 12px; font-weight: 700; }
.history-details summary { color: var(--app-primary); cursor: pointer; font-weight: 700; }
.history-details code { display: block; margin-top: 8px; max-width: 460px; padding: 8px 10px; overflow-wrap: anywhere; color: var(--app-text); background: #f6f8f7; border-radius: 8px; white-space: normal; }

.account-number-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 0;
  color: var(--app-primary);
  border: 0;
  background: transparent;
  font-weight: 780;
}

.account-number-button i {
  font-size: 10px;
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.account-number-button:hover i,
.account-number-button:focus-visible i {
  opacity: 1;
  transform: none;
}

.account-name-cell {
  font-weight: 620;
}

.source-badge,
.period-status {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 9px;
  color: #617076;
  border: 1px solid #dce3e1;
  border-radius: 999px;
  background: #f7f9f8;
  font-size: 10px;
  font-weight: 720;
  white-space: nowrap;
}

.source-badge-own {
  color: var(--app-primary);
  border-color: #c9dde1;
  background: var(--app-primary-soft);
}

.settings-empty-state {
  display: grid;
  min-height: 300px;
  padding: 45px 24px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.settings-empty-state > span {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 15px;
  background: var(--app-primary-soft);
  font-size: 23px;
}

.settings-empty-state h3 {
  margin: 0 0 7px;
  font-size: 18px;
  font-weight: 720;
}

.settings-empty-state p {
  margin: 0 0 18px;
  color: var(--app-text-muted);
  font-size: 13px;
}

.settings-detail-form {
  display: grid;
  gap: 18px;
}

.settings-form-heading {
  justify-content: flex-start;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  padding: 25px 24px 28px;
}

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

.app-select {
  width: 100%;
  height: 44px;
  padding: 0 38px 0 13px;
  color: var(--app-text);
  border: 1px solid #cdd6d4;
  border-radius: var(--app-radius-sm);
  outline: none;
  background: #fff;
}

.app-select:focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(57, 117, 138, .12);
}

.settings-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 2px;
}

.account-editor-modal .modal-dialog {
  max-width: 650px;
}

.account-editor-modal .modal-content {
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(25, 42, 48, .22);
}

.account-editor-modal .modal-header {
  align-items: flex-start;
  padding: 23px 25px 20px;
  border-bottom-color: var(--app-border);
  background: #fbfcfb;
}

.modal-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--app-primary);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.account-editor-modal .modal-title {
  font-size: 20px;
  font-weight: 730;
}

.account-editor-modal .modal-body {
  padding: 24px 25px;
}

.account-modal-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.account-editor-modal .modal-footer {
  padding: 17px 25px;
  border-top-color: var(--app-border);
  background: #fbfcfb;
}

.account-modal-alert {
  margin-bottom: 18px;
}

.account-modal-loading {
  display: flex;
  min-height: 150px;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: var(--app-text-muted);
  font-size: 13px;
}

.fiscal-year-list {
  display: grid;
}

.fiscal-year-card {
  display: grid;
  grid-template-columns: 46px minmax(280px, 1fr) auto;
  gap: 17px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--app-border);
  transition: background 150ms ease;
}

.fiscal-year-card:last-child {
  border-bottom: 0;
}

.fiscal-year-card:hover {
  background: #fafbf9;
}

.fiscal-year-card.is-open {
  box-shadow: inset 3px 0 0 var(--app-primary);
}

.fiscal-year-date-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 11px;
  background: var(--app-primary-soft);
  font-size: 18px;
}

.fiscal-year-title-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.fiscal-year-title-row > a {
  color: var(--app-text);
  font-size: 16px;
  font-weight: 730;
}

.fiscal-year-title-row > a:hover {
  color: var(--app-primary);
}

.period-status.is-open {
  color: #2f694f;
  border-color: #c5ded1;
  background: #eff8f3;
}

.fiscal-year-meta {
  display: flex;
  gap: 28px;
}

.fiscal-year-meta span {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.fiscal-year-meta small {
  color: var(--app-text-muted);
  font-size: 10px;
  font-weight: 680;
}

.fiscal-year-meta strong {
  font-size: 11px;
  font-weight: 720;
}

.fiscal-year-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.compact-action {
  min-height: 36px;
  padding: 0 11px;
  font-size: 11px;
}

.danger-text-action {
  display: inline-flex;
  min-height: 36px;
  gap: 6px;
  align-items: center;
  padding: 0 10px;
  color: #9a4941;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.danger-text-action:hover,
.danger-text-action:focus-visible {
  background: #fff1ef;
}

.settings-info-panel {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-top: 17px;
  padding: 17px 19px;
  color: #695c48;
  border: 1px solid #e6d9c4;
  border-radius: var(--app-radius-sm);
  background: #fbf8f1;
}

.settings-info-panel > i {
  margin-top: 2px;
  color: #a2783f;
}

.settings-info-panel strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.settings-info-panel p,
.fiscal-year-guidance p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.fiscal-year-form-workspace {
  --workspace-half-width: 560px;
  max-width: 1120px;
}

.fiscal-year-form-surface {
  max-width: 850px;
}

.fiscal-year-guidance {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 24px 25px;
  padding: 13px 15px;
  color: var(--app-text-muted);
  border-radius: var(--app-radius-sm);
  background: #f4f7f6;
}

.fiscal-year-guidance i {
  color: var(--app-primary);
}

@media (min-width: 1200px) {
  #main.fiscal-year-form-workspace {
    margin-left: max(
      var(--app-sidebar-width),
      calc(50% + var(--app-sidebar-half-width) - var(--workspace-half-width))
    );
  }

  .toggle-sidebar #main.fiscal-year-form-workspace {
    margin-left: max(0px, calc(50% - var(--workspace-half-width)));
  }
}

@media (max-width: 1050px) {
  .fiscal-year-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .fiscal-year-actions {
    grid-column: 2;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .detail-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .settings-summary-strip > div:nth-child(2) {
    border-right: 0;
  }

  .settings-summary-strip p {
    grid-column: 1 / -1;
    border-top: 1px solid var(--app-border);
  }

  .settings-form-grid,
  .account-modal-fields {
    grid-template-columns: 1fr;
  }

  .settings-form-grid .field-wide,
  .account-modal-fields .field-wide {
    grid-column: auto;
  }

  .fiscal-year-card {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 18px;
  }

  .fiscal-year-date-icon {
    width: 38px;
    height: 38px;
  }

  .fiscal-year-title-row,
  .fiscal-year-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .fiscal-year-meta {
    gap: 4px;
  }

  .settings-form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .settings-form-actions > * {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .settings-summary-strip {
    grid-template-columns: 1fr;
  }

  .settings-summary-strip > div {
    min-height: 62px;
    border-right: 0;
    border-bottom: 1px solid var(--app-border);
  }

  .settings-summary-strip p {
    grid-column: auto;
    border-top: 0;
  }

  .settings-surface-heading,
  .settings-form-grid {
    padding-inline: 18px;
  }

  .fiscal-year-actions {
    grid-column: 1 / -1;
  }
}

/* Remaining application pages */
.format-badge {
  display: inline-flex;
  min-width: 74px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--app-primary);
  border: 1px solid #bfd4d9;
  border-radius: 10px;
  background: var(--app-primary-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

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

.import-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.import-progress li {
  position: relative;
  display: flex;
  gap: 11px;
  align-items: center;
  color: var(--app-text-muted);
}

.import-progress li:first-child::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 19px;
  left: 40px;
  width: calc(100% - 40px);
  height: 2px;
  background: #d9e1e0;
}

.import-progress li > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 2px solid #cdd8d8;
  border-radius: 50%;
  background: var(--app-surface, #fff);
  font-size: 13px;
}

.import-progress li > span i { display: none; }
.import-progress li div { display: grid; gap: 1px; }
.import-progress li small { font-size: 11px; font-weight: 700; }
.import-progress li strong { color: inherit; font-size: 14px; }
.import-progress li.is-current { color: var(--app-primary); }
.import-progress li.is-current > span { color: #fff; border-color: var(--app-primary); background: var(--app-primary); }
.import-progress li.is-complete { color: var(--app-success); }
.import-progress li.is-complete > span { color: #fff; border-color: var(--app-success); background: var(--app-success); }
.import-progress li.is-complete > span b { display: none; }
.import-progress li.is-complete > span i { display: block; }
.import-progress li.is-complete:first-child::after { background: var(--app-success); }

.import-surface > form {
  padding: 25px;
}

.file-drop-field {
  display: grid;
  min-height: 126px;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 17px;
  align-items: center;
  padding: 23px;
  border: 1px dashed #afc5c9;
  border-radius: 13px;
  background: #f7faf9;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.file-drop-field:hover,
.file-drop-field:focus-within {
  border-color: var(--app-primary);
  background: #f1f7f7;
}

.file-drop-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.file-drop-icon,
.export-file-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 13px;
  background: var(--app-primary-soft);
  font-size: 21px;
}

.file-drop-field strong,
.file-drop-field small {
  display: block;
}

.file-drop-field strong {
  margin-bottom: 5px;
  font-size: 14px;
}

.file-drop-field small {
  color: var(--app-text-muted);
  font-size: 12px;
}

.import-actions,
.import-complete-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 18px;
}

.import-ready {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 27px;
  border-left: 4px solid var(--app-primary);
  background: linear-gradient(90deg, var(--app-primary-soft), #fff 45%);
}

.import-ready > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 50%;
  background: #e2f0f2;
  font-size: 21px;
}

.import-ready strong,
.import-ready p {
  display: block;
  margin: 0;
}

.import-ready .primary-action {
  min-height: 48px;
  padding-inline: 23px;
  box-shadow: 0 8px 20px rgba(36, 105, 123, .18);
}

.import-ready p {
  margin-top: 4px;
  color: var(--app-text-muted);
  font-size: 12px;
}

.import-complete-actions {
  padding: 25px;
  justify-content: flex-start;
}

.primary-action.is-loading {
  pointer-events: none;
  opacity: .75;
}

.transport-workspace .settings-info-panel {
  align-items: center;
}

.transport-workspace .settings-info-panel > a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-left: auto;
  color: var(--app-primary);
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.export-period-list article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--app-border);
}

.export-period-list article:last-child {
  border-bottom: 0;
}

.export-period-list strong,
.export-period-list small {
  display: block;
}

.export-period-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .65rem;
}

.export-period-list strong {
  margin-bottom: 4px;
  font-size: 14px;
}

.export-period-list small {
  color: var(--app-text-muted);
  font-size: 11px;
}

.profile-page-avatar {
  display: grid;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--app-primary);
  border-radius: 50%;
  background: var(--app-primary-soft);
  font-size: 26px;
}

.field-help {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 7px;
  color: var(--app-text-muted);
  font-size: 10px;
}

.app-field textarea,
.support-form textarea {
  width: 100%;
  min-height: 165px;
  padding: 13px;
  color: var(--app-text);
  border: 1px solid #cdd6d4;
  border-radius: var(--app-radius-sm);
  outline: none;
  background: #fff;
  resize: vertical;
}

.app-field textarea:focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(57, 117, 138, .12);
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 18px;
  align-items: start;
}

.support-form-fields {
  display: grid;
  gap: 20px;
  padding: 25px;
}

.support-form-fields .primary-action {
  justify-self: end;
}

.support-side-card {
  padding: 27px;
  border: 1px solid #d7e1df;
  border-radius: var(--app-radius);
  background: #edf4f3;
}

.support-side-card > span {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 32px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 13px;
  background: rgba(255, 255, 255, .65);
  font-size: 21px;
}

.support-side-card h2 {
  margin: 0 0 9px;
  font-size: 19px;
  font-weight: 720;
}

.support-side-card p,
.support-side-card li {
  color: var(--app-text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.support-side-card ul {
  margin: 19px 0 0;
  padding-left: 18px;
}

.subscription-hero-card {
  position: relative;
  margin-bottom: 18px;
  padding: clamp(28px, 4vw, 46px);
  color: #fff;
  overflow: hidden;
  border-radius: var(--app-radius-lg);
  background: #1c3b47;
  box-shadow: var(--app-shadow-lg);
}

.subscription-hero-card::after {
  position: absolute;
  right: -120px;
  bottom: -170px;
  width: 360px;
  height: 360px;
  content: "";
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(255, 255, 255, .025);
}

.subscription-status-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  margin-bottom: 42px;
}

.subscription-plan-badge,
.subscription-active,
.subscription-pending {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  font-weight: 750;
}

.subscription-plan-badge {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .11);
}

.subscription-active {
  color: #9fd4b7;
}

.subscription-pending {
  color: #f1c983;
}

.subscription-hero-card h2,
.subscription-hero-card p,
.subscription-price {
  position: relative;
  z-index: 1;
}

.subscription-hero-card h2 {
  max-width: 680px;
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 720;
  letter-spacing: -.04em;
}

.subscription-hero-card p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, .68);
  line-height: 1.65;
}

.subscription-price {
  display: flex;
  gap: 9px;
  align-items: baseline;
  margin-top: 30px;
}

.subscription-price strong {
  font-size: 29px;
}

.subscription-price span {
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
}

.subscription-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.subscription-details-grid article {
  min-height: 190px;
  padding: 23px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: #fff;
  box-shadow: var(--app-shadow);
}

.subscription-details-grid article > span {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 28px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 11px;
  background: var(--app-primary-soft);
  font-size: 18px;
}

.subscription-details-grid h3 {
  margin: 0 0 7px;
  font-size: 15px;
  font-weight: 720;
}

.subscription-details-grid p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.subscription-details-grid a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 720;
}

.subscription-includes {
  margin-top: 18px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: #fff;
  box-shadow: var(--app-shadow);
}

.subscription-includes > header {
  max-width: 680px;
  margin-bottom: 25px;
}

.subscription-includes h2 {
  margin: 4px 0 7px;
  font-size: 25px;
  font-weight: 720;
}

.subscription-includes > header p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 13px;
}

.subscription-includes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.subscription-includes-grid article {
  display: flex;
  min-height: 112px;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid #e0e6e4;
  border-radius: 12px;
  background: #fafbf9;
}

.subscription-includes-grid article > i {
  color: var(--app-primary);
  font-size: 19px;
}

.subscription-includes-grid h3 {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 720;
}

.subscription-includes-grid p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 12px;
  line-height: 1.55;
}

/* Public account and onboarding flows */
.auth-flow-page {
  min-height: 100vh;
  background: #f8f7f3;
}

.auth-flow-header {
  display: flex;
  width: min(1380px, calc(100% - 64px));
  min-height: 88px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.auth-flow-exit,
.simple-auth-back {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--app-text-muted);
  font-size: 12px;
  font-weight: 680;
}

.auth-flow-main {
  display: grid;
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 120px);
  margin: 0 auto;
  padding: 45px 0 75px;
  grid-template-columns: minmax(300px, .8fr) minmax(520px, 1.2fr);
  gap: clamp(55px, 8vw, 110px);
  align-items: start;
}

.auth-flow-intro {
  padding-top: 65px;
}

.auth-flow-intro h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 4.5vw, 58px);
  font-weight: 720;
  line-height: 1.05;
  letter-spacing: -.055em;
}

.auth-flow-intro > p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.onboarding-steps {
  display: grid;
  gap: 0;
  margin: 50px 0 0;
  padding: 0;
  list-style: none;
}

.onboarding-steps li {
  position: relative;
  display: flex;
  min-height: 75px;
  gap: 13px;
  color: #829094;
}

.onboarding-steps li:not(:last-child)::after {
  position: absolute;
  top: 32px;
  bottom: 0;
  left: 15px;
  width: 1px;
  content: "";
  background: #d6deda;
}

.onboarding-steps li > span {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #ced8d5;
  border-radius: 50%;
  background: #fff;
  font-size: 10px;
  font-weight: 780;
}

.onboarding-steps .is-current > span {
  color: #fff;
  border-color: var(--app-primary);
  background: var(--app-primary);
}

.onboarding-steps strong,
.onboarding-steps small {
  display: block;
}

.onboarding-steps strong {
  color: var(--app-text);
  font-size: 12px;
}

.onboarding-steps small {
  margin-top: 2px;
  font-size: 10px;
}

.auth-flow-card,
.simple-auth-card {
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--app-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(30, 46, 51, .08);
}

.auth-flow-card > header {
  margin-bottom: 28px;
}

.auth-flow-card h2 {
  margin: 0 0 6px;
  font-size: 27px;
  font-weight: 730;
  letter-spacing: -.035em;
}

.auth-flow-card header p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 12px;
}

.auth-flow-form {
  display: grid;
  gap: 26px;
}

.auth-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
}

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

.auth-form-grid.compact-grid {
  gap: 13px;
}

.auth-flow-select {
  width: 100%;
  height: 50px;
  padding: 0 40px 0 14px;
  color: var(--app-text);
  border: 1px solid #cdd7d5;
  border-radius: 9px;
  outline: none;
  background: #fff;
}

.auth-flow-select:focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 3px rgba(57, 117, 138, .12);
}

.terms-checkbox {
  align-items: flex-start;
  line-height: 1.5;
}

.simple-auth-shell {
  display: grid;
  width: min(100% - 40px, 500px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 35px 0 60px;
  grid-template-rows: auto 1fr;
  gap: 34px;
  align-items: center;
}

.simple-auth-shell > .public-brand {
  justify-self: center;
}

.simple-auth-card {
  width: 100%;
}

.simple-auth-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 25px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 15px;
  background: var(--app-primary-soft);
  font-size: 23px;
}

.simple-auth-card .login-heading h1 {
  margin: 0 0 8px;
  font-size: 31px;
  font-weight: 730;
  letter-spacing: -.04em;
}

.simple-auth-back {
  margin-top: 24px;
}

/* Voucher preview and detail page */
.voucher-preview-workspace {
  --workspace-half-width: 620px;
  max-width: 1240px;
}

.preview-status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  color: #2f694f;
  border: 1px solid #c5ded1;
  border-radius: 999px;
  background: #eff8f3;
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
}

.preview-form {
  display: grid;
  gap: 17px;
}

.voucher-preview-surface {
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  background: #fff;
  box-shadow: var(--app-shadow);
}

.voucher-preview-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 24px 27px;
  border-left: 3px solid var(--app-accent);
  border-bottom: 1px solid var(--app-border);
  background: #faf8f3;
}

.voucher-preview-meta > div:last-child {
  text-align: right;
}

.voucher-preview-meta span,
.voucher-preview-meta strong {
  display: block;
}

.voucher-preview-meta span {
  margin-bottom: 5px;
  color: var(--app-text-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.voucher-preview-meta h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 720;
}

.voucher-preview-meta strong {
  font-size: 14px;
}

.voucher-preview-table-wrap {
  overflow-x: auto;
}

.voucher-preview-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  table-layout: fixed;
}

.voucher-preview-table th,
.voucher-preview-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--app-border);
}

.voucher-preview-table th {
  color: var(--app-text-muted);
  background: #f6f8f7;
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
}

.voucher-preview-table th:first-child,
.voucher-preview-table td:first-child {
  width: 31%;
}

.voucher-preview-table th:nth-child(2),
.voucher-preview-table td:nth-child(2) {
  width: 37%;
}

.voucher-preview-table .numeric-cell {
  width: 16%;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.voucher-preview-table tfoot td {
  border-bottom: 0;
  background: #f8faf9;
  font-weight: 750;
}

.preview-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.voucher-page-audit {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 17px 21px;
  color: var(--app-text-muted);
  border-top: 1px solid var(--app-border);
  background: #fbfcfb;
  font-size: 11px;
}

.voucher-page-audit i {
  color: var(--app-success);
}

.voucher-document-surface {
  overflow: hidden;
  margin-top: 18px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-lg);
  background: #fff;
  box-shadow: var(--app-shadow);
}

.document-inbox-workspace { --workspace-half-width: 620px; max-width: 1240px; }
.document-inbox-workspace .voucher-document-surface + .voucher-document-surface { margin-top: 18px; }
.document-inbox-upload-form .document-upload-content { display: grid; gap: 16px; }
.document-inbox-upload-selection {
  padding: 16px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: #f8faf9;
}
.document-inbox-upload-selection[hidden] { display: none; }
.document-inbox-upload-selection-heading { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.document-inbox-upload-selection-heading > div { display: grid; gap: 2px; }
.inbox-upload-file-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.inbox-upload-file-info {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 13px;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius-sm);
  background: #fff;
}
.inbox-upload-file-info > i { font-size: 19px; }
.inbox-upload-file-info span,
.inbox-upload-file-info strong,
.inbox-upload-file-info small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-upload-file-info small { margin-top: 2px; }
.document-inbox-upload-actions { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.document-inbox-upload-actions > span { color: var(--app-text-muted); font-size: 12px; }
.document-inbox-upload-form .document-drop-zone.is-uploading { cursor: wait; pointer-events: none; border-color: var(--app-primary); background: var(--app-primary-soft); opacity: .78; }

.voucher-document-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 25px;
  border-bottom: 1px solid var(--app-border);
}

.voucher-document-header h2 { margin: 3px 0; font-size: 18px; }
.voucher-document-header p { font-size: 13px; }
.document-count { padding: 7px 10px; border-radius: 999px; background: var(--app-primary-soft); color: var(--app-primary); font-size: 11px; font-weight: 750; }

.document-inbox-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 16px 24px;
  border-bottom: 1px solid var(--app-border);
  background: #f8faf9;
}
.document-inbox-search { position: relative; margin: 0; }
.document-inbox-search i { position: absolute; top: 50%; left: 13px; color: var(--app-text-muted); transform: translateY(-50%); }
.document-inbox-search input,
.document-inbox-filter select {
  width: 100%;
  min-height: 42px;
  color: var(--app-text);
  border: 1px solid #cbd6d3;
  border-radius: var(--app-radius-sm);
  background: #fff;
}
.document-inbox-search input { padding: 9px 13px 9px 39px; }
.document-inbox-filter { min-width: 155px; margin: 0; }
.document-inbox-filter span { display: block; margin: 0 0 5px; color: var(--app-text-muted); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.document-inbox-filter select { padding: 8px 34px 8px 11px; }
.document-inbox-selection {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  color: var(--app-primary);
  border-bottom: 1px solid #b8d5d9;
  background: var(--app-primary-soft);
}
.document-inbox-selection[hidden] { display: none; }
.document-inbox-selection > span { display: flex; gap: 8px; align-items: center; }
.document-inbox-selection .primary-action { text-decoration: none; }

.voucher-document-list { display: grid; }
.voucher-document-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 15px 24px; border-bottom: 1px solid var(--app-border); }
.document-inbox-card { grid-template-columns: auto auto minmax(0, 1fr) auto; transition: background-color .16s ease, box-shadow .16s ease; }
.document-inbox-card[hidden] { display: none; }
.document-inbox-card.is-selected { background: #f1f8f9; box-shadow: inset 3px 0 0 var(--app-primary); }
.document-select-control { display: grid; margin: 0; cursor: pointer; place-items: center; }
.document-select-control input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.document-select-control > span[aria-hidden="true"] { display: grid; width: 22px; height: 22px; place-items: center; color: transparent; border: 1px solid #aebdb9; border-radius: 6px; background: #fff; font-size: 13px; }
.document-select-control input:focus-visible + span { outline: 3px solid rgb(37 112 130 / 20%); outline-offset: 2px; }
.document-select-control input:checked + span { color: #fff; border-color: var(--app-primary); background: var(--app-primary); }
.voucher-document-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 10px; background: var(--app-primary-soft); color: var(--app-primary); font-size: 18px; }
.voucher-document-info { min-width: 0; }
.voucher-document-info strong, .voucher-document-info span { display: block; }
.voucher-document-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voucher-document-info span { margin-top: 3px; color: var(--app-text-muted); font-size: 11px; }
.document-analysis { display: grid; gap: 7px; margin-top: 9px; }
.analysis-status { display: inline-flex !important; width: fit-content; gap: 6px; align-items: center; padding: 5px 8px; border-radius: 999px; font-weight: 700; }
.analysis-status.is-pending { color: #79591f; background: #fff2d7; }
.analysis-status.is-ready { color: #176d57; background: #e8f6f1; }
.analysis-status.is-failed { color: #963f37; background: #fff0ed; }
.analysis-result { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.analysis-result > span:not(.analysis-status), .analysis-result > strong { margin: 0; font-size: 12px; }
.analysis-suggestion-action { display: inline-flex; width: fit-content; gap: 6px; align-items: center; color: var(--app-primary); font-size: 12px; font-weight: 750; text-decoration: none; }
.analysis-inbox-recommendations { display: grid; gap: 5px; max-width: 620px; }
.analysis-inbox-recommendations .analysis-suggestion-action { width: 100%; padding: 7px 9px; border: 1px solid #d4e2de; border-radius: 8px; background: #f7fbfa; }
.analysis-inbox-recommendations .analysis-suggestion-action small { margin-left: auto; color: var(--app-text-muted); font-weight: 600; }
.analysis-browse-action { margin-top: 2px; }
.analysis-template { max-width: 720px; }
.analysis-template summary { width: fit-content; cursor: pointer; color: var(--app-primary); font-size: 12px; font-weight: 750; }
.analysis-template form { display: grid; grid-template-columns: repeat(3, minmax(140px, 1fr)); gap: 8px; margin-top: 9px; padding: 12px; border: 1px solid var(--app-border); border-radius: var(--app-radius-sm); background: #f8faf9; }
.analysis-template label { margin: 0; color: var(--app-text-muted); font-size: 10px; font-weight: 700; }
.analysis-template label:first-child { grid-column: 1 / -1; }
.analysis-template input, .analysis-template select { display: block; width: 100%; min-height: 38px; margin-top: 4px; padding: 7px 9px; border: 1px solid #cbd6d3; border-radius: 7px; background: #fff; }
.analysis-template button { width: fit-content; }
.transaction-analysis-panel { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--app-border); border-radius: var(--app-radius-sm); font-size: 12px; }
.transaction-analysis-panel[hidden] { display: none; }
.transaction-analysis-panel span { flex: 1; }
.transaction-analysis-panel.is-pending { color: #79591f; border-color: #ead3a4; background: #fff9ec; }
.transaction-analysis-panel.is-ready { color: #176d57; border-color: #abd7c7; background: #eff9f5; }
.transaction-analysis-panel.is-failed { color: #963f37; border-color: #e2b2ac; background: #fff4f1; }
.transaction-analysis-panel.analysis-template-picker { display: block; color: var(--app-text); background: #f7fbfa; }
.analysis-template-picker-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.analysis-template-picker-header > div { display: grid; gap: 3px; }
.analysis-template-picker-header strong { font-size: 14px; }
.analysis-template-picker-header span { color: var(--app-text-muted); font-size: 12px; }
.analysis-template-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.analysis-template-option { display: grid; gap: 6px; min-width: 0; padding: 12px; text-align: left; color: var(--app-text); border: 1px solid #c8d9d5; border-radius: 10px; background: #fff; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.analysis-template-option:hover, .analysis-template-option:focus-visible { border-color: var(--app-primary); box-shadow: 0 6px 18px rgba(24, 76, 87, .10); transform: translateY(-1px); }
.analysis-template-option-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.analysis-template-option-heading strong { font-size: 13px; }
.analysis-template-badge { flex: 0 0 auto; padding: 3px 7px; color: #526966; border-radius: 999px; background: #eef3f2; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.analysis-template-badge.is-recommended { color: #176d57; background: #e4f5ee; }
.analysis-template-option-description { color: var(--app-text-muted); font-size: 11px; line-height: 1.45; }
.analysis-template-option-meta { color: var(--app-primary); font-size: 10px; font-weight: 700; }
.analysis-template-browse { margin-top: 12px; }
.analysis-template-browser { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--app-border); }
.analysis-template-browser[hidden] { display: none; }
.analysis-template-browser > input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #c8d4d1; border-radius: 8px; background: #fff; }
.analysis-template-options.is-all { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 350px; overflow-y: auto; padding: 2px; }
.analysis-template-empty { margin: 4px 0; color: var(--app-text-muted); }
@media (max-width: 800px) {
  .analysis-template-options, .analysis-template-options.is-all { grid-template-columns: 1fr; }
  .analysis-template-options.is-all { max-height: 420px; }
  .analysis-inbox-recommendations .analysis-suggestion-action { align-items: flex-start; flex-wrap: wrap; }
  .analysis-inbox-recommendations .analysis-suggestion-action small { width: 100%; margin-left: 0; }
}
.voucher-document-actions { display: flex; gap: 7px; align-items: center; }
.voucher-document-actions form { margin: 0; }
.booked-document-trigger.is-active { border-color: #78aab5; background: var(--app-primary-soft); }
.booked-document-viewer { overflow: hidden; margin: 0 24px 22px; border: 1px solid var(--app-border); border-radius: var(--app-radius); background: #f6f8f7; }
.booked-document-viewer > header { display: flex; min-height: 68px; gap: 16px; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--app-border); background: #fff; }
.booked-document-viewer > header span, .booked-document-viewer > header strong { display: block; }
.booked-document-viewer > header strong { max-width: 600px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booked-document-canvas { display: block; height: min(68vh, 720px); min-height: 460px; overflow: auto; background: #e9edeb; }
.booked-document-canvas.is-pannable { cursor: grab; overscroll-behavior: contain; }
.booked-document-canvas.is-panning { cursor: grabbing; user-select: none; }
.booked-document-canvas img { display: block; width: calc(100% - 40px); max-width: none; height: auto; margin: 20px auto; }
.booked-document-pdf-pages { display: grid; width: 100%; min-height: 100%; gap: 18px; align-content: start; justify-items: center; padding: 20px; }
.booked-document-pdf-pages[hidden] { display: none; }
.booked-document-pdf-pages canvas { max-width: none; background: #fff; box-shadow: 0 3px 14px rgb(20 35 40 / 14%); }
.voucher-detail-documents .booked-document-viewer { margin: 16px 0 0; }
.voucher-detail-document-list { display: flex; flex-wrap: wrap; gap: 8px; }
.voucher-detail-document-list .booked-document-trigger { display: inline-flex; gap: 7px; align-items: center; padding: 9px 11px; color: var(--app-primary); border: 1px solid #b8d1d6; border-radius: var(--app-radius-sm); background: #fff; }
.report-modal .booked-document-canvas { height: min(52vh, 580px); min-height: 380px; }
.icon-action { display: inline-grid; width: 38px; height: 38px; padding: 0; place-items: center; color: var(--app-primary); border: 1px solid #b8d1d6; border-radius: var(--app-radius-sm); background: #fff; }
.danger-action { color: #a3443b; border-color: #e2b2ac; }
.document-preview-modal .modal-content { overflow: hidden; border: 0; border-radius: var(--app-radius-lg); }
.document-preview-modal .modal-header { padding: 18px 22px; }
.document-preview-modal .modal-title { margin-top: 3px; font-size: 20px; }
.document-preview-modal .modal-body { padding: 0; background: #e9edeb; }
.document-preview-modal .booked-document-viewer { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.document-preview-modal .booked-document-canvas { height: min(76vh, 820px); }
.voucher-document-empty { display: flex; gap: 9px; align-items: center; justify-content: center; padding: 28px; color: var(--app-text-muted); border-bottom: 1px solid var(--app-border); }
.voucher-document-upload { padding: 20px 24px 23px; }
.voucher-document-upload > label { display: block; margin-bottom: 8px; font-weight: 720; }
.voucher-document-upload > div { display: flex; gap: 10px; align-items: center; }
.voucher-document-upload input { min-width: 0; flex: 1; padding: 9px; border: 1px solid #cdd6d4; border-radius: var(--app-radius-sm); }
.voucher-document-upload small { display: block; margin-top: 7px; color: var(--app-text-muted); }
.voucher-existing-document-picker { margin-top: 12px; border: 1px solid var(--app-border); border-radius: var(--app-radius-sm); background: #f8faf9; }
.voucher-existing-document-picker summary { padding: 11px 13px; cursor: pointer; color: var(--app-primary); font-size: 12px; font-weight: 720; }
.voucher-existing-document-picker > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 7px; padding: 0 12px 12px; }
.voucher-existing-document-picker label { display: flex; gap: 9px; align-items: center; padding: 9px; border: 1px solid var(--app-border); border-radius: 8px; background: #fff; }
.voucher-existing-document-picker label > span { min-width: 0; }
.voucher-existing-document-picker strong, .voucher-existing-document-picker small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voucher-existing-document-picker small { margin: 2px 0 0; }
.voucher-detail-add-documents { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--app-border); }
.voucher-detail-add-documents h3 { margin: 0 0 10px; font-size: 14px; }
.existing-voucher-document-form { display: grid; grid-template-columns: minmax(190px, 1fr) auto; gap: 9px; align-items: start; }
.voucher-detail-file-picker { display: flex; min-height: 42px; gap: 8px; align-items: center; padding: 9px 11px; cursor: pointer; color: var(--app-primary); border: 1px dashed #8fb8c1; border-radius: var(--app-radius-sm); background: #f7fbfb; font-size: 12px; font-weight: 720; }
.voucher-detail-file-picker input { min-width: 0; flex: 1; color: var(--app-text-muted); font-weight: 500; }
.voucher-detail-inbox-picker { grid-column: 1 / -1; border: 1px solid var(--app-border); border-radius: var(--app-radius-sm); }
.voucher-detail-inbox-picker summary { padding: 9px 11px; cursor: pointer; color: var(--app-primary); font-size: 12px; font-weight: 720; }
.voucher-detail-inbox-picker > div { display: grid; gap: 5px; padding: 0 10px 10px; }
.voucher-detail-inbox-picker label { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.voucher-detail-add-status { grid-column: 1 / -1; min-height: 16px; color: var(--app-text-muted); font-size: 11px; }
.voucher-detail-add-status.is-error { color: #963f37; }
.voucher-detail-add-status.is-success { color: var(--app-success); }
.existing-voucher-document-form button:disabled { cursor: wait; opacity: .6; }

@media (max-width: 700px) {
  .voucher-document-card { grid-template-columns: auto minmax(0, 1fr); }
  .document-inbox-card { grid-template-columns: auto auto minmax(0, 1fr); }
  .document-inbox-card .voucher-document-actions { grid-column: 2 / -1; }
  .voucher-document-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .voucher-document-upload > div { align-items: stretch; flex-direction: column; }
  .document-inbox-toolbar { grid-template-columns: 1fr; }
  .document-inbox-filter { min-width: 0; }
  .document-inbox-selection { align-items: stretch; flex-direction: column; }
  .document-inbox-selection .primary-action { justify-content: center; }
  .inbox-upload-file-list { grid-template-columns: 1fr; }
  .document-inbox-upload-actions { align-items: stretch; flex-direction: column; }
  .document-inbox-upload-actions .primary-action { justify-content: center; }
  .booked-document-viewer { margin-right: 14px; margin-left: 14px; }
  .booked-document-canvas { min-height: 360px; }
  .document-inbox-layout { grid-template-columns: 1fr; }
  .analysis-template form { grid-template-columns: 1fr; }
  .analysis-template label:first-child { grid-column: auto; }
  .inbox-document-preview { position: static; }
}

@media (min-width: 1200px) {
  #main.voucher-preview-workspace {
    margin-left: max(var(--app-sidebar-width), calc(50% + var(--app-sidebar-half-width) - var(--workspace-half-width)));
  }
  .toggle-sidebar #main.voucher-preview-workspace {
    margin-left: max(0px, calc(50% - var(--workspace-half-width)));
  }
}

/* Error page */
.error-page {
  min-height: 100vh;
  background: #f8f7f3;
}

.error-page-shell {
  position: relative;
  display: flex;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 42px 0 65px;
  overflow: hidden;
  flex-direction: column;
}

.error-page-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: auto 0;
}

.error-code {
  display: block;
  margin-bottom: 12px;
  color: var(--app-primary-soft);
  font-size: clamp(90px, 15vw, 180px);
  font-weight: 800;
  line-height: .8;
  letter-spacing: -.08em;
  text-shadow: 1px 0 #c7dce0, -1px 0 #c7dce0, 0 1px #c7dce0, 0 -1px #c7dce0;
}

.error-page-content h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 720;
  letter-spacing: -.055em;
}

.error-page-content > p {
  max-width: 570px;
  margin: 0;
  color: var(--app-text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.error-page-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.error-page-decoration {
  position: absolute;
  right: 4%;
  bottom: 16%;
  display: grid;
  width: 290px;
  height: 290px;
  place-items: center;
  color: rgba(57, 117, 138, .2);
  border: 1px solid rgba(57, 117, 138, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(57, 117, 138, .035), 0 0 0 104px rgba(57, 117, 138, .02);
  font-size: 100px;
}

@media (max-width: 900px) {
  .support-layout,
  .subscription-details-grid,
  .subscription-includes-grid,
  .auth-flow-main {
    grid-template-columns: 1fr;
  }

  .auth-flow-main {
    max-width: 680px;
    gap: 42px;
  }

  .auth-flow-intro {
    padding-top: 10px;
  }

  .onboarding-steps {
    display: none;
  }

  .error-page-decoration {
    right: -110px;
    opacity: .55;
  }
}

@media (max-width: 760px) {
  .import-progress { gap: 12px; }
  .import-progress li { align-items: flex-start; }
  .import-progress li:first-child::after { display: none; }
  .import-progress li > span { width: 32px; height: 32px; flex-basis: 32px; }
  .import-progress li div { line-height: 1.25; }

  .file-drop-field,
  .import-ready,
  .export-period-list article {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .file-drop-field .secondary-action,
  .import-ready .primary-action,
  .export-period-list article .secondary-action {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .export-period-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
  }

  .transport-workspace .settings-info-panel {
    align-items: flex-start;
  }

  .transport-workspace .settings-info-panel > a {
    margin-left: 0;
  }

  .subscription-details-grid {
    grid-template-columns: 1fr;
  }

  .auth-flow-header {
    width: calc(100% - 36px);
  }

  .auth-flow-main {
    width: calc(100% - 36px);
    padding-top: 25px;
  }

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

  .auth-form-grid .field-wide {
    grid-column: auto;
  }

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

  .voucher-preview-meta > div:last-child {
    text-align: left;
  }

  .preview-actions,
  .error-page-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .preview-actions > *,
  .error-page-actions > * {
    justify-content: center;
  }
}

/* Company selection */
.company-select-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 4%, rgba(114, 169, 180, .17), transparent 31%),
    #f6f5f1;
}

.company-select-header {
  display: flex;
  width: min(1320px, calc(100% - 64px));
  min-height: 82px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(95, 113, 117, .18);
}

.company-select-user {
  display: flex;
  gap: 10px;
  align-items: center;
}

.company-select-user > div {
  min-width: 0;
}

.company-select-user small,
.company-select-user strong {
  display: block;
}

.company-select-user small {
  color: var(--app-text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.company-select-user strong {
  max-width: 220px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-select-user form {
  margin-left: 8px;
}

.company-select-user button {
  display: inline-flex;
  min-height: 38px;
  gap: 7px;
  align-items: center;
  padding: 0 12px;
  color: #52646a;
  border: 1px solid #ced7d5;
  border-radius: 9px;
  background: rgba(255, 255, 255, .7);
  font-size: 11px;
  font-weight: 680;
}

.company-select-user button:hover,
.company-select-user button:focus-visible {
  color: var(--app-primary-hover);
  border-color: #aac3c7;
  background: #fff;
}

.company-select-main {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 76px 0 70px;
}

.company-select-intro {
  max-width: 760px;
  margin-bottom: 36px;
}

.company-select-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -.055em;
}

.company-select-intro p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 16px;
}

.company-select-surface {
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 17px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 24px 65px rgba(28, 41, 46, .09);
  backdrop-filter: blur(10px);
}

.company-select-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 25px;
  border-bottom: 1px solid var(--app-border);
}

.company-select-list-heading h2 {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 720;
}

.company-select-list-heading p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 12px;
}

.company-count {
  display: grid;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  place-items: center;
  color: var(--app-primary-hover);
  border-radius: 9px;
  background: var(--app-primary-soft);
  font-size: 13px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.company-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 20px;
}

.company-choice-card {
  display: grid;
  min-height: 116px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 19px;
  color: var(--app-text);
  border: 1px solid #d8e0de;
  border-radius: 12px;
  background: #fbfcfc;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.company-choice-card:hover,
.company-choice-card:focus-visible {
  color: var(--app-text);
  border-color: #a9c4c9;
  background: #fff;
  box-shadow: 0 10px 26px rgba(28, 41, 46, .09);
  transform: translateY(-2px);
}

.company-choice-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--app-primary);
  border-radius: 12px;
  background: var(--app-primary-soft);
  font-size: 20px;
}

.company-choice-copy {
  min-width: 0;
}

.company-choice-copy > strong,
.company-choice-copy > small {
  display: block;
}

.company-choice-copy > strong {
  margin-bottom: 6px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-choice-copy > small,
.company-choice-meta {
  color: var(--app-text-muted);
  font-size: 11px;
}

.company-choice-meta {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

.company-choice-meta small + small::before {
  margin-right: 7px;
  content: "·";
  color: #a0abad;
}

.company-choice-action {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--app-primary-hover);
  font-size: 11px;
  font-weight: 720;
}

.company-choice-action i,
.company-new-card > .bi-arrow-right {
  transition: transform 140ms ease;
}

.company-choice-card:hover .company-choice-action i,
.company-choice-card:focus-visible .company-choice-action i,
.company-new-card:hover > .bi-arrow-right,
.company-new-card:focus-visible > .bi-arrow-right {
  transform: translateX(3px);
}

.company-new-card {
  border-style: dashed;
  background: rgba(240, 246, 246, .55);
}

.company-new-card .company-choice-icon {
  color: #7a8b90;
  background: #eef2f1;
}

.company-new-card > .bi-arrow-right {
  color: #87969a;
}

.company-select-empty {
  display: flex;
  min-height: 240px;
  gap: 20px;
  align-items: center;
  padding: 36px;
}

.company-select-empty > span {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--app-primary);
  border-radius: 14px;
  background: var(--app-primary-soft);
  font-size: 23px;
}

.company-select-empty > div {
  flex: 1;
}

.company-select-empty h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.company-select-empty p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 13px;
}

.company-select-help {
  margin: 21px 0 0;
  color: var(--app-text-muted);
  font-size: 11px;
  text-align: center;
}

.company-select-help a {
  font-weight: 700;
}

@media (max-width: 760px) {
  .company-select-header {
    width: calc(100% - 32px);
  }

  .company-select-user > .profile-avatar,
  .company-select-user > div {
    display: none;
  }

  .company-select-user form {
    margin-left: 0;
  }

  .company-select-main {
    width: calc(100% - 32px);
    padding-top: 50px;
  }

  .company-choice-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .company-select-user button span {
    display: none;
  }

  .company-select-user button {
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .company-select-list-heading,
  .company-choice-grid {
    padding: 17px;
  }

  .company-choice-card {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 15px;
  }

  .company-choice-icon {
    width: 42px;
    height: 42px;
  }

  .company-choice-action {
    font-size: 0;
  }

  .company-choice-action i {
    font-size: 14px;
  }

  .company-select-empty {
    align-items: flex-start;
    flex-direction: column;
  }
}
.vat-flow-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.vat-flow-steps li { display: flex; gap: .75rem; align-items: center; opacity: .65; }
.vat-flow-steps li > span { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--surface-muted, #eef2f6); font-weight: 700; }
.vat-flow-steps li.is-current { opacity: 1; }
.vat-flow-steps li.is-current > span { background: var(--bs-primary, #0d6efd); color: #fff; }
.vat-flow-steps strong, .vat-flow-steps small { display: block; }
@media (max-width: 767px) { .vat-flow-steps { grid-template-columns: 1fr; } }

.vat-list-workspace { max-width: 1500px; }
.vat-list-intro { display: flex; gap: 1rem; align-items: flex-start; padding: 1.2rem 1.35rem; margin-bottom: 1.5rem; border: 1px solid #cfe0e3; border-radius: 16px; background: #f4fafb; }
.vat-list-intro-icon { display: grid; place-items: center; flex: 0 0 2.25rem; width: 2.25rem; height: 2.25rem; color: var(--app-primary); background: #dceff2; border-radius: 50%; font-size: 1.1rem; }
.vat-list-intro strong { display: block; margin-bottom: .2rem; }
.vat-list-intro p { margin: .1rem 0; color: var(--app-text-muted); }
.vat-list-intro a { font-weight: 700; text-underline-offset: 3px; }
.vat-period-list { overflow: hidden; padding: 0; }
.vat-period-list-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--app-border); }
.vat-period-list-heading h2 { margin: 0; font-size: 1.15rem; }
.vat-period-list-heading p { margin: .15rem 0 0; color: var(--app-text-muted); font-size: .86rem; }
.vat-period-list-heading > span { color: var(--app-text-muted); font-size: .8rem; font-weight: 700; }
.vat-empty-flow { display: flex; align-items: center; gap: .85rem; padding: 1.35rem 1.5rem; color: var(--app-text-muted); }
.vat-empty-flow > i { color: #2f8a70; font-size: 1.35rem; }
.vat-empty-flow strong { display: block; color: var(--app-text); }
.vat-empty-flow p { margin: .15rem 0 0; }
.vat-period-list table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.vat-period-list th { padding: .75rem 1.5rem; color: var(--app-text-muted); background: #f8faf9; border-bottom: 1px solid var(--app-border); font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; text-align: left; }
.vat-period-list td { height: 66px; padding: .8rem 1.5rem; border-bottom: 1px solid #e7ecea; vertical-align: middle; }
.vat-period-list tbody tr:last-child td { border-bottom: 0; }
.vat-period-list tbody tr { transition: background .15s ease; }
.vat-period-list tbody tr:hover { background: #f6faf9; }
.vat-period-list th:first-child, .vat-period-list td:first-child { width: 42%; }
.vat-period-list th:nth-child(2), .vat-period-list td:nth-child(2) { width: 22%; }
.vat-period-list th:nth-child(3), .vat-period-list td:nth-child(3) { width: 18%; }
.vat-period-list th:last-child, .vat-period-list td:last-child { width: 18%; text-align: right; }
.vat-period-list a { display: inline-flex; align-items: center; color: var(--app-text); font-weight: 750; text-decoration: none; }
.vat-period-list a::after { content: "\F285"; margin-left: .55rem; color: #8aa0a6; font-family: "bootstrap-icons"; font-size: .75rem; opacity: 0; transform: translateX(-4px); transition: .15s ease; }
.vat-period-list tr:hover a { color: var(--app-primary); }
.vat-period-list tr:hover a::after { opacity: 1; transform: translateX(0); }
.vat-period-list tr.is-missing { color: #79878c; }
.vat-period-list tr.is-missing a { color: #59696f; font-weight: 650; }
.vat-outcome { display: inline-grid; justify-items: end; line-height: 1.25; }
.vat-outcome small { color: var(--app-text-muted); font-size: .7rem; font-weight: 650; }
.vat-outcome strong { color: var(--app-text); font-size: .92rem; font-variant-numeric: tabular-nums; }
.vat-outcome.is-refund strong { color: var(--app-success); }
.vat-outcome.is-zero strong { color: var(--app-text-muted); font-weight: 600; }
.vat-period-status { display: inline-flex; padding: .3rem .75rem; border-radius: 999px; background: #e5e7eb; }
.vat-period-status.is-current { background: #e5e7eb; }
.vat-period-status.is-progress { background: #dbeafe; color: #1e40af; }
.vat-period-status.is-closed { background: #dcfce7; color: #166534; }
.vat-period-status.is-action { background: #fff0d7; color: #8a5517; }
.vat-period-status.is-missing { color: #748288; background: #f0f3f2; }
.vat-history-list { margin-top: 1rem; overflow: hidden; padding: 0; }
.vat-history-list > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.5rem; cursor: pointer; list-style: none; }
.vat-history-list > summary::-webkit-details-marker { display: none; }
.vat-history-list > summary::after { content: "\F282"; color: var(--app-primary); font-family: "bootstrap-icons"; transition: transform .18s ease; }
.vat-history-list[open] > summary::after { transform: rotate(180deg); }
.vat-history-list > summary > span:first-child { display: grid; gap: .15rem; }
.vat-history-list > summary strong { color: var(--app-text); }
.vat-history-list > summary small { color: var(--app-text-muted); font-size: .82rem; }
.vat-history-count { margin-left: auto; color: var(--app-text-muted); font-size: .8rem; font-weight: 700; }
.vat-history-information { display: flex; align-items: flex-start; gap: .7rem; padding: .9rem 1.5rem; color: var(--app-text-muted); background: #f8faf9; border-top: 1px solid var(--app-border); border-bottom: 1px solid var(--app-border); }
.vat-history-information i { color: var(--app-primary); }
.vat-history-information p { margin: 0; max-width: 960px; font-size: .86rem; line-height: 1.5; }
.vat-history-table { border: 0; border-radius: 0; box-shadow: none; }
.vat-period-list tr.is-historical { color: #79878c; }
.vat-period-list tr.is-historical a { color: #59696f; font-weight: 650; }
.vat-period-status.is-historical { color: #66757a; background: #edf1f0; }
@media (max-width: 800px) {
  .vat-period-list { overflow-x: auto; }
  .vat-period-list table { min-width: 760px; }
  .vat-period-list th, .vat-period-list td { padding-left: 1rem; padding-right: 1rem; }
}
.vat-period-header { margin-bottom: 1rem; }
.vat-period-outcome { display: grid; place-items: center; gap: .35rem; padding: 1.5rem; margin-bottom: 1rem; border: 1px solid var(--app-border); border-radius: 18px; background: #fff; text-align: center; }
.vat-period-outcome > span { color: var(--app-muted); }
.vat-period-outcome div strong, .vat-period-outcome div b { display: block; }
.vat-period-outcome div b { margin-top: .25rem; font-size: 1.8rem; }
.vat-workflow-card { margin: 1rem 0; border: 1px solid var(--app-border); border-radius: 18px; background: #fff; overflow: hidden; opacity: .72; }
.vat-workflow-card.is-open, .vat-workflow-card.is-complete { opacity: 1; }
.vat-workflow-card > header { margin: 0; }
.vat-step-toggle { display: flex; align-items: center; gap: 1rem; width: 100%; padding: 1.25rem 1.5rem; border: 0; background: transparent; color: inherit; text-align: left; }
.vat-step-toggle:not(:disabled) { cursor: pointer; }
.vat-step-toggle:not(:disabled):hover { background: #f8faf9; }
.vat-step-toggle:focus-visible { outline: 3px solid rgba(52, 120, 143, .28); outline-offset: -3px; }
.vat-step-toggle:disabled { cursor: default; opacity: 1; }
.vat-step-marker { display: grid; place-items: center; flex: 0 0 2.25rem; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: #f1f5f9; font-weight: 800; }
.vat-step-marker > * { grid-area: 1 / 1; }
.vat-step-marker > i { display: none; }
.vat-workflow-card.is-complete .vat-step-marker { background: #e5f5ee; color: #246c55; }
.vat-workflow-card.is-complete .vat-step-marker > span { display: none; }
.vat-workflow-card.is-complete .vat-step-marker > i { display: inline; }
.vat-step-heading { display: grid; gap: .15rem; min-width: 0; }
.vat-step-heading > span { font-size: 1.1rem; font-weight: 700; }
.vat-step-chevron { margin-left: auto; transition: transform .18s ease; }
.vat-workflow-card.is-expanded .vat-step-chevron { transform: rotate(180deg); }
.vat-workflow-card h2 { margin: 0; font-size: 1.1rem; }
.vat-workflow-card small { color: var(--app-muted); }
.vat-workflow-body { padding: 0 1.5rem 1.5rem; }
.vat-workflow-body[hidden] { display: none; }
.vat-check-list { padding-left: 1.35rem; }
.vat-check-list li { margin: .45rem 0; }
.vat-workflow-body form { margin-top: 1.25rem; }
.vat-workflow-body .vat-step-actions form { margin: 0; }
.imported-year-end-card { margin: 1rem 0; overflow: hidden; border: 1px solid var(--app-border); border-radius: 18px; background: #fff; }
.imported-year-end-card > header { display: flex; align-items: flex-start; gap: 1rem; padding: 1.5rem; border-bottom: 1px solid var(--app-border); background: #f7fbfa; }
.imported-year-end-card h2 { margin: .15rem 0 .25rem; font-size: 1.35rem; }
.imported-year-end-card p { margin: 0; max-width: 760px; color: var(--app-text-muted); line-height: 1.5; }
.imported-year-end-icon { display: grid; place-items: center; flex: 0 0 2.75rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; color: #26745d; background: #e5f5ee; font-size: 1.2rem; }
.imported-year-end-body { padding: 1.5rem; }
.imported-year-end-body h3 { margin: 0 0 1rem; font-size: 1rem; }
.imported-year-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.imported-year-checks li { display: flex; align-items: flex-start; gap: .7rem; min-width: 0; padding: .9rem 1rem; border: 1px solid var(--app-border); border-radius: 12px; background: #fafcfb; }
.imported-year-checks li > i { flex: 0 0 auto; margin-top: .1rem; }
.imported-year-checks li > span { display: grid; gap: .15rem; min-width: 0; }
.imported-year-checks li strong { font-size: .88rem; }
.imported-year-checks li small { overflow-wrap: anywhere; color: var(--app-text-muted); line-height: 1.4; }
.imported-year-checks li.is-passed > i { color: #26745d; }
.imported-year-checks li.is-warning > i { color: #9a651b; }
.imported-year-checks li.is-blocking > i { color: #b23a2f; }
.imported-year-end-confirm { display: grid; justify-items: start; gap: 1rem; margin-top: 1.35rem; padding-top: 1.35rem; border-top: 1px solid var(--app-border); }
.imported-year-end-confirm .vat-confirmation { max-width: 820px; }
@media (max-width: 760px) { .imported-year-checks { grid-template-columns: 1fr; } .imported-year-end-card > header, .imported-year-end-body { padding: 1.1rem; } }
.vat-payment-preview { margin-top: 1.25rem; overflow: hidden; border: 1px solid var(--app-border); border-radius: 12px; }
.vat-payment-preview h3 { margin: 0; padding: 1rem 1.1rem; font-size: .95rem; background: #f6f8f7; }
.vat-payment-preview table { width: 100%; border-collapse: collapse; }
.vat-payment-preview th, .vat-payment-preview td { padding: .8rem 1.1rem; border-top: 1px solid var(--app-border); text-align: right; font-variant-numeric: tabular-nums; }
.vat-payment-preview th:first-child, .vat-payment-preview td:first-child { text-align: left; }
.vat-payment-preview td:first-child span { display: block; color: var(--app-muted); font-size: .78rem; }
.vat-payment-form { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr) auto; align-items: end; gap: 1rem; padding: 1rem; border-radius: 12px; background: #f6f8f7; }
.vat-payment-form label { display: grid; gap: .4rem; font-weight: 700; }
.vat-payment-form input, .vat-payment-form select { min-height: 44px; padding: .6rem .75rem; border: 1px solid var(--app-border); border-radius: 8px; background: #fff; }
.vat-payment-amount { display: grid; gap: .3rem; min-width: 140px; }
.vat-payment-amount span { color: var(--app-muted); font-size: .8rem; }
.vat-payment-amount strong { font-size: 1.05rem; }
@media (max-width: 800px) { .vat-payment-form { grid-template-columns: 1fr; } }

/* Company access */
.access-workspace { display: grid; gap: 1.4rem; }
.access-inline-form { display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 1rem; padding: 1.35rem; }
.access-inline-form .app-field { margin: 0; }
.access-list { display: grid; }
.access-row { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; padding: 1rem 1.35rem; border-top: 1px solid var(--app-border); }
.access-avatar { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; color: var(--app-primary); background: #e9f4f6; font-weight: 800; }
.access-person { display: grid; gap: .2rem; min-width: 0; }
.access-person span { color: var(--app-text-muted); overflow-wrap: anywhere; }
.access-role { padding: .35rem .65rem; border-radius: 999px; color: #245f70; background: #e5f1f4; font-weight: 700; font-size: .82rem; }
.access-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.ownership-form { display: grid; gap: 1rem; padding: 1.35rem; max-width: 780px; }
.access-confirm { display: flex; align-items: flex-start; gap: .65rem; }
.access-confirm input { margin-top: .25rem; }
@media (max-width: 760px) { .access-inline-form { grid-template-columns: 1fr; } .access-row { grid-template-columns: 2.75rem minmax(0, 1fr); } .access-row .access-role, .access-row form { grid-column: 2; justify-self: start; } }
.invitation-company-card { display: flex; align-items: center; gap: 1rem; margin: 1.25rem 0; padding: 1rem; border: 1px solid var(--app-border); border-radius: 12px; background: #f7fbfb; }
.invitation-company-icon { display: grid; place-items: center; flex: 0 0 2.75rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; color: var(--app-primary); background: var(--app-primary-soft); font-size: 1.15rem; }
.invitation-company-card div { display: grid; gap: .15rem; min-width: 0; }
.invitation-company-card small, .invitation-company-card span { color: var(--app-text-muted); }
.invitation-company-card strong { overflow-wrap: anywhere; font-size: 1.05rem; }
