/* ============================================================
   360° Feedback für dein Team — Design-System
   Designsprache 1:1 aus Entscheidungsgrundlage v5 extrahiert.
   Externes Stylesheet (CSP-freundlich). Light-Theme, bewusst warm.
   ============================================================ */

:root {
  /* ---- Grundflächen & Text ---- */
  --bg:            #F8F7F3;
  --surface:       #ffffff;
  --surface-2:     #F1EFE8;
  --ink:           #1a1a18;
  --ink-2:         #444441;
  --muted:         #5F5E5A;
  --muted-2:       #888780;
  --line:          rgba(0,0,0,0.06);
  --line-2:        #D3D1C7;

  /* ---- Primär (Blau) ---- */
  --blue:          #185FA5;
  --blue-dark:     #0C447C;
  --blue-mid:      #85B7EB;
  --blue-soft:     #B5D4F4;
  --blue-bg:       #E6F1FB;
  --navy:          #1A3A5C;

  /* ---- Grün (positiv / Arbeitsverhalten) ---- */
  --green:         #0F6E56;
  --green-dark:    #085041;
  --green-bg:      #E1F5EE;
  --green-line:    #5DCAA5;
  --green-ink:     #27500A;

  /* ---- Amber (Belastbarkeit) ---- */
  --amber:         #854F0B;
  --amber-dark:    #633806;
  --amber-bg:      #FAEEDA;
  --amber-line:    #EF9F27;
  --amber-ink:     #412402;

  /* ---- Violett (Entwicklung) ---- */
  --purple:        #534AB7;
  --purple-dark:   #3C3489;
  --purple-bg:     #EEEDFE;
  --purple-line:   #AFA9EC;

  /* ---- Rot (K.O. / Fehler) ---- */
  --red:           #A32D2D;
  --red-strong:    #E5484D;
  --red-bg:        #FCEBEB;
  --red-line:      #F09595;
  --red-ink:       #791F1F;

  /* ---- Akzent (per Dimension überschrieben) ---- */
  --accent:        var(--blue);
  --accent-bg:     var(--blue-bg);
  --accent-ink:    var(--blue-dark);

  /* ---- Typografie ---- */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --fs:   15px;

  /* ---- Radius / Schatten / Abstände ---- */
  --r-sm: 8px;
  --r:    10px;
  --r-lg: 14px;
  --r-pill: 99px;
  --shadow: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --sp: 16px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: var(--fs);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   Layout
   ============================================================ */
.container { width: 90%; max-width: 1280px; margin: 0 auto; padding: 0 var(--sp); }
.container--narrow { max-width: 960px; }

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.app-header__inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; row-gap: 10px; }
.app-brand { display: flex; flex-direction: column; }
.app-brand__name { font-size: 15px; font-weight: 700; color: var(--ink); }
.app-brand__claim { font-size: 12px; color: var(--blue); font-style: italic; }
.app-nav  { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-left: 28px; }
.app-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }

@media (max-width: 1100px) {
  /* Logo (+ Benutzer-Chip rechts) oben, Nav als eigene Zeile darunter. */
  .app-nav { order: 3; width: 100%; margin-left: 0; }
}

.app-main { padding: 24px 0 40px; }

.app-footer {
  text-align: center;
  font-size: 11px;
  color: var(--muted-2);
  padding: 24px 16px 32px;
  line-height: 1.6;
}

.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--blue);
}
.page-title { font-size: 22px; margin: 6px 0 4px; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: 12px; }

/* ============================================================
   Cards & Sections
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp);
  margin-bottom: 12px;
}
/* Erste Card nach Titel/Text/Kopfzeile bekommt auch nach oben Luft. */
.eyebrow + .card, .page-title + .card, p + .card,
.row--between + .card, .alert + .card { margin-top: 12px; }
.card--sm { padding: 12px 14px; }
.card--accent { border-left: 3px solid var(--accent); }

.section-header { display: flex; align-items: center; gap: 10px; margin: 20px 0 10px; }
.section-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  background: var(--accent-bg); color: var(--accent-ink);
}
.section-title { font-size: 16px; font-weight: 600; }

/* Dimensions-Akzente (setzen --accent für Kindelemente) */
.dim--sozial      { --accent: var(--blue);   --accent-bg: var(--blue-bg);   --accent-ink: var(--blue-dark); }
.dim--arbeit      { --accent: var(--green);  --accent-bg: var(--green-bg);  --accent-ink: var(--green-dark); }
.dim--belastbar   { --accent: var(--amber);  --accent-bg: var(--amber-bg);  --accent-ink: var(--amber-dark); }
.dim--entwicklung { --accent: var(--purple); --accent-bg: var(--purple-bg); --accent-ink: var(--purple-dark); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1;
  padding: 11px 18px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); }

.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--surface-2); }

.btn--danger { background: var(--red); color: #fff; }
.btn--danger:hover { background: var(--red-ink); }

.btn--block { display: flex; width: 100%; }
.btn--sm { padding: 7px 12px; font-size: 12px; }

/* ============================================================
   Formulare
   ============================================================ */
.field { margin-bottom: 16px; }
.field__label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink); margin-bottom: 6px;
}
.field__req { color: var(--red); }
.field__hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

.input, .select, .textarea {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--ink);
  padding: 10px 12px; background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(24,95,165,0.12);
}
.input--error { border-color: var(--red-line); }
.input--error:focus { box-shadow: 0 0 0 3px rgba(163,45,45,0.12); }

.field__error { font-size: 12px; color: var(--red); margin-top: 5px; font-weight: 500; }

/* ============================================================
   Badges / Pills
   ============================================================ */
.badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid transparent;
}
.badge--role-admin      { background: var(--navy);      color: #fff; }
.badge--role-supervisor { background: var(--blue-bg);   color: var(--blue-dark); }
.badge--role-employee   { background: var(--green-bg);  color: var(--green-dark); }
.badge--pro             { background: var(--blue);      color: var(--blue-bg); }
.badge--neutral         { background: var(--surface-2); color: var(--muted); border-color: var(--line-2); }

/* Bewertungsstufen */
.rating { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); }
.rating--unter  { background: var(--red-bg);   color: var(--red); }
.rating--durch  { background: var(--amber-line); color: var(--amber-ink); }
.rating--gut    { background: #C0DD97;         color: var(--green-ink); }
.rating--heraus { background: var(--blue);     color: var(--blue-bg); }

/* 9 Einstufungs-Bänder */
.band { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); }
.band--schwach           { background: #E5484D; color: #fff; }
.band--ausbaufaehig      { background: #F09595; color: #5C1010; }
.band--solide            { background: #FAC775; color: #412402; }
.band--gefestigt         { background: #F5E077; color: #4A3A00; }
.band--etabliert         { background: #D9E8A0; color: #3D5215; }
.band--stark             { background: #C0DD97; color: #27500A; }
.band--sehr_stark        { background: #97C459; color: #1C3A06; }
.band--exzellent         { background: #85B7EB; color: #0C447C; }
.band--aussergewoehnlich { background: #185FA5; color: #E6F1FB; }

/* ============================================================
   Alerts / Info-Boxen
   ============================================================ */
.alert {
  border-radius: var(--r); padding: 11px 14px; font-size: 13px;
  line-height: 1.55; border: 1px solid transparent; margin-bottom: 12px;
}
.alert strong { font-weight: 600; }
.alert--info    { background: var(--blue-bg);  color: var(--blue-dark);  border-color: var(--blue-mid); }
.alert--success { background: var(--green-bg); color: var(--green-dark); border-color: var(--green-line); }
.alert--warn    { background: #FFF0C0;         color: #7A5800;           border-color: #EFD070; }
.alert--danger  { background: var(--red-bg);   color: var(--red);        border-color: var(--red-line); }

/* ============================================================
   Tabellen
   ============================================================ */
.table { width: 100%; border-collapse: collapse; }
.table th {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted-2);
  padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line);
}
.table td { font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table--zebra tbody tr:nth-child(even) { background: #FAFAF8; }

/* ============================================================
   Auth (Login / Passwort setzen)
   ============================================================ */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 28px 24px;
}
.auth-card__head { text-align: center; margin-bottom: 20px; }
.auth-card__title { font-size: 20px; margin: 6px 0 4px; }
.auth-card__sub { font-size: 13px; color: var(--muted); }
.auth-card__foot { margin-top: 16px; text-align: center; font-size: 12px; color: var(--muted); }

/* ============================================================
   Utilities
   ============================================================ */
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; }
.row--between { justify-content: space-between; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.hidden { display: none; }

@media (max-width: 500px) {
  .page-title { font-size: 19px; }
  .container { padding: 0 12px; }
}

/* ---- Vergleichs-Balken „Du vs. Team-Ø" (Blitzlicht-Ansatz, je Dimension) ---- */
.cmpbar__row   { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.cmpbar__label { flex: 0 0 58px; font-size: 12px; color: var(--muted); }
.cmpbar__track { flex: 1; height: 14px; background: var(--surface-2);
                 border-radius: 7px; overflow: hidden; }
.cmpbar__fill  { height: 100%; border-radius: 7px; min-width: 3px;
                 transition: width .4s ease; }
.cmpbar__fill--me   { background: var(--accent); }
.cmpbar__fill--team { background: var(--line-2); }
.cmpbar__value { flex: 0 0 46px; text-align: right; font-size: 12px;
                 font-weight: 600; color: var(--ink-2); }

/* ---- Aufklapp-Historie (Benutzer-Details) — natives <details>, kein JS ---- */
.acc {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); margin-bottom: 8px;
}
.acc__summary {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; cursor: pointer; list-style: none;
}
.acc__summary::-webkit-details-marker { display: none; }
.acc__summary::before {
  content: '▸'; color: var(--muted-2); font-size: 13px;
  transition: transform .15s ease;
}
.acc[open] > .acc__summary::before { transform: rotate(90deg); }
.acc__title { font-weight: 600; font-size: 14px; }
.acc__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.acc__body  { padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.acc__dim   {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 12px 0 4px; font-size: 13px;
}
.acc__dim:first-child { margin-top: 0; }
.acc__skills { list-style: none; margin: 0 0 4px; padding: 0; }
.acc__skills li {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 13px; padding: 4px 8px; border-radius: 4px;
}
.acc__skills li:nth-child(even) { background: #efefef; }
.acc__body > .btn { margin-top: 12px; }
