:root {
  --bg: #0a0a0f; --bg2: #12121a; --rand: #23232e;
  --gold: #ffd700; --gold-dunkel: #b89b00;
  --text: #f2f2f2; --leise: #9a9aa5;
  --blau: #3b82f6; --gruen: #22c55e; --rot: #b91c1c;
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--text);
  font: 15px/1.5 "Outfit", system-ui, -apple-system, sans-serif; }
a { color: inherit; text-decoration: none; }

.topbar { display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; border-bottom: 1px solid var(--rand); background: var(--bg);
  position: sticky; top: 0; z-index: 10; }
.logo { color: var(--gold); font-weight: 700; letter-spacing: 1px; font-size: 17px; }
.logo span { color: var(--text); }
.topbar-aktionen { display: flex; gap: 10px; }

.btn { border: 1px solid var(--rand); background: var(--bg2); color: var(--text);
  padding: 8px 16px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #14100a; }
.btn.gold:hover { background: #ffe14d; }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn.klein { padding: 4px 12px; font-size: 13px; }
.btn.gruen { border-color: var(--gruen); color: var(--gruen); background: transparent; }
.btn.rot { border-color: var(--rot); color: #f87171; background: transparent; }

.layout { display: flex; min-height: calc(100vh - 57px); }
.seite { width: 200px; padding: 18px 10px; border-right: 1px solid var(--rand);
  display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.seite a { padding: 9px 14px; border-radius: 8px; color: var(--leise); font-weight: 500;
  display: flex; justify-content: space-between; align-items: center; }
.seite a:hover { color: var(--text); background: var(--bg2); }
.seite a.aktiv { color: var(--gold); background: var(--bg2); border-left: 3px solid var(--gold); }
.seite a.leise { margin-top: auto; font-size: 13px; }
.badge { background: var(--rot); color: #fff; border-radius: 10px; font-size: 11px;
  padding: 1px 7px; font-weight: 700; }

main { flex: 1; padding: 24px; max-width: 1200px; }
h1 { font-size: 24px; margin-bottom: 18px; }
h2 { font-size: 17px; margin: 18px 0 10px; }
.meldung { background: #1a2e1a; border: 1px solid #2e5c2e; color: #a7e3a7;
  padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--bg2); border: 1px solid var(--rand); border-radius: 10px; padding: 14px; }
.kpi .wert { font-size: 26px; font-weight: 700; }
.kpi .label { color: var(--leise); font-size: 13px; }
.kpi.deal .wert { color: var(--gold); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.chip { border: 1px solid var(--rand); border-radius: 16px; padding: 4px 14px;
  color: var(--leise); font-size: 13px; font-weight: 600; }
.chip.aktiv, .chip:hover { color: var(--gold); border-color: var(--gold); }
.chips input { margin-left: auto; background: var(--bg2); border: 1px solid var(--rand);
  border-radius: 8px; padding: 7px 12px; color: var(--text); font: inherit; width: 210px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--leise); font-size: 12px; text-transform: uppercase;
  letter-spacing: .5px; padding: 8px 10px; border-bottom: 1px solid var(--rand); }
td { padding: 12px 10px; border-bottom: 1px solid var(--rand); vertical-align: middle; }
tr:hover td { background: var(--bg2); }
.casino-zelle { display: flex; align-items: center; gap: 10px; }
.favicon { width: 30px; height: 30px; border-radius: 8px; background: var(--bg2);
  border: 1px solid var(--rand); display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-weight: 700; flex-shrink: 0; overflow: hidden; }
.favicon img { width: 100%; height: 100%; object-fit: contain; }
.domain { color: var(--leise); font-size: 13px; }

.pille { border-radius: 12px; padding: 3px 12px; font-size: 12px; font-weight: 700;
  display: inline-block; white-space: nowrap; }
.pille.neu { background: #2a2a35; color: #c4c4cf; }
.pille.passt { background: #203049; color: #93c5fd; }
.pille.angeschrieben { background: #1e3a5f; color: #60a5fa; }
.pille.geantwortet { background: #3d3000; color: var(--gold); }
.pille.deal { background: #143622; color: #4ade80; }
.pille.aussortiert, .pille.abgelehnt { background: #3b1212; color: #f87171; }

.karte { background: var(--bg2); border: 1px solid var(--rand); border-radius: 12px;
  padding: 16px; margin-bottom: 14px; }
.karte.gold { border-color: var(--gold-dunkel); }
.mail-kopf { display: flex; justify-content: space-between; color: var(--leise);
  font-size: 13px; margin-bottom: 8px; gap: 10px; flex-wrap: wrap; }
.mail-text { white-space: pre-wrap; }
.detail-kopf { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.detail-spalten { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

form.inline { display: inline; }
textarea, input[type=text], input[type=email], input[type=password], select {
  width: 100%; background: var(--bg); border: 1px solid var(--rand); border-radius: 8px;
  padding: 9px 12px; color: var(--text); font: inherit; }
textarea { min-height: 140px; resize: vertical; }
label { display: block; color: var(--leise); font-size: 13px; margin: 10px 0 4px; }
.leiste { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.hinweis { color: var(--leise); font-size: 13px; }
.warn { color: #fbbf24; }

.login-box { max-width: 360px; margin: 12vh auto; }

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .seite { width: 100%; flex-direction: row; overflow-x: auto; border-right: 0;
    border-bottom: 1px solid var(--rand); padding: 8px; }
  .seite a { white-space: nowrap; }
  .seite a.aktiv { border-left: 0; border-bottom: 2px solid var(--gold); border-radius: 8px 8px 0 0; }
  .seite a.leise { margin-top: 0; }
  main { padding: 14px; }
  .detail-spalten { grid-template-columns: 1fr; }
  .topbar-aktionen .ghost { display: none; }
  th:nth-child(3), td:nth-child(3), th:nth-child(4), td:nth-child(4) { display: none; }
  .chips input { width: 100%; margin: 0; }
}
