/* ─────────────────────────────────────────────
   admin.css – Login-Bereich (ergänzt styles.css)
   Nutzt dieselben Schwarz-Gold-Variablen.
   ───────────────────────────────────────────── */

.admin-body { min-height: 100vh; background: var(--bg); }
.muted { color: var(--muted); }

/* ── Zentrierte Screens (Boot / Login) ── */
.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 30px;
  text-align: center;
}
.login-brand { display: inline-block; font-size: 1.5rem; margin-bottom: 18px; }
.login-card h1 { font-size: 1.5rem; margin: 0 0 4px; }
.login-card .muted { margin: 0 0 22px; }
.login-card .field { text-align: left; }
.login-card .form-status { min-height: 1em; }

/* ── Topbar ── */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* Live-Indikator (grün pulsierend = verbunden) */
.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #555;
  flex-shrink: 0;
  transition: background 0.3s;
}
.live-dot.on {
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Toast / Live-Benachrichtigung */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 24px);
  z-index: 60;
  max-width: 90vw;
  padding: 13px 20px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--brand);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: 0.92rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; }
.role-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--muted);
  background: #222019;
  padding: 3px 9px;
  border-radius: 999px;
}
.role-badge.is-admin { color: var(--brand); background: rgba(var(--gold-rgb), 0.14); }

.btn-ghost {
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 38px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.btn-ghost:hover { border-color: var(--brand); }
.btn-ghost.danger:hover { border-color: var(--err); color: var(--err); }

/* ── Tabs ── */
.admin-tabs {
  display: flex;
  gap: 6px;
  max-width: 880px;
  margin: 22px auto 0;
  padding: 0 20px;
  flex-wrap: wrap;
}
.tab-btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 6px;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.is-active { color: var(--brand); border-color: var(--brand); }
.tab-btn[hidden] { display: none; }

/* ── Main / Panels ── */
.admin-main { max-width: 880px; margin: 0 auto; padding: 22px 20px 80px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.panel-head h2 { margin: 0; font-size: 1.4rem; letter-spacing: -0.02em; }
.block-title { font-size: 1.05rem; margin: 26px 0 12px; }
.empty-hint { padding: 28px 0; text-align: center; }
.inline-search {
  width: 260px;
  max-width: 100%;
  padding: 10px 13px;
  font: inherit;
  color: var(--text);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.inline-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.22); }

/* ── Filterleiste ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.filter-chip {
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 15px;
  min-height: 38px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.filter-chip:hover { color: var(--text); border-color: var(--line-2); }
.filter-chip.is-active {
  color: var(--brand);
  border-color: var(--brand);
  background: rgba(var(--gold-rgb), 0.14);
}

/* ── Anfragen-Liste ── */
.req-list { display: grid; gap: 14px; }
.req-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.req-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.req-top time { color: var(--muted); font-size: 0.82rem; }
.badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand);
  background: rgba(var(--gold-rgb), 0.14);
  padding: 3px 11px;
  border-radius: 999px;
}
.req-row { display: flex; gap: 10px; font-size: 0.92rem; padding: 3px 0; }
.req-row span { color: var(--muted); min-width: 78px; }
.req-row a { color: var(--brand); text-decoration: none; }
.req-msg {
  margin: 12px 0 0;
  padding: 12px 14px;
  background: var(--card-2);
  border-radius: 10px;
  white-space: pre-wrap;
  font-size: 0.93rem;
}

/* ── Dashboard ── */
.stat-total {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 8px;
}
.stat-num { font-size: 2.4rem; font-weight: 800; color: var(--brand); line-height: 1; }
.stat-lbl { color: var(--muted); margin-top: 4px; }
.stat-bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 34px; align-items: center; gap: 12px; }
.bar-label { font-size: 0.9rem; }
.bar-label i { color: var(--muted); font-style: normal; font-size: 0.78rem; }
.bar-track { height: 12px; background: var(--card-2); border-radius: 999px; overflow: hidden; }
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
  border-radius: 999px;
  min-width: 2px;
  transition: width 0.4s ease;
}
.bar-count { text-align: right; font-weight: 700; }

/* ── Mitarbeiter ── */
.add-user {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 18px;
  margin-bottom: 18px;
}
.add-user summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.add-user-form { padding: 6px 0 16px; }
.user-list { display: grid; gap: 14px; }
.user-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.user-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.user-actions { display: flex; gap: 8px; }
.assign-title { margin: 14px 0 8px; font-size: 0.85rem; color: var(--muted); }
.assign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.assign-box {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
}
.assign-box input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.assign-box i { color: var(--muted); font-style: normal; font-size: 0.76rem; }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }
.save-hint { margin-left: 12px; font-size: 0.85rem; }

@media (max-width: 560px) {
  .bar-row { grid-template-columns: 110px 1fr 28px; gap: 8px; }
  .inline-search { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot.on { animation: none !important; }
  .toast { transition: opacity 0.25s; }
}
