@import url('/farben.css');
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;600;700&family=Fredoka:wght@600&display=swap');

* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); color: var(--text); font: 15px/1.5 Figtree, system-ui, sans-serif; }
h1, h2, .logo { font-family: Fredoka, Figtree, sans-serif; font-weight: 600; }
h2 { font-size: 20px; margin: 0; }
h3 { font-size: 15px; margin: 18px 0 8px; }
button, select, input, textarea { font: inherit; color: var(--text); }
button { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: 7px 14px; cursor: pointer; }
button:disabled { background: var(--knopf-aus-grund); color: var(--knopf-aus-text); cursor: default; }
button.haupt { background: var(--akzent); color: var(--auf-akzent); border-color: var(--akzent); font-weight: 700; }
button.stopp { background: var(--fehler); color: var(--flaeche); border-color: var(--fehler); font-weight: 700; }
select, input, textarea { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: 7px 10px; }
textarea { width: 100%; margin: 6px 0; resize: vertical; }
label { display: block; font-size: 13px; color: var(--text2); margin: 8px 0; }
label input:not([type=checkbox]), label select { display: block; width: 100%; margin-top: 3px; }
label.haken { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); margin: 4px 12px 4px 0; }
.haken-reihe { display: flex; flex-wrap: wrap; }
pre { white-space: pre-wrap; word-break: break-word; font: inherit; margin: 6px 0 0; }

.kopf { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 12px 20px; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.logo { font-size: 18px; color: var(--akzent-schrift); }
nav { display: flex; gap: 4px; }
nav button { border: 0; background: none; }
nav button.an { background: var(--akzent-weich); font-weight: 700; }
.lampe { margin-left: auto; font-size: 13px; padding: 3px 12px; border-radius: 99px; background: var(--akzent-weich); }
.lampe.an { background: var(--akzent-2); color: var(--auf-akzent-2); font-weight: 700; }
/* Pillen: nur Pflaume-Toene, Mint nie fuer Status (Corporate Design). */
.pille { display: inline-block; font-size: 12px; line-height: 18px; padding: 1px 9px; border-radius: 99px; background: var(--flaeche-2); border: 1px solid var(--linie); white-space: nowrap; }
.pille.art-antwort, .pille.st-geantwortet, .pille.st-interessiert, .pille.st-registriert, .pille.st-kunde,
.pille.pr-gueltig, .pille.karte-pdf, .pille.karte-keine { background: var(--akzent-weich); border-color: var(--akzent-rand); color: var(--akzent-schrift); font-weight: 600; }
.pille.art-abmeldung, .pille.st-abgemeldet, .pille.st-bounce, .pille.pr-ungueltig, .pille.pr-riskant-website { background: var(--akzent); border-color: var(--akzent); color: var(--auf-akzent); }
.pille.pr-offen, .pille.karte-digital { color: var(--text2); background: none; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; padding: 14px 20px 0; }
.kachel { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 12px; }
.kachel b { font-size: 18px; }
.kachel span { font-size: 12px; color: var(--text2); }

.flaeche { display: flex; gap: 16px; padding: 14px 20px 40px; align-items: flex-start; }
#ansicht { flex: 1; min-width: 0; }
#detail { width: 440px; max-width: 100%; flex-shrink: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 18px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.schliessen { float: right; }
.daten { color: var(--text2); font-size: 13.5px; margin: 4px 0; word-break: break-word; }
.leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.leiste input[type=search] { min-width: 200px; flex: 1; }
.liste { list-style: none; margin: 0; padding: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; overflow: hidden; }
.liste li { padding: 11px 14px; border-bottom: 1px solid var(--linie-weich); cursor: pointer; }
.liste li:last-child { border-bottom: 0; }
.liste li.neu { background: var(--akzent-weich); }
.zeile1 { display: flex; align-items: center; gap: 8px; }
.zeile1 time { margin-left: auto; font-size: 12px; color: var(--text2); white-space: nowrap; }
.betreff { font-size: 14px; word-break: break-word; }
.vorschau { font-size: 13px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabelle { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--text2); padding: 8px 12px; border-bottom: 1px solid var(--linie); }
td { padding: 8px 12px; border-bottom: 1px solid var(--linie-weich); }
tbody tr { cursor: pointer; }
.tabelle tbody tr:hover { background: var(--flaeche-2); }
.anzahl { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--akzent-weich); color: var(--akzent-schrift); }
.leiste label.filter { margin: 0 0 0 auto; }
.filterleiste { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 14px; padding: 12px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; }
label.filter { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--text2); }
label.filter select { display: block; margin-top: 3px; min-width: 120px; max-width: 220px; padding: 5px 8px; font-size: 13.5px; }
label.filter.gesetzt select { border-color: var(--akzent); background: var(--akzent-weich); color: var(--akzent-schrift); font-weight: 600; }
.zuruecksetzen { margin-left: auto; font-size: 13px; padding: 6px 12px; }
.haupt-zeile { display: flex; align-items: center; gap: 8px; }
.prio { flex-shrink: 0; width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--flaeche-2); color: var(--text2); }
.prio-A { background: var(--akzent); color: var(--auf-akzent); }
.prio-B { background: var(--akzent-weich); color: var(--akzent-schrift); }
.neben { font-size: 12.5px; color: var(--text2); margin-top: 2px; }
.neben.warnung { color: var(--akzent-schrift); font-weight: 600; }
.mail { word-break: break-all; }
td { vertical-align: top; }
.pillen { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
dl.angaben { margin: 0; display: grid; gap: 4px; }
.angabe { display: grid; grid-template-columns: 120px 1fr; gap: 8px; font-size: 14px; }
.angabe dt { color: var(--text2); }
.angabe dd { margin: 0; word-break: break-word; }
#detail a { color: var(--akzent-schrift); }
.blaettern { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.block { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 14px; }
.verlauf article { border-left: 3px solid var(--linie); padding: 6px 0 6px 10px; margin-bottom: 10px; }
.verlauf article.ein { border-left-color: var(--akzent-2); }
.verlauf header { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text2); }
.leer { color: var(--text2); }
.fehler { color: var(--fehler); font-weight: 600; }
.meldung { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--akzent); color: var(--auf-akzent); padding: 9px 18px; border-radius: 10px; }
.meldung.fehler { background: var(--fehler); color: var(--flaeche); }
.meldung[hidden], .pille[hidden], #detail[hidden] { display: none; }

body.schlicht { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 16px; }
.karte { width: 100%; max-width: 420px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; padding: 28px; }
.karte h1 { margin-top: 0; font-size: 24px; }
.karte button { width: 100%; margin-top: 8px; padding: 11px; }

@media (max-width: 900px) {
  .flaeche { flex-direction: column; }
  #detail { width: 100%; position: static; max-height: none; }
}
