/* Stellen-Radar — dunkles Radar-Thema, mobile-first.
   Bewusst ohne Webfonts (CSP style-src 'self'): charaktervoller System-Stack
   statt Inter/Roboto-Einheitsbrei. */

:root {
    color-scheme: dark;
    --grund:      #0e1512;
    --flaeche:    #16201b;
    --flaeche-2:  #1c2822;
    --linie:      #2a3a32;
    --text:       #e6efe9;
    --text-2:     #93a89c;
    --radar:      #46e0a1;          /* Radar-Grün, Markenfarbe */
    --gruen:      #46e08c;
    --gelb:       #e8c453;
    --rot:        #e06a5a;
    --radius:     10px;
    --schrift:    "Avenir Next", Avenir, "Segoe UI Variable", "Segoe UI", Seravek, Verdana, sans-serif;
}

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

body {
    font-family: var(--schrift);
    background:
        radial-gradient(1100px 500px at 85% -10%, rgba(70, 224, 161, .07), transparent 60%),
        var(--grund);
    color: var(--text);
    font-size: 15px;
    line-height: 1.45;
    min-height: 100vh;
}

/* ---------- Login ---------- */
body.login { display: grid; place-items: center; }
.login-box {
    width: min(320px, 90vw);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    padding: 2rem 1.6rem;
    display: grid;
    gap: .9rem;
}
.login-box h1 {
    font-size: 1.3rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--radar);
    text-align: center;
}
.login-box h1::before { content: "◉ "; }
.login-box input {
    background: var(--grund);
    border: 1px solid var(--linie);
    border-radius: 6px;
    color: var(--text);
    padding: .65rem .8rem;
    font-size: 1rem;
}
.login-box input:focus { outline: 2px solid var(--radar); outline-offset: 1px; border-color: transparent; }
.fehler { color: var(--rot); font-size: .85rem; text-align: center; }

/* ---------- Kopf ---------- */
.kopf {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--linie);
    background: rgba(14, 21, 18, .92);
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(6px);
}
.kopf h1 {
    font-size: 1rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--radar);
}
.kopf h1::before { content: "◉ "; }
.status-nav { display: flex; gap: .25rem; margin-inline: auto; }
.status-nav a {
    color: var(--text-2);
    text-decoration: none;
    padding: .35rem .7rem;
    border-radius: 999px;
    font-size: .88rem;
    transition: color .15s, background-color .15s;
}
.status-nav a:hover { color: var(--text); }
.status-nav a.aktiv { background: var(--flaeche-2); color: var(--text); }
.status-nav .n {
    font-size: .72rem;
    color: var(--radar);
    font-variant-numeric: tabular-nums;
}
.logout button {
    background: none;
    border: 1px solid var(--linie);
    color: var(--text-2);
    border-radius: 6px;
    padding: .3rem .7rem;
    cursor: pointer;
    font-size: .8rem;
}
.logout button:hover { color: var(--rot); border-color: var(--rot); }

/* ---------- Filter ---------- */
.filter {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    padding: .8rem 1rem;
    max-width: 880px;
    margin: 0 auto;
}
.filter input[type="search"] { flex: 2 1 180px; }
.filter select { flex: 1 1 150px; }
.filter input, .filter select, .filter button {
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 6px;
    color: var(--text);
    padding: .5rem .7rem;
    font-size: .9rem;
    font-family: inherit;
}
.filter input:focus, .filter select:focus { outline: 2px solid var(--radar); outline-offset: 1px; }
.filter button { cursor: pointer; color: var(--grund); background: var(--radar); border: none; font-weight: 600; }
.filter button:hover { filter: brightness(1.12); }

/* ---------- Liste ---------- */
.liste {
    max-width: 880px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
    display: grid;
    gap: .7rem;
}
.leer { color: var(--text-2); text-align: center; padding: 3rem 0; }

.stelle {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .9rem;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-left: 4px solid var(--linie);
    border-radius: var(--radius);
    padding: .9rem 1rem;
}
.stelle.ampel-gruen { border-left-color: var(--gruen); }
.stelle.ampel-gelb  { border-left-color: var(--gelb); }
.stelle.ampel-rot   { border-left-color: var(--rot); opacity: .75; }

.score {
    align-self: start;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    background: var(--flaeche-2);
    border: 2px solid var(--linie);
    color: var(--text-2);
}
.score.ki { border-color: var(--radar); color: var(--radar); }

.inhalt { min-width: 0; }
.inhalt h2 { font-size: 1rem; font-weight: 600; margin-bottom: .15rem; }
.inhalt h2 a { color: var(--text); text-decoration: none; }
.inhalt h2 a:hover { color: var(--radar); text-decoration: underline; }
.meta { color: var(--text-2); font-size: .84rem; }
.meta strong { color: var(--gelb); font-weight: 600; }
.lohn { font-size: .9rem; margin-top: .3rem; font-variant-numeric: tabular-nums; }
.ampel-gruen .lohn { color: var(--gruen); }
.ampel-gelb  .lohn { color: var(--gelb); }
.ampel-rot   .lohn { color: var(--rot); }
.lohn .quelle { color: var(--text-2); font-size: .78rem; margin-left: .3rem; }
.gruende { color: var(--text-2); font-size: .78rem; margin-top: .25rem; }

.ki-urteil {
    margin-top: .5rem;
    padding: .5rem .7rem;
    background: var(--flaeche-2);
    border-radius: 6px;
    font-size: .86rem;
    border-left: 3px solid var(--radar);
}
.ki-urteil em { color: var(--text-2); font-style: normal; font-size: .8rem; }
.ki-urteil .tipp { margin-top: .3rem; color: var(--gelb); }

.aktionen { display: flex; flex-direction: column; gap: .35rem; align-self: start; }
.aktionen button {
    background: var(--flaeche-2);
    border: 1px solid var(--linie);
    color: var(--text);
    border-radius: 6px;
    padding: .35rem .7rem;
    font-size: .8rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s, color .15s;
}
.aktionen .merken:hover { border-color: var(--gruen); color: var(--gruen); }
.aktionen .weg:hover    { border-color: var(--rot); color: var(--rot); }
.aktionen button:hover  { border-color: var(--radar); }

@media (max-width: 560px) {
    .stelle { grid-template-columns: auto 1fr; }
    .aktionen { grid-column: 1 / -1; flex-direction: row; }
    .status-nav { order: 3; width: 100%; justify-content: center; }
}

/* ---------- Formseiten (Profil, Anschreiben) ---------- */
.kopf .heim { color: var(--radar); text-decoration: none; }
.formseite {
    max-width: 760px;
    margin: 0 auto 4rem;
    padding: 1.2rem 1rem;
}
.seitentitel { font-size: 1.15rem; margin-bottom: .4rem; }
.erklaerung { color: var(--text-2); font-size: .88rem; margin-bottom: 1.2rem; }
.erklaerung a { color: var(--radar); }
.ok-meldung { color: var(--gruen); margin-bottom: 1rem; font-size: .9rem; }
.fehler-meldung { color: var(--rot); margin-bottom: 1rem; font-size: .9rem; }

.feld { display: block; margin-bottom: 1.2rem; }
.feld-titel { display: block; font-weight: 600; margin-bottom: .15rem; }
.feld-hinweis { display: block; color: var(--text-2); font-size: .8rem; margin-bottom: .4rem; font-weight: 400; }
.formseite textarea {
    width: 100%;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 8px;
    color: var(--text);
    padding: .7rem .8rem;
    font-family: inherit;
    font-size: .92rem;
    line-height: 1.5;
    resize: vertical;
}
.formseite textarea:focus { outline: 2px solid var(--radar); outline-offset: 1px; }

.haupt-knopf {
    background: var(--radar);
    color: var(--grund);
    border: none;
    border-radius: 8px;
    padding: .7rem 1.4rem;
    font-size: .95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}
.haupt-knopf:hover { filter: brightness(1.12); }
.haupt-knopf:disabled { opacity: .6; cursor: wait; }
.neben-knopf {
    background: var(--flaeche-2);
    border: 1px solid var(--linie);
    color: var(--text);
    border-radius: 8px;
    padding: .7rem 1rem;
    font-size: .88rem;
    font-family: inherit;
    cursor: pointer;
}
.neben-knopf:hover { border-color: var(--radar); }
.knopf-zeile { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }

.stelle.detail { margin-bottom: 1.4rem; grid-template-columns: 1fr; }
.generieren { margin: 1.4rem 0; }
.generieren .erklaerung { margin-top: .6rem; }

.inserat-text { margin-top: 2rem; }
.inserat-text summary { color: var(--text-2); cursor: pointer; font-size: .88rem; }
.inserat-text pre {
    white-space: pre-wrap;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 8px;
    padding: 1rem;
    font-family: inherit;
    font-size: .85rem;
    color: var(--text-2);
    margin-top: .6rem;
}

.aktionen .schreiben-link {
    display: block;
    text-align: center;
    background: var(--flaeche-2);
    border: 1px solid var(--linie);
    color: var(--text);
    border-radius: 6px;
    padding: .35rem .7rem;
    font-size: .8rem;
    text-decoration: none;
    white-space: nowrap;
}
.aktionen .schreiben-link:hover { border-color: var(--radar); color: var(--radar); }
.aktionen .schreiben-link.fertig { border-color: var(--gruen); color: var(--gruen); }

/* ---------- Stelle hinzufügen ---------- */
.formseite input.voll {
    width: 100%;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 8px;
    color: var(--text);
    padding: .6rem .8rem;
    font-family: inherit;
    font-size: .92rem;
}
.formseite input.voll:focus { outline: 2px solid var(--radar); outline-offset: 1px; }
.feld-reihe { display: grid; grid-template-columns: 2fr 1fr; gap: .8rem; }
.trenner { border: none; border-top: 1px solid var(--linie); margin: 1.2rem 0; }
@media (max-width: 560px) { .feld-reihe { grid-template-columns: 1fr; } }

/* Beworben */
.aktionen .bewerben:hover, .neben-knopf.bewerben:hover { border-color: var(--radar); color: var(--radar); }
.meta .bw { color: var(--radar); }

/* Brief-Link als Knopf */
a.brief-link { text-decoration: none; display: inline-block; }
a.brief-link:hover { border-color: var(--radar); color: var(--radar); }

.stammdaten { margin: .8rem 0 0; max-width: 560px; }
.stammdaten .feld { margin-bottom: .8rem; }
