/* ===============================
   Health Tracker – Modern Clean UI
   =============================== */

/* === Grundlayout === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --bg: #f5f6fb;
  --card-bg: #fff;
  --text: #222;
  --text-light: #555;
  --border: #e5e7eb;
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  --radius: 10px;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* === Navigation === */
.navbar {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  transition: 0.3s ease;
}

.nav-menu a:hover {
  background: var(--primary);
  color: #fff;
}

.nav-menu a.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* === Mobile Navigation === */
.nav-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
}

@media (max-width: 700px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 0.5rem;
  }

  .nav-menu.show {
    display: flex;
  }
}

/* === Container & Cards === */
.container {
  width: 100%;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.container h1 {
  font-size: 2rem;
  text-align: center;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.card h2 {
  font-size: 1.2rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.card p {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

/* === Buttons === */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.7rem 1.3rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  transition: 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.btn-danger {
  background: #ef4444;
}

.btn-danger:hover {
  background: #dc2626;
}

/* === Tabellen === */
.table-responsive {
  overflow-x: auto;
  margin-top: 0.75rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

table th,
table td {
  padding: 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table th {
  background: #f9fafb;
  color: var(--primary-dark);
  font-weight: 600;
}

table tr:hover {
  background: #f9fafb;
}

/* === Statusfarben === */
.status-normal {
  color: #16a34a;
}
.status-high {
  color: #dc2626;
}
.status-low {
  color: #2563eb;
}
.status-warning {
  color: #f59e0b;
}

/* === Charts === */
canvas {
  width: 100%;
  max-width: 100%;
  height: auto !important;
}

/* === Alerts === */
.alert {
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert.success {
  background: #d1fae5;
  color: #065f46;
}

.alert.error {
  background: #fee2e2;
  color: #7f1d1d;
}

/* === Footer === */
footer, .footer {
  text-align: center;
  color: #777;
  font-size: 0.85rem;
  margin-top: 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

/* === Mobile Optimierung === */
@media (max-width: 600px) {
  .container {
    margin: 1rem auto;
    padding: 0 0.6rem;
  }

  .card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .container h1 {
    font-size: 1.6rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}
