/* Stundenzettel Bäckerei R. Müller
 *
 * Farbherkunft: das Foto des Ladenschilds an der Bösinger Straße 10.
 * Messinggold der Buchstaben, Cremegelb der Fassade, Dunkelbraun des Vordachs.
 * Die Werte hier sind aus dem Foto abgelesen. Sobald die Bilddatei im Projekt
 * liegt, werden sie einmal exakt nachgezogen. Danach ist ein Farbwechsel
 * ausschliesslich eine Aenderung in diesem Block.
 */

:root {
  --gold: #c1962b;
  --gold-dunkel: #9a7620;
  --gold-hell: #e2c469;
  --creme: #f2e5b8;
  --creme-hell: #fbf5e5;
  --braun: #33251b;
  --braun-mittel: #6b543f;
  --braun-hell: #a4907a;
  --weiss: #fffdf7;
  --linie: #e6dcc2;
  --rot: #a33b28;

  --rund: 14px;
  --schatten: 0 1px 2px rgba(51, 37, 27, .06), 0 4px 14px rgba(51, 37, 27, .05);

  color-scheme: light;
}

@font-face {
  font-family: "Archivo";
  src: url("/static/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 max(28px, env(safe-area-inset-bottom));
  background: var(--creme-hell);
  color: var(--braun);
  font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.rahmen {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --- Kopf: Fassade mit goldenem Schriftzug, darunter das dunkle Vordach ---- */

.kopf {
  background: var(--creme);
  border-bottom: 7px solid var(--braun);
  padding: calc(14px + env(safe-area-inset-top)) 16px 13px;
  text-align: center;
}

.kopf-innen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  max-width: 520px;
  margin: 0 auto;
}

.wortmarke {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .11em;
  color: var(--gold);
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}

.kopf-unterzeile {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--braun-mittel);
  margin-top: 3px;
  text-shadow: none;
}

.brezel {
  width: 40px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--gold);
}

/* Die Brezel zeichnet sich beim Start einmal selbst. Ein einziger Strang,
   deshalb reicht eine Linie und ein Strichmuster. */
.brezel .brezel-strang {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: brezel-zeichnen .9s cubic-bezier(.65, 0, .35, 1) forwards;
}

@keyframes brezel-zeichnen {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .brezel .brezel-strang {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* --- Monatsleiste ---------------------------------------------------------- */

.monatsleiste {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 12px;
}

.monatsname {
  font-size: 21px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -.01em;
}

.pfeil {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--weiss);
  border: 1px solid var(--linie);
  color: var(--braun);
  font-size: 20px;
  text-decoration: none;
  box-shadow: var(--schatten);
}

.pfeil:active { background: var(--creme); }

/* --- Summenkarte ----------------------------------------------------------- */

.summe {
  background: var(--braun);
  color: var(--creme);
  border-radius: var(--rund);
  padding: 18px 20px;
  box-shadow: var(--schatten);
}

.summe-zahl {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--gold-hell);
}

.summe-zahl .einheit {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  margin-left: 5px;
  color: var(--creme);
  opacity: .75;
}

.summe-zeile {
  font-size: 14px;
  opacity: .8;
  margin-top: 5px;
}

.balken {
  height: 9px;
  border-radius: 5px;
  background: rgba(251, 245, 229, .18);
  margin-top: 14px;
  overflow: hidden;
}

.balken-fuellung {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--gold), var(--gold-hell));
  transition: width .5s ease;
}

/* --- Tageskarte "heute" ---------------------------------------------------- */

.heute-karte {
  background: var(--weiss);
  border: 2px solid var(--gold);
  border-radius: var(--rund);
  padding: 15px 16px 16px;
  margin-top: 14px;
  box-shadow: var(--schatten);
}

.heute-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.heute-datum {
  font-weight: 700;
  font-size: 17px;
}

.heute-marke {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--gold-dunkel);
  background: var(--creme);
  border-radius: 999px;
  padding: 3px 10px;
}

.schnellwahl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* --- Knoepfe --------------------------------------------------------------- */

.knopf {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: none;
  border-radius: 11px;
  background: var(--gold);
  color: #2b1f14;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 0 var(--gold-dunkel);
}

.knopf:active { transform: translateY(1px); box-shadow: none; }

.knopf .zeitspanne {
  display: block;
  font-size: 13px;
  font-weight: 600;
  opacity: .72;
  margin-top: 1px;
}

.knopf-leise {
  background: var(--weiss);
  color: var(--braun);
  border: 1px solid var(--linie);
  box-shadow: none;
}

.knopf-gefahr {
  background: transparent;
  color: var(--rot);
  border: 1px solid rgba(163, 59, 40, .3);
  box-shadow: none;
  font-weight: 600;
}

.knopf-reihe {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

/* Zweite Reihe unter dem Hauptknopf: Drucken und Speichern. Bewusst leiser
   gesetzt, der Weg fuer Mama bleibt der grosse Knopf darueber. */
.knopf-reihe-zwei {
  margin-top: 10px;
}

.knopf-reihe-zwei .knopf {
  flex: 1 1 0;
  min-height: 48px;
  font-size: 15px;
  line-height: 24px;
}

/* --- Tagesliste ------------------------------------------------------------ */

.tagesliste {
  margin: 22px 0 0;
  border-radius: var(--rund);
  overflow: hidden;
  background: var(--weiss);
  border: 1px solid var(--linie);
  box-shadow: var(--schatten);
}

.tag {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid var(--linie);
  color: inherit;
  text-decoration: none;
  min-height: 52px;
}

.tag:first-child { border-top: none; }
.tag-sonntag { background: #f7f0dd; }
.tag-heute { background: var(--creme); }

.tag-datum {
  flex: 0 0 46px;
  font-variant-numeric: tabular-nums;
}

.tag-datum .wochentag {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--braun-hell);
}

.tag-datum .zahl {
  font-size: 18px;
  font-weight: 700;
}

/* Tagessumme, nur bei geteiltem Dienst. Ohne sie muesste sie zwei Zahlen im
   Kopf addieren, obwohl die App sie ohnehin schon kennt. */
.tag-datum .tag-summe {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--creme);
  color: var(--gold-dunkel);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .01em;
}

.tag-zeiten {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}

.tag-zeiten .zeile { display: block; }
.tag-zeiten .notiz {
  display: block;
  font-size: 12.5px;
  color: var(--braun-hell);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-leer .tag-datum .zahl,
.tag-leer .tag-datum .wochentag { color: var(--braun-hell); }

.tag-strich {
  color: var(--braun-hell);
  font-size: 15px;
}

.tag-stunden {
  flex: 0 0 auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}

.tag-plus {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--creme);
  color: var(--gold-dunkel);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}

/* --- Formulare ------------------------------------------------------------- */

.karte {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--rund);
  padding: 18px;
  margin-top: 18px;
  box-shadow: var(--schatten);
}

.feld { margin-bottom: 16px; }
.feld:last-child { margin-bottom: 0; }

.feld label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--braun-mittel);
  margin-bottom: 6px;
}

.feld input[type="time"],
.feld input[type="date"],
.feld input[type="text"],
.feld input[type="number"],
.feld input[type="password"] {
  width: 100%;
  min-height: 52px;
  padding: 11px 13px;
  border: 1px solid var(--linie);
  border-radius: 11px;
  background: var(--creme-hell);
  color: var(--braun);
  font-family: inherit;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.feld input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  background: var(--weiss);
}

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

.hinweis {
  font-size: 13px;
  color: var(--braun-hell);
  margin: 6px 0 0;
}

.pausenwahl {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.pausenwahl button {
  flex: 1 1 0;
  min-height: 44px;
  border: 1px solid var(--linie);
  border-radius: 10px;
  background: var(--weiss);
  color: var(--braun-mittel);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.pausenwahl button.aktiv {
  background: var(--creme);
  border-color: var(--gold);
  color: var(--braun);
}

.vorlagenwahl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.vorlagenwahl button {
  min-height: 48px;
  border: 1px solid var(--linie);
  border-radius: 11px;
  background: var(--creme-hell);
  color: var(--braun);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.vorlagenwahl button span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--braun-hell);
}

.fehler {
  background: #fbeae6;
  border: 1px solid rgba(163, 59, 40, .25);
  color: var(--rot);
  border-radius: 11px;
  padding: 11px 13px;
  font-size: 15px;
  margin-bottom: 16px;
}

.erfolg {
  background: var(--creme);
  border: 1px solid var(--gold);
  color: var(--braun);
  border-radius: 11px;
  padding: 11px 13px;
  font-size: 15px;
  margin-bottom: 16px;
}

/* --- Kleinkram ------------------------------------------------------------- */

.seitenkopf {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
}

.seitenkopf h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.zurueck {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--weiss);
  border: 1px solid var(--linie);
  color: var(--braun);
  font-size: 20px;
  text-decoration: none;
}

.fusszeile {
  margin-top: 26px;
  text-align: center;
  font-size: 12.5px;
  color: var(--braun-hell);
}

.fusszeile a {
  color: var(--braun-mittel);
  text-decoration: none;
  border-bottom: 1px solid var(--linie);
}

/* --- Anmeldung ------------------------------------------------------------- */

.anmeldung {
  max-width: 340px;
  margin: 8vh auto 0;
  text-align: center;
}

.anmeldung .brezel {
  width: 74px;
  height: 62px;
  margin-bottom: 16px;
}

.anmeldung .wortmarke {
  font-size: 21px;
  margin-bottom: 26px;
}

.pin-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--braun-mittel);
  margin-bottom: 10px;
}

.pin-feld {
  width: 100%;
  min-height: 62px;
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .5em;
  text-indent: .5em;
  border: 2px solid var(--linie);
  border-radius: 13px;
  background: var(--weiss);
  color: var(--braun);
  font-family: inherit;
}

.pin-feld:focus {
  outline: none;
  border-color: var(--gold);
}
