/* Bewusst ohne Framework/Build-Schritt geschrieben - eine handgeschriebene,
   schlanke CSS-Datei, die "mobile first" gedacht ist (Basis-Styles gelten
   fuers Handy, ab 640px wird fuer groessere Bildschirme angepasst). */

:root {
  --bg: #f7f6f3;
  --card-bg: #ffffff;
  --text: #23241f;
  --muted: #6b6d63;
  --border: #e3e1da;
  --primary: #4b6a52;      /* gedecktes Gruen, passend zu Yoga */
  --primary-dark: #3a5340;
  --danger: #b3492f;
  --ok: #4b6a52;
  --warn: #c8862c;
  --full: #b3492f;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

a { color: var(--primary-dark); }

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

header.topbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

header.topbar .container {
  padding-top: 12px;
  padding-bottom: 12px;
}

header.topbar h1 {
  font-size: 1.15rem;
  margin: 0 0 8px;
}

nav.mainnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

nav.mainnav a {
  text-decoration: none;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.92rem;
}

nav.mainnav a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.card h2, .card h3 { margin-top: 0; }

.list { display: flex; flex-direction: column; gap: 12px; }

.class-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.class-card .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.class-card .datetime { font-weight: 600; }
.class-card .title { color: var(--muted); }

.fill-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
  margin-top: 8px;
}

.fill-bar > span {
  display: block;
  height: 100%;
  background: var(--ok);
}

.fill-bar.warn > span { background: var(--warn); }
.fill-bar.full > span { background: var(--full); }

.fill-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 4px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: var(--border);
  color: var(--muted);
}

.badge.full { background: #f6dfd9; color: var(--full); }
.badge.warn { background: #f6ecd9; color: var(--warn); }
.badge.ok { background: #e2ebe3; color: var(--ok); }

form.stacked { display: flex; flex-direction: column; gap: 12px; }

label { font-size: 0.88rem; color: var(--muted); display: block; margin-bottom: 4px; }

input[type=text], input[type=number], input[type=email],
input[type=password], input[type=datetime-local], select, textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}

textarea { min-height: 70px; }

button, .btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

button:hover, .btn:hover { background: var(--primary-dark); }

.btn.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.btn.small { padding: 6px 10px; font-size: 0.85rem; }

.error {
  background: #f6dfd9;
  color: var(--danger);
  border: 1px solid #e3b9ab;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }

.participant-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.participant-row:last-child { border-bottom: none; }

.muted { color: var(--muted); font-size: 0.88rem; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  header.topbar h1 { font-size: 1.3rem; }
}

.login-wrap {
  max-width: 340px;
  margin: 80px auto;
}

.top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
