/**
 * ═══════════════════════════════════════════════════════════════
 * AGENT-BASE.CSS — Design-System für alle civitasAI Lab-Agenten
 * Canonical Reference: Auswahlmaschine v8
 * ═══════════════════════════════════════════════════════════════
 * 
 * Nutzung: Jeder Agent bindet diese Datei ein:
 *   <link rel="stylesheet" href="../../_base.css">
 *   <link rel="stylesheet" href="../_agent-base.css">
 * 
 * und überschreibt nur spezifische Werte in seinem eigenen <style>.
 */

/* ── TOKENS ──
   Alle Farb- und Schrift-Tokens kommen aus _base.css (einzige Quelle).
   Fonts werden ebenfalls dort geladen. Hier KEINE :root-Definitionen anlegen. */

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

/* ── BASE ── */
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── LAYOUT ── */
.app-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  background: var(--card);
}

/* ── APP-HEADER (kicker + serif h1) ── */
.app-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}
.app-kicker {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 10px;
}
.app-header p {
  margin: 0;
  font-size: .9rem;
  color: var(--text3);
  max-width: 600px;
}

/* ── STEP-NAV ── */
.step-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 36px;
  overflow-x: auto;
}
.step-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text3);
  cursor: pointer;
  white-space: nowrap;
}
.step-btn.active { color: var(--text); border-bottom-color: var(--primary); }
.step-btn:disabled { color: #c5c2bc; cursor: not-allowed; }

/* ── FIELDSETS ── */
.fs {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 24px;
  margin-bottom: 20px;
}
.fs-collapsed { padding: 12px 16px; margin-bottom: 12px; }
.fs h3 { font-size: .95rem; font-weight: 700; margin: 0 0 16px; }
.fs h3 small { font-size: .72rem; font-weight: 400; color: var(--text3); margin-left: 8px; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 0;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.btn-primary:hover { background: var(--primary-h); }
.btn-secondary {
  display: inline-block;
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 0;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-secondary:hover { background: #e8e5e0; }
.btn-outline {
  display: inline-block;
  background: none;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 9px 16px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-outline:hover { background: #fdf5f5; }
.btn-coming {
  background: var(--bg2);
  color: var(--text3);
  border: 1px solid var(--border);
  cursor: not-allowed;
}

/* ── FORMS ── */
input, select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
  font-family: inherit;
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(192,57,43,.12);
}
input::placeholder, textarea::placeholder { color: var(--text3); }
label { font-weight: 600; font-size: .875rem; color: var(--text2); margin-bottom: 5px; display: block; }

/* ── CARDS ── */
.card {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s;
}
.card:hover { border-color: var(--primary); }
.card.selected { border-color: var(--primary); background: #fdf5f5; }

/* ── CHIPS / PILLS ── */
.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .75rem;
  background: var(--bg2);
  color: var(--text2);
  border: 1px solid var(--border);
  cursor: pointer;
}
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── LOADING ── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(250,250,248,.88);
  z-index: 100;
  justify-content: center;
  align-items: center;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOOLTIPS ── */
.tip-btn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text3);
  font-size: .7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
}
.tip-box {
  background: var(--text);
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: .8rem;
  max-width: 440px;
}

/* ── ICONS (GL-003 §5c) ──
   Inline-SVG, single-weight (stroke-width 1.5), monochrom via currentColor.
   Dekorativ: jedes SVG traegt aria-hidden="true" + focusable="false",
   Bedeutung traegt immer das sichtbare Textlabel daneben.
   Nutzung: <svg class="lab-icon" viewBox="0 0 24 24" stroke-width="1.5"
            stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"
            focusable="false"><path .../></svg> */
.lab-icon {
  width: 24px;            /* Situations-/Karten-Icon */
  height: 24px;
  flex: 0 0 auto;
  color: var(--text2);   /* Ruhezustand */
  stroke: currentColor;
  fill: none;
}
.lab-icon--tab {
  width: 20px;           /* Modus-Tab-Icon */
  height: 20px;
}

/* ── MOBILE ── */
@media (max-width: 600px) {
  .app-wrap { padding: 24px 16px 60px; }
  .card-grid { grid-template-columns: 1fr !important; }
  .btn-row { flex-direction: column; }
}
