/* ==========================================================================
   Capstone Career, Design Tokens + Basis-Komponenten  (tokens_v1.css)
   Kein Build-Schritt. Einbinden: <link rel="stylesheet" href="/css/tokens_v1.css">
   Theme: :root = Light. Dark via [data-theme="dark"] auf <html>
   oder automatisch per prefers-color-scheme, solange nicht data-theme="light".
   Herkunft der Markenwerte: /workspace/level-up/capstone-rise-styleguide.md (3.1 bis 3.3, 4)

   VERBINDLICH: Diese Datei ist die einzige Quelle für UI-Farben und Typografie der App.
   Keine Hex-Werte in Blade-Templates oder anderen CSS-Dateien, nur var(--…).
   Statusfarben stammen ausschließlich aus der Markenpalette (Stein, Limestone, Gold, Pillar-Varianten).
   Rot (--danger, --danger-fill, Basis #A3302A) nur für Fehler: Formularfehler, fehlgeschlagene
   Aktionen, destruktive Bestätigung. Nie für Status wie «Absage» oder einen niedrigen Fit-Score.
   Status-Label «Gesendet» (Klasse .badge--gesendet), nicht «Versendet».
   Logo/Wordmark: Dateien von Capstone Brand (lockup.svg, lockup-dark.svg, icon.svg …), nicht verändern.
   ========================================================================== */

/* ---------- 1. Theme-unabhängige Tokens ---------- */
:root {
  /* Marken-Rohwerte Capstone Rise (nicht direkt in Komponenten verwenden) */
  --cr-obsidian: #0E0F12;
  --cr-slate: #1C1F26;
  --cr-chalk: #F6F3EE;
  --cr-limestone: #E8E3D9;
  --cr-mortar: #8A8F98;
  --cr-granite: #5A5F69;
  --cr-basalt: #3A3F48;
  --cr-gold: #C9A24A;
  --cr-gold-light: #E3C47A;
  --cr-gold-deep: #B08A3A;
  --cr-lapis-light: #7FA0D0;
  --cr-lapis-deep: #2F4C7A;
  --cr-lapis-tint: #DCE4F0;
  --cr-copper-light: #D9956A;
  --cr-copper-deep: #8A4B2A;
  --cr-copper-tint: #F3E2D6;
  --cr-sage-light: #8FBF9B;
  --cr-sage-deep: #3F6E4C;
  --cr-sage-tint: #DDEBDF;
  --cr-error: #A3302A;  /* kein Styleguide-Wert, Vorgabe Capstone Career, nur Fehler */

  /* Schrift */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Cormorant Garamond", "Cormorant", Garamond, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Type Scale (rem bei 16px Root) */
  --fs-xs: 0.75rem;    /* 12 */
  --fs-sm: 0.8125rem;  /* 13 */
  --fs-base: 0.9375rem;/* 15 */
  --fs-md: 1.0625rem;  /* 17 */
  --fs-lg: 1.25rem;    /* 20 */
  --fs-xl: 1.5rem;     /* 24 */
  --fs-2xl: 2rem;      /* 32, Cormorant Seitentitel */
  --fs-3xl: 2.75rem;   /* 44, Cormorant große Zahl */
  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-base: 1.5;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Spacing, 4px Basis */
  --sp-0: 0;
  --sp-1: 0.25rem;  /* 4 */
  --sp-2: 0.5rem;   /* 8 */
  --sp-3: 0.75rem;  /* 12 */
  --sp-4: 1rem;     /* 16 */
  --sp-5: 1.25rem;  /* 20 */
  --sp-6: 1.5rem;   /* 24 */
  --sp-8: 2rem;     /* 32 */
  --sp-10: 2.5rem;  /* 40 */
  --sp-12: 3rem;    /* 48 */
  --sp-16: 4rem;    /* 64 */

  /* Radien: Stein ist eher eckig, UI braucht trotzdem weiche Kanten */
  --radius-xs: 2px;
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 4px;
  --radius-pill: 999px;

  /* Motion */
  --dur-instant: 80ms;
  --dur-fast: 140ms;
  --dur-base: 200ms;
  --dur-slow: 320ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --touch-min: 44px;
  --topbar-h: 56px;
  --tabbar-h: 64px;
  --sidebar-w: 248px;
  --sidebar-w-collapsed: 72px;
  --content-max: 1280px;
  --reading-max: 72ch;
  --z-sticky: 10;
  --z-nav: 20;
  --z-overlay: 40;
  --z-toast: 50;
}

/* ---------- 2. Light (Standard) ---------- */
:root {
  color-scheme: light;
  --bg: #E8E3D9;  /* Limestone */
  --surface: #F6F3EE;  /* Chalk */
  --surface-raised: #FBFAF7;
  --surface-sunken: #E1DBCF;
  --selected: #ECE6DB;
  --border: #D3CCBE;
  --border-strong: #7A7F88;  /* Eingabefelder, 3.6:1 auf surface */
  --text: #0E0F12;  /* Obsidian */
  --text-secondary: #3A3F48;  /* Basalt */
  --text-muted: #5A5F69;  /* Granite */
  --primary: #2F4C7A;  /* Lapis Deep (Career Deep) */
  --primary-hover: #263F66;
  --on-primary: #F6F3EE;
  --primary-soft: #DCE4F0;
  --accent: #C9A24A;  /* Keystone Gold, nur Fläche/Linie */
  --accent-hover: #B08A3A;
  --accent-text: #765915;  /* Gold für Text auf hell, 5.1:1 auf Limestone */
  --on-accent: #0E0F12;
  --accent-soft: #F1E4C2;
  --link: #2F4C7A;
  --focus: #2F4C7A;
  --focus-halo: rgba(47, 76, 122, 0.25);
  --success: #3F6E4C;  /* Sage Deep */
  --success-bg: #DDEBDF;
  --warning: #8A4B2A;  /* Copper Deep */
  --warning-bg: #F3E2D6;
  --danger: #A3302A;  /* Basis-Fehlerrot, nur Fehler */
  --danger-bg: #F5DEDB;
  --danger-fill: #A3302A;  /* Fläche destruktiver Buttons, Text weiß 7.0:1 */
  --on-danger: #FFFFFF;
  --info: #2F4C7A;
  --info-bg: #DCE4F0;
  --st-neu: #2F4C7A;
  --st-neu-bg: transparent;
  --st-neu-bd: #7F95B8;
  --st-entwurf: #4A4F58;
  --st-entwurf-bg: #DDD7CB;
  --st-entwurf-bd: transparent;
  --st-bereit: #2F4C7A;
  --st-bereit-bg: #DCE4F0;
  --st-bereit-bd: transparent;
  --st-greenlight: #6B5013;
  --st-greenlight-bg: #F1E4C2;
  --st-greenlight-bd: #C9A24A;
  --st-gesendet: #F6F3EE;
  --st-gesendet-bg: #2F4C7A;
  --st-gesendet-bd: transparent;
  --st-interview: #8A4B2A;
  --st-interview-bg: #F3E2D6;
  --st-interview-bd: transparent;
  --st-angebot: #0E0F12;
  --st-angebot-bg: #C9A24A;
  --st-angebot-bd: transparent;
  --st-absage: #3A3F48;  /* neutral, nie rot */
  --st-absage-bg: transparent;
  --st-absage-bd: #7A7F88;
  --st-archiv: #5A5F69;
  --st-archiv-bg: transparent;
  --st-archiv-bd: #A9A294;
  --score-low: #5A5F69;
  --score-mid: #8A4B2A;
  --score-good: #3F6E4C;
  --score-track: #DDD7CB;
  /* Funnel-Balken (Dashboard), Reihenfolge Neu → Angebot, Stein zu Gold */
  --fn-neu: #A9A294;
  --fn-bereit: #7FA0D0;
  --fn-gesendet: #2F4C7A;
  --fn-interview: #D9956A;
  --fn-angebot: #C9A24A;
  --shadow-1: 0 1px 2px rgba(14, 15, 18, 0.06), 0 1px 1px rgba(14, 15, 18, 0.04);
  --shadow-2: 0 4px 12px rgba(14, 15, 18, 0.08), 0 1px 3px rgba(14, 15, 18, 0.06);
  --shadow-3: 0 16px 40px rgba(14, 15, 18, 0.14), 0 2px 6px rgba(14, 15, 18, 0.08);
  --scrim: rgba(14, 15, 18, 0.45);
}

/* ---------- 3. Dark (explizit) ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0E0F12;  /* Obsidian */
  --surface: #16181D;
  --surface-raised: #1C1F26;  /* Slate */
  --surface-sunken: #0A0B0D;
  --selected: #23272F;  /* heller als surface, nie dunkler */
  --border: #2A2E36;
  --border-strong: #6A707A;
  --text: #F6F3EE;  /* Chalk */
  --text-secondary: #E8E3D9;  /* Limestone */
  --text-muted: #8A8F98;  /* Mortar */
  --primary: #7FA0D0;  /* Lapis Light (Career Light) */
  --primary-hover: #9DB8E0;
  --on-primary: #0E0F12;
  --primary-soft: #1A2333;
  --accent: #C9A24A;
  --accent-hover: #E3C47A;
  --accent-text: #C9A24A;  /* 8.0:1 auf Obsidian */
  --on-accent: #0E0F12;
  --accent-soft: #2B2414;
  --link: #9DB8E0;
  --focus: #9DB8E0;
  --focus-halo: rgba(157, 184, 224, 0.30);
  --success: #8FBF9B;  /* Sage Light */
  --success-bg: #17271C;
  --warning: #D9956A;  /* Copper Light */
  --warning-bg: #2C1E16;
  --danger: #E8786E;  /* aus #A3302A aufgehellt, 6.2:1 auf surface */
  --danger-bg: #311C19;
  --danger-fill: #A3302A;  /* gleiche Fläche wie hell, Text weiß 7.0:1 */
  --on-danger: #FFFFFF;
  --info: #9DB8E0;
  --info-bg: #1A2333;
  --st-neu: #9DB8E0;
  --st-neu-bg: transparent;
  --st-neu-bd: #4A6490;
  --st-entwurf: #BCC0C8;
  --st-entwurf-bg: #262A31;
  --st-entwurf-bd: transparent;
  --st-bereit: #9DB8E0;
  --st-bereit-bg: #1A2333;
  --st-bereit-bd: transparent;
  --st-greenlight: #E3C47A;
  --st-greenlight-bg: #2B2414;
  --st-greenlight-bd: #8A6F2E;
  --st-gesendet: #0E0F12;
  --st-gesendet-bg: #7FA0D0;
  --st-gesendet-bd: transparent;
  --st-interview: #D9956A;
  --st-interview-bg: #2C1E16;
  --st-interview-bd: transparent;
  --st-angebot: #0E0F12;
  --st-angebot-bg: #C9A24A;
  --st-angebot-bd: transparent;
  --st-absage: #E8E3D9;
  --st-absage-bg: transparent;
  --st-absage-bd: #6A707A;
  --st-archiv: #8A8F98;
  --st-archiv-bg: transparent;
  --st-archiv-bd: #3A3F48;
  --score-low: #8A8F98;
  --score-mid: #D9956A;
  --score-good: #8FBF9B;
  --score-track: #2A2E36;
  --fn-neu: #5A5F69;
  --fn-bereit: #4A6490;
  --fn-gesendet: #7FA0D0;
  --fn-interview: #D9956A;
  --fn-angebot: #C9A24A;
  --shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-2: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.55);
  --scrim: rgba(0, 0, 0, 0.6);
}

/* ---------- 4. Dark (System), identisch zu 3, bei Änderungen beide Blöcke pflegen ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0E0F12;
    --surface: #16181D;
    --surface-raised: #1C1F26;
    --surface-sunken: #0A0B0D;
    --selected: #23272F;
    --border: #2A2E36;
    --border-strong: #6A707A;
    --text: #F6F3EE;
    --text-secondary: #E8E3D9;
    --text-muted: #8A8F98;
    --primary: #7FA0D0;
    --primary-hover: #9DB8E0;
    --on-primary: #0E0F12;
    --primary-soft: #1A2333;
    --accent: #C9A24A;
    --accent-hover: #E3C47A;
    --accent-text: #C9A24A;
    --on-accent: #0E0F12;
    --accent-soft: #2B2414;
    --link: #9DB8E0;
    --focus: #9DB8E0;
    --focus-halo: rgba(157, 184, 224, 0.30);
    --success: #8FBF9B;
    --success-bg: #17271C;
    --warning: #D9956A;
    --warning-bg: #2C1E16;
    --danger: #E8786E;
    --danger-bg: #311C19;
    --danger-fill: #A3302A;
    --on-danger: #FFFFFF;
    --info: #9DB8E0;
    --info-bg: #1A2333;
    --st-neu: #9DB8E0;
    --st-neu-bg: transparent;
    --st-neu-bd: #4A6490;
    --st-entwurf: #BCC0C8;
    --st-entwurf-bg: #262A31;
    --st-entwurf-bd: transparent;
    --st-bereit: #9DB8E0;
    --st-bereit-bg: #1A2333;
    --st-bereit-bd: transparent;
    --st-greenlight: #E3C47A;
    --st-greenlight-bg: #2B2414;
    --st-greenlight-bd: #8A6F2E;
    --st-gesendet: #0E0F12;
    --st-gesendet-bg: #7FA0D0;
    --st-gesendet-bd: transparent;
    --st-interview: #D9956A;
    --st-interview-bg: #2C1E16;
    --st-interview-bd: transparent;
    --st-angebot: #0E0F12;
    --st-angebot-bg: #C9A24A;
    --st-angebot-bd: transparent;
    --st-absage: #E8E3D9;
    --st-absage-bg: transparent;
    --st-absage-bd: #6A707A;
    --st-archiv: #8A8F98;
    --st-archiv-bg: transparent;
    --st-archiv-bd: #3A3F48;
    --score-low: #8A8F98;
    --score-mid: #D9956A;
    --score-good: #8FBF9B;
    --score-track: #2A2E36;
    --fn-neu: #5A5F69;
    --fn-bereit: #4A6490;
    --fn-gesendet: #7FA0D0;
    --fn-interview: #D9956A;
    --fn-angebot: #C9A24A;
  --fn-neu: #5A5F69;
  --fn-bereit: #4A6490;
  --fn-gesendet: #7FA0D0;
  --fn-interview: #D9956A;
  --fn-angebot: #C9A24A;
    --shadow-1: 0 0 0 1px rgba(255, 255, 255, 0.04);
    --shadow-2: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-3: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 16px 40px rgba(0, 0, 0, 0.55);
    --scrim: rgba(0, 0, 0, 0.6);
  }
}

/* ---------- 5. Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 0.15em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 4px var(--focus-halo); }
.t-title { font-family: var(--font-serif); font-weight: var(--fw-semibold); font-size: var(--fs-2xl); line-height: var(--lh-tight); letter-spacing: -0.01em; margin: 0; }
.t-h2 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); line-height: var(--lh-snug); margin: 0; }
.t-h3 { font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: var(--lh-snug); margin: 0; }
.t-label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.t-muted { color: var(--text-muted); }
.t-secondary { color: var(--text-secondary); }
.t-num, .tabular { font-variant-numeric: tabular-nums; }
.t-big-num { font-family: var(--font-serif); font-weight: var(--fw-semibold); font-size: var(--fs-3xl); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.brand-logo { display: inline-flex; align-items: center; flex: none; line-height: 0; padding: 4px; margin: -4px; border-radius: var(--radius-sm); }
.brand-logo img { display: block; height: 28px; width: auto; }            /* Lockup 5.21:1 => ca. 146 x 28 */
.brand-logo .brand-logo__icon { height: 32px; width: 32px; display: none; }
.brand-logo__dark { display: none !important; }
:root[data-theme="dark"] .brand-logo__light { display: none !important; }
:root[data-theme="dark"] .brand-logo__dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo__light { display: none !important; }
  :root:not([data-theme="light"]) .brand-logo__dark { display: block !important; }
}
@media (max-width: 599.98px) {
  :root:root .brand-logo .brand-logo__lockup { display: none !important; }
  .brand-logo .brand-logo__icon.brand-logo__light { display: block !important; }
  :root[data-theme="dark"] .brand-logo .brand-logo__icon.brand-logo__light { display: none !important; }
  :root[data-theme="dark"] .brand-logo .brand-logo__icon.brand-logo__dark { display: block !important; }
}
@media (max-width: 599.98px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo .brand-logo__icon.brand-logo__light { display: none !important; }
  :root:not([data-theme="light"]) .brand-logo .brand-logo__icon.brand-logo__dark { display: block !important; }
}

.keystone-line { display: block; width: 32px; height: 3px; background: var(--accent); border: 0; margin: 0; }

/* ---------- 6. Buttons ---------- */
.btn {
  --btn-bg: var(--surface-raised);
  --btn-fg: var(--text);
  --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--touch-min); padding: 0 var(--sp-4);
  font: inherit; font-weight: var(--fw-semibold); font-size: var(--fs-base); line-height: 1;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--radius-md);
  cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-instant) var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: color-mix(in srgb, var(--btn-bg) 88%, var(--text)); }
.btn:active { transform: translateY(1px); }
.btn--primary { --btn-bg: var(--primary); --btn-fg: var(--on-primary); --btn-bd: var(--primary); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--secondary { --btn-bg: var(--surface-raised); --btn-fg: var(--text); --btn-bd: var(--border-strong); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: transparent; }
.btn--ghost:hover { background: var(--selected); }
.btn--danger { --btn-bg: var(--danger-fill); --btn-fg: var(--on-danger); --btn-bd: var(--danger-fill); }
.btn--danger:hover { background: color-mix(in srgb, var(--danger-fill) 85%, #000); }
.btn--accent, .btn--greenlight { --btn-bg: var(--accent); --btn-fg: var(--on-accent); --btn-bd: var(--accent-hover); }
.btn--accent:hover, .btn--greenlight:hover { background: var(--accent-hover); }
.btn--sm { min-height: 36px; padding: 0 var(--sp-3); font-size: var(--fs-sm); }
.btn--lg { min-height: 52px; padding: 0 var(--sp-6); font-size: var(--fs-md); }
.btn--icon { width: var(--touch-min); padding: 0; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { position: relative; color: transparent; pointer-events: none; }
.btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--btn-fg); border-right-color: transparent;
  animation: cc-spin 0.7s linear infinite;
}
@keyframes cc-spin { to { transform: rotate(360deg); } }

/* ---------- 7. Card ---------- */
.card {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-5); box-shadow: var(--shadow-1); min-width: 0;
}
.card--raised { background: var(--surface-raised); box-shadow: var(--shadow-2); }
.card--interactive { cursor: pointer; transition: border-color var(--dur-fast) var(--ease-out); }
.card--interactive:hover { border-color: var(--border-strong); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }

/* ---------- 8. Badge ---------- */
.badge {
  --b-fg: var(--text-secondary); --b-bg: var(--surface-sunken); --b-bd: transparent;
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 var(--sp-2);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); line-height: 1; white-space: nowrap;
  color: var(--b-fg); background: var(--b-bg); border: 1px solid var(--b-bd); border-radius: var(--radius-sm);
}
.badge svg { width: 14px; height: 14px; }
.badge--success { --b-fg: var(--success); --b-bg: var(--success-bg); }
.badge--warning { --b-fg: var(--warning); --b-bg: var(--warning-bg); }
.badge--danger { --b-fg: var(--danger); --b-bg: var(--danger-bg); }
.badge--info { --b-fg: var(--info); --b-bg: var(--info-bg); }
.badge--neu { --b-fg: var(--st-neu); --b-bg: var(--st-neu-bg); --b-bd: var(--st-neu-bd); }
.badge--entwurf { --b-fg: var(--st-entwurf); --b-bg: var(--st-entwurf-bg); --b-bd: var(--st-entwurf-bd); }
.badge--bereit { --b-fg: var(--st-bereit); --b-bg: var(--st-bereit-bg); --b-bd: var(--st-bereit-bd); }
.badge--greenlight { --b-fg: var(--st-greenlight); --b-bg: var(--st-greenlight-bg); --b-bd: var(--st-greenlight-bd); }
.badge--gesendet { --b-fg: var(--st-gesendet); --b-bg: var(--st-gesendet-bg); --b-bd: var(--st-gesendet-bd); }
.badge--interview { --b-fg: var(--st-interview); --b-bg: var(--st-interview-bg); --b-bd: var(--st-interview-bd); }
.badge--angebot { --b-fg: var(--st-angebot); --b-bg: var(--st-angebot-bg); --b-bd: var(--st-angebot-bd); }
.badge--absage { --b-fg: var(--st-absage); --b-bg: var(--st-absage-bg); --b-bd: var(--st-absage-bd); }
.badge--archiv { --b-fg: var(--st-archiv); --b-bg: var(--st-archiv-bg); --b-bd: var(--st-archiv-bd); border-style: dashed; }
.badge--abgelehnt { --b-fg: var(--st-absage); --b-bg: var(--st-absage-bg); --b-bd: var(--st-absage-bd); border-style: dotted; }   /* eigene Ablehnung (nicht Arbeitgeber-Absage), nie rot */
.badge--estimated { --b-fg: var(--warning); --b-bg: transparent; --b-bd: currentColor; border-style: dashed; }

/* ---------- 9. Table ---------- */
.table-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.table th, .table td { padding: var(--sp-2) var(--sp-3); text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.table thead th {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--surface-raised); color: var(--text-muted);
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
}
.table tbody tr:hover { background: color-mix(in srgb, var(--selected) 55%, transparent); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; }
.table th[aria-sort] button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.table th[aria-sort] button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.table th[aria-sort="ascending"] button::after { content: "\2191"; color: var(--text); }
.table th[aria-sort="descending"] button::after { content: "\2193"; color: var(--text); }
.table th[aria-sort="none"] button::after { content: "\2195"; opacity: 0.45; }
@media (max-width: 719.98px) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); }
  .table--stack td { display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-1) 0; border: 0; text-align: right; }
  .table--stack td::before { content: attr(data-label); color: var(--text-muted); font-size: var(--fs-xs); text-align: left; }
  .table--stack td[data-primary] { display: block; text-align: left; font-size: var(--fs-base); font-weight: var(--fw-semibold); padding-bottom: var(--sp-2); }
  .table--stack td[data-primary]::before { content: none; }
}

/* ---------- 10. Formularfelder ---------- */
.field { display: grid; gap: 6px; margin-bottom: var(--sp-4); }
.field__label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text); }
.field__label .opt { font-weight: var(--fw-regular); color: var(--text-muted); }
.field__help { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.field__error { display: none; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--danger); margin: 0; }
.field__error svg { width: 16px; height: 16px; flex: none; }
.input, .select, .textarea {
  width: 100%; min-height: var(--touch-min); padding: var(--sp-2) var(--sp-3);
  font: inherit; color: var(--text); background: var(--surface-raised);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.textarea { min-height: 120px; line-height: var(--lh-base); resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); opacity: 1; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; box-shadow: 0 0 0 4px var(--focus-halo); }
.field[data-invalid] .input, .field[data-invalid] .select, .field[data-invalid] .textarea,
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }
.field[data-invalid] .field__error { display: flex; }
.field[data-valid] .input { border-color: var(--success); }
.input:disabled, .textarea:disabled { background: var(--surface-sunken); color: var(--text-muted); cursor: not-allowed; }

/* ---------- 11. Fit-Score ---------- */
/* Nutzung: <div class="score score--good" style="--score:78" role="img" aria-label="Fit-Score 78 von 100, passt">
             <span class="score__num">78</span></div> */
.score {
  --score: 0; --score-color: var(--score-mid); --size: 64px;
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--size); height: var(--size); border-radius: 50%;
  background: conic-gradient(var(--score-color) calc(var(--score) * 1%), var(--score-track) 0);
}
.score::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.score__num { position: relative; font-weight: var(--fw-bold); font-size: calc(var(--size) * 0.3); font-variant-numeric: tabular-nums; color: var(--text); line-height: 1; }
.score--sm { --size: 40px; }
.score--sm::before { inset: 4px; }
.score--lg { --size: 112px; }
.score--lg::before { inset: 9px; }
.score--lg .score__num { font-family: var(--font-serif); font-weight: var(--fw-semibold); font-size: 2.5rem; font-variant-numeric: lining-nums tabular-nums; }
.score--low { --score-color: var(--score-low); }
.score--mid { --score-color: var(--score-mid); }
.score--good, .score--top { --score-color: var(--score-good); }
.score--top::after { content: ""; position: absolute; top: -3px; left: 50%; width: 12px; height: 8px; transform: translateX(-50%); background: var(--accent); clip-path: polygon(0 0, 100% 0, 81% 100%, 19% 100%); }
.score-bar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--sp-2); min-width: 120px; }
.score-bar__track { height: 6px; border-radius: var(--radius-pill); background: var(--score-track); overflow: hidden; }
.score-bar__fill { display: block; height: 100%; width: calc(var(--score, 0) * 1%); background: var(--score-color, var(--score-mid)); border-radius: inherit; }
.score-bar__num { font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; min-width: 2.5ch; text-align: right; }
.score-bar.score--low { --score-color: var(--score-low); }
.score-bar.score--mid { --score-color: var(--score-mid); }
.score-bar.score--good, .score-bar.score--top { --score-color: var(--score-good); }
.score-bar.score--top::after, .score-bar::before { content: none; }

/* ---------- 12. Gap-Analyse ---------- */
.gap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.gap-item { display: grid; grid-template-columns: 24px 1fr auto; gap: var(--sp-3); align-items: start; padding: var(--sp-3); border-radius: var(--radius-md); background: var(--surface-raised); }
.gap-item__icon { width: 20px; height: 20px; margin-top: 1px; }
.gap-item__state { font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.gap-item--met .gap-item__icon, .gap-item--met .gap-item__state { color: var(--success); }
.gap-item--partial .gap-item__icon, .gap-item--partial .gap-item__state { color: var(--warning); }
.gap-item--missing .gap-item__icon, .gap-item--missing .gap-item__state { color: var(--text); }
.gap-item--missing { box-shadow: inset 3px 0 0 var(--text-muted); }
.gap-item__hint { grid-column: 2 / -1; font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }

/* ---------- 13. Toast + Dialog ---------- */
.toast-region { position: fixed; z-index: var(--z-toast); left: 50%; bottom: calc(var(--tabbar-h) + var(--sp-4)); transform: translateX(-50%); display: grid; gap: var(--sp-2); width: min(92vw, 420px); }
@media (min-width: 1024px) { .toast-region { left: auto; right: var(--sp-6); bottom: var(--sp-6); transform: none; } }
.toast { display: grid; grid-template-columns: 20px 1fr auto; gap: var(--sp-3); align-items: start; padding: var(--sp-3) var(--sp-4); background: var(--surface-raised); color: var(--text); border: 1px solid var(--border); border-left: 3px solid var(--info); border-radius: var(--radius-md); box-shadow: var(--shadow-3); font-size: var(--fs-sm); }
.toast--success { border-left-color: var(--success); }
.toast--danger { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warning); }
.toast--info { border-left-color: var(--info); }
.dialog { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0; width: min(92vw, 480px); background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow-3); }
.dialog::backdrop { background: var(--scrim); }
.dialog__body { padding: var(--sp-6); }
.dialog__foot { display: flex; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--border); }

/* ---------- 14. Navigation (Grundgerüst) ---------- */
.tabbar { position: fixed; z-index: var(--z-nav); inset: auto 0 0 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-raised); border-top: 1px solid var(--border); }
.tabbar a { display: grid; place-items: center; align-content: center; gap: 2px; min-height: var(--touch-min); color: var(--text-muted); text-decoration: none; font-size: 11px; font-weight: var(--fw-medium); position: relative; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--text); }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 24px; height: 3px; background: var(--accent); }
@media (min-width: 1024px) { .tabbar { display: none; } }
.sidenav a { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--touch-min); padding: 0 var(--sp-3); border-radius: var(--radius-md); color: var(--text-secondary); text-decoration: none; font-weight: var(--fw-medium); position: relative; }
.sidenav a:hover { background: var(--selected); color: var(--text); }
.sidenav a[aria-current="page"] { background: var(--selected); color: var(--text); }
.sidenav a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--accent); }
.sidenav a svg { width: 20px; height: 20px; flex: none; }

/* ---------- 15. Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .btn[aria-busy="true"]::after { animation: cc-spin 1.6s linear infinite !important; }
}
