/* ==========================================================================
   EHCW intern: Design-System
   Farben: Gelb #ffda00 (wie Website), Schwarz #101820 (Pantone Black 6 C),
   Rot #ed0000 (Akzent der Website). Font: Sinter mit System-Fallback
   (Sinter-Datei folgt mit dem Design-Block am Fr 20.11., Kit-Typekit ist
   domain-gebunden).
   ========================================================================== */

:root {
  --gelb: #ffda00;
  --schwarz: #101820;
  --rot: #ed0000;
  --grau-hell: #f4f5f6;
  --grau-mittel: #e3e6e8;
  --grau-text: #5a646b;
  --weiss: #ffffff;
  --radius: 6px;
  --schatten: 0 1px 3px rgba(16, 24, 32, 0.12);
  --font: 'Sinter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--schwarz);
  background: var(--grau-hell);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1 { font-size: 1.6rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.25rem; margin: 0 0 0.6rem; }

a { color: inherit; }

.lead { color: var(--grau-text); margin-top: -0.4rem; }

/* ---------- Kopfzeile ---------- */
.kopf {
  background: var(--schwarz);
  color: var(--weiss);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
}

.marke {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
}

.marke-logo {
  background: var(--gelb);
  border-radius: var(--radius);
  padding: 4px 8px;
  display: inline-flex;
}

.marke-logo img {
  display: block;
  height: 30px;
  width: auto;
}

.kopf-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.logout-form { margin: 0; }

/* ---------- Hauptnavigation ---------- */
.hauptnav {
  background: var(--weiss);
  border-bottom: 1px solid var(--grau-mittel);
  display: flex;
  gap: 0.25rem;
  padding: 0 1.25rem;
  overflow-x: auto;
}

.hauptnav a {
  text-decoration: none;
  padding: 0.7rem 0.8rem;
  font-size: 0.95rem;
  color: var(--grau-text);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.hauptnav a:hover { color: var(--schwarz); }

.hauptnav a.aktiv {
  color: var(--schwarz);
  font-weight: 700;
  border-bottom-color: var(--gelb);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem 0;
  font-size: 0.85rem;
  color: var(--grau-text);
}

.breadcrumb a {
  color: var(--grau-text);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--schwarz); }

.breadcrumb-trenner { margin: 0 0.4rem; }

/* ---------- Fortschrittsbalken ---------- */
.fortschritt {
  display: block;
  height: 6px;
  background: var(--grau-mittel);
  border-radius: 999px;
  overflow: hidden;
}

.fortschritt-balken {
  display: block;
  height: 100%;
  background: var(--gelb);
  border-radius: 999px;
}

/* ---------- Inhalt ---------- */
.inhalt {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

/* ---------- Kacheln ---------- */
.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.kachel {
  background: var(--weiss);
  border: 1px solid var(--grau-mittel);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 1.1rem 1.1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-decoration: none;
  transition: border-color 120ms ease, transform 120ms ease;
}

.kachel:hover {
  border-color: var(--gelb);
  transform: translateY(-1px);
}

.kachel-zahl {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.kachel-titel { font-weight: 700; }

.kachel-text {
  font-size: 0.9rem;
  color: var(--grau-text);
  flex: 1;
}

.kachel-hinweis {
  font-size: 0.75rem;
  color: var(--grau-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--grau-mittel);
  padding-top: 0.5rem;
  margin-top: 0.4rem;
}

/* ---------- Buttons, Badges, Meldungen ---------- */
.btn {
  display: inline-block;
  background: var(--weiss);
  border: 1px solid var(--schwarz);
  color: var(--schwarz);
  border-radius: var(--radius);
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: var(--grau-hell); }

.btn-primary {
  background: var(--gelb);
  border-color: var(--gelb);
  font-weight: 700;
}

.btn-primary:hover { background: #f0cf00; }

.btn-klein {
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  border-color: var(--grau-text);
  color: var(--schwarz);
  background: var(--weiss);
}

.btn-block { width: 100%; }

.badge {
  background: var(--gelb);
  color: var(--schwarz);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.meldung {
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
}

.meldung-fehler {
  background: #fdeaea;
  border: 1px solid var(--rot);
  color: #8c0000;
}

/* ---------- Formulare ---------- */
.formular label {
  display: block;
  font-weight: 700;
  margin: 0.9rem 0 0.25rem;
}

.formular input,
.formular select,
.formular textarea {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--grau-text);
  border-radius: var(--radius);
  background: var(--weiss);
}

.formular input:focus,
.formular select:focus,
.formular textarea:focus {
  outline: 2px solid var(--gelb);
  outline-offset: 1px;
  border-color: var(--schwarz);
}

.formular .btn { margin-top: 1.2rem; }

/* ---------- Tabellen ---------- */
.tabelle {
  width: 100%;
  border-collapse: collapse;
  background: var(--weiss);
  border: 1px solid var(--grau-mittel);
  border-radius: var(--radius);
  overflow: hidden;
}

.tabelle th,
.tabelle td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--grau-mittel);
  font-size: 0.95rem;
}

.tabelle th {
  background: var(--grau-hell);
  font-weight: 700;
}

.tabelle tr:last-child td { border-bottom: 0; }

/* ---------- Leere Zustände ---------- */
.leer {
  background: var(--weiss);
  border: 1px dashed var(--grau-text);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--grau-text);
  max-width: 560px;
  margin: 2rem auto;
}

.leer-titel {
  font-weight: 700;
  color: var(--schwarz);
  font-size: 1.1rem;
}

/* ---------- Login ---------- */
.login-box {
  background: var(--weiss);
  border: 1px solid var(--grau-mittel);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  max-width: 400px;
  margin: 4rem auto;
  padding: 2rem;
}

.login-logo {
  background: var(--gelb);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.login-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.login-box h1 {
  text-align: center;
  margin-bottom: 0;
}

.login-sub {
  text-align: center;
  color: var(--grau-text);
  margin-top: 0.2rem;
}

/* ---------- Fusszeile ---------- */
.fuss {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--grau-text);
  border-top: 1px solid var(--grau-mittel);
  background: var(--weiss);
}

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .kopf { flex-wrap: wrap; }
  .kopf-user { width: 100%; justify-content: flex-end; }
  .kacheln { grid-template-columns: 1fr; }
}

/* ---------- Druckansicht ---------- */
@media print {
  .kopf, .hauptnav, .fuss, .btn, .logout-form { display: none !important; }
  body { background: var(--weiss); }
  .inhalt { max-width: none; padding: 0; }
  .kachel, .tabelle, .leer { box-shadow: none; }
}
