:root {
  --bg: #f3f4f7; --surface: #fff; --text: #15171b; --muted: #4d535c; --line: #d6dae1;
  --field-border: #7e8793; --accent: #1b4a76; --accent-soft: #e6eef7; --focus: #2f6fb0;
  --danger: #b42318; --danger-soft: #fdecea; --warn: #8a5a00; --warn-soft: #fff5e0; --ok: #1e7a3c; --ok-soft: #e7f5ec;
  --radius: 8px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 15px; color: var(--text);
}
/* Große Schrift (Schalter unten links, wird je Gerät gemerkt) – für Kassen-Laptops
   und Bildschirme, auf die man schräg schaut. */
html.gross { font-size: 17px; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); display: flex; min-height: 100vh; }
a { color: var(--accent); }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 600; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 600; }
h3 { font-size: 12px; margin: 18px 0 8px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.muted { color: var(--muted); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 12px; word-break: break-all; }

/* Navigation */
.topbar { display: none; }
.sidebar { width: 230px; flex: none; background: #14263a; color: #dfe7f0; padding: 18px 12px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar[hidden] { display: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; padding: 0 8px; color: #fff; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, #4f8cc9, #1f4e79); flex: none; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { color: #c9d5e2; text-decoration: none; padding: 9px 10px; border-radius: 6px; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.sidebar-new { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.sidebar .btn:not(.primary) { background: transparent; color: #dfe7f0; border-color: rgba(255,255,255,.25); }
.sidebar .btn:not(.primary):hover { background: rgba(255,255,255,.08); }
.userbox { border-top: 1px solid rgba(255,255,255,.12); padding: 12px 8px 0; font-size: 12px; color: #aebdcc; }
.userbox strong { color: #fff; display: block; font-size: 13px; }
.userbox button { background: none; border: none; color: #c9d5e2; padding: 4px 0; margin-right: 12px; cursor: pointer; font: inherit; text-decoration: underline; }

main { flex: 1; min-width: 0; padding: 24px 28px 60px; outline: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Bausteine */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi .card { padding: 14px 16px; margin: 0; }
.kpi .label { color: var(--muted); font-size: 12px; }
.kpi .value { font-size: 22px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.btn { font: inherit; border: 1px solid #d0d4db; background: var(--surface); color: var(--text); padding: 8px 12px; border-radius: 6px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.2; white-space: nowrap; min-height: 36px; }
.btn:hover { background: #f0f2f5; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #183f63; }
.btn.danger { color: var(--danger); border-color: #f2c4bf; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.block { width: 100%; }
.btn.small { padding: 4px 8px; font-size: 12px; min-height: 28px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 20px; padding: 2px 8px; border-radius: 4px; line-height: 1; }
.icon-btn:hover { color: var(--danger); background: var(--danger-soft); }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); border: 1px solid #c9ced6; border-radius: 6px; padding: 8px 9px; background: #fff; width: 100%; min-height: 36px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc0e4; outline-offset: 0; border-color: var(--accent); }
input[type=checkbox] { width: 18px; min-height: 18px; height: 18px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #f7f9fc; }
table.list .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eef0f3; color: var(--muted); white-space: nowrap; }
.badge.offen, .badge.teilbezahlt { background: var(--warn-soft); color: var(--warn); }
.badge.bezahlt { background: var(--ok-soft); color: var(--ok); }
.badge.storniert, .badge.Storno, .badge.teilstorniert { background: var(--danger-soft); color: var(--danger); }
.badge.Entwurf { background: var(--accent-soft); color: var(--accent); }
.badge.alt { background: #f3eefa; color: #5b3e8a; }
.msg { border-radius: 6px; padding: 10px 12px; font-size: 13px; white-space: pre-line; }
.msg + .msg { margin-top: 8px; }
.msg ul { margin: 4px 0 0; padding-left: 18px; white-space: normal; }
.msg.error { background: var(--danger-soft); color: var(--danger); }
.msg.warn { background: var(--warn-soft); color: var(--warn); }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.msg.info { background: var(--accent-soft); color: var(--accent); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters > * { width: auto; min-width: 140px; flex: 1 1 140px; max-width: 260px; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }

/* Editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.editor aside { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.editor aside .card + .card { margin-top: 0; }
.items-head, .item { display: grid; grid-template-columns: 24px 80px 92px 104px 70px minmax(130px, 1fr) 96px 28px; gap: 6px 8px; }
.items-head { font-size: 12px; color: var(--muted); font-weight: 600; padding: 4px 0 6px; border-bottom: 1px solid var(--line); }
.item { padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.item .pos { color: var(--muted); padding-top: 9px; grid-row: 1 / 3; }
.item .desc { grid-column: 2 / 8; }
.item .rm { grid-column: 8; }
.item .qty { grid-column: 2; }
.item .total { text-align: right; padding-top: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item input.num { text-align: right; }
.totals { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.totals td { padding: 4px 0; }
.totals td:last-child { text-align: right; white-space: nowrap; }
.totals tr.grand td { border-top: 2px solid var(--text); padding-top: 8px; font-weight: 700; font-size: 16px; }
.seg { display: inline-flex; border: 1px solid #c9ced6; border-radius: 6px; overflow: hidden; }
.seg button { border: none; background: #fff; padding: 7px 11px; font: inherit; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--accent); color: #fff; }
.savestate { font-size: 12px; color: var(--muted); }

/* Belegansicht */
.doc-view { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.pdf-frame { width: 100%; height: calc(100vh - 150px); min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
dl.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.cancel-lines td { vertical-align: middle; }
.cancel-lines input.num { width: 90px; text-align: right; }

/* Anmeldung */
.login-wrap { min-height: 100vh; width: 100%; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login { width: min(400px, 100%); }
.login .brand { color: var(--text); justify-content: center; margin-bottom: 16px; font-size: 20px; }

/* Modal & Toast */
.modal { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal[hidden] { display: none; }
.modal .dialog { background: var(--surface); border-radius: 10px; width: min(760px, 100%); padding: 22px; box-shadow: 0 20px 40px rgba(0,0,0,.2); }
.modal .dialog.narrow { width: min(480px, 100%); }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #14263a; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; white-space: pre-line; max-width: 92vw; z-index: 60; }
#toast.show { opacity: 1; }
#toast.error { background: var(--danger); }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.logo-preview { max-height: 60px; max-width: 220px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: #fff; }

@media (max-width: 1150px) {
  .editor, .doc-view { grid-template-columns: 1fr; }
  .editor aside { position: static; }
  .pdf-frame { height: 70vh; min-height: 420px; }
}
/* Handy & Tablet */
@media (max-width: 860px) {
  body { flex-direction: column; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; background: #14263a; color: #fff; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
  .topbar .brand { color: #fff; padding: 0; }
  .menu-btn { background: none; border: none; color: #fff; font-size: 24px; padding: 4px 8px; cursor: pointer; }
  .sidebar { position: fixed; inset: 0 30% 0 0; height: 100%; z-index: 45; width: auto; max-width: 300px; box-shadow: 0 0 40px rgba(0,0,0,.4); transform: translateX(-105%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .sidebar > .brand { display: none; }
  main { padding: 16px 14px 80px; }
  h1 { font-size: 19px; }
  .items-head { display: none; }
  .item { grid-template-columns: 22px 1fr 1fr 34px; }
  .item .desc { grid-column: 2 / 4; }
  .item .rm { grid-column: 4; grid-row: 1; }
  .item .qty, .item .price, .item .tax { grid-column: 2; }
  .item .unit, .item .disc { grid-column: 3; }
  .item .total { grid-column: 3; }
  .item .tax { grid-column: 2 / 4; }
  table.list.responsive thead { display: none; }
  table.list.responsive tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
  table.list.responsive td { border: none; padding: 0; }
  table.list.responsive td.hide-m { display: none; }
  .filters > * { max-width: none; }
}
@media print { .sidebar, .topbar, .actions { display: none; } }
.badge.angenommen { background: var(--ok-soft); color: var(--ok); }
.badge.abgelehnt, .badge.abgelaufen { background: var(--danger-soft); color: var(--danger); }
.badge.Mahnung { background: var(--warn-soft); color: var(--warn); }
.item .tax.inherit { display: flex; align-items: center; font-size: 12px; color: var(--muted); background: #f3f5f8; border: 1px dashed #c9ced6; border-radius: 6px; padding: 0 9px; min-height: 36px; }

/* Kundensuche */
.combo { position: relative; flex: 1; min-width: 0; }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(16,24,40,.14); max-height: 320px; overflow-y: auto; }
.combo-item { padding: 9px 11px; cursor: pointer; border-bottom: 1px solid var(--line); line-height: 1.35; }
.combo-item:last-child { border-bottom: 0; }
.combo-item.on, .combo-item:hover { background: var(--accent-soft); }
.combo-head { padding: 7px 11px; font-size: 12px; color: var(--muted); }

/* ===== Laden-Ansicht (Oktober 2026) =====================================
   Kräftigere Darstellung und kürzere Wege für die Arbeit an der Kasse.
   Die Regeln stehen bewusst am Ende und überschreiben die obigen. */

/* Schrift und Kontrast: Eingaben erbten bisher die 12-px-Beschriftung. */
h1 { font-size: 1.55rem; }
h2 { font-size: 1.12rem; }
label.f { font-size: .9rem; font-weight: 600; color: #2b3038; gap: 5px; }
input, select, textarea { font-size: 1rem; min-height: 42px; padding: 9px 11px; border: 1.5px solid var(--field-border); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(47,111,176,.45); border-color: var(--focus); }
input::placeholder, textarea::placeholder { color: #8a9099; }
.btn { font-size: 1rem; min-height: 42px; padding: 9px 15px; border-color: #9aa3ad; font-weight: 500; }
.btn.primary { font-weight: 600; }
.btn.small { font-size: .85rem; min-height: 30px; padding: 4px 9px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.check { font-size: .95rem; }
.sidebar nav a { font-size: 1rem; padding: 10px 10px; }
table.list th { font-size: .85rem; color: #3f454e; }
.items-head { font-size: .85rem; color: #3f454e; }
.item .pos { font-weight: 600; color: #3f454e; }
.item input, .item select, .item textarea { min-height: 42px; }
.totals td { padding: 6px 0; font-size: 1.02rem; }
.totals tr.grand td { font-size: 1.3rem; }
.msg { font-size: .95rem; }
.badge { font-size: .85rem; }
.combo-item { padding: 11px 12px; font-size: 1rem; }
.seg button { padding: 9px 13px; }
html.gross input, html.gross select, html.gross textarea, html.gross .btn { min-height: 46px; }

/* Schritte im Beleg: 1. Kunde/Verkäufer, 2. Ausweis, 3. Positionen … Nur sichtbare
   Karten zählen (die Bankverbindung ist bei Barzahlung ausgeblendet). */
.editor > div { counter-reset: schritt; }
.editor > div > .card:not([hidden]) h2.schritt::before { counter-increment: schritt; content: counter(schritt) " "; display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; margin-right: .45em; border-radius: 50%; background: var(--accent); color: #fff; font-size: .85em; }

/* Selten gebrauchte Texte eingeklappt – die Maske wird deutlich kürzer. */
details.card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h2 { margin: 0; }
details.card > summary::after { content: "anzeigen"; margin-left: auto; font-size: .9rem; color: var(--accent); text-decoration: underline; }
details.card[open] > summary::after { content: "ausblenden"; }
details.card[open] > summary { margin-bottom: 12px; }

/* Ankaufbeleg: keine Rabatt- und Steuerspalte – mehr Platz für Bezeichnung und Betrag. */
@media (min-width: 861px) {
  .editor.purchase .items-head, .editor.purchase .item { grid-template-columns: 24px 90px 110px 150px minmax(0, 1fr) 28px; }
  .editor.purchase .items-head span:nth-child(5), .editor.purchase .items-head span:nth-child(6), .editor.purchase .items-head span:nth-child(7),
  .editor.purchase .item .disc, .editor.purchase .item .tax, .editor.purchase .item .total { display: none; }
  .editor.purchase .item .desc { grid-column: 2 / 6; }
  .editor.purchase .item .rm { grid-column: 6; }
}

/* Feste Leiste am unteren Rand: Summe, Stand und Festschreiben immer im Blick –
   ohne Scrollen. Auf breiten Bildschirmen übernimmt das die rechte Spalte. */
.editor-bar { display: none; }
@media (max-width: 1150px) {
  main:has(.editor-bar) { padding-bottom: 96px; }
  .editor-bar { display: flex; position: fixed; left: 230px; right: 0; bottom: 0; z-index: 35; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 10px 16px; background: var(--surface); border-top: 2px solid var(--accent); box-shadow: 0 -6px 20px rgba(16,24,40,.12); }
  .editor-bar .eb-sum { display: flex; flex-direction: column; line-height: 1.15; }
  .editor-bar .eb-sum span { font-size: .8rem; color: var(--muted); font-weight: 600; }
  .editor-bar .eb-sum strong { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
  .editor-bar .eb-state { flex: 1 1 160px; font-size: .9rem; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font-family: inherit; }
  .editor-bar .eb-state.ok { color: var(--ok); font-weight: 600; }
  .editor-bar .eb-state.err { color: var(--danger); font-weight: 600; }
  .editor-bar .actions { margin-left: auto; }
}
@media (max-width: 860px) {
  .editor-bar { left: 0; }
  /* Handy: PDF-Vorschau und Festschreiben stehen in der unteren Leiste – oben nur noch „Löschen“ */
  .page-head .actions #btn-preview, .page-head .actions #btn-finalize { display: none; }
}

/* Dialoge: Das Fenster scrollt jetzt selbst (nicht mehr der Hintergrund), und die
   Schaltflächen bleiben unten sichtbar. Ein Klick auf den Scrollbalken kann das
   Fenster damit nicht mehr schließen. */
.modal { padding: 16px; align-items: center; }
.modal .dialog { max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; padding: 22px 22px 0; }
.modal .dialog > *:not(.foot) { flex: none; }
.modal .foot { position: sticky; bottom: 0; margin: 18px -22px 0; padding: 12px 22px 16px; background: var(--surface); border-top: 1px solid var(--line); }
@media print { .editor-bar { display: none; } }

/* Buchhaltung: Belege & Abgleich */
.fin-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.fin-tabs a { text-decoration: none; color: var(--muted); padding: 10px 14px; border-bottom: 3px solid transparent; font-weight: 600; }
.fin-tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.fin-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.fin-tile { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); min-height: 120px; }
.fin-tile:hover { background: #f7f9fc; }
.fin-tile.gruen { border-left-color: var(--ok); } .fin-tile.gelb { border-left-color: #d99a00; } .fin-tile.rot { border-left-color: var(--danger); }
.fin-tile-head { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.fin-tile-body { font-size: 13px; color: var(--muted); flex: 1; }
.ampel { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--line); flex: none; }
.ampel.gruen { background: var(--ok); } .ampel.gelb { background: #d99a00; } .ampel.rot { background: var(--danger); }
.fin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 18px; }
.btn.big { padding: 14px 20px; font-size: 16px; min-height: 48px; }
.btn.warn { background: var(--warn-soft); border-color: #e8c47a; color: var(--warn); }
.fin-checks { margin: 0; padding-left: 0; list-style: none; }
.fin-checks li { padding: 6px 0; } .fin-checks li.warn { color: var(--warn); } .fin-checks li.ok { color: var(--ok); }
.dropzone { border: 2px dashed #9aa6b5; border-radius: var(--radius); padding: 40px 20px; text-align: center; background: #fafbfd; margin: 12px 0; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.fin-log { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.fin-logline { font-size: 13px; padding: 6px 8px; border-radius: 6px; background: #f7f9fc; }
.fin-logline .ok { color: var(--ok); font-weight: 700; } .fin-logline .error { color: var(--danger); font-weight: 700; }
.fin-sub { padding-left: 18px; color: var(--muted); }
.fin-item { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.fin-item.later { opacity: .7; }
.fin-item-main { flex: 1; min-width: 0; }
.fin-item-top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 15px; }
.fin-item-why { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fin-item-actions { display: flex; flex-direction: column; gap: 6px; flex: none; min-width: 220px; }
.fin-item-actions .btn { justify-content: flex-start; }
.fin-more { display: flex; gap: 6px; }
.amt { font-variant-numeric: tabular-nums; font-weight: 600; } .amt.neg { color: var(--danger); } .amt.pos { color: var(--ok); }
.warn-text { color: var(--warn); }
.fin-catgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-top: 10px; }
.fin-catgrid .btn { justify-content: flex-start; white-space: normal; text-align: left; min-height: 44px; }
.fin-receipt { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 420px); gap: 16px; }
.fin-preview { width: 100%; height: 70vh; min-height: 420px; border: 1px solid var(--line); border-radius: 6px; background: #fff; object-fit: contain; }
table.list tr.open td { background: #fffaf0; }
@media (max-width: 760px) {
  .fin-item { flex-direction: column; } .fin-item-actions { min-width: 0; width: 100%; }
  .fin-receipt { grid-template-columns: 1fr; } .fin-preview { height: 50vh; min-height: 300px; }
  .fin-tabs a { padding: 8px 10px; }
}
.fin-settings-table input:not([type=checkbox]) { min-width: 120px; }
.fin-settings-table td:first-child input { min-width: 220px; }
