/* ============================================================
   lean2sigma CD · Kunden-Cockpit
   Off-White #f4f3f0 · Text #17181a · Sekundär #4a4a48/#6b6a66/#9a9893
   Akzent #2EA3F2 (dunkler Text #0d1b26) · Tiefblau #1877b8
   Haarlinien #dcdad4 · keine Verläufe, keine Schatten, klare Kanten
   ============================================================ */

:root {
  --bg: #f4f3f0;
  --card: #ffffff;
  --ink: #17181a;
  --ink-2: #4a4a48;
  --ink-3: #6b6a66;
  --ink-4: #9a9893;
  --line: #dcdad4;
  --accent: #2EA3F2;
  --on-accent: #0d1b26;
  --link: #1877b8;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; }
.hidden { display: none !important; }
.shell { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Kopfzeile */
header { border-bottom: 1px solid var(--ink); background: var(--bg); }
.header-inner { display: flex; align-items: center; gap: 16px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
h1 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-4); }
.logo.l2s { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 15px; flex: none; }
nav#tabs { display: flex; gap: 20px; }
nav#tabs button { background: none; border: none; border-bottom: 2px solid transparent; padding: 6px 0; font: inherit; font-weight: 500; color: var(--ink-3); cursor: pointer; }
nav#tabs button:hover { color: var(--ink); }
nav#tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }
.user-box { margin-left: auto; position: relative; display: flex; align-items: center; }
.user-btn { font: inherit; font-weight: 500; display: flex; align-items: center; gap: 8px; background: none; border: 1px solid transparent; padding: 6px 10px; cursor: pointer; color: var(--ink-2); }
.user-btn:hover { color: var(--ink); border-color: var(--line); }
.user-caret { font-size: 10px; color: var(--ink-4); }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--card); border: 1px solid var(--ink); min-width: 200px; z-index: 40; }
.user-menu-head { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.user-menu-name { font-weight: 600; }
.user-menu-item { display: block; width: 100%; text-align: left; font: inherit; background: none; border: none; padding: 10px 14px; cursor: pointer; color: var(--ink-2); }
.user-menu-item:hover { background: var(--bg); color: var(--ink); }

/* Karten & Statistik */
.card { background: var(--card); border: 1px solid var(--line); padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.score-bar { display: flex; height: 10px; margin-top: 10px; background: #eeece6; }
.score-bar span { display: block; height: 100%; }
.score-bar .seg-pos { background: #7ba77b; }
.score-bar .seg-neg { background: #c25a5a; }
.score-bar .seg-offen { background: #2EA3F2; }
@media (max-width: 900px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
}
.stat-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-4); }
.stat-value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; }
.stat-hint { font-size: 12px; color: var(--ink-4); margin-top: 2px; }
h2.section { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-4); }
.mt { margin-top: 24px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }

/* Balken */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.bar-label { width: 176px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 13px; }
.bar-track { flex: 1; height: 16px; background: var(--bg); }
.bar-fill { height: 16px; background: var(--accent); }
.bar-fill.ink { background: var(--ink); }
.bar-fill.line { background: var(--line); }
.bar-fill.pos { background: #7ba77b; }
.bar-fill.neg { background: #c25a5a; }
.bar-num { width: 32px; text-align: right; font-weight: 600; }

/* Buttons */
.btn { font: inherit; font-weight: 500; border: 1px solid var(--ink); background: var(--card); color: var(--ink); padding: 9px 18px; cursor: pointer; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { opacity: 0.88; }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-3); }
.btn.ghost:hover { color: var(--ink); }
.btn.small { padding: 5px 12px; font-size: 13px; }

/* Formulare */
label { display: block; font-size: 13px; }
label > span { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); padding: 8px 10px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--link); }
textarea { resize: vertical; }
.f-row { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.f-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .f-row, .f-row.cols-2 { grid-template-columns: 1fr; } }

/* Tabelle */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th { text-align: left; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); border-bottom: 1px solid var(--ink); padding: 10px 12px; }
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--bg); }
.tbl-wrap { overflow-x: auto; }

/* Chips & Punkte */
.chip { display: inline-block; padding: 2px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
/* Statusfarben: Gewonnen = Grüntöne, Abgelehnt = Rottöne, alles andere = Blautöne (CD) */
.chip.neu      { background: #e3eefa; color: #14507c; }
.chip.arbeit   { background: #d3e9f8; color: #0d3b5c; }
.chip.versendet{ background: #bfe2f8; color: #0d1b26; }
.chip.feedback { background: #a7d7f5; color: #0d2f47; }
.chip.gewonnen { background: #dcead8; color: #1e4d1e; }
.chip.abgelehnt{ background: #edd9d9; color: #5c2626; }
.prio { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.prio.hoch { background: #c25a5a; }
.prio.mittel { background: #c69a3c; }
.ampel-ok { color: var(--accent); }
.ampel-warn { color: #c69a3c; }
.ampel-krit { color: #c25a5a; }

/* Dialog */
.overlay { position: fixed; inset: 0; background: rgba(23,24,26,0.4); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.dialog { background: var(--card); border: 1px solid var(--ink); width: 100%; max-width: 720px; max-height: 92vh; overflow-y: auto; padding: 24px; }
.dialog h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.hint { font-size: 12px; color: var(--ink-4); margin-top: 8px; }
.backlink { color: var(--link); font-weight: 600; font-size: 13px; }

/* Liste nächste Schritte */
.step-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 10px 0; cursor: pointer; }
.step-row:last-child { border-bottom: none; }
.step-row:hover { background: var(--bg); }
.step-title { font-weight: 500; white-space: nowrap; }
.step-text { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-date { margin-left: auto; white-space: nowrap; font-size: 12px; }

/* Trainer-Karten */
.trainer-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .trainer-grid { grid-template-columns: 1fr; } }
.trainer-card { cursor: pointer; }
.trainer-card:hover { border-color: var(--ink); }
.trainer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: var(--card); border: 1px solid var(--ink); padding: 32px; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { font-size: 20px; }
.login-card label { display: block; }
.error { border: 1px solid #c25a5a; color: #5c2626; background: #edd9d9; padding: 8px 10px; font-size: 13px; }

/* Fußzeile */
footer { border-top: 1px solid var(--ink); margin-top: 32px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; font-size: 12px; color: var(--ink-4); }

/* Donut-Diagramm (Kursarten) */
.pie { width: 100%; height: auto; display: block; font-family: var(--font); }
.pie-label { font-size: 12px; fill: #4a4a48; }
.pie-total { font-size: 24px; font-weight: 600; fill: #17181a; }
.pie-sub { font-size: 11px; fill: #9a9893; text-transform: uppercase; letter-spacing: 0.1em; }

