* { box-sizing: border-box; }
input, select, textarea, button {
  font-family: inherit;
  font-size: 1rem;
}
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f6f8;
  color: #1a1a1a;
}
.banner {
  width: 100%;
  height: 90px;
  background: #0b1e33;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 1.2rem;
  font-weight: 600;
}
#app { padding: 24px; max-width: 900px; margin: 0 auto; }

.card {
  background: #fff;
  border: 1px solid #e2e5e9;
  border-radius: 12px;
  padding: 24px;
  max-width: 380px;
  margin: 40px auto;
}
.card h1 { font-size: 1.3rem; margin: 0 0 16px; text-align: center; }
.card input {
  display: block; width: 100%; padding: 10px; margin-bottom: 12px;
  border: 1px solid #ccc; border-radius: 6px; font-size: 1rem;
}
.btn {
  display: block; width: 100%; padding: 11px; border-radius: 8px; border: none;
  font-size: 1rem; font-weight: 600; cursor: pointer; margin-bottom: 10px;
}
.btn-primary { background: #0068ff; color: #fff; }
.btn-secondary { background: #fff; color: #1a1a1a; border: 1px solid #e2e5e9; }
.btn-danger { background: #fff; color: #c0392b; border: 1px solid #f0c4bd; }
.error { color: #c0392b; font-size: 0.9rem; margin-bottom: 10px; }

.tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid #e2e5e9; }
.tab { padding: 10px 16px; cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active { border-bottom-color: #0068ff; font-weight: 600; }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee; font-size: 0.9rem; }
th { background: #f0f2f4; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.toolbar button { width: auto; padding: 8px 14px; }

.formrow { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.feld-block { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.feld-block label { font-size: 0.8rem; font-weight: 600; color: #45536b; }
.feld-block input { width: 100%; margin-bottom: 0; }
.formrow input { width: auto; flex: 1; min-width: 140px; margin-bottom: 0; }
.formrow button { width: auto; margin-bottom: 0; }

.muted { color: #6b7280; font-size: 0.85rem; }
.topbar { display: flex; justify-content: flex-end; padding: 10px 24px 0; }
.topbar button { width: auto; padding: 6px 12px; font-size: 0.85rem; }

/* 4-Quadranten-Dashboard-Layout (Eltern/Schueler/Schulleiter, siehe Roadmap) */
.quadranten {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.quadrant {
  background: #fff;
  border: 1px solid #e2e5e9;
  border-radius: 12px;
  padding: 18px;
  min-height: 160px;
}
.quadrant h2 { margin: 0 0 12px; font-size: 1rem; color: #0b1e33; }
.kontakt-karte {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border: 1px solid #e2e5e9; border-radius: 8px; margin-bottom: 8px;
}
.kind-liste { list-style: none; padding: 0; margin: 0; }
.kind-liste li {
  padding: 10px 12px; border-radius: 8px; cursor: pointer; margin-bottom: 6px;
  border: 1px solid transparent;
}
.kind-liste li.aktiv { background: #eaf2ff; border-color: #0068ff; font-weight: 600; }
.kind-liste li:hover { background: #f4f6f8; }

/* Mobile: Quadranten werden zu einzelnen Seiten mit Pillen-Navigation statt 2x2-Raster
   (Hamburger-Menue laut Roadmap noch nicht final entschieden - Pillen als einfache
   Zwischenloesung, siehe Status.md) */
@media (max-width: 700px) {
  .quadranten { grid-template-columns: 1fr; }
  .quadrant { display: none; }
  .quadrant.mobil-aktiv { display: block; }
  .quadranten-nav { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
  .quadranten-nav button { width: auto; padding: 8px 14px; font-size: 0.85rem; }
}
@media (min-width: 701px) {
  .quadranten-nav { display: none; }
}

/* Schule/Schulleiter-Dashboard: zwei unabhaengige Spalten statt starrem 2x2-Raster, damit die
   kompakte "Meine Schule"-Kachel nicht durch eine hohe Nachbarkachel in der gleichen Zeile
   aufgeblasen wird (siehe Stephans Layout-Wunsch 2026-09-16) */
.schule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}
.schule-col { display: flex; flex-direction: column; gap: 16px; }
.quadrant-compact { min-height: auto; }
.quadrant-gruppe {
  border: 2px solid #0068ff44;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 104, 255, 0.03);
}
.quadrant-gruppe .quadrant-in-gruppe {
  border-color: #dfe6ee;
}
.tabelle-scroll { max-height: 340px; overflow-y: auto; border: 1px solid #e2e5e9; border-radius: 8px; }
.tabelle-scroll table { border-radius: 0; }
.tabelle-scroll tbody tr.aktiv { background: #eaf2ff; }
.tabelle-suche {
  width: 100%; margin-bottom: 10px; padding: 8px 10px; border: 1px solid #d7dce2; border-radius: 8px;
}
.schueler-kontext {
  margin: 0 0 10px; padding: 8px 12px; background: #eaf2ff; border-radius: 8px; font-weight: 600;
}
@media (max-width: 700px) {
  .schule-grid { grid-template-columns: 1fr; }
}

.avatar-thumb {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle; background: #dbe4ee; color: #45536b; font-weight: 700;
  flex-shrink: 0;
}
img.avatar-thumb { cursor: zoom-in; }

.foto-zoom-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; pointer-events: none;
}
.foto-zoom-overlay img {
  max-width: 85vw; max-height: 85vh; border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5); background: #fff;
}

.qr-popup-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: none; align-items: center; justify-content: center;
  z-index: 10000;
}
.qr-popup-box {
  background: #fff; border-radius: 12px; padding: 20px 24px;
  text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}


.lang-flaggen-dd summary { list-style: none; }
.lang-flaggen-dd summary::-webkit-details-marker { display: none; }
.lang-flaggen-dd summary::marker { content: ""; }
