/* Farb-Tokens für Bedienelemente (Buttons, Links, Fokusrahmen).
   Bewusst aus den Werten abgeleitet, die hier schon in Gebrauch waren --
   .btn (#111), .btn-reject (#c8102e), .btn-approve (#248a3d), .btn-delete
   (#fee2e2/#991b1b/#e4b3ae) -- damit nichts neu erfunden wird.
   Für Datendarstellung (Abwesenheitsarten, Rollen, Diagramme, Auslastung) gibt
   es seit 13.11.2026 eigene Töne: --reihe-1 bis --reihe-6, --rot-blass. */
:root{
  --bg:#ffffff; --text:#111; --muted:#5b6570; --line:#d1d5db; --accent:#111;
  --accent-hover:#000;
  --surface:#f5f7fa;        /* dezente Füll-/Hover-Fläche */
  --danger:#c8102e;         /* destruktiv, deckend (weisse Schrift darauf) */
  --danger-strong:#991b1b;  /* destruktiv als Text auf hellem Grund */
  --danger-bg:#fee2e2;      /* helle Füllung dazu */
  --danger-line:#e4b3ae;    /* Rahmen dazu */
  --success:#248a3d;
  /* Farbliste des Intranets (Regeln_Farben.md, von Stefan am 12.11.2026 gewählt):
     neue Seiten nehmen nur diese Variablen, keine Zahlenwerte. Werte nach Stefans Wahl im
     Farbfächer vom 13.11.2026 (F3.79). */
  --success-bg:#d4edda; --success-strong:#155724;   /* Marke Grün: bezahlt, erledigt */
  --aus:#c7c7cc;                                    /* geerbt, gesperrt, Soll-Balken */
  --blau:#2a78d6; --blau-blass:#86b6ef;             /* Auswahl, Balken, «nur sehen» (nicht für Links und Aktionen); blass = Vergleich, geerbt */
  --blau-bg:#dbeafe; --blau-text:#1d4ed8;           /* Marke Blau: Hinweis */
  --achtung-bg:#fef3c7; --achtung-text:#92400e;     /* Marke Achtung: wartet, fehlt, weicht ab */
  --achtung:#ff9f0a;                                /* Achtung kräftig: Planungsmodus, Band «Arbeitskopie», Balken (Stefan 13.11.2026) */
  --violett-bg:#f3e8ff; --violett-text:#7e22ce;     /* Marke Violett: PQ, Abzeichen */
  /* Datenfarben (Regeln_Farben.md, Abschnitt «Datenfarben», Stefan 13.11.2026). Eine Reihe für
     Abwesenheitsarten, Rollen und Diagramme, Reihenfolge fest; --reihe-1 ist das Blau der Liste.
     Rot und Grün kommen in der Reihe nicht vor, die bedeuten schon etwas. */
  --reihe-1:#2a78d6; --reihe-2:#eb6834; --reihe-3:#1baf7a; --reihe-4:#eda100; --reihe-5:#6250d6; --reihe-6:#e87ba4;
  /* Hauch (Stefan 13.11.2026: «die haben der GUI gutgetan»): die Fläche der Marke mit 60 % Weiss,
     für einen Zustand auf grosser Fläche -- Zeile, Feld, Kasten. Das kleine Schild bleibt die Marke. */
  --danger-hauch:#fceff0; --success-hauch:#eef8f0; --blau-hauch:#eff6ff; --achtung-hauch:#fffaeb;
  --surface-hauch:#fafbfc;  /* Fläche hell: Tabellenkopf, Karte, wo --surface zu kräftig wäre */
  --rot-blass:#e17c8c;      /* Auslastung 101 bis 110 % (Rot mit 45 % Weiss) */
  --ausl-mitte:#89c397;     /* Auslastung um 50 %: auf dem Weg von --success-bg nach --success */
}
/* Zurück zur übergeordneten Seite, über dem Titel (Unterseiten der Einstellungen, F3.68) */
.zurueck{display:inline-block;margin:0 0 8px;font-size:12.5px;font-weight:700;color:var(--text);text-decoration:none}
.zurueck:hover{text-decoration:underline}
*{box-sizing:border-box}
html{overflow-x:hidden}
/* Fusszeile mit dem laufenden Stand (Versions-Tag · Commit), base.html */
/* Fusszeile (seit 7.11.2026 mit Wortmarke links, Stand rechts; bündig mit
   der 1200-px-Inhaltsspalte) */
footer.stand{display:flex;align-items:center;justify-content:space-between;gap:16px;max-width:1200px;margin:0 auto;color:var(--muted);font-size:11px;padding:28px 20px 18px;font-variant-numeric:tabular-nums}
footer.stand a{color:inherit;text-decoration:none}
footer.stand a:hover{text-decoration:underline}
/* Wortmarke zwingend schwarz, nicht abgeblendet (Stefan 7.11.2026) */
footer.stand .stand-logo{display:inline-flex;color:var(--text)}
footer.stand .stand-logo svg{height:11px;width:auto;display:block}
body{margin:0;background:var(--bg);color:var(--text);overflow-x:hidden;
     font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial}
.wrap{max-width:1200px;margin:40px auto;padding:0 20px}


/* Tab-Links */
.tabs{margin-bottom:16px;color:var(--muted);font-weight:700}
.tabs a{color:var(--accent);text-decoration:underline}
.tabs a.active{text-decoration:none;border-bottom:2px solid var(--accent);padding-bottom:2px}
.tabs .sep{margin:0 8px;color:var(--aus)}

.panel{display:none}
.panel.show{display:block}

.card{border:1px solid var(--line);border-radius:16px;padding:22px}
h1{margin:0 0 6px;font-size:22px}
p{margin:0 0 16px;color:var(--muted)}
.drop{border:2px dashed var(--line);border-radius:14px;padding:28px;text-align:center;background:var(--surface-hauch);transition:.2s}
.drop.drag{border-color:var(--aus);background:var(--surface)}

.btn{display:inline-block;background:var(--accent);color:#fff;border:0;border-radius:10px;padding:10px 16px;font-weight:700;cursor:pointer}
.btn.small{padding:4px 8px;border-radius:6px;font-size:12px;margin-left:6px;white-space:nowrap}
.btn.outline{background:transparent;border:1px solid var(--line);color:var(--text)}

/* Projektfarben-Auswahl (feste Palette statt <input type="color">).
   Die Radio-Knöpfe selbst sind unsichtbar, geklickt wird das farbige Feld. */
.color-choice{display:flex;gap:6px;align-items:center}
.color-choice input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}
.color-choice label{width:26px;height:26px;border-radius:7px;cursor:pointer;display:block;
  border:2px solid transparent;box-shadow:inset 0 0 0 1px rgba(0,0,0,.10);transition:transform .1s}
.color-choice label:hover{transform:scale(1.08)}
.color-choice input:checked + label{border-color:var(--text);box-shadow:inset 0 0 0 1px rgba(0,0,0,.10)}
/* Tastaturbedienung sichtbar halten, da das Original-Input ausgeblendet ist */
.color-choice input:focus-visible + label{outline:2px solid var(--text);outline-offset:2px}
.btn:disabled{opacity:.5;cursor:not-allowed}

.list{margin-top:16px}
.row{display:flex;align-items:center;gap:8px;margin:10px 0;padding:10px 0;border-top:1px solid var(--line);min-width:0}
.row:first-child{border-top:0}
.name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
progress{flex:1 1 auto;width:auto;max-width:100%;height:10px}
.status{flex:0 0 auto;display:flex;align-items:center;gap:10px}
.ok{color:var(--success);font-weight:600}
.err{color:var(--danger);font-weight:600}
.gone{color:var(--muted);text-decoration:line-through}
.wait{color:var(--muted);font-weight:600}
.btn.small.outline{margin-left:0}
.hint{font-size:13px;color:var(--muted);margin-top:8px}
footer{margin-top:22px;color:var(--muted);font-size:13px}

/* Formular */
.form{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:8px 0 16px}
.form label{font-weight:600}
.form input,.form select,.form textarea{
  width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;font:inherit;
  box-sizing:border-box;height:42px;background:#fff
}
.form select{
  -webkit-appearance:none;-moz-appearance:none;appearance:none;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 12px center;
  padding-right:32px;cursor:pointer
}
.form textarea{grid-column:1 / span 2;min-height:140px}

.stack > * + *{margin-top:10px}
.minihelp{font-size:13px;color:var(--muted)}

.dashboard-wrap{max-width:1200px;margin:40px auto;padding:0 20px}
.dashboard-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
.dashboard-header h1{margin:0}

.filter-tabs{display:flex;gap:8px;margin-bottom:20px}
.filter-tabs a{padding:6px 14px;border-radius:8px;text-decoration:none;color:var(--text);border:1px solid var(--line);font-size:14px;font-weight:600}
.filter-tabs a.active{background:var(--accent);color:#fff;border-color:var(--accent)}

table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line)}
th{font-weight:700;font-size:13px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}
td{font-size:14px}

.badge{display:inline-block;padding:2px 10px;border-radius:6px;font-size:12px;font-weight:700}
.badge.pending{background:var(--achtung-bg);color:var(--achtung-text)}
.badge.approved{background:var(--success-bg);color:var(--success-strong)}
.badge.rejected{background:var(--danger-bg);color:var(--danger-strong)}

/* Debitoren-Status */
.badge.geplant{background:var(--surface);color:var(--muted)}
.badge.offen{background:var(--blau-bg);color:var(--blau-text)}
.badge.bald{background:var(--achtung-bg);color:var(--achtung-text)}
.badge.ueberfaellig{background:var(--danger-bg);color:var(--danger-strong)}
.badge.bezahlt{background:var(--success-bg);color:var(--success-strong)}
.badge.storniert{background:var(--surface);color:var(--muted);text-decoration:line-through}
.badge.due{background:var(--achtung-bg);color:var(--achtung-text)}

/* Debitoren-Abrechnung (Projektseite «Partner und Gewinn», Seite «Partner»):
   Spaltengruppen getönt (Honoraranteil blau, Gewinn aus Topf grün), Zeilen
   mit Hover, ganze Projektzeile klickbar, Honorarbalken pro Empfänger. */
.deb-abr-grouped th.deb-abr-grpname{border-bottom:none;padding:6px 10px;border-radius:8px 8px 0 0}
.deb-abr-grouped th.deb-abr-grpname.deb-abr-grp{border-left:none}
.deb-abr-grouped th.g-honorar{background:rgba(42,120,214,.10);color:var(--blau)}
.deb-abr-grouped th.g-gewinn{background:rgba(27,175,122,.12);color:var(--success)}
.deb-abr-grouped th:not(.deb-abr-grpname):nth-child(n+2):nth-child(-n+5),.deb-abr-grouped td:nth-child(n+2):nth-child(-n+5){background:rgba(42,120,214,.05)}
.deb-abr-grouped th:not(.deb-abr-grpname):nth-child(n+6),.deb-abr-grouped td:nth-child(n+6){background:rgba(27,175,122,.06)}
.deb-abr-grouped th:nth-child(6),.deb-abr-grouped td:nth-child(6){border-left:1px solid #fff}
.deb-abr-grouped .badge{font-weight:600;font-size:11.5px;padding:1px 8px}
.deb-abr-grouped tbody tr:hover td{box-shadow:inset 0 0 0 999px rgba(0,0,0,.025)}
.deb-abr-rowlink{cursor:pointer}
.deb-abr-rowlink a{text-decoration:none}
.deb-abr-rowlink:hover a{text-decoration:underline}
.deb-pt-bar{display:flex;gap:2px;height:7px;border-radius:3px;overflow:hidden;background:var(--surface);margin-top:10px;max-width:720px}
.deb-pt-seg{min-width:0}
.deb-pt-legend{display:flex;gap:8px 16px;flex-wrap:wrap;margin-top:6px;font-size:11.5px}
.deb-pt-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:5px}
.deb-pt-legend b{font-weight:600}
.deb-pt-legend .deb-pt-leg-leer{color:var(--muted)}
.deb-pt-legend .deb-pt-leg-leer b{font-weight:400}

.action-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.action-form input[type=text]{padding:6px 10px;border:1px solid var(--line);border-radius:8px;font:inherit;flex:1;min-width:120px}
.btn-approve{background:var(--success);color:#fff;border:0;border-radius:8px;padding:6px 14px;font-weight:700;cursor:pointer;font-size:13px}
.btn-reject{background:var(--danger);color:#fff;border:0;border-radius:8px;padding:6px 14px;font-weight:700;cursor:pointer;font-size:13px}

.flash{padding:12px 16px;border-radius:10px;margin-bottom:16px;font-weight:600}
.flash.success{background:var(--success-bg);color:var(--success-strong)}
.flash.error{background:var(--danger-bg);color:var(--danger-strong)}
.flash.warning{background:var(--achtung-bg);color:var(--achtung-text)}

/* Abwesenheiten */
.absence-list{display:flex;flex-direction:column;gap:10px}
.absence-card{border:1px solid var(--line);border-radius:12px;padding:14px 18px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px}
.absence-card.away-now{border-left:4px solid var(--success)}
.absence-name{font-weight:700;font-size:15px;flex:1 1 auto;min-width:120px}
.absence-badge-now{display:inline-block;background:var(--success-bg);color:var(--success-strong);font-size:11px;font-weight:700;padding:2px 8px;border-radius:6px;margin-left:6px;vertical-align:middle}
.absence-details{display:flex;gap:16px;color:var(--muted);font-size:14px;flex-wrap:wrap}

/* Timeline */
.timeline-section{margin-top:24px}
.timeline-section h2{font-size:16px;margin:0 0 12px;font-weight:700}
.timeline-outer{display:flex;align-items:stretch}
.timeline-labels{flex:0 0 110px}
.timeline-labels .tl-spacer{height:var(--tl-header-h,40px)}
.timeline-labels .tl-name{font-size:13px;font-weight:600;height:32px;display:flex;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-bottom:1px solid var(--line)}
.timeline-scroll{flex:1;overflow-x:auto;-webkit-overflow-scrolling:touch;position:relative;padding-bottom:20px}
.timeline-inner{position:relative}
.timeline-header{display:flex;border-bottom:1px solid var(--line)}
.timeline-week{text-align:center;font-size:11px;color:var(--muted);font-weight:600;padding:4px 0;border-left:1px solid var(--line)}
.timeline-row{display:flex;height:32px;border-bottom:1px solid var(--line);position:relative;z-index:2;pointer-events:none}
.timeline-track{flex:1;position:relative;height:32px}
.timeline-bar{position:absolute;top:8px;height:16px;border-radius:4px;background:var(--blau);opacity:.85;min-width:3px;cursor:default;pointer-events:auto}
.timeline-today{position:absolute;top:0;bottom:0;width:2px;background:var(--danger);z-index:2}
.timeline-today::after{content:"Heute";position:absolute;bottom:-16px;left:-14px;font-size:10px;color:var(--danger);font-weight:700;white-space:nowrap}
.timeline-legend{display:flex;gap:16px;padding:10px 0 0;font-size:12px;color:var(--muted);flex-wrap:wrap}

/* PDF warning */

/* Delete button */
.btn-delete{background:transparent;color:var(--muted);border:1px solid var(--line);border-radius:8px;padding:4px 10px;font-weight:600;cursor:pointer;font-size:12px}
.btn-delete:hover{background:var(--danger-bg);color:var(--danger-strong);border-color:var(--danger-line)}

/* DB-Verwaltung */
.db-input{padding:4px 8px;border:1px solid var(--line);border-radius:6px;font:inherit;font-size:13px;width:100%;max-width:180px}
.db-input:focus{border-color:var(--accent);outline:none}
.db-inline-form{display:contents}

/* ── Top Navigation ── */
.top-nav{
  position:sticky;top:0;z-index:1000;
  background:rgba(255,255,255,0.88);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(0,0,0,0.08);
  height:44px;overflow:hidden;
}
/* Beide Leisten beginnen am linken Rand der 1200-px-Inhaltsspalte (wie
   bisher), dürfen aber nach rechts bis zum Fensterrand wachsen: die
   Hauptleiste des Admins ist rund 1470 px breit, mehr als die Spalte.
   Reicht auch das Fenster nicht, scrollt die Leiste horizontal (dünner
   Balken unten, Trackpad/Shift-Rad), statt rechts abgeschnitten zu werden --
   html/body haben overflow-x:hidden. Entscheid Stefan 21.10.2026: scrollen,
   nicht umbrechen. Das ::after-Element hält rechts 20 px frei, weil
   Browser das padding-right eines gescrollten Flex-Containers am Ende
   weglassen. */
.adm-nav-inner,.top-nav-inner,.sub-nav-inner{--nav-rand:max(0px, calc((100% - 1200px) / 2))}
.top-nav-inner{
  width:fit-content;min-width:min(1200px, 100%);max-width:calc(100% - var(--nav-rand));
  margin:0 0 0 var(--nav-rand);padding:0 0 0 20px;
  display:flex;align-items:center;height:44px;gap:2px;
  overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,0.2) transparent;
}
.top-nav-inner::after,.sub-nav-inner::after{content:"";flex:0 0 20px}
.top-nav-inner::-webkit-scrollbar,.sub-nav-inner::-webkit-scrollbar{height:4px}
.top-nav-inner::-webkit-scrollbar-thumb,.sub-nav-inner::-webkit-scrollbar-thumb{background:rgba(0,0,0,0.2);border-radius:2px}
.top-nav-inner::-webkit-scrollbar-track,.sub-nav-inner::-webkit-scrollbar-track{background:transparent}
.top-nav-logo{
  font-weight:700;font-size:14px;letter-spacing:.2px;
  color:var(--text);text-decoration:none;margin-right:12px;flex-shrink:0;
}
.top-nav-link{
  padding:5px 11px;border-radius:7px;
  font-size:13px;font-weight:500;
  color:var(--text);text-decoration:none;
  transition:background .12s;white-space:nowrap;
}
.top-nav-group{
  display:flex;align-items:center;gap:2px;
}
.top-nav-group:empty{display:none}
.top-nav-group + .top-nav-group{
  margin-left:6px;padding-left:6px;
  border-left:1px solid rgba(0,0,0,0.1);
}
.top-nav-link:hover{background:rgba(0,0,0,0.06)}
.top-nav-link.tl-active{background:var(--text);color:#fff}
.top-nav-link.tl-disabled{opacity:.4}
.ext-link-icon{font-size:11px;opacity:.5;margin-left:1px}

/* ── Hilfe zu dieser Seite (9.11.2026, hilfe.py / base.html): Knopf «? Hilfe»
   rechts in der Hauptleiste (klein und grau wie Profil/Abmelden), der Text
   als <dialog> mit Kopf, scrollendem Text und Fuss; dieselbe Textgestaltung
   auf der eigenen Seite /hilfe/<key> (.hilfe-seite). Das globale p ist
   abgeblendet (var(--muted)), der Hilfetext soll aber lesbar schwarz sein. */
.hilfe-zeichen{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:16px;height:16px;border-radius:50%;
  border:1.5px solid currentColor;font-size:11px;font-weight:700;line-height:1;font-style:normal}
.hilfe-dialog{border:1px solid var(--line);border-radius:14px;padding:0;width:600px;max-width:calc(100vw - 32px);max-height:calc(100vh - 64px);
  box-shadow:0 12px 40px rgba(0,0,0,.18);color:var(--text);background:var(--bg)}
.hilfe-dialog[open]{display:flex;flex-direction:column}
.hilfe-dialog::backdrop{background:rgba(0,0,0,.25)}
.hilfe-kopf{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 16px 0 22px}
.hilfe-kopf h2{display:flex;align-items:center;gap:10px;margin:0;font-size:17px}
.hilfe-kopf .hilfe-zeichen{width:22px;height:22px;font-size:13px}
.hilfe-schliessen{background:none;border:0;font:inherit;font-size:24px;line-height:1;color:var(--muted);cursor:pointer;padding:2px 8px;border-radius:7px}
.hilfe-schliessen:hover{background:var(--surface);color:var(--text)}
.hilfe-dialog .hilfe-text{flex:1 1 auto;overflow:auto;padding:14px 22px 6px}
.hilfe-fuss{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 22px 18px;border-top:1px solid var(--line);font-size:13px}
.hilfe-fuss a{color:var(--muted);text-decoration:none}
.hilfe-fuss a:hover{color:var(--text);text-decoration:underline}
.hilfe-text{font-size:14px;line-height:1.55;color:var(--text)}
.hilfe-text p{margin:0 0 10px;color:var(--text)}
.hilfe-text h3{margin:18px 0 6px;font-size:14px}
.hilfe-text h3:first-child{margin-top:0}
.hilfe-text ol,.hilfe-text ul{margin:0 0 10px;padding-left:22px}
.hilfe-text li{margin:0 0 5px}
.hilfe-text li ul{margin:5px 0 2px}
.hilfe-text .hinweis{font-size:12.5px;color:var(--muted)}
.hilfe-seite{max-width:760px}
.hilfe-seite-kopf{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.hilfe-seite-kopf h1{margin:0}
.hilfe-seite-kopf .hilfe-zeichen{width:26px;height:26px;font-size:15px}
.hilfe-seite-fuss{margin-top:24px;font-size:13px}
.hilfe-seite-fuss a{color:var(--text)}
/* Seitenleiste (ab 900 px, dlg.show() statt showModal): fest rechts unter der
   Hauptleiste, die Seite rückt um die Leistenbreite nach links (padding am
   body), die drei Leisten bleiben über die ganze Breite (negativer Rand). */
.hilfe-dialog[open]:not(:modal){position:fixed;top:60px;right:16px;bottom:16px;left:auto;margin:0;width:380px;height:auto;max-height:none;z-index:900}
html.hilfe-offen body{padding-right:412px}
html.hilfe-offen .adm-nav,html.hilfe-offen .top-nav,html.hilfe-offen .sub-nav{margin-right:-412px}
/* Marken an den Feldern (Nummer des Schritts): im <label> des Felds oder,
   ohne Label, an der linken oberen Ecke des Elements (absolut, base.html
   führt die Position nach). Dieselbe Nummer vor dem Schritt im Text. */
.hilfe-marke{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;
  background:var(--accent);color:#fff;font-size:11px;font-weight:700;line-height:1;cursor:default;user-select:none}
.hilfe-marke.im-label{margin-right:7px;vertical-align:-3px}
.hilfe-marke.am-rand{position:absolute;z-index:5;box-shadow:0 0 0 2px #fff}
.hilfe-ziel-aktiv{outline:2px solid var(--accent);outline-offset:2px;border-radius:10px}
.hilfe-text ol.hilfe-schritte{list-style:none;padding-left:28px;counter-reset:schritt}
.hilfe-text ol.hilfe-schritte>li{counter-increment:schritt;position:relative;padding:2px 4px;margin:0 0 3px -4px;border-radius:6px}
.hilfe-text ol.hilfe-schritte>li::before{content:counter(schritt);position:absolute;left:-24px;top:4px;width:18px;height:18px;border-radius:50%;
  background:var(--accent);color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center}
.hilfe-text li.hilfe-aktiv{background:var(--surface)}
/* Knopf «? Anleitung» rechts in der Titelzeile (_hilfe_knopf.html): grau,
   ohne Rahmen, erst beim Zeigen dunkler (diskret, Stefan 9.11.2026). */
.hilfe-titelzeile{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:0 0 6px}
.hilfe-titelzeile h1{margin:0}
.hilfe-knopf{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:500;color:var(--muted);text-decoration:none;
  padding:3px 6px;border-radius:7px;white-space:nowrap;opacity:.8}
.hilfe-knopf .hilfe-zeichen{width:15px;height:15px;font-size:10px;border-width:1.2px}
.hilfe-knopf:hover{color:var(--text);background:rgba(0,0,0,0.06);opacity:1}
.hilfe-rechts{margin-left:auto;align-self:center}   /* Knopf rechts aussen in einer eigenen Kopfzeile (Projektseite) */

/* ── Verwaltungszeile (7.11.2026): schmale graue Zeile über der Hauptleiste,
   nur Admins (base.html rendert sie nur dann). Gleiche Spaltenlogik und
   gleiches Scrollen wie die beiden Leisten, nicht sticky. Die Zahl am Link
   (.adm-zahl) ist das rote Abzeichen der offenen Fälle; im aktiven Link
   weiss auf schwarz. */
.adm-nav{background:var(--surface);border-bottom:1px solid rgba(0,0,0,0.08);height:28px;overflow:hidden;position:relative}
.adm-nav-inner{
  width:fit-content;min-width:min(1200px, 100%);max-width:calc(100% - var(--nav-rand));
  margin:0 0 0 var(--nav-rand);padding:0 0 0 20px;
  display:flex;align-items:center;height:28px;gap:2px;
  overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,0.2) transparent;
}
.adm-nav-inner::after{content:"";flex:0 0 20px}
.adm-nav-inner::-webkit-scrollbar{height:4px}
.adm-nav-inner::-webkit-scrollbar-thumb{background:rgba(0,0,0,0.2);border-radius:2px}
.adm-nav-inner::-webkit-scrollbar-track{background:transparent}
.adm-nav-titel{font-size:11px;color:var(--muted);margin-right:8px;flex-shrink:0;letter-spacing:.2px}
.adm-nav-group{display:flex;align-items:center;gap:2px}
.adm-nav-group + .adm-nav-group{margin-left:6px;padding-left:6px;border-left:1px solid rgba(0,0,0,0.12)}
.adm-nav-link{
  display:inline-flex;align-items:center;gap:5px;
  padding:2px 8px;border-radius:5px;font-size:12px;font-weight:500;
  color:var(--text);text-decoration:none;transition:background .12s;white-space:nowrap;
}
.adm-nav-link:hover{background:rgba(0,0,0,0.06)}
.adm-nav-link.adm-aktiv{background:var(--text);color:#fff}
.adm-zahl{font-size:10px;font-weight:600;line-height:1;padding:2px 5px;border-radius:8px;background:var(--danger);color:#fff;font-variant-numeric:tabular-nums}
.adm-nav-link.adm-aktiv .adm-zahl,.burger-unterlink.sn-active .adm-zahl{background:#fff;color:var(--text)}
.burger-unterlink .adm-zahl{margin-left:6px}
/* dieselbe Zahl an einem Link der Hauptleiste (Kreditoren: offene Freigaben, 22.11.2026) */
.top-nav-link .adm-zahl,.burger-link .adm-zahl{margin-left:5px}
.top-nav-link.tl-active .adm-zahl,.burger-link.tl-active .adm-zahl{background:#fff;color:var(--text)}
html.deb-breit .adm-nav-inner{width:auto;min-width:0;max-width:none;margin:0}

/* ── Sub Navigation (Backend) ── */
.sub-nav{
  background:var(--surface);border-bottom:1px solid rgba(0,0,0,0.08);
  height:36px;position:sticky;top:0;z-index:999;overflow:hidden;
}
.sub-nav-inner{
  width:fit-content;min-width:min(1200px, 100%);max-width:calc(100% - var(--nav-rand));
  margin:0 0 0 var(--nav-rand);padding:0 0 0 20px;
  display:flex;align-items:center;height:36px;gap:2px;
  overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(0,0,0,0.2) transparent;
}
.sub-nav-link{
  padding:3px 10px;border-radius:6px;
  font-size:12px;font-weight:500;
  color:var(--text);text-decoration:none;
  transition:background .12s;white-space:nowrap;
}
.sub-nav-link:hover{background:rgba(0,0,0,0.06)}
.sub-nav-link.sn-active{background:var(--text);color:#fff}
/* Breite Ansicht (Debitoren): Schalter rechts in der Unterleiste, Klasse
   deb-breit am <html> nimmt Leisten und Inhalt die 1200px-Grenze. */
.sub-nav-breit{margin-left:auto;flex-shrink:0;background:transparent;border:1px solid var(--line);border-radius:6px;padding:2px 9px;font:inherit;font-size:12px;color:var(--muted);cursor:pointer;white-space:nowrap}
.sub-nav-breit:hover{color:var(--text)}
.sub-nav-breit.active{background:var(--text);border-color:var(--text);color:#fff}
html.deb-breit .top-nav-inner,html.deb-breit .sub-nav-inner{width:auto;min-width:0;max-width:none;margin:0}
html.deb-breit .dashboard-wrap{max-width:none}
/* Scroll-Hinweis (Entscheid Stefan 21.10.2026): solange eine Leiste nach
   rechts weiter scrollbar ist, setzt das Inline-Skript in base.html die
   Klasse hat-mehr auf .top-nav bzw. .sub-nav, und ein 40 px breiter Verlauf
   von transparent zur Leistenfarbe liegt über dem rechten Rand (ohne
   Mausereignisse, der dünne Scrollbalken bleibt bedienbar). Am Ende der
   Leiste verschwindet er. Die äusseren Leisten sind sticky, also positioniert,
   das ::after kann absolut darin liegen. */
.adm-nav::after,.top-nav::after,.sub-nav::after{
  content:"";position:absolute;top:0;right:0;bottom:0;width:40px;pointer-events:none;
  opacity:0;transition:opacity .15s;
}
.adm-nav::after{background:linear-gradient(to right, rgba(235,235,238,0), var(--surface))}
.top-nav::after{background:linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.95))}
.sub-nav::after{background:linear-gradient(to right, rgba(245,245,247,0), var(--surface))}
.adm-nav.hat-mehr::after,.top-nav.hat-mehr::after,.sub-nav.hat-mehr::after{opacity:1}

/* ── Burger-Menü für schmale Fenster (unter 700 px, Entscheid Stefan
   21.10.2026): base.html rendert den Block immer, sichtbar ist er nur in der
   Media-Query unten; ab 700 px bleibt alles wie bisher (Leisten scrollen).
   Aufbau: .burger (44 px hoher Platzhalter im Fluss; Kopfzeile und Menü sind
   position:fixed, nicht sticky, weil body overflow-x:hidden hat und sticky
   darin nicht am Fenster haftet; z-index 5000 -- über den
   Vollbild-Karten der Debitoren (1200/1300) und den Overlays der Auslastung
   (bis 4000), unter dem Datepicker (6000), der aber im Menü nie offen ist),
   .burger-schalter (verstecktes Kontrollkästchen, checkbox-hack),
   .burger-kopf (Schriftzug links, Knopf rechts, Optik der Hauptleiste),
   .burger-knopf (Label: drei Striche, angekreuzt ein X),
   .burger-menu (Liste, fixed unter der Kopfzeile, scrollt in sich),
   .burger-gruppe (Gruppen der Hauptleiste, durch feine Linien getrennt),
   .burger-bereich (<details> eines Bereichs mit Unterlinks, Akkordeon),
   .burger-pfeil (Pfeil rechts in der <summary>: zu ⌄, offen ⌃),
   .burger-link / .burger-unterlink (Bereich / eingerückter Unterlink,
   Hervorhebung tl-active / sn-active wie in den Leisten, mindestens 16 px
   Schrift und 44 px Zeilenhöhe für Touch). Offenes Menü sperrt das Scrollen
   der Seite dahinter: per :has() oder, in älteren Browsern, über die Klasse
   burger-offen am <html> (Inline-Skript in base.html). */
.burger{display:none}
@media(max-width:699px){
  .adm-nav,.top-nav,.sub-nav,.sub-nav-breit{display:none}
  .burger{display:block;height:44px}
  .burger-schalter{position:absolute;opacity:0;width:0;height:0;pointer-events:none}
  .burger-kopf{
    position:fixed;top:0;left:0;right:0;z-index:5000;
    height:44px;display:flex;align-items:center;justify-content:space-between;padding:0 4px 0 14px;
    background:rgba(255,255,255,0.88);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
    border-bottom:1px solid rgba(0,0,0,0.08);
  }
  .burger-kopf .top-nav-logo{margin:0;display:inline-flex;align-items:center;color:var(--text)}
  .burger-kopf .top-nav-logo svg{height:14px;width:auto;display:block}
  .burger-knopf{width:44px;height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:8px}
  .burger-knopf span{position:relative;display:block;width:20px;height:2px;background:var(--text);border-radius:1px;transition:background .15s}
  .burger-knopf span::before,.burger-knopf span::after{
    content:"";position:absolute;left:0;width:20px;height:2px;background:var(--text);border-radius:1px;transition:transform .15s;
  }
  .burger-knopf span::before{top:-6px}
  .burger-knopf span::after{top:6px}
  .burger-schalter:checked ~ .burger-kopf .burger-knopf span{background:transparent}
  .burger-schalter:checked ~ .burger-kopf .burger-knopf span::before{transform:translateY(6px) rotate(45deg)}
  .burger-schalter:checked ~ .burger-kopf .burger-knopf span::after{transform:translateY(-6px) rotate(-45deg)}
  .burger-schalter:focus-visible ~ .burger-kopf .burger-knopf{outline:2px solid var(--text);outline-offset:-2px}
  .burger-menu{
    display:none;position:fixed;top:44px;left:0;right:0;bottom:0;z-index:5000;
    overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    background:var(--bg);padding:6px 14px 60px;
  }
  .burger-schalter:checked ~ .burger-menu{display:block}
  .burger-gruppe + .burger-gruppe{border-top:1px solid rgba(0,0,0,0.1);margin-top:6px;padding-top:6px}
  .burger-link,.burger-unterlink{
    display:flex;align-items:center;min-height:44px;padding:8px 12px;border-radius:8px;
    font-size:16px;font-weight:500;line-height:1.3;color:var(--text);text-decoration:none;
  }
  .burger-unterlink{font-weight:400;margin-left:24px}
  .burger-unter{margin-bottom:4px}
  /* Akkordeon (Nachtrag Stefan 21.10.2026): ein Bereich mit Unterlinks ist ein
     <details>, sein Name die <summary> (ohne Browser-Dreieck, nicht
     markierbar), rechts ein kleiner Pfeil, der offen nach oben zeigt. */
  .burger-bereich{display:block}
  .burger-bereich > summary{list-style:none;cursor:pointer;justify-content:space-between;-webkit-user-select:none;user-select:none}
  .burger-bereich > summary::-webkit-details-marker{display:none}
  .burger-pfeil{flex:0 0 auto;width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;
    transform:translateY(-3px) rotate(45deg);margin:0 6px 0 12px;opacity:.6;transition:transform .15s}
  .burger-bereich[open] > summary .burger-pfeil{transform:translateY(3px) rotate(225deg)}
  .burger-link:hover,.burger-unterlink:hover{background:rgba(0,0,0,0.06)}
  .burger-link.tl-active,.burger-unterlink.sn-active{background:var(--text);color:#fff}
  .burger-bereich.tl-disabled,.burger-link.tl-disabled{opacity:.4}
  html:has(.burger-schalter:checked),html:has(.burger-schalter:checked) body,
  html.burger-offen,html.burger-offen body{overflow:hidden}
}

/* Flache System-Icons (statt Emojis) — per CSS-Mask einfärbbar via currentColor */
.icon-check,.icon-close,.icon-warning,.icon-pencil,.icon-doc,.icon-archive,.icon-gear,.icon-pin,.icon-calendar,.icon-triangle,.icon-building,.icon-square,.icon-circle,.icon-dots{display:inline-block;flex-shrink:0;background-color:currentColor;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain;vertical-align:-1px}
.icon-pin{width:16px;height:16px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDIxIDYgMTJBNiA2IDAgMSAxIDE4IDEyWiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDIxIDYgMTJBNiA2IDAgMSAxIDE4IDEyWiIvPjwvc3ZnPg==")}
.icon-triangle{width:14px;height:14px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDQgMyAyMEgyMVoiLz48L3N2Zz4=");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDQgMyAyMEgyMVoiLz48L3N2Zz4=")}
.icon-building{width:14px;height:14px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTMgMjFWOUgxMFYyMUgzWk0xMiAyMVY0SDE5VjIxSDEyWiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTMgMjFWOUgxMFYyMUgzWk0xMiAyMVY0SDE5VjIxSDEyWiIvPjwvc3ZnPg==")}
.icon-square{width:14px;height:14px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTQgNEgyMFYyMEg0WiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTQgNEgyMFYyMEg0WiIvPjwvc3ZnPg==")}
.icon-circle{width:14px;height:14px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDJBMTAgMTAgMCAxIDAgMTIgMjJBMTAgMTAgMCAxIDAgMTIgMloiLz48L3N2Zz4=");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDJBMTAgMTAgMCAxIDAgMTIgMjJBMTAgMTAgMCAxIDAgMTIgMloiLz48L3N2Zz4=")}
.icon-dots{width:14px;height:14px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTcgNkEyIDIgMCAxIDAgNyAxMEEyIDIgMCAxIDAgNyA2Wk0xNyA2QTIgMiAwIDEgMCAxNyAxMEEyIDIgMCAxIDAgMTcgNlpNNyAxNkEyIDIgMCAxIDAgNyAyMEEyIDIgMCAxIDAgNyAxNlpNMTcgMTZBMiAyIDAgMSAwIDE3IDIwQTIgMiAwIDEgMCAxNyAxNloiLz48L3N2Zz4=");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTcgNkEyIDIgMCAxIDAgNyAxMEEyIDIgMCAxIDAgNyA2Wk0xNyA2QTIgMiAwIDEgMCAxNyAxMEEyIDIgMCAxIDAgMTcgNlpNNyAxNkEyIDIgMCAxIDAgNyAyMEEyIDIgMCAxIDAgNyAxNlpNMTcgMTZBMiAyIDAgMSAwIDE3IDIwQTIgMiAwIDEgMCAxNyAxNloiLz48L3N2Zz4=")}
.icon-check{width:12px;height:12px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTkgMTYuMTcgNC44MyAxMmwtMS40MiAxLjQxTDkgMTkgMjEgN2wtMS40MS0xLjQxeiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTkgMTYuMTcgNC44MyAxMmwtMS40MiAxLjQxTDkgMTkgMjEgN2wtMS40MS0xLjQxeiIvPjwvc3ZnPg==")}
.icon-close{width:11px;height:11px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5IDYuNDEgMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMnoiLz48L3N2Zz4=");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5IDYuNDEgMTcuNTkgNSAxMiAxMC41OSA2LjQxIDUgNSA2LjQxIDEwLjU5IDEyIDUgMTcuNTkgNi40MSAxOSAxMiAxMy40MSAxNy41OSAxOSAxOSAxNy41OSAxMy40MSAxMnoiLz48L3N2Zz4=")}
.icon-warning{width:12px;height:12px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEgMjFoMjJMMTIgMiAxIDIxem0xMi0zaC0ydi0yaDJ2MnptMC00aC0ydi00aDJ2NHoiLz48L3N2Zz4=");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEgMjFoMjJMMTIgMiAxIDIxem0xMi0zaC0ydi0yaDJ2MnptMC00aC0ydi00aDJ2NHoiLz48L3N2Zz4=")}
.icon-pencil{width:12px;height:12px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTMgMTcuMjVWMjFoMy43NUwxNy44MSA5Ljk0bC0zLjc1LTMuNzVMMyAxNy4yNXpNMjAuNzEgNy4wNGMuMzktLjM5LjM5LTEuMDIgMC0xLjQxbC0yLjM0LTIuMzRhLjk5NTkuOTk1OSAwIDAgMC0xLjQxIDBsLTEuODMgMS44MyAzLjc1IDMuNzUgMS44My0xLjgzeiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTMgMTcuMjVWMjFoMy43NUwxNy44MSA5Ljk0bC0zLjc1LTMuNzVMMyAxNy4yNXpNMjAuNzEgNy4wNGMuMzktLjM5LjM5LTEuMDIgMC0xLjQxbC0yLjM0LTIuMzRhLjk5NTkuOTk1OSAwIDAgMC0xLjQxIDBsLTEuODMgMS44MyAzLjc1IDMuNzUgMS44My0xLjgzeiIvPjwvc3ZnPg==")}
.icon-doc{width:12px;height:12px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYgMmMtMS4xIDAtMS45OS45LTEuOTkgMkw0IDIwYzAgMS4xLjg5IDIgMS45OSAySDE4YzEuMSAwIDItLjkgMi0yVjhsLTYtNkg2em03IDdWMy41TDE4LjUgOUgxM3oiLz48L3N2Zz4=");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTYgMmMtMS4xIDAtMS45OS45LTEuOTkgMkw0IDIwYzAgMS4xLjg5IDIgMS45OSAySDE4YzEuMSAwIDItLjkgMi0yVjhsLTYtNkg2em03IDdWMy41TDE4LjUgOUgxM3oiLz48L3N2Zz4=")}
.icon-archive{width:13px;height:13px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTIwLjU0IDUuMjNsLTEuMzktMS42OEMxOC44OCAzLjIxIDE4LjQ3IDMgMTggM0g2Yy0uNDcgMC0uODguMjEtMS4xNi41NUwzLjQ2IDUuMjNDMy4xNyA1LjU3IDMgNi4wMiAzIDYuNVYxOWMwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjYuNWMwLS40OC0uMTctLjkzLS40Ni0xLjI3ek0xMiAxNy41TDYuNSAxMkgxMHYtMmg0djJoMy41TDEyIDE3LjV6TTUuMTIgNWwuODEtMWgxMS45NGwxLjA1IDFINS4xMnoiLz48L3N2Zz4=");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTIwLjU0IDUuMjNsLTEuMzktMS42OEMxOC44OCAzLjIxIDE4LjQ3IDMgMTggM0g2Yy0uNDcgMC0uODguMjEtMS4xNi41NUwzLjQ2IDUuMjNDMy4xNyA1LjU3IDMgNi4wMiAzIDYuNVYxOWMwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjYuNWMwLS40OC0uMTctLjkzLS40Ni0xLjI3ek0xMiAxNy41TDYuNSAxMkgxMHYtMmg0djJoMy41TDEyIDE3LjV6TTUuMTIgNWwuODEtMWgxMS45NGwxLjA1IDFINS4xMnoiLz48L3N2Zz4=")}
.icon-calendar{width:13px;height:13px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTcgMnYySDVhMiAyIDAgMCAwLTIgMnYxM2EyIDIgMCAwIDAgMiAyaDE0YTIgMiAwIDAgMCAyLTJWNmEyIDIgMCAwIDAtMi0yaC0yVjJoLTJ2Mkg5VjJIN3ptMTIgOHY5SDV2LTloMTR6Ii8+PC9zdmc+");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTcgMnYySDVhMiAyIDAgMCAwLTIgMnYxM2EyIDIgMCAwIDAgMiAyaDE0YTIgMiAwIDAgMCAyLTJWNmEyIDIgMCAwIDAtMi0yaC0yVjJoLTJ2Mkg5VjJIN3ptMTIgOHY5SDV2LTloMTR6Ii8+PC9zdmc+")}
.icon-gear{width:13px;height:13px;-webkit-mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LjE0IDEyLjk0Yy4wNC0uMy4wNi0uNjEuMDYtLjk0IDAtLjMyLS4wMi0uNjQtLjA3LS45NGwyLjAzLTEuNThjLjE4LS4xNC4yMy0uNDEuMTItLjYxbC0xLjkyLTMuMzJjLS4xMi0uMjItLjM3LS4yOS0uNTktLjIybC0yLjM5Ljk2Yy0uNS0uMzgtMS4wMy0uNy0xLjYyLS45NEwxNC40IDIuODFjLS4wNC0uMjQtLjI0LS40MS0uNDgtLjQxaC0zLjg0Yy0uMjQgMC0uNDMuMTctLjQ3LjQxTDkuMjUgNS4zNWMtLjU5LjI0LTEuMTMuNTctMS42Mi45NEw1LjI0IDUuMzNjLS4yMi0uMDgtLjQ3IDAtLjU5LjIyTDIuNzQgOC44N2MtLjEyLjIxLS4wOC40Ny4xMi42MWwyLjAzIDEuNThDNC44NCAxMS4zNiA0LjggMTEuNjkgNC44IDEycy4wMi42NC4wNy45NGwtMi4wMyAxLjU4Yy0uMTguMTQtLjIzLjQxLS4xMi42MWwxLjkyIDMuMzJjLjEyLjIyLjM3LjI5LjU5LjIybDIuMzktLjk2Yy41LjM4IDEuMDMuNyAxLjYyLjk0bC4zNiAyLjU0Yy4wNS4yNC4yNC40MS40OC40MWgzLjg0Yy4yNCAwIC40NC0uMTcuNDctLjQxbC4zNi0yLjU0Yy41OS0uMjQgMS4xMy0uNTYgMS42Mi0uOTRsMi4zOS45NmMuMjIuMDguNDcgMCAuNTktLjIybDEuOTItMy4zMmMuMTItLjIyLjA3LS40Ny0uMTItLjYxbC0yLTEuNTh6TTEyIDE1LjZjLTEuOTggMC0zLjYtMS42Mi0zLjYtMy42czEuNjItMy42IDMuNi0zLjYgMy42IDEuNjIgMy42IDMuNi0xLjYyIDMuNi0zLjYgMy42eiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5LjE0IDEyLjk0Yy4wNC0uMy4wNi0uNjEuMDYtLjk0IDAtLjMyLS4wMi0uNjQtLjA3LS45NGwyLjAzLTEuNThjLjE4LS4xNC4yMy0uNDEuMTItLjYxbC0xLjkyLTMuMzJjLS4xMi0uMjItLjM3LS4yOS0uNTktLjIybC0yLjM5Ljk2Yy0uNS0uMzgtMS4wMy0uNy0xLjYyLS45NEwxNC40IDIuODFjLS4wNC0uMjQtLjI0LS40MS0uNDgtLjQxaC0zLjg0Yy0uMjQgMC0uNDMuMTctLjQ3LjQxTDkuMjUgNS4zNWMtLjU5LjI0LTEuMTMuNTctMS42Mi45NEw1LjI0IDUuMzNjLS4yMi0uMDgtLjQ3IDAtLjU5LjIyTDIuNzQgOC44N2MtLjEyLjIxLS4wOC40Ny4xMi42MWwyLjAzIDEuNThDNC44NCAxMS4zNiA0LjggMTEuNjkgNC44IDEycy4wMi42NC4wNy45NGwtMi4wMyAxLjU4Yy0uMTguMTQtLjIzLjQxLS4xMi42MWwxLjkyIDMuMzJjLjEyLjIyLjM3LjI5LjU5LjIybDIuMzktLjk2Yy41LjM4IDEuMDMuNyAxLjYyLjk0bC4zNiAyLjU0Yy4wNS4yNC4yNC40MS40OC40MWgzLjg0Yy4yNCAwIC40NC0uMTcuNDctLjQxbC4zNi0yLjU0Yy41OS0uMjQgMS4xMy0uNTYgMS42Mi0uOTRsMi4zOS45NmMuMjIuMDguNDcgMCAuNTktLjIybDEuOTItMy4zMmMuMTItLjIyLjA3LS40Ny0uMTItLjYxbC0yLTEuNTh6TTEyIDE1LjZjLTEuOTggMC0zLjYtMS42Mi0zLjYtMy42czEuNjItMy42IDMuNi0zLjYgMy42IDEuNjIgMy42IDMuNi0xLjYyIDMuNi0zLjYgMy42eiIvPjwvc3ZnPg==")}

/* ── Mobile Responsive ── */
@media(max-width:600px){
  .wrap{margin:20px auto;padding:0 14px}

  /* Tabs: horizontal scroll */
  .tabs{display:flex;gap:6px;overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch;padding-bottom:4px}
  .tabs .sep{margin:0 2px}

  /* Forms: single column */
  .form{grid-template-columns:1fr}
  .form textarea{grid-column:1}
  .form div[style*="grid-column"]{grid-column:1!important}

  .card{padding:16px;border-radius:12px}
  .drop{padding:20px}
  h1{font-size:19px}

  /* Upload rows */
  .row{flex-wrap:wrap;gap:4px}
  .name{flex:1 1 100%;font-size:14px}
  progress{flex:1 1 auto;max-width:60%}

  /* Dashboard */
  .dashboard-wrap{margin:20px auto;padding:0 14px}
  .dashboard-header{flex-direction:column;align-items:flex-start;gap:10px}

  /* Filter tabs: scroll */
  .filter-tabs{overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:4px;flex-wrap:nowrap}
  .filter-tabs a{flex-shrink:0;font-size:13px;padding:6px 12px}

  /* Table → Card Layout */
  table,thead,tbody,th,td,tr{display:block}
  thead{display:none}
  tr{border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:12px}
  td{padding:4px 0;border:0;font-size:14px}
  td:before{content:attr(data-label);display:inline-block;font-weight:700;font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.4px;min-width:90px;margin-right:8px}

  /* Action form in cards */
  .action-form{flex-direction:column;gap:6px;margin-top:8px}
  .action-form input[type=text]{min-width:0;width:100%}
  .action-form button{width:100%;padding:10px;font-size:14px}

  /* Timeline mobile */
  .timeline-labels{flex:0 0 80px}
  .timeline-labels .tl-name{font-size:12px}
  .timeline-legend{padding-left:0}

  /* Leisten: unter 700 px ersetzt sie das Burger-Menü (Regeln oben), hier nichts mehr. */
}

/* Arbeitskopie (config.TROCKENLAUF): Band über jeder Seite, base.html */
.trockenlauf-band { background: var(--achtung); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 5px 12px; letter-spacing: .02em; }
@media print { .trockenlauf-band { display: none; } }
/* Ansicht als Person: Band über jeder Seite, solange ein Admin durch die Brille einer anderen Person schaut */
.ansicht-band { background: var(--text); color: #fff; font-size: 13px; font-weight: 600; padding: 5px 12px; display: flex; gap: 14px; justify-content: center; align-items: center; position: sticky; top: 0; z-index: 900; }
.ansicht-band form { margin: 0; }
.ansicht-band .hinweis { background: var(--achtung); border-radius: 6px; padding: 1px 9px; }
.ansicht-band button { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text); background: #fff; border: 0; border-radius: 6px; padding: 2px 10px; cursor: pointer; }
@media print { .ansicht-band { display: none; } }

/* ── Bedienelemente (projektmanagement/Regeln_Bedienelemente.md, Stefans Wahl vom 18.11.2026) ──
   Je Zweck genau ein Element; neue Seiten nehmen nur diese Klassen und keine eigenen Stile.
   Höhen: 22 in der Zeile und in der Fusszeile, 28 über der Tabelle und im Tabellenfeld,
   34 im Formular. Rundungen: 6 klein, 8 gross. Anklickbarer Text ist schwarz; Grau heisst
   «nicht gewählt». Die bestehenden Seiten werden Bereich um Bereich darauf umgestellt; wo eine
   Seite ihre alten Klassen noch braucht (JavaScript, viele Stellen), stehen sie hier als
   Zweitname neben der Klasse der Liste -- die Werte stehen nur hier. */

/* 1 Hauptaktion · 2 Nebenaktion · 4 Löschen: .btn.small, dazu .outline oder .gefahr;
   .mittel für die Leiste über einer Tabelle (28 statt 22) */
.btn.small{line-height:14px}                              /* Höhe 22 auf jeder Seite, was auch immer die Seite vererbt */
a.btn,summary.btn{text-decoration:none}
summary.btn{list-style:none;user-select:none}
summary.btn::-webkit-details-marker{display:none}
.btn.small.outline,.btn.small.gefahr{padding:3px 8px}     /* der Rahmen zählt mit */
.btn.small.gefahr{background:transparent;color:var(--danger);border:1px solid var(--danger-line);margin-left:0}
.btn.small.mittel{padding:7px 10px}
.btn.small.outline.mittel,.btn.small.gefahr.mittel{padding:6px 10px}
details[open]>summary.btn.small.outline{background:var(--text);color:#fff;border-color:var(--text)}   /* Knopf, der ein Feld aufklappt: offen = gewählt */
/* Zweitnamen (Projekte, Stunden): .pa .knopf, Knöpfe der Leiste über der Tabelle */
.pa .knopf,.pa #st-druck .m-knopf,.pa .m-knopf.st-leise{display:inline-block;background:transparent;color:var(--text);
  border:1px solid var(--line);border-radius:6px;padding:3px 8px;font:inherit;font-size:12px;font-weight:700;line-height:14px;
  white-space:nowrap;text-align:center;text-decoration:none;cursor:pointer}
.pa .knopf.haupt{background:var(--text);color:#fff;border:0;padding:4px 8px}
.pa #st-druck .m-knopf,.pa .m-knopf.st-leise{padding:6px 10px}

/* 3 Aktion in der Zeile: Symbol mit Hinweis im title, Klickfläche 24
   (Zweitname: .deb-icon im Block der Zahlungspläne, das Skript baut Zeilen damit nach) */
.be-sym,.deb-icon{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 4px;
  background:none;border:0;border-radius:6px;font:inherit;font-size:14px;line-height:1;color:var(--muted);
  text-decoration:none;cursor:pointer}
.be-sym:hover,.deb-icon:hover{background:var(--line);color:var(--text)}
.be-sym.gefahr:hover,.deb-icon.deb-danger:hover{background:var(--danger-bg);color:var(--danger-strong)}

/* 5 Textknopf: kleine Aktion im Text (Zweitnamen im Block der Zahlungspläne: «+ PDF», «Prozess wählen»,
   «ganzen Zahlungsplan zeigen») */
.be-text,.deb-pdf-upload,.deb-zp-prozess.leer,.deb-verlauf-link{background:none;border:0;padding:0;font:inherit;font-size:12px;color:var(--muted);text-decoration:underline;cursor:pointer}
.be-text:hover,.deb-pdf-upload:hover,.deb-zp-prozess.leer:hover,.deb-verlauf-link:hover{color:var(--text)}

/* 6 Umschalter: Leiste, das gewählte Stück trägt .a (Zweitname: .pa .wahl) */
.be-leiste,.pa .wahl{display:inline-flex;height:28px;border:1px solid var(--line);border-radius:8px;overflow:hidden;font-size:13px;font-weight:600}
.be-leiste>a,.be-leiste>button,.pa .wahl a,.pa .wahl button{display:flex;align-items:center;padding:0 12px;border:0;background:#fff;color:var(--muted);
  font:inherit;text-decoration:none;white-space:nowrap;cursor:pointer}
.be-leiste>.a,.pa .wahl a.a,.pa .wahl button.a{background:var(--text);color:#fff}

/* 7 Reiter: der gewählte trägt .a */
.be-reiter{display:flex;gap:22px;border-bottom:1px solid var(--line);margin:0 0 18px;font-size:14px;font-weight:600}
.be-reiter>a,.be-reiter>button{padding:0 0 9px;margin-bottom:-1px;border:0;border-bottom:2px solid transparent;background:none;
  color:var(--muted);font:inherit;text-decoration:none;white-space:nowrap;cursor:pointer}
.be-reiter>.a{color:var(--text);border-bottom-color:var(--text)}

/* 8 Eingabefeld (34; .mittel = 28 über der Tabelle) · 9 Feld in der Tabelle (.tab, 28).
   .be-feld am Feld selbst oder .be-felder am Behälter: dann gilt es für jedes Feld darin, auch
   für eines, das ein Skript später einsetzt. :where() wiegt nichts, Breiten setzt die Seite.
   Zweitnamen: .pa .filter (Leiste über der Tabelle), .pa .m-knopf (Mehrfachauswahl),
   .deb-in (Feld in der Tabelle der Zahlungspläne). */
.be-feld,.deb-in,
.be-felder :where(input:not([type=checkbox],[type=radio],[type=file],[type=hidden],[type=range],[type=color],[type=submit],[type=button],[type=reset]),select,textarea),
.pa .filter :where(input:not([type=checkbox],[type=radio],[type=hidden]),select),
.pa .m-knopf{height:34px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--text);
  font:inherit;font-size:13px}
textarea.be-feld,.be-felder :where(textarea){height:auto}
.be-feld.mittel,
.be-felder.mittel :where(input:not([type=checkbox],[type=radio],[type=file],[type=hidden],[type=range],[type=color],[type=submit],[type=button],[type=reset]),select),
.pa .filter :where(input:not([type=checkbox],[type=radio],[type=hidden]),select),
.pa .m-knopf{height:28px;padding:3px 10px}
.be-feld.tab,.deb-in,
.be-felder.tab :where(input:not([type=checkbox],[type=radio],[type=file],[type=hidden],[type=range],[type=color],[type=submit],[type=button],[type=reset]),select){height:28px;padding:3px 8px;border-radius:6px}
@media (max-width:700px){                              /* sonst zoomt das iPhone beim Antippen hinein */
  .be-feld,.deb-in,
  .be-felder :where(input:not([type=checkbox],[type=radio],[type=file],[type=hidden],[type=range],[type=color],[type=submit],[type=button],[type=reset]),select,textarea),
  .pa .filter :where(input:not([type=checkbox],[type=radio],[type=hidden]),select){font-size:16px}
}

/* 10 Link (.im-text: in einem Satz, Grösse des Satzes; Zweitname: das PDF einer Rate) */
.be-link,.deb-pdf-cell a{color:var(--text);font-size:12.5px;font-weight:700;text-decoration:none;cursor:pointer}
.be-link:hover,.deb-pdf-cell a:hover{text-decoration:underline}
.be-link.im-text{font-size:inherit}
button.be-link{background:none;border:0;padding:0;font-family:inherit}

/* 11 Aufklappen: Text schwarz, das Dreieck des Browsers grau (Zweitnamen: Projektseiten) */
summary.be-klapp,.pa .re-klapp>summary,.pa .zp-plan>summary{font-size:13px;font-weight:600;color:var(--text);cursor:pointer}
summary.be-klapp::marker,.pa .re-klapp>summary::marker{color:var(--muted)}
/* wo der Titel ein Feld ist, klappt ein Knopf mit demselben grauen Dreieck (Zahlungsplan zum Bearbeiten) */
.deb-zp-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-width:24px;height:24px;padding:0;
  background:none;border:0;font:inherit;font-size:13px;line-height:1;color:var(--muted);cursor:pointer}

/* 12 Schliessen (Zweitname: .pa .m-zu) */
.be-zu,.pa .m-zu{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 2px;
  background:none;border:0;font:inherit;font-size:20px;line-height:1;color:var(--muted);cursor:pointer}
.be-zu:hover,.pa .m-zu:hover{color:var(--text)}

/* 13 Häkchen und Auswahlpunkte: überall schwarz und 15 gross. :where() wiegt nichts, jede Regel
   einer Seite geht vor. Ebenso die Farbe eines Links, den keine Seite gestaltet hat (vorher das
   Blau des Browsers). */
:where(input[type=checkbox],input[type=radio]){accent-color:var(--text);width:15px;height:15px}
:where(a){color:var(--text)}

/* Zahlungsplan drucken (templates/_zahlungsplan_druck.html): der Knopf klappt ein kleines Feld auf.
   Knopf und Felder sind die der Liste oben, hier steht nur die Anordnung. */
.zp-druck{position:relative;display:inline-block;vertical-align:middle}
/* im Block der Debitoren hat jedes summary ein Dreieck davor: hier nicht, der Knopf ist ein Knopf */
details.zp-druck>summary.btn.small{display:inline-block}
details.zp-druck>summary.be-sym{display:inline-flex;list-style:none;padding:0}
details.zp-druck>summary.be-sym::-webkit-details-marker{display:none}
details.zp-druck>summary.btn.small::before,details.zp-druck>summary.be-sym::before{content:none}
details.zp-druck[open]>summary.be-sym{background:var(--line);color:var(--text)}      /* offen = gewählt */
.zp-druck-panel{position:absolute;z-index:30;top:calc(100% + 6px);left:0;display:flex;flex-direction:column;gap:8px;width:300px;
  padding:12px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 6px 24px rgba(0,0,0,.08);text-align:left}
.zp-druck.rechts .zp-druck-panel{left:auto;right:0}
.zp-druck-plaene{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--text)}
.zp-druck-plaene label{display:flex;align-items:center;gap:7px;cursor:pointer}
.zp-druck-panel .btn{align-self:flex-end}
