:root {
  --primary: #65B32E;
  --primary-dark: #4f8f24;
  --secondary: #163F8B;
  --footer: #2D313A;
  --bg: #EAEAEA;
  --bg-card: #FFFFFF;
  --text: #110E11;
  --muted: #6b7280;
  --green: #4caf50;
  --red: #e53935;
  --amber: #ff9800;
  --radius: 14px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.topbar {
  background: var(--footer);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.logo { height: 36px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-name { color: #fff; font-size: 14px; }

.container { max-width: 960px; margin: 0 auto; padding: 16px 16px 60px; }
.view[hidden], .page[hidden] { display: none; }

h1 { font-size: 22px; margin-bottom: 8px; }
h2 { font-size: 20px; margin-bottom: 4px; }
h3 { font-size: 16px; margin: 24px 0 12px; color: var(--secondary); }
.muted { color: var(--muted); font-size: 14px; }
.hint { margin-top: 12px; }

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.tab {
  flex: 1;
  white-space: nowrap;
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.tab.active { background: var(--primary); color: #fff; }

/* Welcome */
.welcome { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }

/* Stats */
.grid.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat { text-align: center; padding: 20px 12px; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 30px; font-weight: 700; margin: 6px 0 2px; }
.stat-unit { font-size: 12px; color: var(--muted); }

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 8px;
}

/* Buttons & Inputs */
.btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn-block { display: block; width: 100%; text-align: center; margin-top: 16px; }

.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }
.input {
  width: 100%; padding: 12px; border: 1px solid #d1d5db;
  border-radius: 10px; font-size: 15px;
}

/* Tabellen */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #f0f0f0; }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; }

/* Pillen */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-green { background: #e6f4ea; color: var(--green); }
.pill-red { background: #fdecea; color: var(--red); }
.pill-amber { background: #fff4e5; color: #b26a00; }
.pill-blue { background: #e8f0fe; color: var(--secondary); }

/* Filter-Buttons */
.filter-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.filter-btn {
  padding: 8px 18px;
  border: none;
  background: #2D313A;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all .15s;
  opacity: 0.55;
}
.filter-btn:hover { opacity: 0.8; }
.filter-btn.active { opacity: 1; background: #2D313A; color: #fff; }

.badge {
  display: inline-block; padding: 1px 6px; margin-left: 4px;
  background: #163F8B; color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 600; vertical-align: middle;
}

/* Team-Grid mit Bild */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.team-member {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; background: #fafafa; border-radius: 12px;
}
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2D313A;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  width: 44px; height: 44px; border-radius: 50%;
  flex-shrink: 0;
}
.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-left: auto; }
.dot-green { background: var(--green); }
.dot-red { background: var(--red); }
.team-name { font-size: 13px; font-weight: 500; line-height: 1.2; }

/* Stunden */
.hours-chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 10px; }
.hbar { flex: 1; background: var(--primary); border-radius: 3px 3px 0 0; min-height: 2px; }

/* Login */
.login-card { max-width: 400px; margin: 40px auto; text-align: center; }

@media (min-width: 640px) {
  .grid.stats { grid-template-columns: repeat(4, 1fr); }
  .stat-value { font-size: 36px; }
}
