:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #eef4f1;
  --text: #17201f;
  --muted: #66706c;
  --line: #cbd8d2;
  --accent: #0f766e;
  --accent-dark: #12343b;
  --warn: #f59e0b;
  --bad: #b42318;
  --good: #047857;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-header {
  min-height: 88px;
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.2;
}

h2 {
  font-size: 15px;
}

h3 {
  font-size: 13px;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}


.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}


.public-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.public-nav a,
.app-footer a,
.legal-back {
  color: var(--accent-dark);
  text-decoration: none;
}

.public-nav a:hover,
.app-footer a:hover,
.legal-back:hover {
  color: var(--accent);
  text-decoration: underline;
}
.language-switch {
  display: flex;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.language-option {
  min-width: 48px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
}

.language-option:last-child {
  border-right: 0;
}

.language-option.active {
  background: var(--accent-dark);
  color: #ffffff;
}
.status-strip {
  min-width: 120px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 13px;
  text-align: center;
}

.status-strip.ok {
  color: var(--good);
  border-color: #a7d7c7;
}

.status-strip.fail {
  color: var(--bad);
  border-color: #efb7ad;
}

.brand-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  padding: 44px 28px 48px;
  border-bottom: 1px solid var(--line);
  background-image: url("assets/statement-engine-hero.png");
  background-position: center right;
  background-size: cover;
  overflow: hidden;
}

.brand-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(246, 247, 244, 0.84);
}

.brand-hero-copy {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
}

.brand-kicker {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 10px;
}

.brand-hero h2 {
  margin: 0;
  max-width: 720px;
  color: #111827;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: 0;
}

.brand-hero p {
  max-width: 720px;
  margin-top: 14px;
  color: #263532;
  font-size: 16px;
  line-height: 1.62;
}

.brand-actions,
.brand-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.brand-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-dark);
  padding: 8px 13px;
  font-size: 13px;
  text-decoration: none;
}

.brand-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.brand-button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.brand-pricing-note {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  max-width: 260px;
}

.brand-pills {
  margin-top: 16px;
}

.brand-pills span {
  border: 1px solid rgba(18, 52, 59, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: #263532;
  padding: 6px 9px;
  font-size: 12px;
}

#tool {
  scroll-margin-top: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 42%) minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - 88px);
}

.input-pane,
.output-pane {
  min-width: 0;
  padding: 18px;
}

.input-pane {
  border-right: 1px solid var(--line);
  background: #fbfbf8;
  overflow: auto;
}

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

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.toolbar-select {
  display: grid;
  gap: 4px;
  min-width: 132px;
}

.toolbar-select span {
  color: var(--muted);
  font-size: 11px;
}

.toolbar-select select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
}

button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

button.primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

textarea {
  width: 100%;
  height: calc(100vh - 334px);
  resize: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 14px;
  font:
    12px/1.55 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  tab-size: 2;
}

#payloadEditor {
  display: none;
}

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

.section-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.secondary-action {
  background: #fbfbf8;
  color: var(--muted);
}

.opening-balance {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
  margin-bottom: 12px;
}

.opening-period-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(128px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.opening-period-grid label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.opening-period-grid span {
  color: var(--muted);
  font-size: 11px;
}

.opening-period-grid input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
}

.opening-period-grid input[readonly] {
  background: var(--surface-2);
  color: var(--muted);
}

.opening-balance-header,
.opening-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 112px 32px;
  gap: 8px;
  align-items: center;
}

.opening-balance-header {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}

.opening-list-body {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.opening-row select,
.opening-row input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
}

.opening-remove {
  width: 32px;
  min-width: 32px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.transaction-list {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
}

.transaction-list-body {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}

.transaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e6ece8;
  padding: 8px 0;
}

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

.transaction-main {
  min-width: 0;
}

.transaction-main strong,
.transaction-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-main strong {
  font-size: 13px;
}

.transaction-main span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.transaction-remove {
  width: 32px;
  min-width: 32px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.empty-state {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 0;
}


.transaction-form {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
  margin-bottom: 12px;
}

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

.form-grid label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.form-grid span {
  color: var(--muted);
  font-size: 11px;
}

.form-grid input,
.form-grid select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
}

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

.month-field input[type="month"] {
  min-width: 0;
  max-width: 100%;
  text-align: center;
}

.form-grid .month-field {
  grid-column: span 2;
}

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

.issue-report {
  margin: -4px 0 12px;
}

.issue-report-toggle {
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.issue-report-toggle:hover {
  color: var(--accent);
}

.issue-report-panel {
  display: grid;
  gap: 8px;
  max-width: 520px;
  margin-top: 8px;
  border: 1px solid var(--line);
  background: #fbfbf8;
  padding: 10px;
}

.issue-report-panel label {
  display: grid;
  gap: 4px;
}

.issue-report-panel span,
.issue-report-status {
  color: var(--muted);
  font-size: 11px;
}

.issue-report-panel select,
.issue-report-panel textarea {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
}

.issue-report-panel textarea {
  height: 78px;
  resize: vertical;
}

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

.issue-report-status {
  min-height: 16px;
  margin: 0;
}

.issue-report-status.ok {
  color: var(--good);
}

.issue-report-status.fail {
  color: var(--bad);
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  min-height: 38px;
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(128px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.metric {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 12px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.2;
}

.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 216px);
  border: 1px solid var(--line);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid #e6ece8;
  text-align: right;
  white-space: nowrap;
  font-size: 13px;
}

th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--accent-dark);
  color: #ffffff;
}

tr.total td {
  font-weight: 700;
  background: var(--surface-2);
}

.breakdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  text-align: left;
}

.breakdown-toggle:hover {
  color: var(--accent);
  border-color: transparent;
}

.breakdown-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent-dark);
  font-size: 12px;
  line-height: 1;
}

tr.breakdown-parent.is-expanded td {
  background: #f8fbf9;
}

tr.breakdown-row {
  background: #f8fbf9;
}

tr.breakdown-row td {
  padding-top: 6px;
  padding-bottom: 6px;
  background: #f8fbf9;
  color: var(--muted);
  font-size: 12px;
}

tr.breakdown-row td:first-child {
  padding-left: 34px;
}

.breakdown-account {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.breakdown-code {
  color: var(--accent-dark);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.breakdown-name {
  color: var(--text);
}

tr.breakdown-empty td {
  color: var(--muted);
  font-style: italic;
  text-align: left;
}

td.ok {
  color: var(--good);
  font-weight: 700;
}

td.fail {
  color: var(--bad);
  font-weight: 700;
}


.pricing-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: #f8fbf9;
  padding: 12px;
  margin: 0 0 12px;
}

.pricing-strip strong,
.pricing-strip span {
  display: block;
}

.pricing-strip span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.resource-section {
  border: 1px solid var(--line);
  background: #f8fbf9;
  padding: 14px;
  margin: 0 0 16px;
}

.resource-section p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.resource-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.resource-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  padding: 12px;
}

.resource-card:hover {
  border-color: var(--accent);
}

.resource-card h3 {
  font-size: 14px;
  line-height: 1.35;
}

.resource-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.price-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.price-pills span {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 5px 8px;
  margin: 0;
  font-size: 12px;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 10px 18px;
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(18, 52, 59, 0.45);
  padding: 18px;
}

.export-modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 20px 40px rgba(18, 52, 59, 0.2);
}

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

.modal-close {
  width: 32px;
  min-width: 32px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.export-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 10px;
  margin-top: 12px;
}

.export-price-row span {
  color: var(--muted);
  font-size: 12px;
}

.export-price-row strong {
  font-size: 16px;
}

.import-format-box {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 10px;
  margin-top: 12px;
}

.import-format-box strong {
  font-size: 13px;
}

.import-format-box code {
  display: block;
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.modal-note {
  font-size: 12px;
}

.sample-options {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.sample-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  background: #fbfbf8;
  padding: 10px;
  cursor: pointer;
}

.sample-option:hover {
  border-color: var(--accent);
}

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

.sample-option strong,
.sample-option em {
  display: block;
}

.sample-option strong {
  font-size: 13px;
  line-height: 1.35;
}

.sample-option em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.rewarded-export {
  display: grid;
  gap: 10px;
  border: 1px solid #f6c453;
  background: #fff8e6;
  color: #4a3410;
  padding: 12px;
  margin-top: 12px;
}

.rewarded-kicker {
  display: inline-block;
  color: #a15c05;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rewarded-export strong {
  display: block;
  margin-top: 3px;
  color: #38250b;
  font-size: 14px;
  line-height: 1.35;
}

.rewarded-export p {
  margin-top: 4px;
  color: #64450f;
  font-size: 12px;
  line-height: 1.5;
}

.rewarded-video {
  min-height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid #e7b746;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(255, 255, 255, 0)),
    #fffdf7;
}

.rewarded-play {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #d49a21;
  border-radius: 50%;
  background: #ffffff;
  color: #a15c05;
  font-size: 16px;
  line-height: 1;
}

.rewarded-export button {
  justify-self: start;
  border-color: #b45309;
  background: #b45309;
  color: #ffffff;
}

.rewarded-export button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.legal-page {
  background: var(--bg);
}

.legal-document {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 18px 56px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
}

.legal-document h1 {
  margin-top: 14px;
}

.legal-document h2 {
  margin-top: 24px;
  font-size: 16px;
}

.legal-document p {
  line-height: 1.65;
}

.content-page .legal-document {
  max-width: 1120px;
}

.content-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 10px 28px rgba(18, 52, 59, 0.06);
}

.content-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--accent);
}

.content-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.content-hero h1 {
  margin-top: 0;
  max-width: 820px;
  font-size: 36px;
  line-height: 1.08;
}

.content-hero p:not(.content-kicker) {
  max-width: 820px;
  color: #263532;
  font-size: 15px;
}

.content-actions,
.pill-link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-actions {
  margin-top: 18px;
}

.content-actions a,
.pill-link-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  background: #f8fbf9;
  border-radius: 6px;
  color: var(--accent-dark);
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.content-actions a:hover,
.pill-link-grid a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.summary-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef4f1;
  padding: 15px 16px;
}

.summary-item strong {
  display: block;
  color: var(--accent-dark);
  font-size: 16px;
}

.summary-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.section-band {
  margin-top: 30px;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-title-row span {
  min-width: 36px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  background: #eef4f1;
  border-radius: 4px;
  color: var(--accent-dark);
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.section-title-row h2 {
  margin-top: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.25;
}

.faq-grid,
.guide-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.qa-card,
.guide-list a {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 1px 0 rgba(18, 52, 59, 0.05);
}

.qa-card h3,
.guide-list strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.qa-card p,
.guide-list span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.guide-list a {
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.guide-list a:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 22px rgba(18, 52, 59, 0.08);
  transform: translateY(-1px);
}

.guide-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-list.compact a {
  padding: 11px 12px;
}

.guide-list.compact strong {
  font-size: 13px;
}

.pill-link-grid {
  gap: 9px;
}

.feedback-admin {
  max-width: 1180px;
}

.admin-token-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px auto;
  align-items: end;
  gap: 10px;
  margin: 18px 0 12px;
}

.admin-token-form label {
  display: grid;
  gap: 5px;
}

.admin-token-form span,
.admin-status {
  color: var(--muted);
  font-size: 12px;
}

.admin-token-form input,
.admin-token-form select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  padding: 7px 9px;
  font: inherit;
}

.admin-status {
  min-height: 18px;
}

.admin-status.ok {
  color: var(--good);
}

.admin-status.fail {
  color: var(--bad);
}

.feedback-admin-list {
  overflow-x: auto;
}

.feedback-admin-table {
  min-width: 980px;
}

.feedback-admin-table th,
.feedback-admin-table td {
  vertical-align: top;
}

.feedback-admin-table td {
  font-size: 12px;
}

.feedback-detail,
.feedback-context {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  font: inherit;
  line-height: 1.45;
}

.feedback-detail {
  min-width: 240px;
  max-width: 380px;
}

.feedback-context {
  min-width: 180px;
  max-width: 280px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .app-header {
    min-height: 0;
    padding: 14px 16px;
    gap: 12px;
  }

  .brand-hero {
    min-height: 340px;
    padding: 32px 18px 36px;
    background-position: center;
  }

  .brand-hero::before {
    background: rgba(246, 247, 244, 0.9);
  }

  .brand-hero h2 {
    font-size: 30px;
    line-height: 1.14;
  }

  .brand-hero p {
    font-size: 14px;
    line-height: 1.58;
  }

  .brand-pricing-note {
    flex-basis: 100%;
    max-width: 100%;
  }

  .app-header,
  .pane-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    justify-content: flex-start;
    gap: 8px;
  }

  .workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .input-pane,
  .output-pane {
    padding: 12px;
  }

  .input-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pane-toolbar {
    gap: 10px;
    margin-bottom: 10px;
  }

  .button-row {
    gap: 6px;
  }

  .section-heading {
    align-items: flex-start;
  }

  button {
    min-height: 32px;
    padding: 6px 10px;
  }

  .toolbar-select {
    min-width: 150px;
  }

  .opening-balance,
  .transaction-form,
  .transaction-list {
    padding: 10px;
    margin-bottom: 10px;
  }

  .opening-period-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .opening-balance-header,
  .opening-row {
    grid-template-columns: minmax(0, 1fr) minmax(90px, 118px) 34px;
    gap: 6px;
  }

  .opening-list-body {
    gap: 7px;
    max-height: 260px;
  }

  .opening-period-grid input,
  .opening-row select,
  .opening-row input,
  .form-grid input,
  .form-grid select,
  .toolbar-select select {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 13px;
  }

  .opening-remove {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
  }

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

  .summary-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .pricing-strip {
    grid-template-columns: 1fr;
  }

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

  .content-hero {
    padding: 18px;
  }

  .content-hero h1 {
    font-size: 28px;
  }

  .summary-strip,
  .faq-grid,
  .guide-list,
  .guide-list.compact {
    grid-template-columns: 1fr;
  }

  .summary-item {
    border: 1px solid var(--line);
  }

  .summary-item:last-child {
    border: 1px solid var(--line);
  }

  .price-pills {
    justify-content: flex-start;
  }

  .table-wrap {
    max-height: 70vh;
  }

  .modal-backdrop {
    align-items: end;
    padding: 10px;
  }

  .export-modal {
    max-height: calc(100vh - 20px);
    overflow: auto;
    padding: 14px;
  }

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

@media (max-width: 420px) {
  .input-pane,
  .output-pane {
    padding: 10px;
  }

  .opening-period-grid {
    grid-template-columns: 1fr;
  }

  .opening-balance-header,
  .opening-row {
    grid-template-columns: minmax(0, 1fr) minmax(78px, 106px) 32px;
    gap: 5px;
  }

  .opening-period-grid input,
  .opening-row select,
  .opening-row input,
  .form-grid input,
  .form-grid select,
  .toolbar-select select {
    min-height: 32px;
    padding: 4px 7px;
  }

  .opening-remove {
    width: 32px;
    min-width: 32px;
    min-height: 32px;
  }

  .form-grid {
    gap: 7px;
  }

  .form-grid .month-field {
    grid-column: 1 / -1;
  }
}


.is-hidden {
  display: none !important;
}





