/* intelliExperts Kandidaten-Matching — CI nach intelliexperts.de
   Farben: Lila #634B92 · Koralle #E74C3C · Petrol #009295 · Grau #F4F4F6
   Fonts:  Titillium Web (Fließtext) · Ubuntu Condensed (Überschriften) — lokal gebundelt */

@font-face { font-family: 'Titillium Web'; font-style: normal; font-weight: 300; src: url('/fonts/titillium-web-v9-latin-300.woff2') format('woff2'); }
@font-face { font-family: 'Titillium Web'; font-style: normal; font-weight: 400; src: url('/fonts/titillium-web-v9-latin-regular.woff2') format('woff2'); }
@font-face { font-family: 'Titillium Web'; font-style: normal; font-weight: 600; src: url('/fonts/titillium-web-v9-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Titillium Web'; font-style: normal; font-weight: 700; src: url('/fonts/titillium-web-v9-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Ubuntu Condensed'; font-style: normal; font-weight: 400; src: url('/fonts/ubuntu-condensed-v11-latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2') format('woff2'); }

:root {
  --lila: #634B92;
  --lila-dunkel: #4C3A70;
  --lila-hell: #EFEBF7;
  --rot: #E74C3C;
  --rot-dunkel: #C0392B;
  --teal: #009295;
  --teal-hell: #E3F4F4;
  --gruen: #2FA97C;
  --orange: #E8912D;
  --bg: #F4F4F6;
  --card: #FFFFFF;
  --border: #E5E5E5;
  --text: #55565A;
  --text-stark: #2E2F33;
  --text-leise: #8A8B90;
  --radius: 10px;
  --schatten: 0 1px 3px rgba(40, 30, 70, .07), 0 6px 18px rgba(40, 30, 70, .05);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: 'Titillium Web', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

h1, h2, h3 { font-family: 'Ubuntu Condensed', 'Titillium Web', sans-serif; font-weight: 400; color: var(--lila); margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
a { color: var(--rot); text-decoration: none; }
a:hover { color: var(--lila); text-decoration: underline; }
p { margin: 0 0 .8em; }

/* ---------- Kopfleiste ---------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px; min-height: 68px;
}
.topbar img.logo { height: 44px; display: block; }
.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a {
  color: var(--text); padding: 8px 14px; border-radius: 999px;
  font-size: .95rem; text-decoration: none;
}
.topbar nav a:hover { color: var(--lila); background: var(--lila-hell); }
.topbar nav a.aktiv { background: var(--lila); color: #fff; }
.llm-ampel { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-leise); white-space: nowrap; }
.llm-ampel .punkt { width: 10px; height: 10px; border-radius: 50%; background: #C9C9C9; }
.llm-ampel .punkt.ok { background: var(--gruen); box-shadow: 0 0 0 3px rgba(47,169,124,.18); }
.llm-ampel .punkt.fehler { background: var(--rot); box-shadow: 0 0 0 3px rgba(231,76,60,.15); }

/* ---------- Layout ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 32px 24px 80px; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--schatten);
  padding: 22px 24px; margin-bottom: 20px;
}
.zeile { display: flex; gap: 20px; flex-wrap: wrap; }
.zeile > * { flex: 1; min-width: 260px; }
.hinweis { font-size: .88rem; color: var(--text-leise); }
.abstand-oben { margin-top: 18px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Titillium Web', sans-serif; font-size: .86rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  border-radius: 999px; padding: 9px 20px; cursor: pointer;
  border: 1px solid transparent; transition: all .15s ease;
  background: var(--rot); color: #fff;
}
.btn:hover { background: var(--lila); color: #fff; text-decoration: none; }
.btn.sekundaer { background: transparent; color: var(--lila); border-color: var(--lila); }
.btn.sekundaer:hover { background: var(--lila); color: #fff; }
.btn.leise { background: transparent; color: var(--text); border-color: var(--border); text-transform: none; letter-spacing: 0; font-weight: 400; }
.btn.leise:hover { border-color: var(--lila); color: var(--lila); background: var(--lila-hell); }
.btn.klein { padding: 5px 14px; font-size: .78rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--rot); }
.btn.sekundaer:disabled:hover { background: transparent; color: var(--lila); }

/* ---------- Formulare ---------- */
label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-stark); margin: 14px 0 4px; }
input[type=text], input[type=url], textarea, select {
  width: 100%; font-family: inherit; font-size: .95rem; color: var(--text-stark);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; background: #fff;
}
input:focus, textarea:focus { outline: 2px solid var(--lila); outline-offset: 0; border-color: var(--lila); }
textarea.gross { min-height: 320px; resize: vertical; line-height: 1.5; font-size: .9rem; }

/* ---------- Statuskacheln (Dashboard) ---------- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kachel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--schatten); padding: 18px 20px; }
.kachel .wert { font-family: 'Ubuntu Condensed'; font-size: 2.3rem; color: var(--lila); line-height: 1.1; }
.kachel .titel { font-size: .85rem; color: var(--text-leise); }
.kachel.teal .wert { color: var(--teal); }

.banner-lokal {
  display: flex; align-items: center; gap: 12px;
  background: var(--teal-hell); border: 1px solid #BFE3E3; color: #056568;
  border-radius: var(--radius); padding: 12px 18px; margin-bottom: 24px; font-size: .92rem;
}
.banner-lokal svg { flex-shrink: 0; }
.banner-lokal code { background: rgba(255,255,255,.7); padding: 1px 7px; border-radius: 5px; font-size: .82rem; }

/* ---------- Tabellen ---------- */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-leise); font-weight: 600; padding: 8px 10px; border-bottom: 2px solid var(--border); }
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr.klickbar { cursor: pointer; }
tr.klickbar:hover td { background: var(--lila-hell); }

/* ---------- Badges & Chips ---------- */
.badge { display: inline-block; font-size: .74rem; font-weight: 600; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.badge.gruen { background: #E7F6EF; color: #1F7A57; }
.badge.orange { background: #FCF0DF; color: #A5691A; }
.badge.rotb { background: #FDECEA; color: #B03A2E; }
.badge.grau { background: #EFEFF2; color: var(--text-leise); }
.badge.lila { background: var(--lila-hell); color: var(--lila); }
.badge.teal { background: var(--teal-hell); color: #056568; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: .78rem; border-radius: 999px; padding: 2px 11px; border: 1px solid transparent; }
.chip.treffer { background: var(--teal-hell); color: #056568; border-color: #BFE3E3; }
.chip.fehlt { background: #fff; color: var(--text-leise); border-color: var(--border); text-decoration: line-through; text-decoration-color: rgba(138,139,144,.5); }
.chip.gewicht3 { font-weight: 700; }

/* ---------- Match-Karten ---------- */
.match-karte { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--schatten); margin-bottom: 14px; overflow: hidden; }
.match-kopf { display: flex; align-items: center; gap: 18px; padding: 16px 20px; cursor: pointer; }
.match-kopf:hover { background: #FAFAFC; }
.match-rang { font-family: 'Ubuntu Condensed'; font-size: 1.3rem; color: var(--text-leise); width: 34px; text-align: center; flex-shrink: 0; }
.match-wer { flex: 1; min-width: 220px; }
.match-wer .name { font-weight: 700; color: var(--text-stark); font-size: 1.02rem; }
.match-wer .rolle { font-size: .88rem; color: var(--text-leise); }
.match-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.match-score { text-align: right; flex-shrink: 0; width: 168px; }
.score-zahl { font-family: 'Ubuntu Condensed'; font-size: 1.9rem; line-height: 1; }
.score-zahl.hoch { color: var(--teal); }
.score-zahl.mittel { color: var(--orange); }
.score-zahl.niedrig { color: var(--text-leise); }
.score-balken { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.balken { height: 6px; border-radius: 3px; background: #EFEFF2; overflow: hidden; }
.balken > span { display: block; height: 100%; border-radius: 3px; }
.balken.sem > span { background: var(--lila); }
.balken.kw > span { background: var(--teal); }
.balken-label { display: flex; justify-content: space-between; font-size: .68rem; color: var(--text-leise); }
.match-detail { border-top: 1px solid var(--border); padding: 18px 20px 20px; background: #FBFBFD; display: none; }
.match-karte.offen .match-detail { display: block; }
.match-aktionen { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }

.ki-box { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--lila); border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; font-size: .93rem; }
.ki-box h4 { margin: 0 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lila); }
.ki-box.anschreiben { border-left-color: var(--rot); }
.ki-box.anschreiben h4 { color: var(--rot); }
.ki-box .inhalt strong { color: var(--text-stark); }
.ki-box .inhalt ul { margin: 4px 0 10px; padding-left: 20px; }
.ki-box .inhalt li { margin-bottom: 2px; }
.ki-box textarea { min-height: 260px; font-size: .9rem; margin-top: 8px; }
.cursor-blink::after { content: '▌'; color: var(--lila); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.faktencheck { display: flex; align-items: flex-start; gap: 10px; border-radius: 8px; padding: 10px 14px; font-size: .88rem; margin-bottom: 12px; }
.faktencheck.bestanden { background: #E7F6EF; color: #1F7A57; }
.faktencheck.auffaellig { background: #FCF0DF; color: #A5691A; }
.faktencheck.unklar { background: #EFEFF2; color: var(--text-leise); }
.faktencheck ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Gewichtungs-Slider ---------- */
.gewichtung { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gewichtung input[type=range] { flex: 1; min-width: 160px; accent-color: var(--lila); }
.gewichtung .seite { font-size: .82rem; color: var(--text-leise); white-space: nowrap; }
.gewichtung .seite strong { color: var(--lila); }
.gewichtung .seite.rechts strong { color: var(--teal); }

/* ---------- Fortschritt / Laden ---------- */
.laden { display: flex; align-items: center; gap: 12px; color: var(--text-leise); font-size: .92rem; padding: 10px 0; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--lila-hell); border-top-color: var(--lila); border-radius: 50%; animation: dreh .8s linear infinite; flex-shrink: 0; }
@keyframes dreh { to { transform: rotate(360deg); } }
.schritte { list-style: none; margin: 10px 0 0; padding: 0; font-size: .92rem; }
.schritte li { padding: 4px 0 4px 28px; position: relative; color: var(--text-leise); }
.schritte li::before { content: ''; position: absolute; left: 6px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: #D9D9DE; }
.schritte li.laeuft { color: var(--text-stark); }
.schritte li.laeuft::before { background: var(--orange); animation: pulsieren 1s ease infinite; }
.schritte li.fertig { color: var(--text); }
.schritte li.fertig::before { background: var(--gruen); }
@keyframes pulsieren { 50% { transform: scale(1.5); } }

/* ---------- Detail-Raster (Kandidat) ---------- */
.profil-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 6px 28px; font-size: .92rem; }
.profil-feld { padding: 7px 0; border-bottom: 1px dashed #ECECEF; }
.profil-feld .feldname { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-leise); }
.profil-feld .feldwert { color: var(--text-stark); }

/* ---------- Drop-Zone ---------- */
.dropzone {
  border: 2px dashed #CFCFD6; border-radius: var(--radius); padding: 36px 20px;
  text-align: center; color: var(--text-leise); background: #FAFAFC; cursor: pointer; transition: all .15s;
}
.dropzone:hover, .dropzone.drueber { border-color: var(--lila); background: var(--lila-hell); color: var(--lila); }

/* ---------- Fußzeile ---------- */
footer { border-top: 1px solid var(--border); background: #fff; margin-top: 40px; }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 18px 24px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; font-size: .82rem; color: var(--text-leise); }
footer .punkt-lokal { color: #056568; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--text-stark); color: #fff; border-radius: 999px; padding: 10px 22px;
  font-size: .9rem; opacity: 0; transition: all .25s ease; z-index: 100; pointer-events: none;
  max-width: 90vw;
}
#toast.zeigen { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.fehler { background: var(--rot-dunkel); }

@media (max-width: 760px) {
  .match-kopf { flex-wrap: wrap; }
  .match-score { width: 100%; text-align: left; }
  html { font-size: 15px; }
}
