/* Neutrales, aufgeräumtes Theme. Große Touch-Ziele fürs Tablet an der Theke,
   dieselben Regeln gelten auch für den Gastbereich (gemeinsames Stylesheet). */

/* Lokal gehostet (statt Google Fonts CDN) — Kernfunktionen dürfen nicht von
   externer Erreichbarkeit abhängen. Deckt Gewicht 600 und 700 ab (Google
   liefert für beide dieselbe Datei aus, siehe Original-CSS-Antwort). */
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("fonts/caveat-variable.2d9de14f93a2.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #0e1014;
  --bg-erhoeht: #171a21;
  --bg-karte: #1b1e26;
  --rand: #2b2f3a;
  --text: #eceef2;
  --text-gedaempft: #9aa1b0;
  --akzent: #4f9dde;
  --akzent-text: #06202f;
  --gefahr: #e5484d;
  --gefahr-bg: #3a1e20;
  --erfolg: #3ecf8e;
  --erfolg-bg: #163329;
  --warnung: #e8b339;
  --warnung-bg: #3a2f12;
  --radius: 10px;
  --radius-klein: 6px;
  --abstand-1: 0.25rem;
  --abstand-2: 0.5rem;
  --abstand-3: 0.75rem;
  --abstand-4: 1rem;
  --abstand-5: 1.5rem;
  --abstand-6: 2rem;
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--schrift);
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  width: 100%;
}

img {
  max-width: 100%;
}

.seite {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--abstand-4) var(--abstand-4) var(--abstand-6);
}

.app-leiste {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--abstand-2);
  padding: var(--abstand-3) var(--abstand-4);
  border-bottom: 1px solid var(--rand);
  background: var(--bg-erhoeht);
}

.app-leiste .app-name {
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

.app-leiste .app-bereich {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}

.app-leiste .app-bereich::before {
  content: "›";
  margin-right: var(--abstand-2);
  color: var(--text-gedaempft);
  font-weight: 400;
}

a { color: var(--akzent); }

h1 { font-size: 1.5rem; margin: 0 0 var(--abstand-2); }
h2 { font-size: 1.15rem; margin: var(--abstand-5) 0 var(--abstand-2); color: var(--text-gedaempft); }
h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: var(--abstand-4) 0 var(--abstand-2);
  color: var(--text-gedaempft);
}

.karte {
  background: var(--bg-karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: var(--abstand-4);
  margin-bottom: var(--abstand-4);
  max-width: 100%;
  overflow-x: auto;
}

.header-leiste {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--abstand-3);
  margin-bottom: var(--abstand-4);
}

.header-leiste nav {
  display: flex;
  align-items: center;
  gap: var(--abstand-3);
  flex-wrap: wrap;
}

.startseite-logo {
  height: 64px;
  width: auto;
  border-radius: var(--radius-klein);
}

/* Fest verankert oben rechts in der Kopfzeile (siehe .header-leiste dort),
   unabhängig davon, wie Logo/Name/Uhr auf schmalen Bildschirmen umbrechen —
   dadurch bleibt die Position auf Handy und PC gleichermaßen vorhersehbar,
   ganz ohne die frühere JS-Positionierung (getBoundingClientRect). */
.hamburger-menu {
  position: absolute;
  top: 0;
  right: 0;
}

.hamburger-btn {
  list-style: none;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.6rem 0.9rem;
}

.hamburger-btn::-webkit-details-marker {
  display: none;
}

.hamburger-menu .hamburger-liste {
  position: absolute;
  top: calc(100% + var(--abstand-2));
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.15rem;
  background: var(--bg-karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: var(--abstand-2);
  width: 220px;
  max-width: calc(100vw - 2 * var(--abstand-4));
  max-height: min(70vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.hamburger-link {
  display: block;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-klein);
  border: none;
  background: transparent;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  text-align: left;
  text-decoration: none;
  min-height: 0;
}

.hamburger-link:hover { background: var(--bg-erhoeht); }
.hamburger-link:active { transform: none; background: var(--rand); }

.hamburger-gruppe {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-gedaempft);
  margin-top: var(--abstand-2);
  padding: var(--abstand-2) 0.7rem 0.2rem;
  border-top: 1px solid var(--rand);
}

.kachel-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--abstand-3);
  margin: var(--abstand-4) 0;
  min-width: 0;
}

.kachel-raster form { display: contents; }

button, .kachel, input[type="submit"], a.btn-still {
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--rand);
  background: var(--bg-erhoeht);
  color: var(--text);
  cursor: pointer;
  min-height: 3.25rem;
  transition: background-color 0.1s ease, transform 0.05s ease;
  text-decoration: none;
  display: inline-block;
}

button:hover, .kachel:hover, a.btn-still:hover { border-color: var(--akzent); }
button:active, .kachel:active, a.btn-still:active { transform: scale(0.98); }

.btn-zurueck {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 1.1rem 1.5rem;
  min-height: 3.75rem;
}

.btn-feld-icon {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  font-size: 1.1rem;
  font-weight: 400;
  padding: 0.35rem 0.55rem;
  min-height: auto;
  line-height: 1;
  background: transparent;
  border-color: transparent;
}

.btn-feld-icon:hover {
  background: var(--bg-erhoeht);
  border-color: var(--rand);
}

.btn-feld-icon.aktiv {
  background: var(--akzent);
  border-color: var(--akzent);
  color: var(--akzent-text);
}

.kachel-primaer {
  background: var(--akzent);
  border-color: var(--akzent);
  color: var(--akzent-text);
}

.btn-gefahr {
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--rand);
  cursor: pointer;
  min-height: 3.25rem;
  display: inline-block;
  list-style: none;
}

.btn-gefahr::-webkit-details-marker { display: none; }

.kachel-storno, .btn-gefahr {
  background: var(--gefahr-bg);
  border-color: var(--gefahr);
  color: var(--gefahr);
}

.kachel-erfolg {
  background: var(--erfolg);
  border-color: var(--erfolg);
  color: #06231a;
}

.artikel-kachel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  width: 100%;
  min-width: 0;
  padding: var(--abstand-3) var(--abstand-2) var(--abstand-2);
  border-radius: var(--radius);
  border: 1px solid var(--rand);
  background: var(--bg-karte);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  min-height: 6.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.08s ease, border-color 0.1s ease, box-shadow 0.1s ease;
}

.artikel-kachel:hover {
  border-color: var(--akzent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.artikel-kachel:active {
  transform: scale(0.96);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.artikel-kachel-platzhalter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--bg-erhoeht);
  color: var(--text-gedaempft);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.artikel-kachel-name {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
  overflow-wrap: break-word;
  max-width: 100%;
}

.artikel-kachel-preis {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--akzent);
  background: var(--bg-erhoeht);
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
}

.mengen-stepper {
  display: flex;
  align-items: center;
  gap: var(--abstand-2);
  margin-top: var(--abstand-2);
}

.stepper-btn {
  width: 2rem;
  height: 2rem;
  min-height: 0;
  padding: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 50%;
  border: 1px solid var(--rand);
  background: var(--bg-erhoeht);
  color: var(--text);
  cursor: pointer;
}

.stepper-btn:active {
  transform: scale(0.92);
}

.stepper-wert {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 700;
}

.warenkorb-zeile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--abstand-2);
  padding: var(--abstand-2) 0;
  border-bottom: 1px solid var(--rand);
}

.warenkorb-zeile:last-child {
  border-bottom: none;
}

.warenkorb-zeile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.warenkorb-zeile-name {
  font-weight: 600;
  overflow-wrap: break-word;
}

.warenkorb-zeile-detail {
  color: var(--text-gedaempft);
  font-size: 0.85rem;
}

.warenkorb-summe {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
  font-size: 1.1rem;
  padding-top: var(--abstand-3);
  margin-top: var(--abstand-2);
  border-top: 2px solid var(--rand);
}

label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-gedaempft);
  margin-bottom: var(--abstand-1);
}

input[type="text"], input[type="password"], input[type="number"], input[type="date"], select {
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  width: 100%;
  border-radius: var(--radius-klein);
  border: 1px solid var(--rand);
  background: var(--bg-erhoeht);
  color: var(--text);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--akzent);
  box-shadow: 0 0 0 3px rgba(79, 157, 222, 0.25);
}

input[type="file"] {
  font: inherit;
  font-size: 0.95rem;
  color: var(--text-gedaempft);
  width: 100%;
}

input[type="file"]::file-selector-button {
  font: inherit;
  padding: 0.6rem 1rem;
  margin-right: var(--abstand-3);
  border-radius: var(--radius-klein);
  border: 1px solid var(--rand);
  background: var(--bg-erhoeht);
  color: var(--text);
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
  background: var(--rand);
}

p > input, p > select { margin-top: var(--abstand-1); }

.pin-pad {
  max-width: 320px;
  margin: 3rem auto;
  text-align: center;
}

.pin-pad input { text-align: center; letter-spacing: 0.3em; font-size: 1.4rem; }

.fehler { color: var(--gefahr); }
.erfolg { color: var(--erfolg); }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-karte);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  overflow: hidden;
}

thead th {
  background: var(--bg-erhoeht);
  color: var(--text-gedaempft);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

th, td { text-align: left; padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--rand); overflow-wrap: break-word; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-erhoeht); }
tfoot th, tfoot td { border-top: 2px solid var(--rand); border-bottom: none; }

.geld { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-offen { background: var(--warnung-bg); color: var(--warnung); }
.badge-geschlossen { background: var(--bg-erhoeht); color: var(--text-gedaempft); }
.badge-bezahlt { background: var(--erfolg-bg); color: var(--erfolg); }
.badge-eigen { background: var(--bg-erhoeht); color: var(--text-gedaempft); font-weight: 500; }

.leerzustand { color: var(--text-gedaempft); text-align: center; padding: var(--abstand-4); }

.betriebstag-hinweis {
  text-align: center;
  padding: var(--abstand-6) var(--abstand-4);
  border-color: var(--warnung);
  background: var(--warnung-bg);
}

.betriebstag-hinweis-icon { font-size: 2.5rem; line-height: 1; }

.betriebstag-hinweis h2 {
  margin: var(--abstand-3) 0 var(--abstand-1);
  color: var(--warnung);
}

.betriebstag-hinweis p {
  color: var(--text-gedaempft);
  margin: 0 0 var(--abstand-4);
}

.betriebstag-hinweis-fussnote { margin-bottom: 0 !important; }

.buchungs-toast {
  display: inline-block;
  background: var(--erfolg-bg);
  color: var(--erfolg);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-klein);
  font-weight: 600;
  margin-bottom: var(--abstand-3);
  animation: buchungs-toast-fade 2.5s ease forwards;
}

@keyframes buchungs-toast-fade {
  0% { opacity: 0; transform: translateY(-6px); }
  12% { opacity: 1; transform: translateY(0); }
  75% { opacity: 1; }
  100% { opacity: 0; }
}

.artikel-bild {
  display: block;
  width: 100%;
  max-height: 4.25rem;
  object-fit: contain;
  margin: 0 auto;
}

td .artikel-bild {
  display: inline-block;
  width: 1.6rem;
  height: 1.6rem;
  max-height: none;
  margin: 0 0.5rem 0 0;
  vertical-align: middle;
}

.ueberfaellig { border-color: var(--warnung); box-shadow: 0 0 0 1px var(--warnung); }

.meldungen { list-style: none; margin: 0 0 var(--abstand-4); padding: 0; display: grid; gap: var(--abstand-2); }

.meldungen li {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-klein);
  border-left: 4px solid var(--rand);
  background: var(--bg-karte);
}

.meldungen li.success { border-color: var(--erfolg); }
.meldungen li.error { border-color: var(--gefahr); }
.meldungen li.warning { border-color: var(--warnung); }

/* Der Deckel als physisches Ding: Kork-Karte statt Tabellenzeile, schräg auf
   der dunklen Theke "liegend". Bewusst der einzige Ort mit Farbausschlag aus
   dem sonst neutralen Theme — hier geht es fachlich um den Deckel selbst. */
.deckel-karte {
  position: relative;
  background: #d9c8a1;
  color: #2b2416;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  width: min(var(--deckel-groesse, 460px), 95vw);
  margin: var(--abstand-5) auto var(--abstand-6);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), inset 0 0 0 6px rgba(43, 36, 22, 0.08);
  transform: rotate(-1.5deg);
  border: 4px solid transparent;
}

.deckel-karte.inaktiv {
  border-color: var(--erfolg);
}

/* 70% ≈ Seite des größten Quadrats, das in den Kreis passt (1/√2) — Inhalt
   bleibt so unter der Rundung, auch wenn er scrollt. */
.deckel-inhalt {
  position: relative;
  z-index: 1;
  width: 70%;
  max-height: 72%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  scrollbar-width: thin;
  scrollbar-color: rgba(43, 36, 22, 0.35) transparent;
}

.deckel-inhalt::-webkit-scrollbar {
  width: 6px;
}

.deckel-inhalt::-webkit-scrollbar-track {
  background: transparent;
}

.deckel-inhalt::-webkit-scrollbar-thumb {
  background: rgba(43, 36, 22, 0.35);
  border-radius: 3px;
}

.deckel-inhalt::-webkit-scrollbar-thumb:hover {
  background: rgba(43, 36, 22, 0.55);
}

.deckel-karte .deckel-name {
  font-family: "Caveat", cursive;
  font-size: 2.1rem;
  line-height: 1;
  margin: 0 0 0.25rem;
}

.deckel-karte .deckel-name-betrag {
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: rgba(43, 36, 22, 0.65);
  white-space: nowrap;
}

.deckel-karte .deckel-name.deckel-name-altlast {
  color: var(--gefahr);
}

.deckel-karte .deckel-strichliste {
  width: 100%;
  font-size: 0.95rem;
}

.deckel-strichliste-zeile {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.2rem 0;
  border-bottom: 1px dashed rgba(43, 36, 22, 0.25);
}

.deckel-strichliste-zeile:last-child { border-bottom: none; }

.deckel-strichliste-name { text-align: left; }
.deckel-strichliste-preis { font-variant-numeric: tabular-nums; white-space: nowrap; }

.deckel-karte .deckel-leer {
  font-style: italic;
  opacity: 0.7;
}

.deckel-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  height: auto;
  opacity: 0.16;
  pointer-events: none;
}

.strich-gruppe {
  display: inline-flex;
  align-items: flex-end;
  position: relative;
  gap: 2px;
  margin-right: 0.4em;
}

.strich { width: 2px; height: 0.85em; background: currentColor; }

.strich-gruppe.voll::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 42%;
  height: 2px;
  background: currentColor;
  transform: rotate(-22deg);
}

/* Mehrere Deckel nebeneinander (Theken-Startseite "Deckel heute"): kleinere
   Karten, wie mehrere Bierdeckel verstreut auf der Theke. */
.deckel-raster {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--abstand-5) var(--abstand-4);
  margin: var(--abstand-4) 0 var(--abstand-6);
}

.deckel-raster .deckel-karte { margin: 0; }
.deckel-raster a { text-decoration: none; color: inherit; display: block; }
.deckel-raster a:hover .deckel-karte { transform: rotate(0deg) scale(1.03); }

.deckel-raster :nth-child(3n+1) .deckel-karte { transform: rotate(-2deg); }
.deckel-raster :nth-child(3n+2) .deckel-karte { transform: rotate(1.5deg); }
.deckel-raster :nth-child(3n+3) .deckel-karte { transform: rotate(-0.5deg); }

.deckel-karte.klein { width: min(calc(var(--deckel-groesse, 460px) * 0.565), 50vw); }
.deckel-karte.klein .deckel-inhalt { gap: 0.3rem; }

.deckel-karte.klein .deckel-name { font-size: 1.5rem; }
.deckel-karte.klein .deckel-strichliste { font-size: 0.8rem; }

.uhr {
  text-align: center;
  color: var(--text-gedaempft);
  font-variant-numeric: tabular-nums;
}

.uhr #uhr-datum { display: block; font-size: 0.85rem; }
.uhr #uhr-zeit { display: block; font-size: 1.4rem; font-weight: 700; color: var(--text); }

@keyframes uhr-blinken { 50% { opacity: 0.2; } }
.uhr-doppelpunkt { animation: uhr-blinken 1s step-start infinite; }
