:root {
  --paper: #f3f4f6;
  --paper-2: #e8eaee;
  --ink: #14171c;
  --muted: #5c6570;
  --line: #dfe3e8;
  --input-line: #c5cad3;
  --accent: #1f6b4a;
  --accent-soft: #e7f3ec;
  --rust: #b42318;
  --moss: #1f6b4a;
  --white: #ffffff;
  --danger: #b42318;
  --shadow: 0 1px 2px rgba(20, 23, 28, 0.04), 0 8px 24px rgba(20, 23, 28, 0.06);
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --rail: 248px;
  --rail-bg: #14181d;
  --rail-ink: #eef1f4;
  --rail-muted: #8b95a1;
  --radius: 12px;
  --radius-sm: 8px;
  color-scheme: light;
}

html.dark {
  --paper: #121416;
  --paper-2: #1c2026;
  --ink: #eef1f4;
  --muted: #9aa3ad;
  --line: #2a3038;
  --input-line: #3a424c;
  --accent: #3d9b74;
  --accent-soft: #1a2c24;
  --white: #181c21;
  --shadow: none;
  --rail-bg: #0e1114;
  --rail-ink: #eef1f4;
  --rail-muted: #8b95a1;
  color-scheme: dark;
}

html {
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button, .nav-btn, .ghost, .primary {
  min-height: 44px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.money {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
}

.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(31, 107, 74, 0.16), transparent 58%),
    var(--paper);
}

.login-card {
  width: min(400px, 100%);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 28px 28px;
}

.login-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  font-size: 1.65rem;
  margin-bottom: 14px;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

h1 {
  font-family: var(--sans);
  font-weight: 650;
  font-size: clamp(1.45rem, 4vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 6px 0 10px;
}

.sub { color: var(--muted); margin: 0 0 24px; line-height: 1.5; }

label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }

input[type="password"] {
  width: 100%;
  border: 1px solid var(--input-line);
  background: var(--paper);
  padding: 14px 12px;
  margin-bottom: 16px;
  font-size: 16px;
  border-radius: var(--radius-sm);
}

.primary {
  width: 100%;
  background: var(--ink);
  color: var(--white);
  border: 0;
  padding: 13px 16px;
  font-weight: 650;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary:disabled { opacity: 0.55; cursor: wait; }

.error {
  color: var(--danger);
  margin: 0 0 12px;
  min-height: 1.2em;
}

.app {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  min-height: 100dvh;
}

.rail {
  background: var(--rail-bg);
  color: var(--rail-ink);
  padding: 22px 14px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
}

.brand {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  padding: 6px 12px 18px;
  line-height: 1.25;
}
.brand-name {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-mark {
  display: block;
  margin-top: 2px;
  color: var(--rail-muted);
  font-size: 0.75rem;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.group-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rail-muted);
  margin: 0 12px 6px;
  font-weight: 600;
}

.nav-btn, .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 0;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
}
.nav-btn .mark {
  width: 1.4em;
  text-align: center;
  flex: none;
  font-size: 1.05rem;
}

.nav-btn.active {
  background: rgba(61, 155, 116, 0.16);
  box-shadow: inset 3px 0 0 var(--accent);
  color: #d7f0e4;
  font-weight: 650;
}
.nav-link { color: var(--rail-muted); }
.nav-link[aria-disabled="true"] { opacity: 0.55; cursor: default; }

.main {
  padding: 28px 36px calc(48px + env(safe-area-inset-bottom));
  min-width: 0;
  max-width: 1280px;
}

.bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: var(--rail-bg);
  color: var(--rail-ink);
}

.bar .brand { font-size: 1rem; padding: 0; }
.bar .brand-mark { display: none; }
.menu-toggle {
  background: #2a3038;
  color: var(--rail-ink);
  border: 0;
  width: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-weight: 650;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scrim {
  display: none;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.top-title { min-width: 0; }
.top-title h1 {
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

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

.search-wrap {
  display: block;
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0 0 22px;
}
.search-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 1rem;
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--input-line);
  background: var(--white);
  padding: 11px 14px 11px 40px;
  font-size: 16px;
  border-radius: var(--radius-sm);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chip.active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.dates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.dates input {
  margin-left: 6px;
  border: 1px solid var(--input-line);
  background: var(--white);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 16px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.pager-actions { display: flex; gap: 8px; }
.pager .ghost:disabled { opacity: 0.4; cursor: default; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  background: var(--paper-2);
}

.pill-open { background: #fef3c7; color: #92400e; }
.pill-ok { background: var(--accent-soft); color: var(--moss); }
.pill-credit { background: #e0e7ff; color: #3730a3; }
html.dark .pill-open { background: #3f2e14; color: #fcd34d; }
html.dark .pill-ok { background: #1a2c24; color: #86efac; }
html.dark .pill-credit { background: #1e293b; color: #93c5fd; }

.kpi.clickable { cursor: pointer; }
.kpi.clickable:hover, .kpi.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.filter-note { color: var(--muted); margin: 0 0 12px; }
.text-btn {
  background: none;
  border: 0;
  color: var(--accent);
  font-weight: 650;
  padding: 0;
  min-height: 0;
  text-decoration: underline;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 7px 10px;
  border-radius: 999px;
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.kpis.kpis-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.kpis.kpis-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 861px) {
  .kpis.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.kpis-work {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.kpis-ledger {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
@media (min-width: 861px) {
  .kpis-ledger { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-height: 44px;
  box-shadow: var(--shadow);
}
.kpi-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.kpi-head .mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--paper-2);
  font-size: 1.05rem;
  flex: none;
}
.kpi-amber .kpi-head .mark { background: #fef3c7; }
.kpi-green .kpi-head .mark { background: var(--accent-soft); }
.kpi-blue .kpi-head .mark { background: #e0e7ff; }
.kpi-slate .kpi-head .mark { background: var(--paper-2); }
html.dark .kpi-amber .kpi-head .mark { background: #3f2e14; }
html.dark .kpi-green .kpi-head .mark { background: #1a2c24; }
html.dark .kpi-blue .kpi-head .mark { background: #1e293b; }
.kpi-text .value { font-size: 1rem; letter-spacing: -0.02em; }

.kpis-work .kpi { padding: 18px 20px; }
.kpis-ledger .kpi { padding: 12px 14px; }

.kpi .label {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 650;
  line-height: 1.25;
}
.kpi .value {
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-top: 6px;
}
.kpis-work .kpi .value { font-size: 2rem; }
.kpis-ledger .kpi .value { font-size: 1.1rem; margin-top: 4px; }
.kpi .hint {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 4px;
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.panel h2 {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--paper-2); font-size: 0.92rem; }
th { color: var(--muted); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--paper); }
td.num { text-align: right; }
.empty { padding: 22px 18px; color: var(--muted); }
.muted { color: var(--muted); font-size: 0.9rem; }

.soon {
  background: var(--white);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .app {
    grid-template-columns: 1fr;
  }

  .bar { display: flex; }

  .rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(var(--rail), 86vw);
    height: 100dvh;
    z-index: 20;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    overflow-y: auto;
    padding-top: calc(20px + env(safe-area-inset-top));
  }

  .app.nav-open .rail { transform: translateX(0); }

  .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 18, 22, 0.5);
    z-index: 15;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .app.nav-open .scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .main { padding: 16px 14px calc(28px + env(safe-area-inset-bottom)); }

  .top {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 12px;
  }

  .toolbar { justify-content: flex-start; }

  .kpis, .kpis-work, .kpis-ledger { gap: 8px; }
  .kpis.kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis-work .kpi .value { font-size: 1.55rem; }

  .search-wrap { max-width: none; }

  table thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr:hover td { background: transparent; }
  tr {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--paper-2);
  }
  td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border: 0;
    text-align: right;
  }
  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 650;
    text-align: left;
  }
  td.num { text-align: right; }
  td.actions {
    flex-direction: column;
    align-items: stretch;
  }
  td.actions .row-actions { justify-content: flex-start; }
}

@media (min-width: 861px) {
  .app.nav-open .rail { transform: none; }
}

.icon-btn {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 1.15rem;
}
.icon-btn.badge-wrap { position: relative; padding: 0; }
.mark {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  line-height: 1;
  font-style: normal;
}
.icon-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--rust);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.notif {
  position: relative;
  flex: 0 0 auto;
}
.notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, 82vw);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 30;
  max-height: 360px;
  overflow: auto;
}
.notif-item { padding: 12px 14px; border-bottom: 1px solid var(--paper-2); }
.notif-item:last-child { border-bottom: 0; }
.notif-item .muted { color: var(--muted); font-size: 0.82rem; margin: 4px 0 0; }

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.person {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.person-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}
.person-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--moss);
  font-weight: 750;
  display: grid;
  place-items: center;
  flex: none;
  text-transform: uppercase;
}
.person h3 { margin: 0 0 6px; font-size: 1.05rem; }
.person dl { margin: 10px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.person dt { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; }
.person dd { margin: 2px 0 0; font-size: 0.9rem; }

.settings-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
}
.settings-side { display: flex; flex-direction: column; gap: 6px; }
.kv { width: 100%; }
.tool-row, .flag-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--paper-2);
}
.tool-row:last-child, .flag-row:last-child { border: 0; }
.tool-row p, .flag-row p { margin: 4px 0 0; color: var(--muted); font-size: 0.82rem; }
.flag-row .state {
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.me-hero {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}
.me-hero h2 { margin: 0 0 6px; font-family: var(--sans); }
.me-hero .person-avatar {
  width: 52px;
  height: 52px;
  font-size: 1.2rem;
}
.link-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.link-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--paper-2);
  display: grid;
  place-items: center;
  flex: none;
  font-size: 1.2rem;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.qr-box {
  margin-top: 8px;
  text-align: center;
}
.qr-box img {
  display: block;
  margin: 0 auto 6px;
  background: #fff;
}
.qr-box-lg { margin-top: 16px; }
.qr-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }

.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 22, 0.5);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
}
.modal {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: min(440px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 20px;
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-head h2 { margin: 4px 0 0; font-family: var(--sans); font-size: 1.25rem; letter-spacing: -0.02em; }
.modal-amounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.modal-amounts > div {
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.modal-amounts .money { font-family: var(--sans); font-size: 1.2rem; font-weight: 650; margin: 4px 0 0; }
.modal-dl { margin: 0 0 16px; }
.modal-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--paper-2);
}
.modal-dl dt { color: var(--muted); }
.modal-dl dd { margin: 0; text-align: right; }
.modal .primary { margin-top: 4px; }
.field-label {
  display: block;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.85rem;
}
.field-label select,
.modal select {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  border-radius: var(--radius-sm);
}
.assign-block { margin: 0 0 14px; }
.assign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.modal-actions .primary { width: 100%; margin-top: 0; }

.money-in { color: var(--moss); }
.money-out { color: var(--danger); }

.ratio-bar {
  height: 6px;
  background: var(--paper-2);
  border-radius: 99px;
  margin: 0 0 16px;
  overflow: hidden;
}
.ratio-bar > span {
  display: block;
  height: 100%;
  background: var(--moss);
}

.kassa-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (min-width: 861px) {
  .kassa-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.kassa-line, .kassa-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 18px;
  font-size: 0.92rem;
}
.kassa-total {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 12px;
  padding-bottom: 16px;
  font-weight: 650;
}
.kassa-col { padding-bottom: 8px; }
.kassa-col h2 { padding-bottom: 12px; }

.tax-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (min-width: 861px) {
  .tax-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.tax-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tax-table th, .tax-table td { padding: 8px 18px; border-bottom: 1px solid var(--paper-2); }
.tax-table th { color: var(--muted); font-weight: 650; text-align: right; }
.tax-table th:first-child, .tax-table td:first-child { text-align: left; }
.tax-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding: 8px 18px 16px;
}
.tax-bar {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  background: transparent;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--muted);
  font-size: 0.7rem;
}
.tax-bar-fill {
  width: 100%;
  min-height: 4px;
  border-radius: 3px 3px 0 0;
  background: var(--paper-2);
}
.tax-bar.active .tax-bar-fill { background: var(--moss); }
.tax-bar.active { color: var(--ink); font-weight: 650; }

.umsatz-head th { text-align: right; }
.umsatz-head th:first-child { text-align: left; }

@media (max-width: 860px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-side { flex-direction: row; flex-wrap: wrap; }
}
