/* MB-Tool - dunkles Graphit wie im Redesign Studio.
   Akzente sind Rot und Blau aus dem Manoberg-Monogramm; das Signaturelement
   ist die rote Kante mit der um 2x4 px versetzten blauen Platte - die
   Fehlregistrierung aus dem Logo. --ink-3 ist heller als gestalterisch
   reizvoll, weil kleiner Text auf getoentem Grund sonst unter WCAG AA faellt. */
:root {
  --grund: #17181B;
  --flaeche: #1E2024;
  --flaeche-2: #25282D;
  --kante: #33373E;
  --ink: #F2F3F5;
  --ink-2: #C3C7CE;
  --ink-3: #9AA0AA;
  --rot: #FF4A42;
  --blau: #6D8FE8;
  --gruen: #5BC08C;
  --gelb: #E5B95C;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--blau); }
a:hover { color: #9DB5F0; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 20px; }

/* ---- Kopf ---- */
header.top {
  border-bottom: 1px solid var(--kante);
  background: var(--flaeche);
  position: sticky; top: 0; z-index: 10;
}
header.top .wrap {
  display: flex; align-items: center; gap: 16px;
  padding-block: 12px; flex-wrap: wrap;
}
.marke {
  font-weight: 700; letter-spacing: .01em; text-decoration: none; color: var(--ink);
  position: relative; padding-left: 14px;
  /* Darf schrumpfen: ein langer Kundenname schiebt sonst den Abmelden-Knopf
     bei 320 px aus dem Bild, und keine Pruefung meldet das. */
  flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere;
}
/* Rote Kante + versetzte blaue Platte */
.marke::before, .marke::after {
  content: ""; position: absolute; top: 2px; bottom: 2px; width: 4px; border-radius: 1px;
}
.marke::before { left: 2px; background: var(--blau); transform: translate(2px, 4px); }
.marke::after  { left: 2px; background: var(--rot); }
.top nav { margin-left: auto; display: flex; gap: 10px; align-items: center; flex: none; }

/* ---- Bausteine ---- */
.karte {
  background: var(--flaeche); border: 1px solid var(--kante);
  border-radius: var(--radius); padding: 18px; margin-block: 16px;
}
h1 { font-size: 24px; margin: 22px 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.leise { color: var(--ink-3); font-size: 13px; }
.reihe { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

input[type=text], input[type=email], input[type=password], input[type=url],
input[type=search], textarea, select {
  background: var(--flaeche-2); color: var(--ink);
  border: 1px solid var(--kante); border-radius: 8px;
  padding: 9px 11px; font: inherit; width: 100%; max-width: 100%;
}
input::placeholder, textarea::placeholder { color: #8A909B; }
input:focus-visible, textarea:focus-visible, select:focus-visible,
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--blau); outline-offset: 2px;
}
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.feld { margin-bottom: 12px; }
.gitter { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }

button, .knopf {
  background: var(--flaeche-2); color: var(--ink); border: 1px solid var(--kante);
  border-radius: 8px; padding: 9px 14px; font: inherit; cursor: pointer;
  text-decoration: none; display: inline-block;
}
button:hover, .knopf:hover { background: #2E3238; color: var(--ink); }
button.haupt { background: var(--rot); border-color: var(--rot); color: #fff; font-weight: 600; }
button.haupt:hover { background: #E23B34; }
button.gefahr { border-color: #6E2B28; color: #FF8A84; }
button.gefahr:hover { background: #3A1E1D; }

/* ---- Status ---- */
.status {
  display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--kante); color: var(--ink-2); white-space: nowrap;
}
.status.interesse { border-color: #2F6B4E; color: #7FD6A6; }
.status.kein_interesse { border-color: #6E2B28; color: #FF9A94; }
.status.kunde { border-color: #3A5EA8; color: #A8C0F5; }
.status.versendet { border-color: #6B5626; color: #EDC974; }
.status.intern { border-color: var(--kante); color: var(--ink-3); }

/* ---- Tabelle ---- */
.tabelle-rahmen { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--kante); vertical-align: top; }
th { color: var(--ink-3); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
tbody tr:hover { background: var(--flaeche-2); }
td.nowrap { white-space: nowrap; }

/* ---- Meldungen ---- */
.meldung { border-radius: 8px; padding: 10px 14px; margin-block: 10px; border: 1px solid var(--kante); }
.meldung.ok { border-color: #2F6B4E; background: #16241D; color: #9EE2BE; }
.meldung.fehler { border-color: #6E2B28; background: #2A1817; color: #FFAFA9; }

/* ---- Gespraech ---- */
.blase { border: 1px solid var(--kante); border-radius: var(--radius); padding: 11px 14px; margin-bottom: 10px; max-width: 46rem; }
.blase.intern { background: var(--flaeche-2); border-left: 3px solid var(--rot); }
.blase.kunde { background: #1B2330; border-left: 3px solid var(--blau); }
.blase p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.blase .wer { font-size: 12px; color: var(--ink-3); }

/* ---- Filter ---- */
.filter { display: flex; gap: 8px; flex-wrap: wrap; margin-block: 14px; }
.filter a {
  text-decoration: none; font-size: 13px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--kante); color: var(--ink-2);
}
.filter a.aktiv { border-color: var(--rot); color: var(--ink); background: #2A1B1A; }

/* Fortschritt des Sammelabgleichs */
.balken {
  height: 8px; border-radius: 999px; background: var(--flaeche-2);
  border: 1px solid var(--kante); overflow: hidden; margin-block: 10px;
  max-width: 34rem;
}
.balken span { display: block; height: 100%; background: var(--rot); }

.passwort-box {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 19px; letter-spacing: .04em; background: var(--flaeche-2);
  border: 1px dashed var(--blau); border-radius: 8px; padding: 10px 14px;
  display: inline-block; overflow-wrap: anywhere;
}

/* ---- Anmeldeseiten ---- */
.mitte { min-height: 100svh; display: grid; place-items: center; padding: 20px; }
.mitte .karte { width: min(100%, 400px); }

@media (max-width: 640px) {
  h1 { font-size: 20px; }
  .karte { padding: 14px; }
}
