/* SPORTUNION Herzogenburg Vereinsapp — Design-System
   Marke: Logo-Orange #E8481F, warmes Schwarz, helle warme Neutrale. */

:root {
  --brand: #E8481F;
  --brand-dark: #C93812;
  --brand-soft: #FCEDE7;
  --brand-softer: #FEF6F3;
  --ink: #1B1917;
  --muted: #77695f;
  --line: #EAE2DD;
  --line-strong: #D9CEC7;
  --bg: #FAF7F5;
  --surface: #FFFFFF;
  --good: #2E7D4F;
  --good-soft: #E7F2EB;
  --warn: #9A6200;
  --warn-soft: #FBF3E4;
  --data: #205B9E;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(27, 25, 23, 0.05), 0 4px 16px rgba(27, 25, 23, 0.06);
  --shadow-lg: 0 8px 40px rgba(27, 25, 23, 0.18);
  /* Abwärtskompatible Aliase */
  --accent: var(--brand);
  --accent-dark: var(--brand-dark);
  --accent-soft: var(--brand-soft);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* --- Icons --------------------------------------------------------------- */
.icon { width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }
.icon-lg { width: 1.35em; height: 1.35em; }

/* --- Topbar -------------------------------------------------------------- */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(27, 25, 23, 0.05);
  position: sticky; top: 0; z-index: 40;
}
.topbar-inner {
  max-width: 78rem; margin: 0 auto; padding: 0.5rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: inherit; }
.brand img { height: 56px; width: auto; display: block; margin: -7px 0; }
.topbar .mainnav { display: flex; gap: 0.15rem; flex-wrap: wrap; }
.topbar .mainnav a {
  color: var(--muted); text-decoration: none; padding: 0.45rem 0.65rem; border-radius: var(--radius-sm);
  font-weight: 500; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.4rem;
}
.topbar .mainnav a:hover { color: var(--ink); background: var(--bg); }
.topbar .mainnav a.active { color: var(--brand-dark); background: var(--brand-soft); font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 0.4rem; }
.subnav { background: var(--bg); border-top: 1px solid var(--line); }
.subnav-inner {
  max-width: 78rem; margin: 0 auto; padding: 0.2rem 1.25rem;
  display: flex; gap: 0.15rem; flex-wrap: wrap;
}
.subnav a {
  color: var(--muted); text-decoration: none; padding: 0.35rem 0.65rem; border-radius: var(--radius-sm);
  font-weight: 500; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 0.35rem;
}
.subnav a:hover { color: var(--ink); background: var(--surface); }
.subnav a.active { color: var(--brand-dark); font-weight: 600; }
.subnav .count {
  background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px;
  padding: 0 0.45rem; font-size: 0.75rem; font-weight: 600; line-height: 1.4;
}
.userbox .who {
  color: var(--muted); font-size: 0.85rem; text-decoration: none;
  padding: 0.35rem 0.55rem; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.userbox .who:hover { color: var(--ink); background: var(--bg); }
.userbox form { margin: 0; }

.content { max-width: 78rem; margin: 0 auto; padding: 1.75rem 1.25rem 4rem; }

/* --- Typografie ----------------------------------------------------------- */
h1 { font-size: 1.5rem; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; margin: 2rem 0 0.6rem; letter-spacing: 0.005em; }
.subtle { color: var(--muted); font-size: 0.88rem; }
a { color: var(--brand-dark); }

/* --- Buttons -------------------------------------------------------------- */
button.btn, a.btn, summary.btn, label.btn {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-sm); padding: 0.4rem 0.85rem; font-size: 0.85rem;
  font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
button.btn:hover, a.btn:hover, summary.btn:hover, label.btn:hover { border-color: var(--muted); background: var(--bg); }
button.btn.primary, a.btn.primary { background: var(--good); border-color: var(--good); color: #fff; }
button.btn.primary:hover { filter: brightness(1.07); }
button.btn.accent, a.btn.accent { background: var(--brand); border-color: var(--brand); color: #fff; }
button.btn.accent:hover { background: var(--brand-dark); }
.btns { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
button.btn[disabled] { opacity: 0.45; cursor: not-allowed; filter: none; }
/* Button-förmiger Auslöser für Aktions-Menüs (details.status-menu) */
.status-menu[open] summary.btn { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
summary.btn .chev { transition: transform 0.12s; }
.status-menu[open] summary.btn .chev { transform: rotate(180deg); }

.btn-link {
  color: var(--muted); text-decoration: none; padding: 0.3rem 0.6rem; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500; display: inline-flex; align-items: center; gap: 0.35rem;
}
.btn-link:hover { color: var(--brand-dark); background: var(--brand-soft); }
.btn-link.active { color: var(--brand-dark); background: var(--brand-soft); font-weight: 700; }

/* Icon-Aktionen in Tabellenzeilen */
.actions { display: flex; gap: 0.15rem; justify-content: flex-end; align-items: center; }
.row-icons { display: flex; gap: 0.15rem; align-items: center; }
.iconbtn {
  border: none; background: none; color: var(--muted); cursor: pointer;
  padding: 0.35rem; border-radius: var(--radius-sm); line-height: 0;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.iconbtn:hover { color: var(--brand-dark); background: var(--brand-soft); }
.iconbtn.danger:hover { color: #b3261e; background: #FCEAE8; }
.iconbtn .icon { width: 1.15rem; height: 1.15rem; vertical-align: 0; }
form.inline-action { margin: 0; display: inline-flex; }

/* --- Karten & Kacheln ------------------------------------------------------ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.15rem; text-decoration: none; color: inherit; display: block;
  box-shadow: var(--shadow);
}
a.card:hover { border-color: var(--brand); }
.card .num { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.card .num.ok { color: var(--good); }
.card .num.alert { color: var(--brand); }
.card .label { color: var(--muted); font-size: 0.85rem; }
.card h4 { margin: 0 0 0.4rem; font-size: 0.95rem; font-weight: 650; }
.card p, .card ul { font-size: 0.9rem; margin: 0.35rem 0; }

/* --- Tabellen (kompakt) ----------------------------------------------------- */
table.list {
  width: 100%; border-collapse: collapse; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 0.88rem;
  box-shadow: var(--shadow);
}
table.list th {
  text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--line-strong);
  background: var(--brand-softer);
}
table.list td { padding: 0.45rem 0.8rem; border-bottom: 1px solid var(--line); }
table.list tr:last-child td { border-bottom: none; }
table.list tbody tr:hover td, table.list tr:hover td { background: var(--brand-softer); }
td.amount, th.amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* table.list th setzt text-align:left mit höherer Spezifität — hier wieder überschreiben */
table.list th.amount { text-align: right; }
.neg { color: var(--brand-dark); }
.pos { color: var(--good); }

/* Scroll-Container: Tabellen scrollen in sich statt die Seite zu sprengen.
   Der Wrapper trägt Rahmen/Schatten, die Tabelle darin bleibt nackt. */
.table-scroll {
  overflow-x: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.table-scroll > table.list {
  border: none; border-radius: 0; box-shadow: none; margin: 0; min-width: 100%;
}

/* --- Chips & Badges --------------------------------------------------------- */
.chip {
  display: inline-block; background: var(--brand-soft); color: var(--brand-dark);
  border-radius: 99px; font-size: 0.74rem; font-weight: 600; padding: 0.08rem 0.55rem;
  margin: 0.08rem 0.15rem 0.08rem 0;
}
.chip-muted { background: var(--bg); color: var(--muted); }
a.chip { text-decoration: none; }
a.chip:hover { text-decoration: underline; }
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 600;
  border-radius: 99px; padding: 0.1rem 0.55rem; background: var(--bg); color: var(--muted);
  white-space: nowrap;
}
.badge.pos, .badge.st-aktiv { background: var(--good-soft); color: var(--good); }
.badge.st-offen { background: #E8F0FA; color: var(--data); }
.badge.st-warteliste, .badge.st-schnuppern { background: var(--warn-soft); color: var(--warn); }
.badge.st-beendet { background: var(--bg); color: var(--muted); }
.score {
  display: inline-block; background: var(--brand-soft); color: var(--brand-dark);
  border-radius: 99px; font-size: 0.72rem; font-weight: 700; padding: 0.1rem 0.5rem; margin-left: 0.4rem;
}

/* --- Tabs & Filter ------------------------------------------------------------ */
.tabs { display: flex; gap: 0.25rem; align-items: center; border-bottom: 2px solid var(--line); margin: 1rem 0; flex-wrap: wrap; }
.tab {
  text-decoration: none; color: var(--muted); padding: 0.45rem 0.9rem; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -2px; font-size: 0.92rem;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 600; }
.tab .count {
  background: var(--brand-soft); color: var(--brand-dark); border-radius: 99px;
  font-size: 0.72rem; font-weight: 700; padding: 0.05rem 0.45rem; margin-left: 0.3rem;
}
.filterbar {
  display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.7rem 0.9rem; margin: 1rem 0; box-shadow: var(--shadow);
}
.filterbar input[type="search"], .filterbar select, .inline-select {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0.35rem 0.55rem;
  font-size: 0.88rem; background: var(--surface); color: var(--ink); font-family: inherit;
}
.filterbar input[type="search"] { min-width: 14rem; }
.check-label { font-size: 0.88rem; display: flex; gap: 0.35rem; align-items: center; }
/* --- Toasts (Django messages) --------------------------------------------------- */
#toasts {
  position: fixed; top: 4.2rem; right: 1rem; z-index: 100;
  display: flex; flex-direction: column; gap: 0.5rem; max-width: 26rem;
}
.flash {
  background: var(--good-soft); color: var(--good); border: 1px solid currentColor;
  border-radius: var(--radius-sm); padding: 0.55rem 2.2rem 0.55rem 0.9rem; font-size: 0.88rem;
  box-shadow: var(--shadow-lg); position: relative; animation: toast-in 0.18s ease-out;
}
.flash-error { background: var(--brand-soft); color: var(--brand-dark); }
.flash-warning { background: var(--warn-soft); color: var(--warn); }
.flash .toast-close {
  position: absolute; top: 0.3rem; right: 0.3rem; border: none; background: none;
  color: inherit; cursor: pointer; padding: 0.15rem; line-height: 0; border-radius: 4px;
}
@keyframes toast-in { from { transform: translateX(1rem); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; } }

/* --- Modal ------------------------------------------------------------------------ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(27, 25, 23, 0.45); z-index: 80;
  display: flex; align-items: flex-start; justify-content: center; padding: 4rem 1rem 2rem;
  overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 34rem; position: relative; animation: modal-in 0.15s ease-out;
}
@keyframes modal-in { from { transform: translateY(0.5rem); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .modal { animation: none; } }
.modal-close {
  position: absolute; top: 0.65rem; right: 0.65rem; border: none; background: none;
  color: var(--muted); cursor: pointer; padding: 0.3rem; border-radius: var(--radius-sm); line-height: 0;
}
.modal-close:hover { color: var(--ink); background: var(--bg); }
#modal-body { padding: 1.4rem 1.6rem 1.6rem; }
#modal-body h2 { margin: 0 2rem 1rem 0; font-size: 1.15rem; }
#modal-body .htmx-indicator { display: none; }

/* Formulare (Modal + Seiten) */
.formfields label { display: block; font-size: 0.82rem; font-weight: 600; margin: 0.7rem 0 0.2rem; }
.formfields input:not([type="checkbox"]):not([type="radio"]), .formfields select, .formfields textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem; font-size: 0.92rem; background: var(--surface); color: var(--ink);
  font-family: inherit;
}
.formfields .checkbox-row { display: flex; gap: 0.45rem; align-items: center; margin-top: 0.8rem; }
.formfields .checkbox-row label { margin: 0; }
/* Options-Karten (z.B. Rabatt-Modus im Teilnahme-Dialog) */
.formfields .choice-group { display: grid; gap: 0.4rem; margin-top: 0.2rem; }
.formfields label.choice {
  display: flex; gap: 0.55rem; align-items: flex-start; margin: 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.55rem 0.65rem; cursor: pointer; font-weight: 400; font-size: 0.85rem;
}
.formfields label.choice:hover { border-color: var(--line-strong); }
.formfields label.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-softer); }
.formfields label.choice input[type="radio"] { margin: 0.15rem 0 0; accent-color: var(--brand); flex: none; }
.formfields .choice-title { font-weight: 600; }
.formfields .choice-sub { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 0.1rem; }
.formfields .choice-fields { margin-top: 0.5rem; padding-left: 1.75rem; }
.formfields .choice-fields[hidden] { display: none; }
.formfields .helptext { display: block; color: var(--muted); font-size: 0.76rem; margin-top: 0.15rem; }
/* Datei-Auswahl (Mail-Anhänge): natives Input versteckt, label.btn als
   Auslöser, Dateiliste als Text daneben */
.formfields .filefield { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.formfields .filefield label { margin: 0; }
.formfields .filefield input[type="file"] {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.formfields .filefield input[type="file"]:focus-visible + label {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
.formfields .filefield [data-file-list] { font-size: 0.82rem; }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 540px) { .form-grid2 { grid-template-columns: 1fr; } }
.form-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
.form-grid3 > [hidden] { display: none; }
@media (max-width: 540px) { .form-grid3 { grid-template-columns: 1fr; } }
.formfields .choice-group.choice-row { grid-template-columns: 1fr 1fr; }
@media (max-width: 540px) { .formfields .choice-group.choice-row { grid-template-columns: 1fr; } }
.modal-footer { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.4rem; flex-wrap: wrap; }
.form-error { color: var(--brand-dark); font-size: 0.85rem; margin: 0.3rem 0 0; }

/* --- Auth & öffentliche Formulare ---------------------------------------------------- */
.authbox {
  max-width: 24rem; margin: 3rem auto 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
}
.authbox label { display: block; font-size: 0.85rem; font-weight: 600; margin: 0.9rem 0 0.25rem; }
.authbox input[type="text"], .authbox input[type="password"], .authbox input[type="email"] {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem; font-size: 0.95rem; background: var(--surface); color: var(--ink);
}
.authbox button { margin-top: 1.2rem; width: 100%; padding: 0.5rem; font-size: 0.95rem; justify-content: center; }
.authbox .helptext { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 0.2rem; }
.authbox .helptext ul { margin: 0.2rem 0 0; padding-left: 1.1rem; }

.formbox {
  max-width: 44rem; margin: 1.5rem auto 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 2rem 2rem;
  box-shadow: var(--shadow);
}
.formbox h2 { margin-top: 1.5rem; }
.formbox label { display: block; font-size: 0.85rem; font-weight: 600; margin: 0.5rem 0 0.2rem; }
.formbox input[type="text"], .formbox input[type="email"], .formbox input[type="date"],
.formbox select, .formbox textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem; font-size: 0.95rem; background: var(--surface); color: var(--ink);
  font-family: inherit;
}
.formbox .check-label input { width: auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 1rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; top: -9999px; }

/* --- Bestand: Umsatz-Karten, Vorschläge --------------------------------------------- */
.tx-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.9rem 1.1rem; margin-bottom: 0.9rem; box-shadow: var(--shadow);
}
.tx-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.tx-title { font-weight: 600; }
.tx-meta { color: var(--muted); font-size: 0.85rem; }
.tx-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.suggestion {
  display: block; margin: 0;
  border-top: 1px dashed var(--line); padding: 0.55rem 0;
}
.suggestion .what { font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem; }
.suggestion .btns { margin-top: 0.5rem; }
/* Vorschau „Übernehmen bucht": strukturierter Buchungsplan statt Fließtext */
.plan {
  background: var(--brand-softer); border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem; margin: 0.4rem 0; font-size: 0.88rem;
}
.plan-title {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted); margin-bottom: 0.2rem;
}
.plan-row { padding: 0.1rem 0; }
.plan-member { display: flex; gap: 0.45rem; align-items: baseline; cursor: pointer; }
/* Kategorie-Chips (Umsatzliste): kuratierte Palette, Slots = Category.color */
.badge.cat-gruen   { background: #E7F2EB; color: #2E7D4F; }
.badge.cat-blau    { background: #E8F0FA; color: #2B5F9E; }
.badge.cat-violett { background: #F0EAF8; color: #6B4FA1; }
.badge.cat-orange  { background: #FDEEE3; color: #C05621; }
.badge.cat-tuerkis { background: #E3F4F2; color: #1F7A70; }
.badge.cat-rosa    { background: #FBEAF0; color: #B03A67; }
.badge.cat-gelb    { background: #FAF3D9; color: #8A6D1A; }
.badge.cat-oliv    { background: #EFF2E0; color: #5F702A; }
.badge.cat-braun   { background: #F2EBE3; color: #7A5B3A; }
.badge.cat-grau    { background: #EDEDEB; color: #5F5F5B; }
.badge.cat-none {
  background: transparent; color: var(--muted);
  border: 1px dashed var(--line-strong);
}
.status-menu-list.cat-menu { max-height: 60vh; overflow-y: auto; }
/* Swatch-Picker im Kategorie-Modal: RadioSelect (#id_color) als Chip-Reihe */
#id_color { display: flex; flex-wrap: wrap; gap: 0.35rem; }
#id_color > div { margin: 0; }
#id_color label {
  cursor: pointer; display: inline-flex; align-items: center;
  border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.8rem;
  background: var(--bg); color: var(--muted);
}
#id_color input { position: absolute; opacity: 0; width: 0; height: 0; }
#id_color label:has(input:checked) { box-shadow: 0 0 0 2px var(--brand); }
#id_color label:has(input[value="gruen"])   { background: #E7F2EB; color: #2E7D4F; }
#id_color label:has(input[value="blau"])    { background: #E8F0FA; color: #2B5F9E; }
#id_color label:has(input[value="violett"]) { background: #F0EAF8; color: #6B4FA1; }
#id_color label:has(input[value="orange"])  { background: #FDEEE3; color: #C05621; }
#id_color label:has(input[value="tuerkis"]) { background: #E3F4F2; color: #1F7A70; }
#id_color label:has(input[value="rosa"])    { background: #FBEAF0; color: #B03A67; }
#id_color label:has(input[value="gelb"])    { background: #FAF3D9; color: #8A6D1A; }
#id_color label:has(input[value="oliv"])    { background: #EFF2E0; color: #5F702A; }
#id_color label:has(input[value="braun"])   { background: #F2EBE3; color: #7A5B3A; }
#id_color label:has(input[value="grau"])    { background: #EDEDEB; color: #5F5F5B; }

/* Eingeklappte Alternativ-Vorschläge unter dem Top-Treffer */
.more-suggestions summary {
  cursor: pointer; padding: 0.45rem 0; font-size: 0.85rem;
  border-top: 1px dashed var(--line); list-style-position: inside;
}
.more-suggestions summary:hover { color: var(--brand); }
/* Indizien als ✓/✗-Signale statt Freitext */
.signal-row { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; font-size: 0.85rem; }
.signal { white-space: nowrap; }
.signal.sig-ok { color: var(--good); }
.signal.sig-warn { color: var(--warn); }

.empty {
  border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 2rem;
  text-align: center; color: var(--muted); background: var(--surface);
}
.pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1.25rem 0; }
.pagination a { color: var(--brand-dark); text-decoration: none; font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 0.5rem; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.25rem 0; }

.invite-link {
  display: block; background: var(--bg); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem; font-family: ui-monospace, monospace; font-size: 0.82rem;
  word-break: break-all; margin: 0.75rem 0;
}

/* --- Mail-Editor: breit und zweispaltig ------------------------------------------------ */
/* Ein Mail-Editor (Betreff, Text, Legende, Vorschau, Vorlagen) ist zu lang für
   ein 34rem-Modal. Enthält das Modal einen, wird es breit: links die Felder,
   rechts Legende + Vorschau + „Als Vorlage speichern", Footer über beide. */
.modal:has(.mail-editor) { max-width: 66rem; }
.mail-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.5rem; }
.mail-editor > .modal-footer { grid-column: 1 / -1; }
@media (min-width: 60rem) {
  .mail-editor { grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); }
  .mail-editor-side { padding-top: 0.5rem; }
  .mail-editor-side .mail-preview { margin-top: 0.5rem; }
  .mail-editor-side .mail-preview pre { max-height: 60vh; }
}

/* --- Mail-Editor: Platzhalter-Legende & Vorschau --------------------------------------- */
.mail-legend { margin: 0.5rem 0 0; }
.mail-legend code { background: var(--brand-softer); border-radius: 4px; padding: 0 0.25rem; }
.mail-preview {
  margin-top: 0.8rem; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0.7rem 0.9rem;
}
.mail-preview-head { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.mail-preview-subject { font-weight: 600; margin: 0.3rem 0 0.4rem; font-size: 0.9rem; }
.mail-preview pre {
  white-space: pre-wrap; margin: 0; font-family: inherit; font-size: 0.88rem;
  max-height: 16rem; overflow-y: auto;
}
.fee-stale { color: var(--warn); }
.modal-warn {
  background: var(--warn-soft); border-left: 3px solid var(--warn);
  border-radius: var(--radius-sm); padding: 0.55rem 0.8rem;
  margin: 0.6rem 0 0; font-size: 0.88rem; color: var(--warn);
}
.mail-template-save {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.8rem;
}
.mail-template-save input { width: auto; flex: 1 1 12rem; }
.mail-template-save [hidden] { display: none; }
.mail-template-save .form-error, .mail-template-save .ok-note { margin: 0; font-size: 0.85rem; }
.ok-note { color: var(--good); }
.placeholder-chips code {
  background: var(--brand-softer); border-radius: 4px; padding: 0 0.25rem;
  font-size: 0.8rem; margin-right: 0.25rem;
}

/* --- PRAE-Grid & Anwesenheit ----------------------------------------------------------- */
.prae-grid td { padding: 0.25rem 0.8rem; }
.prae-grid tr.weekend td { background: var(--bg); }
.prae-grid .grid-text, .grid-text {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 0.25rem 0.45rem; font-size: 0.85rem; background: var(--surface); color: var(--ink);
}
.prae-grid .grid-amount {
  width: 5.5rem; text-align: right; border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 0.25rem 0.45rem; font-size: 0.85rem; font-variant-numeric: tabular-nums;
  background: var(--surface); color: var(--ink);
}
.prae-total {
  margin-top: 0.75rem; font-size: 0.95rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.5rem 0.9rem; display: inline-block;
}
.prae-total.over { border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }
.attendance .att-check { width: 1.6rem; height: 1.6rem; accent-color: var(--good); }
.rereg { border-top: 1px dashed var(--line); margin-top: 0.9rem; padding-top: 0.75rem; }

/* --- Familienportal: Überweisungs-Block (EPC-QR + Kopierfelder) -------------------------- */
.paybox {
  display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap;
  background: var(--bg); border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 0.8rem 0.9rem; margin-top: 0.75rem;
}
.pay-qr { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; flex: none; }
.pay-qr svg { width: 8.5rem; height: 8.5rem; background: #fff; border-radius: 6px; padding: 4px; }
.pay-fields { flex: 1 1 14rem; min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.pay-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.pay-row > .subtle:first-child { width: 3.4rem; flex: none; }
.pay-row span { overflow-wrap: anywhere; }
.pay-fields .m-0 { margin-top: 0.4rem; font-size: 0.78rem; }

/* --- Druck ------------------------------------------------------------------------------ */
.print-doc { margin-top: 1rem; }
.print-head { margin: 0.5rem 0 1rem; }
.print-title { font-size: 1.15rem; font-weight: 700; }
@media print {
  .topbar, .no-print, #toasts, .actions, .modal-overlay { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .content { max-width: none; padding: 0; }
  table.list { border-radius: 0; box-shadow: none; }
  .table-scroll { overflow: visible; border: none; border-radius: 0; box-shadow: none; }
}

/* --- Burger-Navigation (Mobile) --------------------------------------------------------- */
.navburger {
  display: none; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); border-radius: var(--radius-sm); padding: 0.5rem 0.55rem;
  cursor: pointer; line-height: 0;
}
.navburger[aria-expanded="true"] { color: var(--brand-dark); background: var(--brand-soft); border-color: var(--brand); }
.mobile-nav, .mobile-nav[hidden] { display: none; }
.mobile-nav a {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.5rem;
  text-decoration: none; color: var(--ink); border-radius: var(--radius-sm); font-weight: 500;
}
.mobile-nav a.active { color: var(--brand-dark); background: var(--brand-soft); font-weight: 600; }
.mobile-nav details { border-top: 1px solid var(--line); }
.mobile-nav details:first-child, .mobile-nav > a:first-child { border-top: none; }
.mobile-nav summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.5rem; font-weight: 500; border-radius: var(--radius-sm);
}
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary .chev { margin-left: auto; transition: transform 0.12s; }
.mobile-nav details[open] summary .chev { transform: rotate(180deg); }
.mobile-nav summary.active { color: var(--brand-dark); font-weight: 600; }
.mobile-nav .sub a { padding: 0.5rem 0.5rem 0.5rem 2.35rem; color: var(--muted); font-size: 0.94rem; }
.mobile-nav .sub a.active { color: var(--brand-dark); background: var(--brand-soft); }
.mobile-nav .count {
  background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px;
  padding: 0 0.45rem; font-size: 0.75rem; font-weight: 600; margin-left: auto;
}
.mobile-nav .sub .count { margin-left: 0.4rem; }
.mobile-nav .mobile-nav-user {
  border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.6rem;
  display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap;
}
.mobile-nav .mobile-nav-user .who { color: var(--muted); font-size: 0.9rem; padding: 0.45rem 0.5rem; }

@media (max-width: 900px) {
  .topbar .mainnav, .topbar .userbox { display: none; }
  .navburger { display: inline-flex; }
  .brand img { height: 42px; margin: -3px 0; }
  .topbar-inner { padding: 0.5rem 0.9rem; }
  .mobile-nav:not([hidden]) {
    display: block; border-top: 1px solid var(--line); background: var(--surface);
    padding: 0.35rem 0.9rem 0.85rem; max-height: calc(100vh - 62px); overflow-y: auto;
  }
  /* Subnav-Pillen der aktiven Sektion: eine Zeile, seitlich scrollbar */
  .subnav-inner { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0.25rem 0.9rem; }
  .subnav a { white-space: nowrap; }
}

.bulkbar[hidden] { display: none; }
.bulkbar {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  background: var(--brand-soft); border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem; margin: 0.6rem 0;
}
.bulkbar .subtle { margin-right: 0.25rem; }
/* „Alle N Treffer auswählen": Text-Link statt Button; nach dem Klick ersetzt
   ihn das Bestätigungs-Pill. [hidden]-Guards, weil display sonst gewinnt. */
.bulkbar [data-select-all-matches] {
  border: none; background: none; margin: 0; cursor: pointer;
  font: inherit; font-size: 0.85rem; font-weight: 600;
  color: var(--brand-dark); padding: 0.2rem 0.45rem; border-radius: var(--radius-sm);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.bulkbar [data-select-all-matches]:hover { background: var(--surface); }
.bulkbar [data-all-armed] {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: var(--surface); border: 1px solid var(--brand);
  color: var(--brand-dark); border-radius: 999px; padding: 0.12rem 0.7rem;
  font-size: 0.82rem; font-weight: 600;
}
/* hidden-Attribut gewinnt in der Leiste immer — .btn & Co. setzen display */
.bulkbar [hidden] { display: none !important; }
td.sel-cell, th.sel-cell { width: 1.6rem; }

.status-menu { position: relative; display: inline-block; }
.status-menu summary { list-style: none; cursor: pointer; }
.status-menu summary::-webkit-details-marker { display: none; }
.status-menu summary:hover .badge { box-shadow: 0 0 0 2px var(--brand-soft); }
.status-menu[open] summary .badge { box-shadow: 0 0 0 2px var(--brand); }
.status-menu-list {
  position: absolute; z-index: 60; top: calc(100% + 3px); left: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 2px; padding: 4px; white-space: nowrap;
}
.status-menu-list button:not(.btn) {
  border: none; background: none; text-align: left; cursor: pointer;
  padding: 3px 5px; border-radius: var(--radius-sm); line-height: 1; font: inherit;
  display: flex; align-items: center; gap: 0.35rem;
}
.status-menu-list button:not(.btn):hover { background: var(--bg); }
.status-menu-list button:not(.btn):hover .badge { box-shadow: 0 0 0 2px var(--brand-soft); }
.status-menu-list a {
  border: none; background: none; text-align: left; cursor: pointer;
  padding: 3px 5px; border-radius: var(--radius-sm); line-height: 1; font: inherit;
  display: flex; align-items: center; gap: 0.35rem;
  color: var(--ink); text-decoration: none;
}
.status-menu-list a:hover { background: var(--bg); }
/* ⋯-Auslöser für Zeilen-Menüs (Text statt Icon, sonst line-height:0) */
.iconbtn.more { line-height: 1; font-weight: 700; padding: 0.35rem 0.5rem; }
/* Aktions-Menüs mit Textzeilen (statt Badge-Picker) */
.menu-wide { min-width: 15rem; }
.menu-right { left: auto; right: 0; }
.mr-auto { margin-right: auto; }
/* Kursgruppen: Farbpunkte statt Namens-Chips — eigene, auf Distanz
   unterscheidbare Palette (kräftige, weit auseinanderliegende Farbtöne;
   die Kategorie-Palette ist dafür zu gedeckt) */
.dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 99px; vertical-align: baseline; }
/* Mehrere Gruppen-Dots überlappen wie ein Avatar-Stack; der Ring in
   Hintergrundfarbe hält die Farben unterscheidbar. */
.dot-stack { display: inline-flex; align-items: center; vertical-align: baseline; }
.dot-stack .dot { box-shadow: 0 0 0 1.5px var(--surface); }
.dot-stack .dot + .dot { margin-left: -0.28rem; }
.dot.g-blau    { background: #2563EB; }
.dot.g-orange  { background: #F59E0B; }
.dot.g-gruen   { background: #16A34A; }
.dot.g-rot     { background: #DC2626; }
.dot.g-violett { background: #9333EA; }
.dot.g-tuerkis { background: #0891B2; }
.dot.g-pink    { background: #DB2777; }
.dot.g-gelb    { background: #EAB308; }
.dot.g-braun   { background: #92400E; }
.dot.g-grau    { background: #64748B; }
.status-menu[open] summary.iconbtn { color: var(--brand-dark); background: var(--brand-soft); }
.menu-sep { border-top: 1px solid var(--line); margin: 0.35rem 0; }
/* Empfänger-Spalte in Mail-Tabellen */
.mail-recipients { max-width: 16rem; overflow-wrap: anywhere; }
/* Eigene Autocomplete-Vorschläge (input[data-suggest]) — statt nativer
   datalist, die nicht stylbar ist und mit Browser-Autofill kollidiert */
.suggest { position: relative; }
.suggest-list {
  position: absolute; z-index: 90; top: 100%; left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 2px; padding: 4px;
  max-height: 13rem; overflow-y: auto;
}
.suggest-list[hidden] { display: none; }
.suggest-item {
  border: none; background: none; text-align: left; cursor: pointer;
  padding: 0.35rem 0.5rem; border-radius: var(--radius-sm); font: inherit;
  font-size: 0.85rem; overflow-wrap: anywhere;
}
.suggest-item:hover { background: var(--bg); }
/* Öffentliches Anmeldeformular: ein Rahmen pro Kind */
.child-row { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin: 1rem 0 0; }
.child-row legend { padding: 0 0.4rem; font-weight: 600; }
/* Inline-Hinweis im Seiteninhalt (kein Toast): z.B. „Kurs voll" */
.notice {
  background: var(--warn-soft); color: var(--warn); border: 1px solid currentColor;
  border-radius: var(--radius-sm); padding: 0.55rem 0.9rem; font-size: 0.88rem; margin: 0.75rem 0;
}

table.list th:not(.sel-cell):not(:empty) { cursor: pointer; user-select: none; }
table.list th.sorted-asc::after { content: " \25B4"; color: var(--brand-dark); }
table.list th.sorted-desc::after { content: " \25BE"; color: var(--brand-dark); }

/* --- Layout-Utilities (statt Inline-Styles) ---------------------------------------------- */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.page-head h1, .page-head h2 { margin: 0; }
/* Rückweg auf Unterseiten: kleine Brotkrume direkt über dem Titel */
.breadcrumb { font-size: 0.85rem; margin: 0 0 0.3rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.m-0 { margin: 0; }
.mt-05 { margin-top: 0.5rem; }
.mt-075 { margin-top: 0.75rem; }
.mt-1 { margin-top: 1rem; }
.mt-15 { margin-top: 1.5rem; }

/* Side-by-Side-Belegprüfung (Eingangsrechnungen) */
.review-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(20rem, 2fr); gap: 1.25rem; align-items: start; }
/* Beleg-Ansicht: serverseitig gerenderte Seiten-Bilder in einem Scroll-Rahmen —
   unabhängig vom PDF-Plugin des Browsers (Download-Einstellung, Mobil) */
.review-doc {
  max-height: 78vh; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.review-doc img { display: block; width: 100%; height: auto; }
.review-doc img + img { border-top: 1px solid var(--line); }
@media (max-width: 900px) { .review-split { grid-template-columns: 1fr; } .review-doc { max-height: 50vh; } }

/* Gefahrenzone in Bearbeiten-Modals (Löschen mit Bestätigung) */
.danger-zone {
  display: flex; justify-content: space-between; align-items: center; gap: 0.6rem;
  border-top: 1px dashed var(--line-strong); margin-top: 1.1rem; padding-top: 0.8rem;
}
button.btn.danger { color: #b3261e; border-color: #E5B3AF; }
button.btn.danger:hover { background: #FCEAE8; border-color: #b3261e; }

/* Zahlstand-Ampel (Mitglieder- und Kursansicht) */
.pay-state { margin-right: 0.3rem; vertical-align: -0.15em; }
.pay-state.ok { color: var(--good); }
.pay-state.open { color: var(--brand); }

/* Dropdown nie breiter als der Viewport */
.status-menu-list { max-width: calc(100vw - 1rem); }

/* --- Beitrags-Popover (Aufschlüsselung, Hover + Tap) ------------------------------------- */
.fee-pop summary { display: inline-flex; }
.fee-pop .fee-amt { border-bottom: 1px dotted var(--line-strong); cursor: help; }
.fee-pop[open] .fee-amt { border-bottom-color: var(--brand); }
.fee-pop-list {
  left: auto; right: 0; white-space: normal; width: max-content;
  min-width: 13rem; max-width: min(22rem, calc(100vw - 1rem));
  padding: 0.6rem 0.75rem; font-size: 0.85rem; text-align: left; font-weight: 400;
}
.fee-line { display: flex; justify-content: space-between; gap: 1.25rem; }
.fee-line span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fee-note { font-size: 0.78rem; max-width: 16rem; }
.fee-sep { border-top: 1px solid var(--line); margin: 0.3rem 0; }
.fee-strong { font-weight: 600; }

/* --- Bank-Verbindung (Badge + Dropdown im Umsätze-Kopf) ---------------------------------- */
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.neg { background: var(--accent-soft); color: var(--accent-dark); }
.bank-pop summary { display: inline-flex; }
.bank-pop-list {
  left: auto; right: 0; white-space: normal; width: max-content;
  min-width: 15rem; max-width: min(24rem, calc(100vw - 1rem));
  padding: 0.6rem 0.75rem; font-size: 0.85rem; font-weight: 400; gap: 0.15rem;
}
.bank-line { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; }
.bank-line span:last-child { white-space: nowrap; }
.bank-strong { font-weight: 600; }
.bank-note { font-size: 0.78rem; max-width: 19rem; }
.bank-sep { border-top: 1px solid var(--line); margin: 0.35rem 0; }
.bank-pop-list form { display: flex; flex-direction: column; gap: 0.45rem; align-items: flex-start; margin: 0.3rem 0 0; }

/* --- Mobile-Feinschliff ------------------------------------------------------------------ */
@media (max-width: 600px) {
  .content { padding: 1.1rem 0.9rem 3rem; }
  #toasts { left: 1rem; right: 1rem; max-width: none; }
  .filterbar { padding: 0.6rem 0.7rem; }
  .filterbar input[type="search"] { min-width: 0; flex: 1 1 10rem; }
  .modal-overlay { padding: 1rem 0.6rem 1.5rem; }
  #modal-body { padding: 1.15rem 1rem 1.25rem; }
  .formbox { padding: 1.15rem 1rem 1.4rem; }
  .authbox { margin-top: 1.5rem; padding: 1.25rem 1.1rem; }
  /* iOS zoomt bei Eingabefeldern unter 16px in die Seite — daher hier 16px */
  input:not([type="checkbox"]):not([type="radio"]), select, textarea,
  .filterbar input[type="search"], .filterbar select, .inline-select,
  .formfields input:not([type="checkbox"]):not([type="radio"]), .formfields select, .formfields textarea,
  .prae-grid .grid-text, .grid-text, .prae-grid .grid-amount { font-size: 16px; }
}

/* --- Touch-Geräte: größere Zielflächen ---------------------------------------------------- */
@media (pointer: coarse) {
  .iconbtn { padding: 0.55rem; }
  .status-menu-list { padding: 6px; gap: 3px; }
  .status-menu-list button, .status-menu-list a { padding: 0.5rem 0.6rem; }
  table.list input[type="checkbox"], .filterbar input[type="checkbox"],
  .formfields input[type="checkbox"], .formbox input[type="checkbox"],
  .formfields input[type="radio"] {
    width: 1.25rem; height: 1.25rem; accent-color: var(--brand);
  }
  .tab { padding: 0.55rem 0.9rem; }
  .pagination a { padding: 0.45rem 0.9rem; }
  .subnav a { padding: 0.5rem 0.75rem; }
  .btn-link { padding: 0.45rem 0.6rem; }
}

/* Vollbild-Warteanzeige für synchron laufende Langläufer (Beleg-Upload → KI) */
.busy-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(2px);
}
.busy-overlay[hidden] { display: none; }
.busy-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.2rem 1.6rem; max-width: 22rem;
  display: flex; flex-direction: column; gap: 0.5rem; align-items: center; text-align: center;
}
.spinner {
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 3px solid var(--line-strong); border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile: entbehrliche Tabellenspalten ausblenden statt horizontal zu
   scrollen — Name, Kernwert und Aktionen bleiben einzeilig sichtbar,
   die Details stehen im jeweiligen Detail-Modal/-Seite */
@media screen and (max-width: 700px) {
  .hide-sm { display: none !important; }
}
/* Gegenstück: nur auf Mobile sichtbar (z.B. ⋯-Zeilenmenü statt Icon-Reihe) */
.only-sm { display: none !important; }
@media screen and (max-width: 700px) {
  .only-sm { display: initial !important; }
  details.only-sm { display: inline-block !important; }
}

/* --- Arbeitslisten (Anmeldungen, PRAE): gestapelte Karten auf Mobile ---------------------- */
@media screen and (max-width: 700px) {
  .table-scroll.cardable-wrap { overflow: visible; border: none; background: none; box-shadow: none; border-radius: 0; }
  table.cardable, table.cardable tbody, table.cardable tr, table.cardable td { display: block; }
  table.cardable tr.cardable-head { display: none; }
  table.cardable tr {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 0.75rem; padding: 0.6rem 0.9rem 0.8rem;
  }
  table.cardable td { border: none; padding: 0.15rem 0; }
  table.cardable tr:hover td { background: none; }
  table.cardable td:empty { display: none; }
  table.cardable td[data-label]::before {
    content: attr(data-label); display: block; font-size: 0.68rem; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--muted); margin-top: 0.45rem;
  }
  table.cardable td.amount { text-align: left; }
  table.cardable td.sel-cell { width: auto; padding-bottom: 0.3rem; }
  table.cardable .btns { justify-content: flex-start !important; margin-top: 0.6rem; }
}
