/* Heimatverein-Plattform – Basisstil, ohne externe Schriftarten (DSGVO) */
:root {
  --c-bg: #f5f4ef;
  --c-surface: #ffffff;
  --c-text: #23261f;
  --c-muted: #6b6f63;
  --c-border: #dedcd2;
  --c-primary: #2f5d3a;
  --c-primary-hover: #244a2e;
  --c-primary-soft: #e6efe7;
  --c-accent: #8a2f2f;
  --c-blue-soft: #e5edf6;
  --c-blue: #2b5280;
  --c-warn-soft: #fbf1dc;
  --c-warn: #8a5a00;
  --c-error-soft: #f9e4e2;
  --c-error: #9b2c22;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 2px 8px rgba(0, 0, 0, .04);
  /* Menüfarben – werden aus app/config.php (menu_bg_color, menu_accent_color) überschrieben */
  --menu-bg: #2f5d3a;
  --menu-text: #ffffff;
  --menu-text-muted: rgba(255, 255, 255, .82);
  --menu-hover: rgba(255, 255, 255, .1);
  --menu-line: rgba(255, 255, 255, .12);
  --menu-accent: #5e9b6a;
  --menu-accent-text: #ffffff;
  --submenu-accent: var(--c-primary);
  --submenu-text: var(--c-primary);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font: 15px/1.5 var(--font); }
h1 { font-size: 1.5rem; margin: 0 0 .75rem; font-weight: 650; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; font-weight: 600; }
a { color: var(--c-primary); }
code, .mono { font-family: var(--mono); font-size: .92em; }
.upper { text-transform: uppercase; }
.muted { color: var(--c-muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.text-warn { color: var(--c-error); }
.boot { padding: 3rem; text-align: center; color: var(--c-muted); }

/* ---------- Layout: Hauptmenü links, Unterpunkte oben ---------- */
.shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 230px; flex: 0 0 230px; background: var(--menu-bg); color: var(--menu-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30;
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--menu-text); text-decoration: none; font-weight: 650; padding: 1rem 1rem 1.1rem; line-height: 1.25; border-bottom: 1px solid var(--menu-line); }
.brand img { height: 40px; width: auto; flex: none; }
.mainnav { display: flex; flex-direction: column; gap: .2rem; padding: .75rem .6rem; flex: 1; }
.mainnav a { display: flex; align-items: center; gap: .65rem; color: var(--menu-text-muted); text-decoration: none; padding: .6rem .75rem; border-radius: 6px; font-weight: 500; }
.mainnav a:hover { background: var(--menu-hover); color: var(--menu-text); }
.mainnav a.active { background: var(--menu-accent); color: var(--menu-accent-text); font-weight: 650; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.nav-icon { display: inline-flex; width: 20px; height: 20px; }
.nav-icon svg { width: 20px; height: 20px; fill: currentColor; }
.sidebar-foot { padding: .75rem 1rem; font-size: .78rem; color: var(--menu-text-muted); opacity: .75; }
.sidebar-backdrop { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: stretch; gap: 1rem; padding: 0 1rem; min-height: 54px;
  background: var(--c-surface); border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 20;
}
.subnav { display: flex; align-items: stretch; gap: .25rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.subnav a { display: flex; align-items: center; padding: 0 .9rem; color: var(--c-muted); text-decoration: none; font-weight: 500; border-bottom: 3px solid transparent; white-space: nowrap; }
.subnav a:hover { color: var(--c-text); }
.subnav a.active { color: var(--submenu-text); border-bottom-color: var(--submenu-accent); font-weight: 650; }
.subnav-title { display: flex; align-items: center; font-weight: 600; padding: 0 .4rem; }
.usermenu { display: flex; align-items: center; gap: .75rem; white-space: nowrap; }
.usermenu a { color: var(--c-muted); text-decoration: none; }
.usermenu a:hover { color: var(--c-text); }
.menu-toggle { display: none; align-self: center; color: var(--c-text); }
.content { width: 100%; max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.narrow { max-width: 520px; }
.narrow-l { max-width: 860px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.page-head h1 { margin: 0; }
.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }

.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid-2.gap-l { gap: 1rem; }
.grid-2 > .card { margin-bottom: 0; }
.grid-plz { display: grid; grid-template-columns: 9rem 1fr; gap: 0 1rem; }

/* ---------- Login / Installer ---------- */
.login { width: 100%; max-width: 380px; text-align: left; }
.login h1 { margin-bottom: .25rem; }
.login-logo { display: block; height: 96px; margin: 0 auto 1rem; }
.install { width: 100%; max-width: 760px; }
.checks { list-style: none; padding: 0; columns: 2; }
.checks .ok { color: var(--c-primary); }
.checks .fail { color: var(--c-error); font-weight: 600; }

/* ---------- Formulare ---------- */
fieldset { border: 1px solid var(--c-border); }
fieldset.card { padding-top: .75rem; }
fieldset:disabled { opacity: .85; }
legend { font-weight: 600; padding: 0 .4rem; }
label, .label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: .85rem; }
.label { margin-bottom: .35rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .55rem .65rem; font: inherit;
  border: 1px solid #c9c7bb; border-radius: 6px; background: #fff; color: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--c-primary); outline-offset: -1px; border-color: var(--c-primary); }
input:disabled, select:disabled { background: #f1f0ea; color: var(--c-muted); }
input[type=checkbox], input[type=radio] { display: inline-block; width: auto; margin: 0 .45rem 0 0; accent-color: var(--c-primary); }
label.check, label.radio { display: flex; align-items: flex-start; gap: .1rem; font-weight: 400; margin-bottom: .5rem; }
label.check input, label.radio input { margin-top: .25rem; }
.radio-group { margin-bottom: .85rem; }
.check-list { border: 1px solid var(--c-border); border-radius: 6px; padding: .6rem .75rem .1rem; margin-bottom: .85rem; max-height: 260px; overflow: auto; }
.input-row { display: flex; gap: .5rem; align-items: stretch; }
.input-row input { flex: 1; }
.input-row .btn { margin-top: .3rem; }
.field-error { display: block; color: var(--c-error); font-weight: 500; margin-top: .2rem; }
.field-warn { display: block; color: var(--c-warn); margin-top: .2rem; }
.fee-preview { background: var(--c-primary-soft); border-radius: 6px; padding: .6rem .8rem; margin: 0; }
.form-actions { display: flex; gap: .5rem; align-items: center; margin: 1rem 0 .5rem; }
.spacer { flex: 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  padding: .5rem .95rem; border: 1px solid #c9c7bb; border-radius: 6px; background: #fff;
  color: var(--c-text); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #f3f2ec; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-hover); }
.btn-danger { color: var(--c-error); border-color: #e2b8b3; }
.btn-danger:hover { background: var(--c-error-soft); }
.btn-small { padding: .25rem .6rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-icon { background: none; border: 0; font-size: 1.2rem; cursor: pointer; padding: .25rem .5rem; color: inherit; }

/* ---------- Tabellen ---------- */
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .6rem .8rem; border-bottom: 1px solid #ecebe4; text-align: left; vertical-align: top; }
.table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--c-muted); font-weight: 600; background: #faf9f5; }
.card > .table th { background: none; }
.table-wrap .table th { background: #faf9f5; }
.table .num { text-align: right; white-space: nowrap; }
.table .center { text-align: center; }
.table tr.inactive td { color: var(--c-muted); }
.table tr.sep td { padding: .2rem; border: 0; }
.contact a { display: block; color: var(--c-text); text-decoration: none; font-size: .9rem; }
.contact a:hover { color: var(--c-primary); text-decoration: underline; }
.table-click tbody tr { cursor: pointer; }
.table-click tbody tr:hover, .table-click tbody tr:focus { background: var(--c-primary-soft); outline: none; }
.sortable { cursor: pointer; user-select: none; }
.actions { white-space: nowrap; text-align: right; }
.actions .btn + .btn { margin-left: .3rem; }
.matrix .yes { color: var(--c-primary); font-weight: 700; }
.matrix .no { color: #c3c1b6; }
.matrix tfoot td { border-bottom: 0; }
.table-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem .8rem; flex-wrap: wrap; }
.pager { display: flex; align-items: center; gap: .5rem; }

/* ---------- Filter ---------- */
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: .6rem; padding: .8rem; }
.filters input, .filters select { margin: 0; }

/* ---------- Kennzahlen ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; }
.stat { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: var(--shadow); }
.stat-value { display: block; font-size: 1.6rem; font-weight: 700; color: var(--c-primary); }
.stat-label { color: var(--c-muted); font-size: .9rem; }

/* ---------- Badges, Hinweise ---------- */
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #eee; margin: 0 .25rem .15rem 0; }
.badge-green { background: var(--c-primary-soft); color: var(--c-primary); }
.badge-blue { background: var(--c-blue-soft); color: var(--c-blue); }
.badge-warn { background: var(--c-warn-soft); color: var(--c-warn); }
.badge-muted { background: #eeede7; color: var(--c-muted); }
.alert { padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; border: 1px solid transparent; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-error { background: var(--c-error-soft); color: var(--c-error); border-color: #efc6c1; }
.alert-warn { background: var(--c-warn-soft); color: var(--c-warn); border-color: #f0dcae; }
.alert-ok { background: var(--c-primary-soft); color: var(--c-primary); border-color: #c4dbc8; }
.loading { padding: 2rem; color: var(--c-muted); display: flex; gap: .6rem; align-items: center; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--c-border); border-top-color: var(--c-primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20, 24, 18, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 1rem 1rem; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 10px; width: 100%; max-width: 560px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.modal-wide { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem .5rem; }
.modal-head h2 { margin: 0; }
.modal-body { padding: .5rem 1.25rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .75rem 1.25rem 1.1rem; border-top: 1px solid #ecebe4; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 100; max-width: min(420px, calc(100vw - 2rem)); }
.toast { padding: .7rem 1rem; border-radius: 6px; background: var(--c-primary); color: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
.toast-error { background: var(--c-error); }
.toast-warn { background: var(--c-warn); }


/* ---------- Aktionen ---------- */
.head-tools { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.head-tools select { margin: 0; width: auto; }
.eyebrow { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-accent); margin-bottom: .1rem; }
.prewrap { white-space: pre-line; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
textarea { resize: vertical; min-height: 2.6rem; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.action-card { display: flex; flex-direction: column; gap: .5rem; color: inherit; text-decoration: none; margin: 0; transition: border-color .15s, box-shadow .15s; }
.action-card:hover { border-color: var(--c-primary); box-shadow: 0 2px 12px rgba(47, 93, 58, .15); }
.action-card h2 { margin: 0; }
.action-card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.action-card .clamp { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.action-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .85rem; color: var(--c-muted); }
.st-entwurf { background: #eeede7; color: var(--c-muted); }
.st-geplant { background: var(--c-blue-soft); color: var(--c-blue); }
.st-laufend { background: var(--c-warn-soft); color: var(--c-warn); }
.st-abgeschlossen { background: var(--c-primary-soft); color: var(--c-primary); }
.st-abgebrochen { background: var(--c-error-soft); color: var(--c-error); }
.ms-offen { background: #eeede7; color: var(--c-muted); }
.ms-in_arbeit { background: var(--c-warn-soft); color: var(--c-warn); }
.ms-erledigt { background: var(--c-primary-soft); color: var(--c-primary); }

.progress-wrap { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 .2rem; }
.progress-wrap > span { min-width: 3.2em; text-align: right; font-size: .85rem; font-weight: 700; color: var(--c-primary); }
.progress { flex: 1; height: 12px; background: #ecebe4; border-radius: 999px; overflow: hidden; }
.progress-s .progress { height: 8px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #4c8a59, var(--c-primary)); border-radius: 999px; }
.w0 { width: 0%; }
.w5 { width: 5%; }
.w10 { width: 10%; }
.w15 { width: 15%; }
.w20 { width: 20%; }
.w25 { width: 25%; }
.w30 { width: 30%; }
.w35 { width: 35%; }
.w40 { width: 40%; }
.w45 { width: 45%; }
.w50 { width: 50%; }
.w55 { width: 55%; }
.w60 { width: 60%; }
.w65 { width: 65%; }
.w70 { width: 70%; }
.w75 { width: 75%; }
.w80 { width: 80%; }
.w85 { width: 85%; }
.w90 { width: 90%; }
.w95 { width: 95%; }
.w100 { width: 100%; }

.objective { border-left: 4px solid var(--c-accent); }
.objective-meta { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
.kr { border-left: 4px solid var(--c-primary); }
.kr-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.kr-head h2 { margin: 0 0 .25rem; }
.kr-head p { margin: 0; }
.kr-value { white-space: nowrap; font-size: 1.05rem; }
.kr-value strong { color: var(--c-primary); font-size: 1.3rem; }
.table.measures { margin-top: .75rem; }
.table.measures th { background: none; }
.table tr.overdue td:first-child, .table tr.overdue td:nth-child(3) { color: inherit; }
.table tr.overdue { background: #fdf6f5; }
.table tr.done td { color: var(--c-muted); }
.table tr.done strong { text-decoration: line-through; }
.select-s { margin: 0; padding: .3rem .4rem; font-size: .85rem; width: auto; }
.chip { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .35rem .2rem .65rem; margin: 0 .3rem .3rem 0; border-radius: 999px; background: var(--c-blue-soft); color: var(--c-blue); font-size: .85rem; font-weight: 500; }
.chip-s { padding: .1rem .55rem; font-size: .8rem; }
.chip-muted { background: #eeede7; color: var(--c-muted); }
.chip button { border: 0; background: none; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 .25rem; border-radius: 50%; }
.chip button:hover { background: rgba(0, 0, 0, .08); }
.picker { display: flex; flex-wrap: wrap; align-items: center; gap: 0; margin-bottom: .3rem; }
.picker select { width: auto; min-width: 220px; margin: 0 0 .3rem; padding: .3rem .5rem; font-size: .9rem; }
.kr-edit { position: relative; }
.kr-tools { position: absolute; right: 1rem; top: .2rem; display: flex; gap: .25rem; align-items: center; }
h3.sub { font-size: .95rem; margin: 1rem 0 .5rem; }
.measure-edit { border: 1px solid var(--c-border); border-radius: 6px; padding: .6rem .8rem .5rem; margin-bottom: .75rem; background: #fbfaf7; }
.measure-edit-head { display: flex; align-items: center; gap: .25rem; margin-bottom: .4rem; }
.btn-icon:disabled { opacity: .3; cursor: default; }
.sticky-actions { position: sticky; bottom: 0; background: var(--c-bg); padding: .75rem 0; border-top: 1px solid var(--c-border); z-index: 5; }
.filters-3 { grid-template-columns: 1fr 1fr auto; align-items: center; }
label.check.inline { margin: 0; white-space: nowrap; }
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
  .kr-head { flex-direction: column; }
  .kr-tools { position: static; justify-content: flex-end; margin-bottom: .5rem; }
  /* Maßnahmen als gestapelte Karten */
  .table.measures thead { display: none; }
  .table.measures, .table.measures tbody, .table.measures tr, .table.measures td { display: block; width: 100%; }
  .table.measures tr { padding: .6rem 0; border-bottom: 1px solid #ecebe4; }
  .table.measures td { border: 0; padding: .15rem .25rem; }
  .table.measures td.nowrap br { display: none; }
  .table.measures td.nowrap::before { content: 'Zieldatum: '; color: var(--c-muted); }
  .table.measures td.nowrap small { margin-left: .5rem; }
  .filters-3 { grid-template-columns: 1fr; }
}


/* ---------- Sitzungen ---------- */
.narrow-xl { max-width: 980px; }
.meeting-when { margin: .2rem 0 0; color: var(--c-muted); display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; }
.people { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: .5rem 1rem; padding: .9rem 1.25rem; }
.people .muted { font-size: .8rem; }
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--c-border); margin: 1rem 0; }
.tabs button { background: none; border: 0; padding: .6rem 1rem; font: inherit; font-weight: 600; color: var(--c-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.tabs button:disabled { opacity: .45; cursor: not-allowed; }
.top-card { padding: .9rem 1.1rem; }
.top-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.top-nr { flex: none; font-weight: 700; font-size: .8rem; color: #fff; background: var(--c-primary); border-radius: 4px; padding: .15rem .45rem; }
.top-title { margin: 0; font-weight: 600; flex: 1; }
.top-title-ro { flex: 1; font-size: 1.05rem; }
.top-tools { display: flex; gap: .1rem; }
.top-card textarea { margin: 0 0 .5rem; }
.files { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .3rem 0 .6rem; }
.file { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border: 1px solid var(--c-border); border-radius: 6px; background: #fbfaf7; color: var(--c-text); text-decoration: none; font-size: .88rem; }
.file:hover { border-color: var(--c-primary); }
.file-del { border: 0; background: none; color: var(--c-error); font-size: 1.05rem; cursor: pointer; padding: 0 .15rem; }
.hidden-file { display: none; }
.save-state { font-size: .8rem; color: var(--c-muted); white-space: nowrap; }
.save-state.saved { color: var(--c-primary); }
.save-state.error { color: var(--c-error); font-weight: 700; }
.editor { min-height: 180px; }
.editor .tox-tinymce { border-radius: 6px; border-color: #c9c7bb; }
.protocol-view { border-left: 3px solid var(--c-primary-soft); padding: .2rem 0 .2rem .9rem; }
.protocol-view p { margin: 0 0 .5rem; }
.protocol-view table { border-collapse: collapse; margin: .4rem 0; }
.protocol-view td, .protocol-view th { border: 1px solid #ccc; padding: .25rem .5rem; }
@media (max-width: 640px) {
  .people { grid-template-columns: 1fr 1fr; }
  .people .wide { grid-column: 1 / -1; }
  .tabs button { padding: .5rem .5rem; font-size: .9rem; }
}


/* ---------- Dateiverwaltung ---------- */
.file-search { width: 260px; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0 0 .75rem; font-size: .95rem; }
.crumbs a { text-decoration: none; color: var(--c-muted); padding: .15rem .35rem; border-radius: 4px; }
.crumbs a:hover { background: var(--c-primary-soft); color: var(--c-primary); }
.crumbs a.current { color: var(--c-text); font-weight: 650; }
.crumbs .sep { color: #b4b2a6; }
.file-table td { vertical-align: middle; }
.file-table .ico { width: 2.2rem; font-size: 1.25rem; text-align: center; padding-right: 0; }
.file-table .chk { width: 2rem; }
.file-table .chk input { margin: 0; }
.file-table .fname { color: var(--c-text); font-weight: 600; text-decoration: none; }
.file-table .fname:hover { color: var(--c-primary); text-decoration: underline; }
.file-table .actions .btn { margin-left: .2rem; }
.file-table tr:hover td { background: #faf9f4; }
.row-up a { color: var(--c-muted); text-decoration: none; }
.empty { text-align: center; padding: 2.5rem 1rem !important; color: var(--c-muted); }
.dropzone { position: relative; transition: box-shadow .15s; }
.dropzone.dragging { box-shadow: 0 0 0 3px var(--c-primary); }
.drop-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(230, 239, 231, .9); color: var(--c-primary); font-weight: 700; font-size: 1.1rem; border-radius: var(--radius); pointer-events: none; }
.bulkbar { display: flex; align-items: center; gap: .5rem; padding: .6rem 1rem; background: var(--c-primary-soft); border-color: #c4dbc8; }
.upload-queue { padding: .6rem 1rem; }
.upload-row { display: grid; grid-template-columns: minmax(0, 2fr) 3fr auto; gap: .75rem; align-items: center; padding: .2rem 0; }
.upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.upload-row .progress { margin: 0; }
@media (max-width: 900px) {
  .file-table .actions .btn:not(.btn-danger):not([href]) { display: none; }
}
@media (max-width: 640px) {
  .file-search { width: 100%; }
  .file-table .actions { white-space: normal; }
  .upload-row { grid-template-columns: 1fr auto; }
  .upload-row .progress { display: none; }
}


/* ---------- Abteilungen, Submitglieder, Import ---------- */
.filters { grid-template-columns: minmax(240px, 2fr) repeat(auto-fit, minmax(140px, 1fr)); }
.dep-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0 .85rem; }
.dep-chip { border: 1px solid #c9c7bb; background: #fff; color: var(--c-text); border-radius: 999px; padding: .3rem .8rem; font: inherit; font-size: .88rem; cursor: pointer; }
.dep-chip:hover { border-color: var(--c-primary); }
.dep-chip.on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.dep-chip.on::before { content: '✓ '; }
fieldset:disabled .dep-chip { cursor: default; }
.sub-card { border: 1px solid var(--c-border); border-radius: 6px; padding: .6rem .8rem .2rem; margin-bottom: .75rem; background: #fbfaf7; }
.sub-head { display: flex; align-items: center; margin-bottom: .3rem; }
.import-summary { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin: .9rem 0 .5rem; }
.import-table { max-height: 45vh; overflow: auto; border: 1px solid var(--c-border); border-radius: 6px; }
.import-table th { position: sticky; top: 0; background: #faf9f5; }
tr.imp-fehler td { background: var(--c-error-soft); }
tr.imp-neu td:nth-child(3) { color: var(--c-primary); font-weight: 600; }
tr.imp-aktualisieren td:nth-child(3) { color: var(--c-blue); font-weight: 600; }
tr.imp-same td { color: var(--c-muted); }
.badge-err { background: var(--c-error-soft); color: var(--c-error); }
.text-ok { color: var(--c-primary); }
.mt { margin-top: .75rem; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input[type=search] { grid-column: 1 / -1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hide-m { display: none; }
  .menu-toggle { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 4px 0 20px rgba(0, 0, 0, .2); }
  .menu-open .sidebar { transform: none; }
  .menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 25; }
}
@media (max-width: 640px) {
  .grid-2, .grid-plz { grid-template-columns: 1fr; }
  .hide-s { display: none; }
  .usermenu a { display: none; }
  .content { padding: 1rem .75rem 3rem; }
  .checks { columns: 1; }
}
