/* ==========================================================================
   Reminder – Retro-Pixel-Modus (Easter Egg)
   Wird nur eingeblendet, wenn der Retro-Modus aktiv ist (🎮-Button).
   Bringt den alten NES.css-Look selbst-gehostet zurück.
   ========================================================================== */

* { box-sizing: border-box; }

html { background: #f0ede6; }

body {
  margin: 0;
  background: #f0ede6;
  color: #000;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* Pixel-Font für Überschriften & Buttons */
h1, h2, h3, .brand, .title,
legend, label, .stat-card strong,
.nes-btn span.txt, .nes-table thead th,
.pixel-font {
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  letter-spacing: 0;
}

/* --- Header --- */
header {
  background: #e8e5db;
  border-bottom: 4px solid #000;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  font-family: "Press Start 2P", monospace;
  font-size: 0.75rem;
  text-decoration: none;
  color: #000;
  background: #fff;
  border: 4px solid #000;
  padding: 0.4rem 0.7rem;
  box-shadow: inset -4px -4px 0 #d0d3d9, inset 4px 4px 0 #fff;
}
header nav { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
header nav a, header nav .nav-link {
  font-size: 0.85rem;
  color: #000;
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border: 2px solid #000;
  background: #fff;
  box-shadow: inset -2px -2px 0 #000;
}
header nav a:hover { background: #cfe0ff; }
header .user-badge {
  color: #000;
  font-size: 0.8rem;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-sep { color: #000; }

.icon-btn {
  background: #fff;
  border: 2px solid #000;
  color: #000;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: inset -2px -2px 0 #000;
}
.btn-logout { display: none; }
.icon-btn.active { background: #cfe0ff; }

/* - Haupt-Inhalt */
main { max-width: 1000px; margin: 2rem auto; padding: 0 1.25rem; }

h1 { font-size: 1.1rem; margin: 0 0 1.25rem; }
h2 { font-size: 0.9rem; margin: 1.5rem 0 0.75rem; }
h3 { font-size: 0.8rem; margin: 1.25rem 0 0.5rem; }
a { color: #000; }

.text-muted { color: #666; font-size: 0.8rem; }

hr { border: none; border-top: 4px solid #000; margin: 1.5rem 0; }

/* status */
.status-active { color: #0a0; font-weight: 700; }
.status-paused { color: #f90; font-weight: 700; }
.status-completed { color: #999; }
.status-error { color: #c00; font-weight: 700; }
.status-sent { color: #0a0; font-weight: 700; }
.status-failed { color: #c00; font-weight: 700; }
.status-bounced { color: #c00; font-weight: 700; }

/* Containers */
.nes-container {
  background: #fff;
  border: 4px solid #000;
  box-shadow: inset -4px -4px 0 #c9ccd4, inset 4px 4px 0 #fff;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.nes-container .title {
  font-family: "Press Start 2P", monospace;
  font-size: 0.7rem;
  margin-top: 0;
}

/* Buttons */
.nes-btn, button {
  display: inline-block;
  background: #fff;
  color: #000;
  border: 4px solid #000;
  box-shadow: inset -4px -4px 0 #000, inset 4px 4px 0 #fff;
  font-family: "Press Start 2P", monospace;
  font-size: 0.65rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}
.nes-btn:disabled { opacity: 0.5; cursor: default; }
.nes-btn.is-primary, .btn-primary {
  background: #000;
  color: #fff;
  box-shadow: inset -4px -4px 0 #333, inset 4px 4px 0 #fff;
}
.nes-btn.is-error { background: #c00; color: #fff; }
.nes-btn.is-success { background: #0a0; color: #fff; }
.nes-btn.is-warning { background: #f90; color: #000; }
.nes-btn.is-small {
  font-size: 0.55rem;
  padding: 0.3rem 0.5rem;
  border-width: 2px;
}

/* Formulare */
label { display: block; font-weight: 400; font-size: 0.75rem; margin: 0.8rem 0 0.3rem; }
input[type="text"], input[type="email"], input[type="number"],
input[type="date"], input[type="time"], input[type="datetime-local"],
input[type="password"], select, textarea {
  width: 100%;
  background: #fff;
  border: 3px solid #000;
  padding: 0.5rem 0.6rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: #000;
}
input[type="number"], input[type="date"], input[type="time"], input[type="datetime-local"] { width: auto; }
select { width: auto; }
textarea { resize: vertical; }
.nes-input, .nes-select, .nes-textarea { margin-bottom: 0.6rem; width: 100%; }
fieldset { border: 3px solid #000; padding: 1rem 1.25rem; margin: 1rem 0; }
legend { font-family: "Press Start 2P", monospace; font-size: 0.6rem; padding: 0 0.4rem; }
input[type="radio"], input[type="checkbox"] { width: auto; }

/* Tabellen */
.nes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: #fff;
  border: 4px solid #000;
}
.nes-table th, .nes-table td {
  border: 3px solid #000;
  padding: 0.5rem 0.7rem;
  text-align: left;
}
.nes-table thead th {
  background: #d3d3d3;
  font-family: "Press Start 2P", monospace;
  font-size: 0.55rem;
}
.nes-table.is-centered th, .nes-table.is-centered td { text-align: left; }
.nes-table a { color: #000; }

/* Stat-Karten */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
}
.stat-card {
  text-align: center;
  background: #fff;
  border: 4px solid #000;
  box-shadow: inset -4px -4px 0 #000, inset 4px 4px 0 #fff;
  padding: 1rem 0.5rem;
}
.stat-card strong {
  display: block;
  font-family: "Press Start 2P", monospace;
  font-size: 0.5rem;
  margin-bottom: 0.4rem;
}
.stat-number { font-size: 1.6rem; font-weight: 700; }

pre {
  background: #fff;
  border: 4px solid #000;
  padding: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}
code {
  background: #e8e5db;
  border: 2px solid #000;
  padding: 0.1rem 0.35rem;
}
.text-muted { color: #666; }
.inline-form { display: inline; margin: 0; }

details summary { cursor: pointer; font-weight: 700; color: #000; }

.wizard-card.selected {
  border-color: #000 !important;
  background: #cfe0ff !important;
}
.wizard-next-btn { background: #000; color: #fff; border-color: #000; }
.wizard-back-btn { background: #fff; border-color: #000; }

footer {
  max-width: 1000px;
  margin: 2rem auto 1.5rem;
  padding: 0 1.25rem;
  text-align: left;
  color: #666;
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  main { padding: 0 0.9rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}