/* Stellar – Basis: Schriften, Tokens, Reset, App-Rahmen und alle gemeinsamen Komponenten.
   Seitenspezifisches steht in treffer.css, board.css, profil.css, lebenslauf.css, admin.css, auth.css.
   Keine externen Ressourcen (CSP: default-src 'self'). */

/* ---------- Schriften (selbst gehostet, OFL; Variable Fonts) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/assets/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(/assets/fonts/space-grotesk-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(/assets/fonts/space-grotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  /* Text */
  --text: #16161D;          /* Haupttext, dunkle Buttons, aktiver Reiter */
  --text-label: #3F3F4A;    /* Labels */
  --text-gedaempft: #5E5E6B;
  --text-meta: #4A4A55;
  /* Linien */
  --linie-karte: #E7E6EC;
  --linie-feld: #DCDBE3;
  --linie-trenner: #EDECF1;
  /* Flächen */
  --flaeche-app: #F6F6F8;
  --flaeche-karte: #FFFFFF;
  --flaeche-hover: #F1F0F5;     /* Hover/Chip */
  --flaeche-unter: #F3F2F7;
  --flaeche-unter-2: #EFEEF4;
  --flaeche-unter-3: #FAFAFC;
  /* Primär (Violett) */
  --primaer: #5B3DF5;
  --primaer-hover: #4A2EE0;
  --primaer-text: #3A20C4;      /* Text auf hellem Grund */
  --primaer-link: #4F32E6;
  --primaer-tint: #EEEBFE;
  --primaer-spur: #ECEAF6;      /* Ring-Spur */
  --primaer-hell: #C9C2FB;
  /* Status */
  --gruen: #12A26A; --gruen-text: #0E7A4F; --gruen-flaeche: #E6F5EE;
  --bernstein-flaeche: #FFF6E5; --bernstein-rand: #F5DDB0; --bernstein-text: #7A4A00; --bernstein-spalte: #B45309;
  --rot-text: #9A2B17; --rot-flaeche: #FDEDEA; --rot-rand: #F2C9C0;
  --blau-flaeche: #E8F1FD; --blau-text: #1D4F91;
  --orange-flaeche: #FFF1E0; --orange-text: #8A4B00;
  --grau-spalte: #8B87A3; --grau-inaktiv: #C9C6D6; --grau-schalter: #D6D4E0;
  /* Dunkles Panel */
  --dunkel: #16161D; --dunkel-2: #2A2936; --dunkel-text: #CFCCE0; --dunkel-text-2: #E4E2EF; --dunkel-text-3: #A9A6BF;
  /* Schrift */
  --schrift: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --schrift-titel: "Space Grotesk", Inter, system-ui, sans-serif;
  /* Radien */
  --r-karte: 16px; --r-feld: 12px; --r-btn: 10px; --r-chip: 6px; --r-pille: 999px;
  --seitenleiste: 232px;
  /* Bewegung und Schatten (SPEC-1.7.0) */
  --t-schnell: 120ms; --t-mittel: 200ms; --ease: cubic-bezier(.2,.8,.2,1);
  --schatten-1: 0 1px 2px rgba(22, 22, 29, .04);
  --schatten-2: 0 12px 30px rgba(22, 22, 29, .12);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--flaeche-app); color: var(--text); font-family: var(--schrift); font-size: 14px; line-height: 1.45; overflow-wrap: break-word; }
a { color: var(--primaer-link); }
a:hover { color: var(--primaer-text); }
h1, h2, h3 { font-family: var(--schrift-titel); color: var(--text); letter-spacing: -0.02em; }
h1 { font-size: 30px; font-weight: 700; line-height: 1.15; margin: 0; }
h2 { font-size: 18px; font-weight: 600; margin: 24px 0 10px; letter-spacing: -0.01em; }
h3 { font-size: 15px; font-weight: 600; margin: 16px 0 6px; letter-spacing: -0.01em; }
p { margin: 0 0 10px; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--primaer); outline-offset: 2px; }
.inline { display: inline; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Icons ---------- */
.ikon { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--schrift-titel); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.logo:hover { color: var(--text); }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--primaer); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.logo-mark svg { width: 20px; height: 20px; }

/* ---------- App-Rahmen ---------- */
.rahmen { display: grid; grid-template-columns: var(--seitenleiste) minmax(0, 1fr); min-height: 100vh; }
.seite { background: #fff; border-right: 1px solid var(--linie-karte); }
.seite-innen { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.seite .logo { padding: 4px 10px 20px; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: var(--r-btn); color: var(--text-label); text-decoration: none; font-weight: 500; line-height: 1.25; }
.nav-link[aria-current="page"] { background: var(--primaer-tint); color: var(--primaer-text); font-weight: 600; }
.nav-link .nav-text { flex: 1; }
.nav-badge { font-size: 12px; font-weight: 700; background: var(--primaer); color: #fff; border-radius: var(--r-pille); padding: 1px 8px; line-height: 1.5; }
.nav-trenner { height: 1px; background: var(--linie-trenner); margin: 12px 8px; }
.seite-fuell { flex: 1; min-height: 24px; }
.statuskasten { border: 1px solid var(--linie-karte); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--flaeche-unter-3); font-size: 12px; color: var(--text-gedaempft); }
.statuskasten .st-zeile { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--gruen-text); }
.statuskasten .st-zeile.warn { color: var(--bernstein-text); }
.statuskasten .st-zeile a { color: inherit; text-decoration: none; }
.statuskasten .st-zeile a:hover { text-decoration: underline; }
.statuskasten .st-punkt { width: 8px; height: 8px; border-radius: var(--r-pille); background: var(--gruen); flex: none; }
.statuskasten .st-zeile.warn .st-punkt { background: #E59A12; }
.benutzer { display: flex; align-items: center; gap: 10px; padding: 14px 8px 0; }
.avatar { width: 32px; height: 32px; border-radius: var(--r-pille); background: var(--dunkel); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: none; }
a.benutzer-name { color: inherit; text-decoration: none; }
a.benutzer-name:hover { text-decoration: underline; }
.benutzer-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.versionszeile { margin: 0; font-size: 11px; color: var(--text-gedaempft); text-align: center; }
.seite-innen .versionszeile { margin-top: 10px; }
.menue-panel .versionszeile { text-align: left; }
.versions-link { color: inherit; text-decoration: none; }
.versions-link:hover, .versions-link[aria-current="page"] { color: var(--primaer-text); text-decoration: underline; }
.neu-hinweis { font-size: 11px; font-weight: 700; background: var(--primaer); color: #fff; border-radius: var(--r-pille); padding: 1px 7px; line-height: 1.5; }
.menue > summary { position: relative; }
.menue-punkt { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: var(--r-pille); background: var(--primaer); border: 2px solid #fff; }
.icon-btn { width: 36px; height: 36px; padding: 0; border: 0; background: transparent; border-radius: 8px; color: var(--text-gedaempft); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* Handy-Kopf und Tab-Leiste (nur < 900 px sichtbar) */
.handy-kopf, .tableiste { display: none; }

/* Inhaltsbereich */
.inhalt { min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 20px; align-items: stretch; }
.inhalt > * { margin-top: 0; margin-bottom: 0; min-width: 0; max-width: 100%; }
.inhalt.schmal > * { width: 100%; max-width: 1100px; }
.inhalt.frei { padding: 0; gap: 0; }
body.ohne-rahmen .inhalt { min-height: 100vh; }

/* Seitenkopf: Titel, Unterzeile, Aktionen */
.seitenkopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.seitenkopf h1 { margin: 0; }
.unterzeile { margin: 4px 0 0; color: var(--text-gedaempft); font-size: 15px; }
.seitenaktionen { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; color: var(--text); background: #fff; border: 1px solid var(--linie-feld); border-radius: var(--r-btn); cursor: pointer; text-decoration: none; text-align: center; }
.btn.primaer { background: var(--primaer); border-color: var(--primaer); color: #fff; font-weight: 700; }
.btn.dunkel { background: var(--dunkel); border-color: var(--dunkel); color: #fff; font-weight: 700; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.gefahr { color: var(--rot-text); border-color: var(--rot-rand); }
.btn.klein-btn, .btn.s36 { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn.s44 { min-height: 44px; }
.btn.s48, .btn.gross { min-height: 48px; padding: 0 20px; font-size: 15px; border-radius: var(--r-feld); }
.btn.voll { width: 100%; }
.btn[disabled], .btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn[aria-disabled="true"] { pointer-events: none; }
.btn .ikon { width: 16px; height: 16px; }
summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }

/* ---------- Eingaben ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--text-label); }
input, select, textarea { display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 0 14px; font: inherit; font-size: 15px; font-weight: 400; color: var(--text); background: #fff; border: 1px solid var(--linie-feld); border-radius: var(--r-btn); }
textarea { padding: 12px 14px; min-height: 0; line-height: 1.45; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235E5E6B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input[type=file] { padding: 9px 12px; height: auto; }
input::placeholder, textarea::placeholder { color: #8B8A97; }
input:focus, select:focus, textarea:focus { border-color: var(--primaer); outline: 2px solid var(--primaer); outline-offset: 0; }
input[disabled], select[disabled], textarea[disabled] { background: var(--flaeche-unter-3); color: var(--text-gedaempft); }
input[type=checkbox], input[type=radio] { accent-color: var(--primaer); }
label.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 400; color: var(--text-label); }
label.check input { width: 18px; height: 18px; min-height: 0; margin: 0; flex: none; }
label.check.inline { display: inline-flex; margin-right: 14px; }
fieldset { border: 1px solid var(--linie-karte); border-radius: 12px; background: var(--flaeche-unter-3); margin: 0; padding: 12px 16px 14px; min-width: 0; }
legend { font-size: 13px; font-weight: 600; color: var(--text-label); padding: 0 6px; }
.hilfe { font-size: 13px; color: var(--text-gedaempft); margin: 6px 0 0; }
.klein { font-size: 13px; color: var(--text-gedaempft); }
/* Feld mit Knopf oder Einheit innen (Passwort anzeigen, "h", "€ / Jahr") */
.feld-innen { position: relative; }
.feld-innen input { padding-right: 52px; }
.feld-innen .icon-btn { position: absolute; right: 6px; bottom: 4px; }
.feld-innen .suffix { position: absolute; right: 14px; bottom: 0; height: 44px; display: flex; align-items: center; color: var(--text-gedaempft); font-size: 14px; pointer-events: none; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.raster .breit { grid-column: 1 / -1; }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; align-items: center; }
.formular > * + * { margin-top: 14px; }
.formular > h2 { margin-bottom: 0; }
.formular > .raster + .raster { margin-top: 16px; }

/* ---------- Schalter (Checkbox als Schalter, 40x24) ---------- */
input[type=checkbox][role=switch] { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; min-height: 0; margin: 0; padding: 0; flex: none; border: 0; border-radius: var(--r-pille); background: var(--grau-schalter); position: relative; cursor: pointer; transition: background .15s; }
input[type=checkbox][role=switch]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
input[type=checkbox][role=switch]:checked { background: var(--primaer); }
input[type=checkbox][role=switch]:checked::after { transform: translateX(16px); }
input[type=checkbox][role=switch]:focus-visible { outline: 2px solid var(--primaer); outline-offset: 2px; }
label.check input[type=checkbox][role=switch] { width: 40px; height: 24px; }
/* Schalter-Knopf (Button, z. B. Quelle an/aus, Anlage standardmäßig beilegen) */
.schalter { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; font: inherit; font-weight: 600; font-size: 13px; border-radius: var(--r-pille); border: 1px solid var(--linie-feld); background: #fff; color: var(--text-gedaempft); cursor: pointer; }
.schalter::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grau-inaktiv); }
.schalter.an { background: var(--primaer-tint); border-color: var(--primaer-hell); color: var(--primaer-text); }
.schalter.an::before { background: var(--primaer); }

/* ---------- Karten ---------- */
.panel { background: var(--flaeche-karte); border: 1px solid var(--linie-karte); border-radius: var(--r-karte); padding: 24px; }
.panel > h2:first-child { margin-top: 0; }
.panel > h2 + p.klein, .panel > h2 + p { margin-top: -4px; }
.panel h2:not(:first-child) { margin-top: 28px; }
.nummer { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--dunkel); color: #fff; font-size: 12px; font-weight: 700; font-family: var(--schrift); margin-right: 10px; vertical-align: 2px; }
.kopf-nummer { display: flex; align-items: center; gap: 10px; }
.kopf-nummer .nummer { margin: 0; }

/* ---------- Reiter / Segmented ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: #fff; border: 1px solid var(--linie-karte); border-radius: 12px; align-self: flex-start; max-width: 100%; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 9px; font-weight: 600; text-decoration: none; color: var(--text-label); white-space: nowrap; }
.tab.aktiv { background: var(--dunkel); color: #fff; }
.tab.dezent { font-weight: 500; }
.zaehler { font-size: 12px; font-weight: 700; line-height: 1.5; padding: 0 7px; border-radius: var(--r-pille); background: var(--flaeche-hover); color: var(--text-gedaempft); }
.tab.aktiv .zaehler { background: rgba(255,255,255,.18); color: #fff; }

/* ---------- Badges und Chips ---------- */
.badge, .chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; line-height: 1.5; padding: 2px 8px; border-radius: var(--r-chip); background: var(--primaer-tint); color: var(--primaer-text); vertical-align: middle; white-space: nowrap; }
.badge.gruen, .chip.ok { background: var(--gruen-flaeche); color: var(--gruen-text); }
.badge.bernstein { background: var(--bernstein-flaeche); color: var(--bernstein-text); }
.badge.rot, .chip.fehler { background: var(--rot-flaeche); color: var(--rot-text); }
.badge.blau { background: var(--blau-flaeche); color: var(--blau-text); }
.badge.orange { background: var(--orange-flaeche); color: var(--orange-text); }
.badge.grau, .chip.grau { background: var(--flaeche-hover); color: var(--text-gedaempft); }
/* Entfernbarer Chip und "+ hinzufügen" */
.tag { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 4px 0 10px; border-radius: 8px; background: var(--flaeche-hover); color: var(--text-label); font-size: 13px; font-weight: 500; }
.tag-x { width: 24px; height: 24px; border: 0; background: transparent; border-radius: 6px; color: var(--text-gedaempft); cursor: pointer; font-size: 16px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.tag-x:hover { background: #E4E2EF; color: var(--text); }
.tag-neu { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 8px; border: 1px dashed var(--grau-inaktiv); background: transparent; color: var(--text-gedaempft); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.tag-neu:hover { border-color: var(--primaer); color: var(--primaer-text); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Hinweisboxen (immer mit Icon) ---------- */
.hinweis, .fehler-box { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--flaeche-unter); color: var(--text-label); font-size: 14px; line-height: 1.45; border: 1px solid transparent; }
.hinweis::before, .fehler-box::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E5E6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E"); }
.hinweis > *, .fehler-box > * { min-width: 0; }
.hinweis p, .fehler-box p { margin: 0; }
.hinweis ul, .fehler-box ul { margin: 4px 0 0; padding-left: 18px; }
.hinweis.warnung { background: var(--bernstein-flaeche); border-color: var(--bernstein-rand); color: var(--bernstein-text); }
.hinweis.warnung::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A4A00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.hinweis.erfolg { background: var(--gruen-flaeche); color: var(--gruen-text); }
.hinweis.erfolg::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E7A4F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E"); }
.hinweis.fehler, .fehler-box { background: var(--rot-flaeche); color: var(--rot-text); border-color: var(--rot-rand); }
.hinweis.fehler::before, .fehler-box::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239A2B17' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m15 9-6 6M9 9l6 6'/%3E%3C/svg%3E"); }
.hinweis a, .fehler-box a { color: inherit; }
.hinweis.klein { font-size: 13px; color: var(--text-label); }
.hinweis.klein.warnung { color: var(--bernstein-text); }

/* Textmeldungen im Fluss */
.rot { color: var(--rot-text); font-weight: 600; }
.ok { color: var(--gruen-text); font-weight: 600; }
.fehler { color: var(--rot-text); font-weight: 600; }

/* ---------- Tabelle ---------- */
.tabelle-wrap { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-gedaempft); padding: 10px 12px; border-bottom: 1px solid var(--linie-trenner); white-space: nowrap; }
.tabelle td { text-align: left; padding: 10px 12px; min-height: 48px; border-bottom: 1px solid var(--linie-trenner); vertical-align: middle; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle .meldung { max-width: 280px; overflow-wrap: anywhere; font-size: 13px; color: var(--text-gedaempft); }
.tabelle select { width: auto; margin: 0; min-height: 36px; }
.tabelle td.aktionen { display: table-cell; }
.punkt { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--grau-inaktiv); margin-right: 8px; vertical-align: 1px; }
.punkt.gruen { background: var(--gruen); }
.punkt.rot { background: #D0442B; }
.punkt.bernstein { background: #E59A12; }

/* ---------- Score-Ring (Makro score_ring in _makros.html) ---------- */
.score-ring { position: relative; display: inline-block; flex: none; }
.score-ring svg { display: block; }
.score-ring .sr-zahl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--schrift-titel); font-weight: 700; color: var(--text); line-height: 1; }

/* ---------- Leerer Zustand ---------- */
.leer { color: var(--text-gedaempft); text-align: center; padding: 32px 20px; border: 1px dashed var(--grau-inaktiv); border-radius: 12px; margin: 0; }
.leer strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ---------- Sonstiges ---------- */
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.liste { margin: 4px 0 8px; padding-left: 20px; }
.pkt { display: inline-block; min-width: 2.2em; font-weight: 700; color: var(--gruen-text); }
.pkt.neg { color: var(--rot-text); }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }
.spinner-wort { color: var(--primaer-text); font-size: 13px; }
.spinner { display: inline-block; width: 1em; height: 1em; border: 3px solid var(--primaer-spur); border-top-color: var(--primaer); border-radius: 50%; animation: dreh 1s linear infinite; vertical-align: -.15em; }
@keyframes dreh { to { transform: rotate(360deg); } }
.details summary, .lauf summary, .profil-karte summary { cursor: pointer; color: var(--primaer-link); font-size: 13px; font-weight: 600; }
summary { cursor: pointer; }
.manuell summary { list-style: none; display: inline-flex; }
.manuell summary::-webkit-details-marker { display: none; }
.manuell form { background: #fff; border: 1px solid var(--linie-karte); border-radius: var(--r-karte); padding: 20px; margin-top: 10px; }
.seiten { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 8px 0; }
.mailframe { width: 100%; height: 80vh; border: 1px solid var(--linie-karte); border-radius: var(--r-karte); background: #fff; }
.login-wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.karte-weiss { background: #fff; border: 1px solid var(--linie-karte); border-radius: var(--r-karte); padding: 28px; box-shadow: 0 6px 24px rgba(22, 22, 29, .06); width: 100%; max-width: 420px; }
.karte-weiss h1 { font-size: 24px; margin-bottom: 12px; }

/* Bewerbung, Versand, Anlagen, Mail-Konto (aus app.css nachgebaut) */
.anlage-zeile { border-top: 1px solid var(--linie-trenner); padding: 14px 0; }
.anlage-zeile:first-of-type { border-top: 0; }
.anlage-zeile p { margin: 0 0 4px; overflow-wrap: anywhere; }
.anlage-knoepfe { display: contents; }
.mailvorschau { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--flaeche-unter-3); border: 1px solid var(--linie-karte); border-radius: 12px; padding: 12px 14px; font: inherit; margin: 6px 0 12px; }
.formular fieldset { margin: 14px 0; }
.formular fieldset label.check { margin-top: 8px; }
.formular fieldset input[type=email], .formular fieldset input[type=text] { margin-top: 8px; }
.formular textarea { font-size: 14px; }
.lebenslauf-foto { width: 105px; height: 135px; object-fit: cover; border: 1px solid var(--linie-karte); border-radius: 8px; }
.formular p.fehler.breit { margin-top: 0; }
.passwort-box code { font-size: 16px; background: var(--flaeche-unter); padding: 4px 8px; border-radius: 6px; user-select: all; }
/* Mail-Konto: nur die Felder des gewählten Anbieters (ohne :has() bleiben beide sichtbar) */
form:has(#anbieter-gmail:checked) .nur-andere { display: none; }
form:has(#anbieter-andere:checked) .nur-gmail { display: none; }

/* ---------- Handy < 900 px: Kopfleiste, Tab-Leiste, Touch-Ziele, 16-px-Felder ---------- */
@media (max-width: 899px) {
  .rahmen { display: block; min-height: 0; }
  .seite { display: none; }
  .inhalt { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); gap: 16px; }
  .inhalt.frei { padding: 0; }
  h1 { font-size: 28px; }
  .seitenkopf { flex-direction: column; align-items: stretch; }
  .seitenaktionen { flex-direction: column; }
  .seitenaktionen > * { width: 100%; }

  .handy-kopf { display: block; position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--linie-karte); }
  .handy-kopf-zeile { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; min-height: 60px; }
  .handy-kopf .logo { font-size: 18px; }
  .handy-kopf .logo-mark { width: 32px; height: 32px; border-radius: 9px; }
  .handy-kopf .logo-mark svg { width: 18px; height: 18px; }
  .menue > summary { list-style: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--linie-karte); border-radius: 12px; background: #fff; color: var(--text); cursor: pointer; }
  .menue > summary::-webkit-details-marker { display: none; }
  .menue[open] > summary { background: var(--flaeche-hover); }
  .menue-panel { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--linie-karte); box-shadow: var(--schatten-2); padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
  .menue-panel .benutzer { padding: 8px 0 0; }
  .menue-panel .abmelden-voll { width: 100%; }

  .tableiste { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--linie-karte); padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
  .tableiste a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; text-decoration: none; color: var(--text-gedaempft); font-size: 11px; font-weight: 600; }
  .tableiste a .ikon { width: 22px; height: 22px; }
  .tableiste a[aria-current="page"] { color: var(--primaer); }
  .tableiste .tab-badge { position: absolute; top: 0; left: calc(50% + 4px); min-width: 18px; padding: 0 5px; border-radius: var(--r-pille); background: var(--primaer); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

  .panel { padding: 16px; }
  .btn, .btn.klein-btn, .btn.s36, .btn.s44, button, .schalter, .tab { min-height: 44px; }
  .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; border: 0; background: transparent; padding: 0; gap: 8px; align-self: stretch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; background: #fff; border: 1px solid var(--linie-karte); border-radius: var(--r-pille); }
  .tab.aktiv { border-color: var(--dunkel); }
  summary { display: flex; align-items: center; min-height: 44px; }
  .manuell summary { display: inline-flex; }
  .tag-x { min-height: 0; width: 28px; height: 28px; }
  .icon-btn { min-height: 44px; width: 44px; height: 44px; }
  .feld-innen .icon-btn { bottom: 0; right: 0; }
  label.check, label.check.inline { display: flex; min-height: 44px; margin: 0; padding-right: 8px; }
  label.check.inline { display: inline-flex; }
  label.check input { width: 22px; height: 22px; }
  label.check input[type=checkbox][role=switch] { width: 40px; height: 24px; }
  input, select, textarea, .formular textarea { font-size: 16px !important; }
  input[type=checkbox], input[type=radio] { width: 22px; }
  .raster { grid-template-columns: 1fr; }
  .aktionen { flex-direction: column; align-items: stretch; }
  .aktionen > *, .aktionen .btn, .aktionen form, .aktionen button { width: 100%; }
  .aktionen form.inline { display: block; }
  .tabelle-wrap, .tabelle-wrap * { overflow-wrap: normal; }
  .tabelle th, .tabelle td { white-space: nowrap; }
  .tabelle .meldung { white-space: normal; min-width: 14rem; overflow-wrap: anywhere; }
  pre, .mailframe, .mono { white-space: pre-wrap; }
  pre, .panel, .panel a, .hinweis, label, .meldung { overflow-wrap: anywhere; }
  .mailframe { height: 70vh; }
  .anlage-knoepfe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .anlage-knoepfe > *, .anlage-knoepfe form, .anlage-knoepfe .btn { width: 100%; }
  .karte-weiss { padding: 20px; }
}

/* ---------- Druck-Feedback (SPEC-1.7.0 Kap. 2) ---------- */
.btn, .icon-btn, .bk-btn, .tab, .nav-link, .tableiste a, .schalter, .tag-x, .tag-neu, .lupe, .tk-link, .bk-titel {
  transition: background-color var(--t-schnell) var(--ease), color var(--t-schnell) var(--ease), border-color var(--t-schnell) var(--ease),
    box-shadow var(--t-schnell) var(--ease), transform var(--t-schnell) var(--ease);
}
/* Hover nur mit echtem Mauszeiger, damit am Handy nichts hängen bleibt */
@media (hover: hover) {
  .nav-link:not([aria-current="page"]):hover { background: var(--flaeche-unter-2); color: var(--text-label); }
  .icon-btn:hover { background: var(--flaeche-hover); color: var(--text); }
  .btn:not(:disabled):hover { background: var(--flaeche-hover); color: var(--text); }
  .btn.primaer:not(:disabled):hover { background: var(--primaer-hover); border-color: var(--primaer-hover); color: #fff; }
  .btn.dunkel:not(:disabled):hover { background: #2A2936; color: #fff; }
  .btn.ghost:not(:disabled):hover { background: var(--flaeche-hover); }
  .btn.gefahr:not(:disabled):hover { background: var(--rot-flaeche); color: var(--rot-text); }
  .tab:hover { background: var(--flaeche-hover); color: var(--text-label); }
  .tab.aktiv:hover { background: var(--dunkel); color: #fff; }
}
/* Gedrückt: leicht einsinken und etwas kräftigere Fläche (nicht bei disabled) */
.btn:not(:disabled):not([aria-disabled="true"]):active { transform: scale(.97); background: var(--flaeche-unter-2); }
.btn.primaer:not(:disabled):not([aria-disabled="true"]):active { background: #3B22C9; border-color: #3B22C9; color: #fff; }
.btn.dunkel:not(:disabled):not([aria-disabled="true"]):active { background: #0B0B10; border-color: #0B0B10; color: #fff; }
.btn.ghost:not(:disabled):not([aria-disabled="true"]):active { background: var(--flaeche-unter-2); }
.btn.gefahr:not(:disabled):not([aria-disabled="true"]):active { background: #FAD9D3; color: var(--rot-text); }
.icon-btn:active, .lupe:active { transform: scale(.94); background: var(--flaeche-unter-2); }
.tab:active { transform: scale(.97); background: var(--flaeche-unter-2); }
.tab.aktiv:active { background: #0B0B10; color: #fff; }
.nav-link:active { transform: scale(.97); background: var(--primaer-tint); }
.tableiste a:active { transform: scale(.94); }
.schalter:active, .tag-neu:active { transform: scale(.97); }
.tag-x:active { transform: scale(.92); background: #D6D4E3; }
.tk-link:active { transform: scale(.99); }
.pop > .ikon, .btn.pop .ikon { animation: pop 220ms var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ---------- Ladezustände (SPEC-1.7.0 Kap. 3) ---------- */
@keyframes zeig { to { opacity: 1; } }
@keyframes puls { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.laedt { white-space: nowrap; }
.laedt::before { content: ""; flex: none; display: inline-block; width: 14px; height: 14px; box-sizing: border-box; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; vertical-align: -2px; opacity: 0; animation: dreh .8s linear infinite, zeig .01s linear 150ms forwards; } /* erst nach 150 ms sichtbar: kein Flackern */
label.laedt::before, span.laedt::before { margin-right: 8px; }
.laedt .ikon { display: none; }
.btn.laedt:disabled, .bk-btn.laedt:disabled { opacity: .8; cursor: progress; }
[aria-busy="true"]:not(button):not(.laedt) { opacity: .6; pointer-events: none; transition: opacity var(--t-mittel) ease 300ms; } /* leicht abgeblendet, nach 300 ms */

/* ---------- Rückmeldungs-Leiste (SPEC-1.7.0 Kap. 4) ---------- */
.rueckmeldung { position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); display: flex; justify-content: center; pointer-events: none; }
.rm-eintrag { pointer-events: auto; display: flex; align-items: center; gap: 6px; width: 100%; max-width: 420px; min-height: 52px; padding: 4px 4px 4px 16px; border-radius: 14px;
  background: var(--dunkel); color: #fff; font-size: 14px; box-shadow: var(--schatten-2); opacity: 0; transform: translateY(12px);
  transition: opacity var(--t-mittel) var(--ease), transform var(--t-mittel) var(--ease); }
.rm-eintrag.an { opacity: 1; transform: none; }
.rm-eintrag.fehler { background: var(--rot-flaeche); color: var(--rot-text); border: 1px solid var(--rot-rand); }
.rm-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rm-undo, .rm-zu { flex: none; min-height: 44px; border: 0; border-radius: 10px; color: inherit; font: inherit; font-weight: 600; cursor: pointer; background: transparent; }
.rm-undo { padding: 0 14px; background: rgba(255, 255, 255, .14); }
.rm-undo:disabled { opacity: .5; cursor: not-allowed; }
.rm-zu { width: 44px; font-size: 22px; line-height: 1; opacity: .8; }
.rm-undo:active, .rm-zu:active { transform: scale(.95); }
@media (min-width: 900px) {
  .rueckmeldung { left: auto; right: 24px; bottom: 24px; width: min(420px, calc(100vw - 48px)); }
}

@media (prefers-reduced-motion: reduce) {
  /* Keine Bewegung; Farb- und Deckkraftwechsel bleiben, Ladeanzeigen pulsieren statt zu drehen */
  *, *::before, *::after { animation: none !important; transition-property: color, background-color, border-color, opacity, box-shadow !important; scroll-behavior: auto !important; }
  .laedt::before, .spinner { animation: puls 1.2s ease-in-out infinite !important; }
  .laedt::before { animation-delay: 150ms !important; }
  .btn:active, .icon-btn:active, .lupe:active, .tab:active, .nav-link:active, .tableiste a:active, .schalter:active, .tag-neu:active, .tag-x:active,
  .tk-link:active, .bkarte:active, .rm-undo:active, .rm-zu:active { transform: none !important; }
  .rm-eintrag { transform: none !important; }
}
