:root {
  color-scheme: light;
  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f7f9fc; --line: #e3e8f0;
  --text: #101828; --muted: #5b6678; --navy: #0d1f3c; --accent: #1f66c1; --accent-soft: #e8f1fc;
  --ok: #11734b; --ok-soft: #e3f5ec; --warn: #8a5a00; --warn-soft: #fdf1d7; --fail: #b3261e; --fail-soft: #fdeae8;
  --s-profit: #2a78d6; --s-prov: #eb6834; --s-cost: #1baf7a; --s-fee: #eda100; --s-revenue: #8b98ad; --s-return: #6250d6;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 24px rgba(16, 24, 40, .05);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #101113; --surface: #1a1a19; --surface-2: #222321; --line: #32332f;
    --text: #f0efec; --muted: #a9a89f; --navy: #0b1526; --accent: #6aa8f0; --accent-soft: #1d2c42;
    --ok: #6fd3a4; --ok-soft: #14301f; --warn: #f0c261; --warn-soft: #33290f; --fail: #ff9a90; --fail-soft: #3a1b19;
    --s-profit: #3987e5; --s-prov: #d95926; --s-cost: #199e70; --s-fee: #c98500; --s-revenue: #6f7480; --s-return: #9085e9;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0; letter-spacing: -.02em; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
h2 { font-size: 1.02rem; margin: 0 0 .9rem; display: flex; align-items: center; gap: .5rem; }
h3 { font-size: .95rem; margin: 1.4rem 0 .5rem; }
p { margin: .3rem 0 .8rem; }
small { display: block; color: var(--muted); font-size: .79rem; }
.muted { color: var(--muted); }
.small { font-size: .83rem; }
code { background: var(--surface-2); padding: .1rem .35rem; border-radius: 4px; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Gerüst */
body.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--navy) 236px, var(--bg) 236px); }
.sidebar { background: var(--navy); color: #c8d3e8; display: flex; flex-direction: column; padding: 1.2rem .8rem; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: .65rem; font-size: 1.25rem; font-weight: 600; color: #fff; padding: 0 .5rem; }
.brand:hover { text-decoration: none; }
.brand b { color: #5ea3f5; }
.sidebar nav { display: flex; flex-direction: column; gap: .2rem; margin-top: 1.8rem; flex: 1; }
.sidebar nav a { display: flex; gap: .75rem; align-items: center; color: #c8d3e8; padding: .62rem .75rem; border-radius: 10px; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.sidebar nav a.active { background: #2a78d6; color: #fff; }
.me { display: flex; align-items: center; gap: .4rem; border-top: 1px solid rgba(255,255,255,.12); padding-top: .9rem; }
.who { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; color: inherit; }
.sidebar .who { color: #fff; }
.sidebar .who small { color: #9fb0cc; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #2a78d6; color: #fff; font-weight: 600; flex: none; }
.logout { background: none; border: 0; color: #c8d3e8; padding: .4rem; }
main { padding: 1.8rem 2.2rem 3rem; max-width: 1440px; width: 100%; }
body.guest { background: linear-gradient(150deg, #0d1f3c, #1f66c1); min-height: 100vh; }
body.guest main { max-width: 430px; margin: 0 auto; padding: 8vh 1.2rem; }
.auth { display: flex; flex-direction: column; gap: .9rem; padding: 2rem; }
.brand.big { color: var(--text); font-size: 1.7rem; padding: 0; }

header.page { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
header.page p { margin: .2rem 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.25rem 1.35rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.card.narrow { max-width: 460px; display: flex; flex-direction: column; gap: .8rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.sum { font-size: 1.4rem; font-weight: 700; }
.grid.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; align-items: start; }
.grid.two > .card { height: calc(100% - 1.2rem); }

/* Kacheln */
.tiles { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1.05rem 1.15rem; box-shadow: var(--shadow); color: var(--text); }
.tile span { color: var(--muted); font-size: .85rem; }
.tile strong { display: block; font-size: 1.55rem; letter-spacing: -.02em; margin: .25rem 0; white-space: nowrap; }
.tile.hero { background: linear-gradient(135deg, #0d1f3c, #2064bd); border: 0; color: #fff; }
.tile.hero:hover { text-decoration: none; filter: brightness(1.08); }
.tile.hero span, .tile.hero small { color: #cfe0fb; }
.tile.hero strong { font-size: 2.15rem; }
.todo ul { margin: 0; padding-left: 1.1rem; }
.todo li { margin: .25rem 0; }
.todo h2 .icon { color: var(--warn); }

/* Startseite */
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #1baf7a; margin-right: .45rem; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(27,175,122,.55); } 70% { box-shadow: 0 0 0 8px rgba(27,175,122,0); } 100% { box-shadow: 0 0 0 0 rgba(27,175,122,0); } }
.heroes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-bottom: 1.2rem; }
.heroes .hero { border-radius: 20px; padding: 1.5rem 1.7rem 1.2rem; color: #fff; box-shadow: var(--shadow); }
.hero.profit { background: linear-gradient(135deg, #0d1f3c, #2064bd); }
.hero.prov { background: linear-gradient(135deg, #5a1f0c, #bd4a1c); }
.heroes .hero > span { opacity: .85; font-weight: 600; }
.heroes .hero > strong { display: block; font-size: clamp(2.1rem, 4.2vw, 3.2rem); line-height: 1.15; letter-spacing: -.03em; margin: .35rem 0 .2rem; font-variant-numeric: tabular-nums; }
.heroes dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0 .7rem; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.2); }
.heroes dt { font-size: .76rem; opacity: .78; }
.heroes dd { margin: .1rem 0 0; font-weight: 700; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.heroes small { color: rgba(255,255,255,.75); }
.gain { display: inline-block; font-style: normal; font-weight: 700; font-size: .82rem; background: rgba(255,255,255,.18); border-radius: 99px; padding: .18rem .75rem; animation: pop .5s ease-out; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.changed { animation: glow 2.4s ease-out; }
@keyframes glow { 0%, 35% { text-shadow: 0 0 14px rgba(255, 190, 90, .95); } 100% { text-shadow: none; } }
.callout { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 14px; padding: .9rem 1.3rem; margin-bottom: 1.2rem; color: var(--text); box-shadow: var(--shadow); }
.callout:hover { text-decoration: none; border-color: var(--accent); }
.callout div { flex: 1; min-width: 220px; }
.callout b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.callout .go { color: var(--accent); font-weight: 600; }
.callout.due { border-left-color: var(--s-prov); background: var(--warn-soft); }
.todo h2 small { display: inline; font-weight: 400; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1.6rem 0 .8rem; }
.section-head h2 { margin: 0; font-size: 1.2rem; }

.shopline { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .55rem 1rem; margin-bottom: 1.2rem; font-size: .88rem; color: var(--muted); }
.shopline span { flex: 1; min-width: 220px; }

/* Storno */
.cancel-box { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .7rem 1rem; margin-bottom: 1rem; }
.cancel-box > div { flex: 1; min-width: 240px; }
.cancel-box input[name=reason] { width: auto; min-width: 220px; }
.cancel-box.on { background: var(--fail-soft); border-color: var(--fail); }
tr.cancelled td { color: var(--muted); }
tr.cancelled td a { color: var(--muted); }
.badge.unbezahlt { background: var(--warn-soft); color: var(--warn); }
.inline-action input[type=date] { width: auto; padding: .15rem .4rem; font-size: .8rem; margin-right: .4rem; }
.badge.storniert { background: var(--fail-soft); color: var(--fail); }
.small-button { padding: .2rem .65rem; font-size: .78rem; }
.inline-action { display: inline-block; margin-left: .6rem; }

/* Monatsliste */
.months { list-style: none; margin: 0 0 1.4rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.month { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.month.faellig, .month.nachtrag { border-color: var(--s-prov); }
.month-main { display: grid; grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(100px, 1fr)) minmax(190px, 1.3fr); gap: 1rem; align-items: center; padding: .9rem 1.2rem; color: var(--text); }
.month-main:hover { text-decoration: none; background: var(--surface-2); border-radius: 14px; }
.month-name strong { font-size: 1.08rem; }
.month-name em { font-style: normal; color: var(--fail); }
.meter { display: block; width: 100%; max-width: 210px; height: 6px; margin-top: .45rem; border-radius: 3px; }
.meter .track { fill: var(--surface-2); }
.fig { text-align: right; font-variant-numeric: tabular-nums; }
.fig span { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fig.main b { font-size: 1.25rem; }
.month-state { text-align: right; }
.badge.faellig { background: var(--s-prov); color: #fff; }
.badge.nachtrag, .badge.verrechnet { background: var(--warn-soft); color: var(--warn); }
.badge.laeuft, .badge.gestellt { background: var(--accent-soft); color: var(--accent); }
.badge.bezahlt { background: var(--ok-soft); color: var(--ok); }
.tiles.four { grid-template-columns: repeat(3, minmax(0, 1fr)) 1.4fr; }
form.fields-form .fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.extra-box { background: var(--surface-2); border-radius: 12px; padding: .2rem .9rem .3rem; margin: .8rem 0; }

/* Diagramme */
.legend { display: flex; gap: 1rem; list-style: none; margin: 0 0 .9rem; padding: 0; color: var(--muted); font-size: .85rem; }
i.s-profit, i.s-prov, i.s-cost, i.s-fee, i.s-rest, i.s-return { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: .45rem; }
.s-profit, .s-rest { background: var(--s-profit); fill: var(--s-profit); }
.s-prov { background: var(--s-prov); fill: var(--s-prov); }
.s-cost { background: var(--s-cost); fill: var(--s-cost); }
.s-fee { background: var(--s-fee); fill: var(--s-fee); }
.s-revenue { fill: var(--s-revenue); }
.s-return { background: var(--s-return); fill: var(--s-return); }
.chart { position: relative; min-height: 250px; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .baseline { stroke: var(--muted); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .hit { fill: transparent; }
.chart .hit:hover, .chart .hit:focus { fill: var(--text); fill-opacity: .05; outline: none; }
.tooltip { position: fixed; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; font-size: .83rem; box-shadow: 0 8px 28px rgba(0,0,0,.18); z-index: 20; white-space: pre-line; }
.split { width: 100%; height: 24px; border-radius: 5px; margin: .4rem 0 1rem; display: block; }
.split rect { stroke: var(--surface); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.split-table i { vertical-align: baseline; }
.split-table td:first-child, td > small:first-of-type { white-space: nowrap; }
td > .badge + small { white-space: normal; }
details summary { cursor: pointer; color: var(--muted); font-size: .88rem; margin-top: .6rem; }
details.card > summary { margin: 0; }
details.card[open] > summary { margin-bottom: 1rem; }

/* Rechenweg */
.flow { width: 100%; }
.flow th { letter-spacing: 0; text-align: left; font-weight: 500; text-transform: none; font-size: .92rem; color: var(--text); width: 34%; }
.flow td.bar { width: 42%; }
.flow svg { width: 100%; height: 18px; display: block; background: var(--surface-2); border-radius: 4px; }
.flow tr.profit th, .flow tr.profit td, .flow tr.prov th, .flow tr.prov td { font-weight: 700; }
.result { margin-top: 1.1rem; border-radius: 12px; background: var(--accent-soft); padding: .9rem 1.1rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.result strong { font-size: 1.8rem; }
.result small { width: 100%; }
.result.pending { background: var(--surface-2); color: var(--muted); }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: .45rem .6rem; border-bottom: 1px solid var(--line); }
td { padding: .62rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tfoot th { font-size: .9rem; color: var(--text); text-transform: none; border-top: 2px solid var(--line); border-bottom: 0; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.neg { color: var(--fail); }
table.orders td { padding: .55rem .4rem; font-size: .89rem; }
table.orders th { padding: .45rem .4rem; font-size: .69rem; letter-spacing: .02em; }
table.orders .clip { max-width: 160px; }
.clip { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tick { width: 30px; }
table.compact td, table.compact th { padding: .4rem .5rem; font-size: .9rem; }

.badge { display: inline-block; font-size: .74rem; font-weight: 600; border-radius: 99px; padding: .12rem .6rem; background: var(--surface-2); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.badge.bereit { background: var(--ok-soft); color: var(--ok); }
.badge.abgerechnet { background: var(--accent-soft); color: var(--accent); }
.badge.korrektur { background: var(--warn-soft); color: var(--warn); }
.badge.unvollstaendig { background: var(--fail-soft); color: var(--fail); }
.badge.method.zugferd, .badge.method.xrechnung { background: var(--ok-soft); color: var(--ok); }
.badge.method.pdf-text { background: var(--accent-soft); color: var(--accent); }
.badge.method.ocr { background: var(--warn-soft); color: var(--warn); }
.badge.soft { white-space: normal; }
@media (prefers-reduced-motion: reduce) { .live-dot, .gain, .changed { animation: none; } }
.dir { font-weight: 600; font-size: .85rem; }
.dir.aus::before { content: "↗ "; }
.dir.ein::before { content: "↘ "; }

/* Formulare */
input, select, textarea, button, .button { font: inherit; }
input, select, textarea { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: #2a78d6; flex: none; margin: 0; }
label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; }
label.check { flex-direction: row; align-items: center; gap: .6rem; font-weight: 500; margin: .8rem 0; }
label.check.must { background: var(--warn-soft); padding: .7rem .8rem; border-radius: 10px; }
label.missing input { border-color: var(--fail); background: var(--fail-soft); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-bottom: .8rem; align-items: start; }
.fields .wide { grid-column: 1 / -1; }
.amount input { text-align: right; font-variant-numeric: tabular-nums; }
.amount.main input { font-weight: 700; border-color: var(--accent); }
.live { margin: 0; font-size: .83rem; }
.live.ok { color: var(--ok); }
.live.fail { color: var(--fail); }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600; font-size: .9rem; }
button:hover, .button:hover { border-color: var(--accent); text-decoration: none; }
.primary { background: #2064bd; border-color: #2064bd; color: #fff; }
.primary:hover { filter: brightness(1.1); }
button.big { padding: .8rem 1.5rem; font-size: 1rem; }
button.link { border: 0; background: none; padding: .2rem 0; }
.danger { color: var(--fail); }
button:disabled { opacity: .55; cursor: wait; }
.actions { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin: .6rem 0; }
form.inline { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .6rem; }
form.inline input { width: auto; flex: 1; min-width: 150px; }
.filter label { flex-direction: row; align-items: center; }
.filter select { width: auto; }

.flash { padding: .75rem 1rem; border-radius: 11px; margin-bottom: .8rem; border: 1px solid transparent; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash.fail { background: var(--fail-soft); color: var(--fail); }
.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.tabs { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }
.tabs a { padding: .38rem .85rem; border-radius: 99px; color: var(--muted); font-weight: 600; font-size: .86rem; }
.tabs a.active { background: var(--accent-soft); color: var(--accent); }
.tabs .search { margin-left: auto; min-width: 260px; }

/* Hochladen */
.drop { position: relative; border: 2px dashed var(--line); background: var(--surface); border-radius: 18px; padding: 2.2rem 1.5rem; text-align: center; align-items: center; cursor: pointer; margin-bottom: 1rem; transition: border-color .15s, background .15s; min-height: 250px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop > .icon { width: 42px; height: 42px; }
.drop.out > .icon { color: var(--s-profit); }
.drop.in > .icon { color: var(--s-prov); }
.drop strong { font-size: 1.15rem; }
.drop span { color: var(--muted); font-weight: 400; max-width: 380px; }
.drop em { font-style: normal; color: var(--accent); }
.drop.over, .drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.drop .files { list-style: none; padding: 0; margin: .4rem 0 0; font-weight: 500; }
.steps li { margin: .35rem 0; }

/* Prüfen */
.review { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr); gap: 1.2rem; align-items: start; }
.preview { padding: .8rem; position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
.preview img { width: 100%; display: block; border: 1px solid var(--line); border-radius: 6px; background: #fff; margin-bottom: .8rem; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: .6rem; padding: .3rem 0; align-items: flex-start; font-size: .9rem; }
.checks li.ok .icon { color: var(--ok); }
.checks li.warn .icon { color: var(--warn); }
.checks li.fail { color: var(--fail); font-weight: 600; }
.suggestions { list-style: none; margin: 0 0 .8rem; padding: .6rem .8rem; background: var(--surface-2); border-radius: 10px; font-size: .88rem; }
.loose { list-style: none; padding: 0; margin: 0; }
.loose li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .5rem 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.user-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr auto auto; gap: .8rem; align-items: end; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: 0; }
.user-row .check { margin: 0 0 .55rem; }
[hidden] { display: none !important; }

@media (max-width: 1250px) {
  .tiles, .tiles.four { grid-template-columns: repeat(2, 1fr); }
  .tile.hero { grid-column: 1 / -1; }
  .month-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .month-name { grid-column: 1 / 3; grid-row: 1; }
  .month-state { grid-column: 3; grid-row: 1; }
}
@media (max-width: 1050px) {
  .grid.two, .review, .heroes { grid-template-columns: minmax(0, 1fr); }
  form.fields-form .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two > .card { height: auto; }
  .preview { position: static; max-height: 70vh; }
  .user-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body.app { display: block; background: var(--bg); }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .7rem; }
  .sidebar nav { order: 3; flex-direction: row; flex-basis: 100%; overflow-x: auto; margin-top: .6rem; }
  .sidebar nav a { white-space: nowrap; padding: .45rem .65rem; }
  .sidebar nav a .icon { display: none; }
  .me { margin-left: auto; border: 0; padding: 0; }
  .me .who span:last-child { display: none; }
  main { padding: 1.1rem .8rem 2rem; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .tiles, .tiles.four { grid-template-columns: minmax(0, 1fr); }
  form.fields-form .fields { grid-template-columns: minmax(0, 1fr); }
  .heroes dl { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .heroes dl div { display: flex; justify-content: space-between; align-items: baseline; }
  .month-main { gap: .6rem; padding: .8rem; }
  .fig.main b { font-size: 1.05rem; }
  .fig b { font-size: .9rem; }
  .month-main { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .month-name { grid-column: 1 / -1; }
  .month-state { grid-column: 1 / -1; grid-row: auto; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; text-align: left; }
  .split-table td:first-child { white-space: normal; }
  .tabs .search { margin-left: 0; width: 100%; }
}
@media print {
  :root { --bg: #fff; --surface: #fff; --text: #000; --muted: #444; --line: #ccc; --accent-soft: #eef4fd; --accent: #000; }
  body.app { display: block; background: #fff; }
  .sidebar, .noprint, .flash { display: none !important; }
  main { padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .sheet { font-size: 11px; }
  @page { size: A4 landscape; margin: 14mm; }
}
