:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.05);
  --transition: all 0.25s ease;
}

/* ===== Basis ===== */
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
h1, h2, h3, h4, h5 {
  margin-top: 0;
}

/* ===== Layout ===== */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--card);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 100;
}
.sidebar .logo {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 25px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: 6px;
  font-weight: 500;
  transition: var(--transition);
}
.sidebar nav a:hover,
.sidebar nav a.active {
  background: var(--primary);
  color: #fff;
}
.sidebar nav a.logout {
  margin-top: auto;
  background: #ef4444;
  color: #fff;
}
.sidebar nav a.logout:hover {
  background: #dc2626;
}

/* ===== Hauptinhalt ===== */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
.topbar {
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 90;
}
.user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.page {
  padding: 40px;
  flex: 1;
}

/* ===== Karten / Module ===== */
.card {
  background: var(--card);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 25px;
}
.card.hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* ===== Alerts ===== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 15px;
  font-weight: 500;
}
.alert-success {
  background: #dcfce7;
  color: #15803d;
}
.alert-danger {
  background: #fee2e2;
  color: #b91c1c;
}

/* ===== Lampenübersicht ===== */
.lampen-flex {
  display: flex;
  gap: 30px;
}
.lampen-spalte {
  flex: 1;
  min-width: 280px;
}
.lampen-spalte h5 {
  margin-bottom: 10px;
  color: var(--primary);
  font-weight: 600;
}
.lampenliste {
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
}
.lampenliste li {
  background: #fff;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lampenliste input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 10px;
}
.status {
  font-weight: 600;
  margin-left: 4px;
}

/* ===== Formular ===== */
.filter-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.filter-form input,
.filter-form button {
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid #ccc;
}
.filter-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
.filter-form button:hover {
  background: var(--primary-hover);
}

/* ===== Footer ===== */
footer {
  text-align: center;
  color: var(--muted);
  padding: 15px 0;
  font-size: 14px;
  border-top: 1px solid #e2e8f0;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .lampen-flex {
    flex-direction: column;
  }
}

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

  .sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    height: 100%;
    transition: left 0.3s ease;
    z-index: 999;
  }

  .sidebar.active {
    left: 0;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    cursor: pointer;
  }

  .page {
    padding: 20px;
  }

  .filter-form {
    flex-direction: column;
  }

  .filter-form input,
  .filter-form button {
    width: 100%;
  }
}

@media (max-width: 500px) {
  h2, h3, h4, h5 {
    font-size: 1rem;
  }

  .card {
    padding: 15px;
  }
}

.btn-pdf {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-pdf:hover {
  background: #1d4ed8;
}

.pdf-btn {
  display: inline-block;
  background: #2563eb;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.pdf-btn:hover {
  background: #1d4ed8;
}

