/* Rheinmarketing Manager: CI wie Website und Hub (Rheingrün, Signalgelb als einziger Akzent, Urbanist) */
@font-face { font-family: "Urbanist"; src: url("/Urbanist-var.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
:root {
  --gruen: #0B2E2C; --gelb: #F5FE90; --gras: #80B700; --sand: #FAF6F5; --weiss: #fff; --tief: #080B0F;
  --grau1: #616161; --grau2: #C3C3C2; --rahmen: rgba(11, 46, 44, .14); --rot: #B3261E; --rot-bg: #FCECEA;
  --ig: #C13584; --fb: #1877F2;
  --r-karte: 16px; --r-knopf: 12px;
  --schatten: 0 1px 2px rgba(11,46,44,.06), 0 8px 24px rgba(11,46,44,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 500 16px/1.5 "Urbanist", system-ui, sans-serif; color: var(--tief); background: var(--sand); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--gruen); text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 34px; line-height: 1.15; }
h2 { font-size: 22px; line-height: 1.25; }
h3 { font-size: 17px; }
.muted { color: var(--grau1); }
.small { font-size: 14px; }
.error { color: var(--rot); min-height: 1.5em; margin: 0; font-size: 15px; }

/* Schaltflächen */
button, .btn { font: 600 15px/1 "Urbanist", sans-serif; min-height: 44px; padding: 0 18px; border-radius: var(--r-knopf); border: 1px solid var(--rahmen); background: var(--weiss); color: var(--gruen); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; transition: background .15s, transform .1s, box-shadow .15s; }
button:hover, .btn:hover { background: #f1f4f3; }
button:active, .btn:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--gras); outline-offset: 2px; }
button.primary { background: var(--gruen); color: var(--weiss); border-color: var(--gruen); }
button.primary:hover { background: #12423f; }
button.primary .pfeil { background: var(--gelb); color: var(--gruen); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; margin-right: -8px; }
button.danger { color: var(--rot); }
button.link { border: 0; background: none; min-height: 0; padding: 4px 0; color: var(--gelb); text-decoration: underline; }
button[disabled] { opacity: .5; cursor: progress; }
input, textarea { font: 500 16px/1.4 "Urbanist", sans-serif; width: 100%; padding: 12px 14px; border: 1px solid var(--grau2); border-radius: var(--r-knopf); background: var(--weiss); color: var(--tief); }
textarea { min-height: 120px; resize: vertical; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }

/* Anmeldung */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(1200px 600px at 80% -10%, rgba(245,254,144,.35), transparent 60%), var(--sand); }
.login-card { width: min(420px, 100%); background: var(--weiss); border: 1px solid var(--rahmen); border-radius: 20px; padding: 32px; display: grid; gap: 16px; box-shadow: var(--schatten); }
.login-logo { height: 22px; width: auto; justify-self: start; }
.login-card h1 { font-size: 28px; }

/* Rahmen */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100%; }
.side { background: var(--gruen); color: var(--weiss); padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; }
.brand { display: grid; gap: 8px; padding: 0 8px; }
.brand-logo { height: 18px; width: auto; }
.brand span { color: var(--gelb); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
nav { display: grid; gap: 4px; }
nav a { color: rgba(255,255,255,.82); text-decoration: none; padding: 11px 12px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; transition: background .15s, color .15s; }
nav a:hover { background: rgba(255,255,255,.08); color: var(--weiss); }
nav a.aktiv { background: var(--gelb); color: var(--gruen); }
.badge { background: var(--gelb); color: var(--gruen); border-radius: 8px; font-size: 12px; padding: 2px 7px; }
nav a.aktiv .badge { background: var(--gruen); color: var(--gelb); }
.side-foot { margin-top: auto; display: grid; gap: 4px; padding: 0 8px; }
.side-foot .muted { color: rgba(255,255,255,.6); }
main { padding: 40px clamp(16px, 4vw, 56px) 80px; max-width: 1180px; width: 100%; outline: none; }

/* Kopf je Bereich */
.kopf { display: grid; gap: 10px; margin-bottom: 28px; }
.kopf p { margin: 0; max-width: 72ch; color: var(--grau1); font-size: 17px; }
.rechte { display: flex; flex-wrap: wrap; gap: 6px; }
.recht { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--weiss); border: 1px solid var(--rahmen); color: var(--gruen); padding: 6px 8px; border-radius: 8px; }
.recht[title] { cursor: help; }
.zeile { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.zeile.ende { justify-content: flex-end; }

/* Karten */
.karte { background: var(--weiss); border: 1px solid var(--rahmen); border-radius: var(--r-karte); padding: 22px; box-shadow: var(--schatten); }
.raster { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.konto { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; }
.konto img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: var(--sand); }
.zahlen { display: flex; gap: 22px; margin-top: 14px; }
.zahl b { display: block; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.zahl span { font-size: 13px; color: var(--grau1); }
.kanal { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 8px; border-radius: 8px; }
.kanal.fb, .kanal.messenger { background: #E7F0FE; color: #0B4FB3; }
.kanal.ig, .kanal.instagram { background: #FBE7F2; color: #8A1F5C; }
.hinweis { background: #FDFFE6; border: 1px solid #E8F07A; border-radius: var(--r-karte); padding: 16px 18px; color: var(--gruen); }
.hinweis b { display: block; margin-bottom: 4px; }
.fehlerbox { background: var(--rot-bg); border: 1px solid #F3C4BF; color: var(--rot); border-radius: 12px; padding: 12px 14px; font-size: 15px; }

/* Beitrag erstellen */
.erstellen { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; align-items: start; }
.feld { display: grid; gap: 14px; }
.kanaele { display: flex; gap: 10px; flex-wrap: wrap; }
.kanaele label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--grau2); border-radius: var(--r-knopf); padding: 10px 14px; font-weight: 600; cursor: pointer; background: var(--weiss); }
.kanaele input { width: 18px; height: 18px; accent-color: var(--gruen); }
.kanaele label:has(input:checked) { border-color: var(--gruen); box-shadow: inset 0 0 0 1px var(--gruen); }
.ablage { border: 1.5px dashed var(--grau2); border-radius: var(--r-karte); padding: 22px; text-align: center; color: var(--grau1); cursor: pointer; background: var(--weiss); transition: border-color .15s, background .15s; }
.ablage:hover, .ablage.ueber { border-color: var(--gruen); background: #f6f9f8; }
.ablage img { max-width: 100%; max-height: 260px; border-radius: 12px; display: block; margin: 0 auto 10px; }
.vorschau { position: sticky; top: 24px; }
.post-vorschau { border: 1px solid var(--rahmen); border-radius: 14px; overflow: hidden; background: var(--weiss); }
.post-vorschau .pk { display: flex; gap: 10px; align-items: center; padding: 12px 14px; font-weight: 600; }
.post-vorschau .pk img { width: 32px; height: 32px; border-radius: 50%; }
.post-vorschau .bild { aspect-ratio: 1; background: var(--sand); display: grid; place-items: center; color: var(--grau2); }
.post-vorschau .bild img { width: 100%; height: 100%; object-fit: cover; }
.post-vorschau .tx { padding: 12px 14px; white-space: pre-wrap; font-size: 15px; }
.schritte { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.schritte li { display: flex; gap: 10px; align-items: center; color: var(--grau1); }
.schritte li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--grau2); flex: none; }
.schritte li.fertig { color: var(--tief); }
.schritte li.fertig::before { background: var(--gras); border-color: var(--gras); }
.schritte li.jetzt::before { border-color: var(--gruen); border-top-color: transparent; animation: dreh .8s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .schritte li.jetzt::before { animation: none; } }

/* Listen */
.liste { display: grid; gap: 12px; }
.eintrag { display: grid; grid-template-columns: 72px 1fr; gap: 16px; }
.eintrag .thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--sand); }
.eintrag .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--grau1); margin-bottom: 4px; }
.eintrag .text { white-space: pre-wrap; word-break: break-word; }
.status { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 8px; background: var(--sand); color: var(--grau1); }
.status.neu { background: var(--gelb); color: var(--gruen); }
.status.raus, .status.beantwortet { background: #EAF6D6; color: #3E5C00; }
.status.fehler { background: var(--rot-bg); color: var(--rot); }
.antworten { margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--rahmen); display: grid; gap: 6px; font-size: 15px; }
.antworten .wir { color: var(--gruen); font-weight: 600; }
.antwortfeld { display: flex; gap: 8px; margin-top: 12px; }
.antwortfeld input { flex: 1; }

/* Nachrichten */
.postfach { display: grid; grid-template-columns: 320px 1fr; gap: 0; border: 1px solid var(--rahmen); border-radius: var(--r-karte); overflow: hidden; background: var(--weiss); min-height: 520px; box-shadow: var(--schatten); }
.gespraeche { border-right: 1px solid var(--rahmen); overflow: auto; max-height: 640px; }
.gespraech { display: grid; gap: 4px; padding: 14px 16px; border-bottom: 1px solid var(--rahmen); cursor: pointer; background: none; border-radius: 0; border-left: 0; border-right: 0; border-top: 0; text-align: left; width: 100%; min-height: 0; font-weight: 500; color: var(--tief); }
.gespraech:hover { background: #f6f9f8; }
.gespraech.aktiv { background: #FDFFE6; box-shadow: inset 3px 0 0 var(--gruen); }
.gespraech .oben { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-weight: 600; }
.gespraech .vorsch { color: var(--grau1); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verlauf { display: flex; flex-direction: column; }
.verlauf-kopf { padding: 14px 18px; border-bottom: 1px solid var(--rahmen); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.blasen { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 8px; overflow: auto; max-height: 460px; background: var(--sand); }
.blase { max-width: 72%; padding: 10px 14px; border-radius: 16px; background: var(--weiss); border: 1px solid var(--rahmen); white-space: pre-wrap; word-break: break-word; }
.blase.wir { align-self: flex-end; background: var(--gruen); color: var(--weiss); border-color: var(--gruen); }
.blase small { display: block; opacity: .65; font-size: 12px; margin-top: 4px; }
.fenster { font-size: 13px; font-weight: 600; padding: 4px 8px; border-radius: 8px; background: #EAF6D6; color: #3E5C00; }
.fenster.agent { background: #FFF3D6; color: #7A4B00; }
.fenster.zu { background: var(--rot-bg); color: var(--rot); }
.schreiben { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--rahmen); }
.schreiben input { flex: 1; }
.leer { padding: 40px; text-align: center; color: var(--grau1); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--gruen); color: var(--weiss); padding: 12px 18px; border-radius: 12px; box-shadow: var(--schatten); font-weight: 600; z-index: 10; }
.toast.fehler { background: var(--rot); }
.schritt-liste { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.schritt-liste li::marker { color: var(--gras); font-weight: 700; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 16px; gap: 14px; }
  nav { grid-auto-flow: column; overflow-x: auto; }
  nav a { white-space: nowrap; }
  .side-foot { display: none; }
  .erstellen, .postfach { grid-template-columns: 1fr; }
  .gespraeche { max-height: 240px; border-right: 0; border-bottom: 1px solid var(--rahmen); }
  h1 { font-size: 28px; }
}
.app > *, nav, .raster > *, .erstellen > *, .postfach > * { min-width: 0; }
@media (max-width: 900px) { main { padding-top: 24px; } .recht { font-size: 11px; } .eintrag { grid-template-columns: 56px 1fr; } .eintrag .thumb { width: 56px; height: 56px; } .antwortfeld { flex-wrap: wrap; } .antwortfeld input { flex-basis: 100%; } }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.kachel { background: var(--sand); border-radius: 12px; padding: 14px 16px; }
.kachel b { display: block; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--gruen); }
.kachel span { font-size: 14px; color: var(--grau1); }
.linie { margin: 8px 0 0; }
.linie figcaption { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.linie svg { width: 100%; height: 140px; display: block; }
.linie .strich { fill: none; stroke: var(--gruen); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.linie .flaeche { fill: rgba(128, 183, 0, .14); stroke: none; }
.linie .achse { display: flex; justify-content: space-between; font-size: 12px; color: var(--grau1); }
