/* =====================================================================
 * Talentmanager-Cockpit — Styles
 * Designsystem 1:1 aus dem Kunden-Cockpit übernommen
 * (Brand-Farben, Surfaces, Typo, Card-Primitives, Job-Grid).
 * Eigene Erweiterungen unten unter §3 (Sidebar-Betriebsliste, Logout).
 * ===================================================================== */

/* hidden-Attribut muss gegen CSS-display-Regeln gewinnen */
[hidden] { display: none !important; }

/* ===================================================================
 * §0 STATE-SCREENS (Login, Loading, Error, Empty)
 * =================================================================*/
.state-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 10;
}
.state-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 40px 48px;
  box-shadow: 0 1px 3px rgba(15, 30, 35, 0.05), 0 12px 40px rgba(15, 30, 35, 0.08);
  max-width: 480px;
  text-align: center;
}
.state-card h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: #0E1A1F;
}
.state-card p {
  font-size: 14px;
  line-height: 1.55;
  color: #5C6F76;
}
.state-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 20px;
  border: 3px solid #EAE8E1;
  border-top-color: #6EB85C;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Login-Formular */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}
.login-form input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid #EAE8E1;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  background: #FAFAF7;
  color: #0E1A1F;
  transition: all 0.15s ease;
}
.login-form input:focus {
  outline: none;
  border-color: #6EB85C;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(110, 184, 92, 0.15);
}
.login-form button {
  padding: 13px 20px;
  border-radius: 12px;
  background: #1B2E34;
  color: white;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: all 0.15s ease;
}
.login-form button:hover:not([disabled]) {
  background: #243B43;
  transform: translateY(-1px);
}
.login-form button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.login-error {
  font-size: 13px;
  color: #B91C1C;
  padding: 10px 12px;
  background: #FEE2E2;
  border-radius: 10px;
  text-align: left;
}

/* ===================================================================
 * §1 TOKENS
 * =================================================================*/
:root {
  --brand-petrol: #1B2E34;
  --brand-petrol-2: #243B43;
  --brand-green: #6EB85C;
  --brand-green-deep: #4F9E3D;
  --brand-green-soft: #E6F3DE;
  --brand-green-line: rgba(110, 184, 92, 0.3);

  --bg-outer: #EFE9E0;
  --bg-shell: #FFFFFF;
  --bg-tile: #FAFAF7;
  --bg-tile-hover: #F5F4EE;

  --ink: #0E1A1F;
  --ink-2: #2F4148;
  --ink-3: #5C6F76;
  --ink-4: #9DAAB0;

  --line: #EAE8E1;
  --line-soft: #F2F0E9;
  --line-strong: #DCD9D0;

  --amber: #B45309;
  --amber-soft: #FEF3C7;
  --red: #B91C1C;
  --red-soft: #FEE2E2;
  --blue: #1D4ED8;
  --blue-soft: #DBEAFE;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(15, 30, 35, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 30, 35, 0.04), 0 4px 12px rgba(15, 30, 35, 0.04);
  --shadow-shell: 0 1px 3px rgba(15, 30, 35, 0.05), 0 12px 40px rgba(15, 30, 35, 0.08);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  height: 100%;
}

body {
  background: var(--bg-outer);
  min-height: 100vh;
  padding: 24px;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50% 40% at 90% 5%, rgba(180, 220, 230, 0.45), transparent 60%),
    radial-gradient(40% 35% at 5% 90%, rgba(255, 220, 200, 0.4), transparent 70%),
    radial-gradient(60% 45% at 50% 50%, rgba(110, 184, 92, 0.06), transparent 80%);
}

/* ===================================================================
 * §2 APP SHELL
 * =================================================================*/
.app {
  position: relative;
  z-index: 1;
  background: var(--bg-shell);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-shell);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: grid;
  grid-template-columns: 288px 1fr 0;
  min-height: calc(100vh - 48px);
  overflow: hidden;
  transition: grid-template-columns 0.35s var(--ease-out);
}
.app--script-open {
  grid-template-columns: 288px 1fr 440px;
}

/* ===================================================================
 * §3 SIDEBAR (mit Betriebsliste + Suche + Logout)
 * =================================================================*/
.sidebar {
  border-right: 1px solid var(--line);
  padding: 28px 18px 20px;
  display: flex;
  flex-direction: column;
  background: var(--bg-shell);
  min-height: 100%;
}
.sidebar__top {
  padding: 0 10px 22px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 20px;
}
.sidebar__logo {
  height: 28px;
  margin-bottom: 6px;
}
.sidebar__logo svg, .sidebar__logo img { height: 100%; width: auto; display: block; }
.sidebar__claim {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
  letter-spacing: 0.01em;
  padding-left: 2px;
}

.sidebar__search {
  position: relative;
  margin-bottom: 14px;
}
.sidebar__search input {
  width: 100%;
  padding: 9px 12px 9px 32px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 12.5px;
  background: var(--bg-tile);
  color: var(--ink);
  transition: all 0.15s var(--ease-out);
}
.sidebar__search input:focus {
  outline: none;
  border-color: var(--brand-green);
  background: var(--bg-shell);
  box-shadow: 0 0 0 3px rgba(110, 184, 92, 0.12);
}
.sidebar__search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--ink-4);
  pointer-events: none;
}

.sidebar__nav-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  font-weight: 600;
  padding: 0 14px 8px;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
  min-height: 0;
}
/* Scrollbar in der Sidebar dezent halten */
.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-track { background: transparent; }
.sidebar__nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.sidebar__nav::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s var(--ease-out);
  border: 1px solid transparent;
  user-select: none;
}
.nav-item:hover {
  background: var(--bg-tile);
  color: var(--ink);
}
.nav-item.active {
  background: var(--brand-petrol);
  color: white;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.08), 0 6px 16px -4px rgba(15, 30, 35, 0.25);
}
.nav-item.active .nav-item__accent {
  background: var(--brand-green);
  box-shadow: 0 0 8px rgba(110, 184, 92, 0.5);
}
.nav-item.active .nav-item__meta {
  color: rgba(255, 255, 255, 0.65);
}
.nav-item__icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-tile);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  transition: all 0.15s var(--ease-out);
}
.nav-item.active .nav-item__icon {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.nav-item__body {
  flex: 1;
  min-width: 0;
}
.nav-item__label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.005em;
}
.nav-item__meta {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-item__accent {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  margin-left: auto;
  flex-shrink: 0;
}

.sidebar__user {
  padding: 14px;
  background: var(--bg-tile);
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-green), var(--brand-green-deep));
  color: white;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.user-info {
  min-width: 0;
  flex: 1;
}
.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-meta {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}
.user-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-green-deep);
  box-shadow: 0 0 0 2px rgba(110, 184, 92, 0.25);
  position: relative;
  flex-shrink: 0;
}
.user-live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--brand-green-deep);
  opacity: 0.4;
  animation: pulseRing 2s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Tool-Link (Skripte, externe Hilfen) zwischen User-Box und Logout */
.sidebar__tool {
  margin-top: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(110, 184, 92, 0.08), rgba(110, 184, 92, 0.03));
  border: 1px solid var(--brand-green-line);
  border-radius: var(--r-md);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 11px;
  transition: all 0.15s var(--ease-out);
}
.sidebar__tool:hover {
  background: linear-gradient(135deg, rgba(110, 184, 92, 0.16), rgba(110, 184, 92, 0.06));
  border-color: var(--brand-green);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -4px rgba(110, 184, 92, 0.3);
}
.sidebar__tool-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(110, 184, 92, 0.3);
}
.sidebar__tool-icon svg {
  width: 16px;
  height: 16px;
}
.sidebar__tool-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sidebar__tool-label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__tool-meta {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__logout {
  margin-top: 8px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink-3);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  transition: all 0.15s var(--ease-out);
}
.sidebar__logout svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.sidebar__logout:hover {
  background: var(--bg-tile);
  color: var(--ink);
  border-color: var(--line-strong);
}

/* ===================================================================
 * §4 CONTENT AREA
 * =================================================================*/
.content {
  overflow-y: auto;
  max-height: calc(100vh - 48px);
}
.content__header {
  padding: 36px 44px 28px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.content__breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-green-soft);
  color: var(--brand-green-deep);
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.005em;
}
.content__breadcrumb::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-green-deep);
}
.content__title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 8px;
}
.content__sub {
  font-size: 15px;
  color: var(--ink-3);
  letter-spacing: -0.005em;
}
.content__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  text-align: right;
  font-size: 12px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.content__meta-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.content__meta-key {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.content__meta-val {
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
}

.panels {
  padding: 32px 44px 56px;
}
.panel {
  display: none;
  animation: panelFadeIn 0.4s var(--ease-out);
}
.panel.active {
  display: block;
}
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================================================================
 * §5 CARD PRIMITIVE & JOB-GRID
 * =================================================================*/
.card {
  background: var(--bg-shell);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

.job-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
/* Bei offener Skript-Sidebar weniger horizontal Platz → 2 Spalten als Default */
.app--script-open .job-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.job-card { padding: 24px 26px 26px; }
.job-section-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}
.job-section-title svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
  color: var(--brand-green-deep);
  flex-shrink: 0;
}
.job-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}
.job-row:last-child { border-bottom: none; }
.job-key {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  flex-shrink: 0;
}
.job-val {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  letter-spacing: -0.005em;
  max-width: 60%;
  word-break: break-word;
}
.job-val a {
  color: var(--brand-green-deep);
  text-decoration: none;
}
.job-val a:hover { text-decoration: underline; }
.job-row--empty {
  font-size: 13px;
  color: var(--ink-4);
  font-style: italic;
  padding: 8px 0;
}
.job-benefits-block { margin-top: 14px; }
.job-benefits-block:first-child { margin-top: 0; }
.job-benefits-block .job-key {
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.benefit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.benefit-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 100px;
  background: var(--brand-green-soft);
  color: var(--brand-green-deep);
  border: 1px solid var(--brand-green-line);
  white-space: nowrap;
}
.benefit-chip--neutral {
  background: var(--bg-tile);
  color: var(--ink-2);
  border-color: var(--line);
}

/* Mehrzeilige Inhalts-Blöcke (Freitext) */
.job-block {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--bg-tile);
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
  white-space: pre-line;
}
.job-block:first-child { margin-top: 0; }
.job-block-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 8px;
}

/* Spezial-Highlight für Top-Story-Kacheln (Idealkandidat, Stärken) */
.job-card--highlight {
  background: linear-gradient(135deg, var(--brand-petrol) 0%, var(--brand-petrol-2) 100%);
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
}
.job-card--highlight::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 184, 92, 0.22), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}
.job-card--highlight > * { position: relative; z-index: 1; }
.job-card--highlight .job-section-title {
  color: white;
  border-color: rgba(255, 255, 255, 0.12);
}
.job-card--highlight .job-section-title svg {
  color: var(--brand-green);
}
.job-card--highlight .job-block {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
}
.job-card--highlight .job-block-label {
  color: var(--brand-green);
}

/* Priorität-Pill */
.prio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.prio-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.prio-pill--akut {
  background: var(--red-soft);
  color: var(--red);
}
.prio-pill--akut::before { background: var(--red); }
.prio-pill--mittel {
  background: var(--amber-soft);
  color: var(--amber);
}
.prio-pill--mittel::before { background: var(--amber); }
.prio-pill--niedrig {
  background: var(--blue-soft);
  color: var(--blue);
}
.prio-pill--niedrig::before { background: var(--blue); }

/* Empty-State innerhalb der Sidebar (z.B. „kein Treffer") */
.sidebar-empty {
  padding: 24px 14px;
  text-align: center;
}
.sidebar-empty span {
  font-size: 13px;
  color: var(--ink-3);
}

/* ===================================================================
 * §6 SKRIPT-SIDEBAR (rechte Slide-In-Sidebar, Talent-Scout-Skript)
 * =================================================================*/
.script-panel {
  border-left: 1px solid var(--line);
  background: var(--bg-shell);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  /* Im closed state ist die Spaltenbreite 0, Aside ist also einfach unsichtbar */
}
.script-panel__head {
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(180deg, var(--bg-shell) 0%, var(--bg-tile) 100%);
}
.script-panel__eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-green-deep);
  font-weight: 700;
  margin-bottom: 4px;
}
.script-panel__title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.script-panel__close {
  background: var(--bg-tile);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-3);
  flex-shrink: 0;
  transition: all 0.15s var(--ease-out);
}
.script-panel__close:hover {
  background: var(--brand-petrol);
  color: white;
  border-color: var(--brand-petrol);
}
.script-panel__close svg {
  width: 14px;
  height: 14px;
}
.script-panel__body {
  padding: 20px 22px 28px;
  overflow-y: auto;
  flex: 1;
}
.script-panel__body::-webkit-scrollbar { width: 6px; }
.script-panel__body::-webkit-scrollbar-track { background: transparent; }
.script-panel__body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.sp-section { margin-bottom: 24px; }
.sp-section:last-child { margin-bottom: 0; }

/* Pre-Call-Check als Checkliste */
.sp-precall {
  background: var(--bg-tile);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px 12px;
}
.sp-precall__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-green-deep);
  font-weight: 700;
  margin-bottom: 10px;
}
.sp-precall__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sp-precall__list li label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--ink-2);
  border-radius: 6px;
  transition: background 0.12s var(--ease-out);
}
.sp-precall__list li label:hover {
  background: rgba(110, 184, 92, 0.06);
}
.sp-precall__list input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: white;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all 0.12s var(--ease-out);
}
.sp-precall__list input[type="checkbox"]:checked {
  background: var(--brand-green);
  border-color: var(--brand-green);
}
.sp-precall__list input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.sp-precall__list input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}
.sp-precall__list input[type="checkbox"]:checked + span {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--ink-4);
}

/* Phasen-Header */
.sp-phase__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.sp-phase__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-petrol);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.sp-phase__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.sp-phase__meta {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 1px;
}

/* "Say"-Box (was der Scout sagt) */
.sp-say {
  background: var(--bg-shell);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-green);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 13px 15px 13px 17px;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  position: relative;
}
.sp-say::before {
  content: "🎙";
  font-size: 10px;
  margin-right: 6px;
  opacity: 0.5;
  filter: grayscale(40%);
}
.sp-say strong {
  color: var(--brand-green-deep);
  font-weight: 700;
}
.sp-ph {
  display: inline-block;
  background: var(--brand-green-soft);
  color: var(--brand-green-deep);
  padding: 1px 7px;
  border-radius: 4px;
  font-style: normal;
  font-weight: 600;
  font-size: 0.92em;
  border: 1px solid var(--brand-green-line);
}

/* Verzweigungen */
.sp-paths {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.sp-path {
  border-radius: var(--r-md);
  padding: 12px 14px;
  border: 1.5px solid;
}
.sp-path__tag {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  margin-bottom: 8px;
  color: white;
}
.sp-path__text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}
.sp-path__hint {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--ink-3);
  font-style: italic;
}
.sp-path__inputs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.sp-path__inputs label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 110px;
}
.sp-path__inputs label span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 600;
}
.sp-path__inputs input {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  background: white;
  color: var(--ink);
}
.sp-path__inputs input:focus {
  outline: none;
  border-color: var(--brand-green);
}
.sp-path--green {
  background: var(--brand-green-soft);
  border-color: var(--brand-green-line);
}
.sp-path--green .sp-path__tag {
  background: var(--brand-green);
}
.sp-path--amber {
  background: #FEF6E7;
  border-color: #F5C97B;
}
.sp-path--amber .sp-path__tag {
  background: #D88A2A;
}

/* Abschlussfrage am Ende eines Pfads */
.sp-path__question {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* Wichtige Aktions-Box (orange — z.B. „in Airtable eintragen + Schnellaktion") */
.sp-action {
  margin-top: 12px;
  padding: 11px 13px;
  background: #FCD9A6;
  border: 1.5px solid #D88A2A;
  border-radius: var(--r-md);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 1px 0 rgba(216, 138, 42, 0.08);
}
.sp-action__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #B86A1A;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.sp-action__text {
  font-size: 12.5px;
  line-height: 1.5;
  color: #5A3508;
}
.sp-action__text strong {
  color: #3A2105;
  font-weight: 700;
}

/* Bridge-Box (grün — kleine Aussage zwischen Pfaden und Note) */
.sp-bridge {
  margin: 12px 0;
  padding: 11px 14px;
  background: var(--brand-green-soft);
  border-left: 3px solid var(--brand-green-deep);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.sp-bridge__tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--brand-green-deep);
  margin-bottom: 4px;
}
.sp-bridge__text {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* Note */
.sp-note {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--bg-tile);
  border-left: 3px solid var(--line-strong);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 12.5px;
  color: var(--ink-2);
  font-style: italic;
  line-height: 1.55;
}
.sp-note::before {
  content: "💡 Notiz · ";
  font-style: normal;
  font-weight: 700;
  color: var(--ink-3);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sp-note strong {
  font-style: normal;
  color: var(--ink);
}

/* Airtable-Handoff */
.sp-handoff {
  margin-top: 12px;
  padding: 16px 18px;
  background: var(--brand-green-soft);
  border: 1.5px dashed var(--brand-green);
  border-radius: var(--r-md);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.sp-handoff__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}
.sp-handoff__label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-green-deep);
  font-weight: 700;
  margin-bottom: 2px;
}
.sp-handoff__text {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.sp-handoff__sub {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-top: 4px;
  line-height: 1.5;
}

/* Don'ts */
.sp-donts {
  padding: 14px 16px;
  background: #FFF4F4;
  border-left: 3px solid #C44;
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 13px;
}
.sp-donts__title {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #C44;
  font-weight: 700;
  margin-bottom: 8px;
}
.sp-donts ul {
  margin: 0;
  padding-left: 18px;
}
.sp-donts li {
  margin: 4px 0;
  color: var(--ink-2);
  line-height: 1.5;
}
.sp-donts strong { color: var(--ink); }

/* Footer */
.sp-footer {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--ink-4);
  text-align: center;
}

/* Tool-Button im Open-State markieren */
.sidebar__tool[data-open="true"] {
  background: linear-gradient(135deg, rgba(110, 184, 92, 0.22), rgba(110, 184, 92, 0.10));
  border-color: var(--brand-green);
  box-shadow: 0 4px 12px -4px rgba(110, 184, 92, 0.35);
}
.sidebar__tool[data-open="true"] .sidebar__tool-icon {
  background: var(--brand-green-deep);
}

/* ===================================================================
 * §7 RESPONSIVE
 * =================================================================*/
/* Tablet- und mittlerer Desktop-Bereich: Grid auf 2 Spalten reduzieren */
@media (max-width: 1280px) {
  .job-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app--script-open { grid-template-columns: 240px 1fr 400px; }
  .app--script-open .job-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .app--script-open { grid-template-columns: 240px 1fr 380px; }
  /* Bei offener Sidebar und engem Screen: 1 Spalte */
  .app--script-open .job-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  /* Hier wird's wirklich eng: Skript wird zum Overlay statt Grid-Column */
  .app--script-open { grid-template-columns: 288px 1fr 0; }
  .app--script-open .script-panel {
    position: fixed;
    top: 24px;
    right: 24px;
    bottom: 24px;
    width: 360px;
    z-index: 50;
    border-left: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: 0 12px 40px rgba(15, 30, 35, 0.18);
  }
}
/* Mobile: 1 Spalte */
@media (max-width: 760px) {
  body { padding: 0; }
  .app {
    grid-template-columns: 1fr;
    border-radius: 0;
    min-height: 100vh;
  }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
    max-height: 50vh;
  }
  .job-grid { grid-template-columns: 1fr; }
  .app--script-open .script-panel {
    top: 0; right: 0; bottom: 0;
    width: 100%;
    border-radius: 0;
  }
}
