/* =========================================================
   Zentrale — Design A "Dunkles Glas"
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --accent: #10B981;
  --accent-light: #34D399;
  --accent-dark: #0D9668;
  --bg: #0A0E16;
  --text: #F1F4F9;
  --text-muted: #6B7386;
  --glass-bg: rgba(255,255,255,0.045);
  --glass-border: rgba(255,255,255,0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --danger: #F87171;
  --warn: #FBBF24;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(16,185,129,0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(16,185,129,0.06), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: 'Outfit', sans-serif; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Layout: Seitenleiste + Inhalt ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px; flex-shrink: 0;
  background: rgba(255,255,255,0.03); backdrop-filter: blur(18px);
  border-right: 1px solid var(--glass-border);
  padding: 1.5rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo { display: flex; align-items: center; gap: 0.7rem; padding: 0 0.4rem; margin-bottom: 2rem; }
.sidebar-logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  box-shadow: 0 6px 18px -6px rgba(16,185,129,0.5);
}
.sidebar-logo-text { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.05rem; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.65rem 0.75rem;
  border-radius: 10px; color: var(--text-muted); font-size: 0.87rem; font-weight: 500;
  margin-bottom: 0.15rem; transition: all 150ms ease;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.sidebar-nav a.active { background: rgba(16,185,129,0.14); color: var(--accent-light); }
.sidebar-nav .nav-section-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: #454B5C;
  padding: 1rem 0.75rem 0.4rem;
}
.sidebar-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--glass-border); }

.content { flex: 1; padding: 2rem 2.2rem; max-width: 1200px; }
.content-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.content-header h1 { font-size: 1.4rem; }

/* ---------- Kacheln / Karten ---------- */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--glass-bg); backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 1.4rem;
  transition: transform 180ms ease, border-color 180ms ease;
}
.card.clickable:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.15); cursor: pointer; }

.card-icon {
  width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 1.25rem; margin-bottom: 0.8rem;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-dark));
}
/* Globaler Icon-Fallback - ohne das rendern SVGs in der Nav/Buttons in
   Browser-Standardgröße (300x150px) statt als kleines Icon. */
svg { width: 1.1em; height: 1.1em; vertical-align: -0.15em; flex-shrink: 0; }
.sidebar-logo-mark svg, .card-icon svg { width: 55%; height: 55%; }
.card-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.3rem; color: var(--text); }
.card-value { font-size: 1.35rem; font-weight: 700; color: var(--accent-light); }
.card-value.danger { color: var(--danger); }
.card-value.warn { color: var(--warn); }
.card-meta { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.25rem; }

.text-sm { font-size: 0.85rem; }
.text-muted { color: var(--text-muted); }
.mono { font-family: 'JetBrains Mono', monospace; }

.btn {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.55rem 1rem;
  border-radius: 999px; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04);
  color: var(--text); font-size: 0.83rem; font-weight: 500; cursor: pointer; transition: all 150ms ease;
}
.btn:hover { background: rgba(255,255,255,0.08); }
.btn-primary { background: linear-gradient(135deg, var(--accent-light), var(--accent-dark)); border: none; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.78rem; }
.btn-danger { background: rgba(239,68,68,0.14); border-color: rgba(239,68,68,0.3); color: #FCA5A5; }

.flash { padding: 0.8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.87rem; }
.flash.success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6EE7B7; }
.flash.error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #FCA5A5; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 0.4rem; }
.status-dot.up { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.status-dot.down { background: var(--danger); box-shadow: 0 0 6px var(--danger); }
.status-dot.unknown { background: #4B5262; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.data-table th {
  text-align: left; font-weight: 600; color: var(--text-muted); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.05em; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--glass-border);
}
.data-table td { padding: 0.65rem 0.7rem; border-bottom: 1px solid var(--glass-border); }
.data-table tr:last-child td { border-bottom: none; }

/* ---------- Login-Seite ---------- */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }
.login-card { width: 100%; max-width: 380px; text-align: center; }
.login-card input {
  width: 100%; padding: 0.75rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04); color: var(--text); font-size: 0.9rem; margin-bottom: 0.8rem;
}

/* ---------- Mobile Navigation ---------- */
.mobile-topbar { display: none; }
.sidebar-backdrop { display: none; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }

  .mobile-topbar {
    display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1rem;
    background: rgba(255,255,255,0.03); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--glass-border); position: sticky; top: 0; z-index: 60;
  }
  .hamburger-btn {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 34px; height: 34px; background: none; border: none; cursor: pointer; padding: 0;
  }
  .hamburger-btn span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; z-index: 80;
    transform: translateX(-100%); transition: transform 220ms ease;
  }
  .sidebar.mobile-open { transform: translateX(0); }

  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 70; opacity: 0; pointer-events: none; transition: opacity 220ms ease;
  }
  .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }

  .content { padding: 1.2rem; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 1.1rem; }
  .btn { padding: 0.6rem 1rem; } /* größere Touch-Fläche */
}

/* ---------- Formulare ---------- */
.field { margin-bottom: 0.9rem; }
.field label { display: block; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.35rem; font-weight: 500; }
.field input, .field select {
  width: 100%; padding: 0.65rem 0.85rem; border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04); color: var(--text); font-size: 0.87rem;
}
.field-row { display: flex; gap: 1rem; }
.field-row .field { flex: 1; }
.offline-state { text-align: center; padding: 2.5rem 1.5rem; }
