:root {
  --farbe-text: #1f2933;
  --farbe-grund: #f5f7fa;
  --farbe-flaeche: #ffffff;
  --farbe-akzent: #0b5cad;
  --farbe-linie: #d5dbe3;
  --leiste-hoehe: 3.5rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, "Segoe UI", sans-serif;
  color: var(--farbe-text);
  background: var(--farbe-grund);
  padding-bottom: var(--leiste-hoehe);
}

.kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--farbe-akzent);
}
.kopf a { color: #fff; text-decoration: none; }
.marke { font-weight: 700; font-size: 1.1rem; }

.inhalt { max-width: 40rem; margin: 0 auto; padding: 1rem; }
h1 { margin-top: 0.5rem; }

.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.kachel {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--farbe-flaeche);
  border: 1px solid var(--farbe-linie);
  border-radius: 0.5rem;
  color: inherit;
  text-decoration: none;
}
.kachel strong { font-size: 1.2rem; color: var(--farbe-akzent); }
.kachel small { color: #5f6c7b; }

.hinweis {
  padding: 0.75rem 1rem;
  background: var(--farbe-flaeche);
  border-left: 4px solid var(--farbe-akzent);
}

.leiste {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--leiste-hoehe);
  display: flex;
  background: var(--farbe-flaeche);
  border-top: 1px solid var(--farbe-linie);
}
.leiste a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--farbe-text);
  text-decoration: none;
  font-weight: 600;
}
.leiste a[aria-current="page"] { color: var(--farbe-akzent); border-top: 3px solid var(--farbe-akzent); }

@media (min-width: 48rem) {
  .kacheln { grid-template-columns: repeat(4, 1fr); }
}

/* Stundenliste (STUN-12) */
.filter { display: grid; gap: 0.5rem; margin-bottom: 0.75rem; }
.filter label { display: grid; gap: 0.2rem; font-size: 0.85rem; color: #5f6c7b; }
.filter select, .filter input {
  font: inherit;
  padding: 0.5rem;
  border: 1px solid var(--farbe-linie);
  border-radius: 0.4rem;
  background: var(--farbe-flaeche);
  color: var(--farbe-text);
  width: 100%;
}
.monatsleiste { display: flex; justify-content: space-between; align-items: center; margin: 0.5rem 0; }
.monatsleiste a { color: var(--farbe-akzent); text-decoration: none; font-weight: 600; padding: 0.4rem 0; }
.summe { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin: 0.25rem 0 0.75rem; }
.summe a { margin-left: auto; color: var(--farbe-akzent); }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.liste li {
  background: var(--farbe-flaeche);
  border: 1px solid var(--farbe-linie);
  border-radius: 0.4rem;
}
.liste a.eintrag {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.1rem 0.75rem;
  padding: 0.6rem 0.8rem;
  color: inherit;
  text-decoration: none;
}
.liste .zeit { font-weight: 600; }
.liste .dauer { grid-row: 1 / span 3; grid-column: 2; align-self: center; font-weight: 700; color: var(--farbe-akzent); }
.liste .projekt { color: #5f6c7b; }
.liste .log { color: #1f2933; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Stempeln (STUN-13) */
.meldung { padding: 0.6rem 0.9rem; border-radius: 0.4rem; margin: 0 0 0.75rem; }
.meldung.ok { background: #e3f4e7; border-left: 4px solid #2e8540; }
.meldung.fehler { background: #fde8e8; border-left: 4px solid #b3261e; }
.knopf {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border: 0;
  border-radius: 0.4rem;
  background: var(--farbe-akzent);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.knopf small { font-weight: 400; opacity: 0.9; }
.laeuft { background: #fff8e1; border: 1px solid #f0d77a; border-radius: 0.5rem; padding: 0.5rem 0.9rem; margin-bottom: 1rem; }
.laeuft h2 { margin: 0.2rem 0 0.4rem; font-size: 1rem; }
.laeuft form { display: grid; gap: 0.5rem; padding: 0.5rem 0; }
.haken { display: flex !important; align-items: center; gap: 0.5rem; color: var(--farbe-text) !important; font-size: 1rem !important; }
.haken input { width: auto !important; }
.uhr { margin: 0; }
.uhr small { color: #5f6c7b; }
.abbrechen { margin-left: 1rem; color: var(--farbe-akzent); }
.unsichtbar { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* Eintrag ansehen, bearbeiten, löschen (STUN-14) */
.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1rem; margin: 0 0 1rem; }
.details dt { color: #5f6c7b; }
.details dd { margin: 0; font-weight: 600; word-break: break-word; }
.aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.knopf.gefahr { background: #b3261e; }

/* Anmeldung (STUN-20) */
.kopf-rechts { display: flex; align-items: center; gap: 1rem; }
.abmelden { margin: 0; }
.abmelden button {
  font: inherit;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 0.4rem;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
}
code { background: rgba(0, 0, 0, 0.07); padding: 0 0.25rem; border-radius: 0.2rem; }

/* Stundennachweis (STUN-19) */
.nachweis { display: grid; gap: 0.5rem; margin: 0 0 0.75rem; padding: 0.6rem 0.8rem; background: var(--farbe-flaeche); border: 1px solid var(--farbe-linie); border-radius: 0.4rem; }
.nachweis label { display: grid; gap: 0.2rem; font-size: 0.85rem; color: #5f6c7b; }
.nachweis select { font: inherit; padding: 0.5rem; border: 1px solid var(--farbe-linie); border-radius: 0.4rem; background: var(--farbe-flaeche); color: var(--farbe-text); width: 100%; }
.nachweis .kst-auswahl { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0; padding: 0; border: 0; }
.nachweis .kst-auswahl legend { padding: 0; font-size: 0.85rem; color: #5f6c7b; margin-bottom: 0.3rem; }
.nachweis .haken { display: flex; align-items: center; gap: 0.4rem; font-size: 1rem; color: var(--farbe-text); min-height: 2.2rem; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.knopf.zweit { background: var(--farbe-flaeche); color: var(--farbe-akzent, #0b5cad); border: 1px solid currentColor; }
.hinweis { margin: 0; font-size: 0.9rem; color: #5f6c7b; }
.zeit-selbst { display: grid; gap: 0.6rem; margin: 0.5rem 0 0; padding: 0.7rem 0.8rem; border: 1px solid var(--farbe-linie); border-radius: 0.4rem; }
.zeit-selbst legend { padding: 0 0.3rem; font-size: 0.9rem; color: #5f6c7b; }
.zeit-selbst .zeitpaar { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; align-items: end; }
.zeit-selbst .datumzeile { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; align-items: end; }
.zeit-selbst .dauerzeile { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.dauer-anzeige { min-width: 5rem; text-align: center; font-weight: 700; font-size: 1.1rem; color: var(--farbe-akzent); }
.wochentag { font-size: 0.9rem; font-weight: 600; color: #5f6c7b; }
.zeit-selbst .pfeil { font: inherit; font-size: 1.1rem; line-height: 1; min-width: 2.75rem; min-height: 2.75rem; padding: 0; border: 1px solid var(--farbe-linie); border-radius: 0.4rem; background: var(--farbe-flaeche); color: var(--farbe-akzent); cursor: pointer; }
.zeit-selbst select, .zeit-selbst input[type=date] { font: inherit; padding: 0.5rem; border: 1px solid var(--farbe-linie); border-radius: 0.4rem; background: var(--farbe-flaeche); color: var(--farbe-text); width: 100%; }
.nachweis small { color: #5f6c7b; }
