/* Zeiterfassung — auf das Telefon gebaut.
 *
 * MOBILE ZUERST, und das ist hier keine Floskel: Die Reinigungskraft steht im
 * Flur und traegt ein, wann sie da war. Die Grundregeln gelten deshalb ohne
 * Medienabfrage, und der breite Bildschirm ist der Sonderfall am Ende.
 *
 * Alles Antippbare ist mindestens 48 px hoch (Android-Mass, groesser als die
 * 44 pt von iOS) - mit Putzhandschuhen trifft man kleiner nicht.
 */

.ze-seite {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ze-kopf h1 {
  margin: 0;
  color: var(--color-primary, #10274c);
  font-size: 1.5rem;
  font-weight: 700;
}

.ze-kopf p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 0.9rem;
}

/* Die Monatskachel - die Zahl, die man sucht, so gross wie moeglich. */
.ze-kachel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10274c 0%, #1c3a68 100%);
  color: #ffffff;
}

.ze-kachel-monat {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

.ze-kachel-summe {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
}

.ze-kachel-sub {
  font-size: 0.9rem;
  opacity: 0.8;
}

.ze-karte {
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.ze-karte h2 {
  margin: 0 0 12px;
  color: var(--color-primary, #10274c);
  font-size: 1.05rem;
  font-weight: 600;
}

/* Zwei Spalten reichen auf jedem Telefon; darunter ginge die Uhrzeit auf
   eine eigene Zeile und das Formular waere doppelt so hoch. */
.ze-raster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ze-datum {
  grid-column: 1 / -1;
}

/* Die Pause steht auf voller Breite, nicht allein in der linken Spalte.
   Von und Bis gehoeren als Paar nebeneinander; die Pause gehoert zu beiden -
   auf halber Breite blieb rechts daneben ein Loch. */
.ze-pause {
  grid-column: 1 / -1;
}

.ze-feld {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  margin-bottom: 12px;
}

.ze-feld > span {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 600;
}

.ze-feld input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  /* 16px verhindert, dass iOS beim Antippen hineinzoomt. Kleiner NICHT
     setzen - das Zoomen verschiebt das ganze Formular. */
  font-size: 16px;
  font-family: inherit;
}

.ze-feld input:focus {
  outline: 2px solid var(--color-primary, #10274c);
  outline-offset: 1px;
  border-color: var(--color-primary, #10274c);
}

.ze-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  color: var(--color-primary, #10274c);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.ze-knopf--stark {
  border-color: var(--color-primary, #10274c);
  background: var(--color-primary, #10274c);
  color: #ffffff;
}

.ze-knopf:disabled {
  opacity: 0.6;
  cursor: default;
}

.ze-knopf:focus-visible {
  outline: 2px solid var(--color-primary, #10274c);
  outline-offset: 2px;
}

.ze-liste,
.ze-monate {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ze-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f9fafb;
}

.ze-zeile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-size: 0.9rem;
}

.ze-zeile-text span {
  color: #6b7280;
  font-size: 0.85rem;
}

.ze-notiz {
  font-style: italic;
}

.ze-zeile-rechts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 auto;
}

.ze-dauer {
  color: var(--color-primary, #10274c);
  font-size: 1rem;
  white-space: nowrap;
}

/* Das Loeschen ist bewusst UNAUFFAELLIG und trotzdem gross genug: Es steht
   an jeder Zeile, und ein roter Knopf je Eintrag machte die Liste zu einer
   Wand aus Warnungen. */
.ze-loeschen {
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9ca3af;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.ze-loeschen:hover:not(:disabled) {
  background: #fef2f2;
  color: #ef4444;
}

/* Der laufende Monat: der Grund steht da, wo sonst der Knopf waere. */
.ze-offen {
  flex: 0 0 auto;
  max-width: 45%;
  color: #9ca3af;
  font-size: 0.78rem;
  text-align: right;
}

.ze-monate .ze-knopf {
  width: auto;
  flex: 0 0 auto;
}

.ze-leer,
.ze-laedt {
  margin: 0;
  color: #9ca3af;
  font-size: 0.9rem;
  font-style: italic;
}

.ze-meldungen {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.ze-meldung {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
}

.ze-meldung--warnung {
  background: #fef3c7;
  color: #92400e;
}

/* Ab Tablet mehr Luft und die Aufstellungen zweispaltig - mehr braucht es
   nicht, die Seite ist bewusst schmal. */
@media (min-width: 700px) {
  .ze-seite {
    padding: 24px 24px 64px;
    gap: 20px;
  }

  .ze-raster {
    grid-template-columns: repeat(4, 1fr);
  }

  .ze-datum,
  .ze-pause {
    grid-column: span 1;
  }

  .ze-knopf--stark {
    width: auto;
    min-width: 200px;
  }
}
