:root {
  /* Farben */
  --bg: #0b1220;
  --bg-accent: #101a32;
  --fg: #e9eef7;
  --muted: #a9b4c7;
  --primary: #59b7ff;
  --primary-contrast: #051423;
  --danger: #ff4d4d;
  --warning: #ffa600;

  /* UI-Elemente */
  --radius: 10px;
  --shadow: 0 6px 16px rgba(0,0,0,.25);

  /* Abstände */
  --gap: 1.2rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  line-height: 1.4;
}

/* HEADER */
header {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 1800px;   /* war 1600px */
  margin: 0 auto;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  color: var(--fg);
}
.brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #7cd3ff 70%);
  color: var(--primary-contrast);
  font-weight: 900;
  font-size: 0.9rem;
}
.page-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

/* NAVIGATION */
nav {
  background: var(--bg-accent);
  padding: 0.6rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  gap: 1.2rem;
}
nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
nav a:hover {
  color: var(--primary);
}
nav a.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

/* CONTENT */
.container {
  width: 100%;
  max-width: 1800px;   /* war 1600px */
  margin: var(--gap) auto 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* DASHBOARD */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}
.card {
  background: var(--bg-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  text-align: center;
  transition: transform 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
}
.card h3 {
  font-size: 0.95rem;
  color: var(--muted);
}
.value {
  margin-top: 0.4rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
}

/* TABELLEN */
.table-wrapper {
  background: var(--bg-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
table th, table td {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.95rem;
}
table th {
  background: rgba(255,255,255,0.05);
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  position: relative;
}
table td {
  border-top: 1px solid rgba(255,255,255,0.05);
}
table tr:hover td {
  background: rgba(89,183,255,0.06);
}
/* Sortier-Indikatoren */
table th.asc::after {
  content: "▲";
  position: absolute;
  right: 8px;
  font-size: 0.8rem;
  color: var(--primary);
}
table th.desc::after {
  content: "▼";
  position: absolute;
  right: 8px;
  font-size: 0.8rem;
  color: var(--primary);
}

/* STATUS BADGES */
.status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status.active { background: rgba(89,183,255,0.15); color: var(--primary); }
.status.banned { background: rgba(255,77,77,0.15); color: var(--danger); }
.status.expired { background: rgba(169,180,199,0.15); color: var(--muted); }

/* BUTTONS */
button {
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-edit {
  background: var(--primary);
  color: var(--primary-contrast);
}
.btn-ban {
  background: rgba(255,166,0,0.2);
  color: var(--warning);
}
.btn-delete {
  background: rgba(255,77,77,0.2);
  color: var(--danger);
}
td button {
  margin-right: 4px;
}
td button:hover {
  opacity: 0.85;
}

/* SUCHE */
.table-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0;
  padding: 0 0.5rem;
}
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-accent);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 4px 8px;
  height: 32px; /* gleiche Höhe wie Tabellenzeilen */
}
.search-box .icon {
  margin-right: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-size: 0.9rem;
  width: 180px;
}
.search-box input::placeholder {
  color: var(--muted);
}

/* FOOTER */
footer {
  background: var(--bg-accent);
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: .8rem;
  padding: 12px 0;         /* nur vertikal */
  width: 100%;             /* volle Breite */
}

footer .footer-inner {
  max-width: 1800px;       /* zentriert auf gleiche Breite wie Header/Container */
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}
nav a i {
  color: var(--fg);       /* gleiche Farbe wie Text */
  margin-right: 6px;      /* Abstand zwischen Icon & Text */
  font-size: 0.95rem;     /* harmonische Größe */
}

