/* ============================================================
   WEIHNACHTSMARKT REGISTRIERKASSE – Stylesheet
   iPad-optimiert, Touch-freundlich
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Lato:wght@300;400;700&display=swap');

:root {
  /* Farben */
  --rot:        #8B0000;
  --rot-hell:   #A52020;
  --rot-dunkel: #5C0000;
  --gold:       #D4AF37;
  --gold-hell:  #F0D060;
  --braun:      #3D1C02;
  --braun-hell: #5A3010;
  --braun-kart: #4A0E0E;
  --braun-tief: #2A0C00;
  --creme:      #FDF6E3;
  --gruen:      #2E7D32;
  --gruen-hell: #4CAF50;
  --gruen-dunkel: #1B5E20;
  --display-rot: #6B0000;
  --gefahr:     #ff6b6b;
  --text-hell:  #FDF6E3;
  --text-dunkel:#2A1500;
  --schatten:   0 4px 16px rgba(0,0,0,0.4);
  --radius:     12px;

  /* Typografie */
  --fs-micro:   0.72rem;
  --fs-small:   0.85rem;
  --fs-body:    1rem;
  --fs-sub:     1.2rem;
  --fs-head:    1.5rem;
  --fs-display: 2rem;
  --fs-hero:    2.4rem;

  /* Abstände (4pt-Grid) */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  12px;
  --sp-lg:  16px;
  --sp-xl:  24px;
  --sp-2xl: 32px;
  --sp-3xl: 48px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Lato', sans-serif;
  background: var(--braun);
  color: var(--text-hell);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow: hidden;
}

/* ── VIEWS ─────────────────────────────────────────────────── */
.view { display: none; height: 100vh; height: 100dvh; flex-direction: column; }
.view.active { display: flex; }

/* ── HEADER ─────────────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, var(--rot-dunkel), var(--rot));
  border-bottom: 3px solid var(--gold);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: var(--schatten);
}

header h1 {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--gold);
  letter-spacing: 2px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.header-right { display: flex; align-items: center; gap: 16px; }

#clock, #clock-display {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-hell);
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

.view-switch-btn {
  background: var(--gold);
  color: var(--braun);
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.view-switch-btn:active { background: var(--gold-hell); }

/* ── KASSIER-LAYOUT ─────────────────────────────────────────── */
#cashier-view .main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Produktbereich */
.products-area {
  flex: 1;
  overflow: hidden;
  padding: 8px;
  background: var(--braun);
  display: flex;
  flex-direction: column;
}

.category-label {
  display: none;
}

.product-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 1fr;
  gap: 4px;
  overflow: hidden;
}

.product-btn {
  position: relative;
  border: 2px solid rgba(212,175,55,0.25);
  border-radius: var(--radius);
  padding: 4px 4px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: transform 0.1s, border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  overflow: hidden;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

/* Kategorie-Farben */
.product-btn[data-category="Getränke"] {
  background: linear-gradient(160deg, #7a1a1a, #4d0d0d);
}
.product-btn[data-category="Sonstiges"] {
  background: linear-gradient(160deg, #7a6510, #4d3f07);
}
.product-btn[data-category="Alkoholfrei"] {
  background: linear-gradient(160deg, #1a5c1a, #0d3d0d);
}

.product-btn:active {
  transform: scale(0.95);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(212,175,55,0.4);
}

.product-emoji {
  font-size: var(--fs-hero);
  line-height: 1;
}

.product-qty-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--gold);
  color: #2a0a0a;
  font-size: 0.75rem;
  font-weight: 900;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.product-img {
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.product-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  color: var(--creme);
  line-height: 1.2;
}

.product-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
}

/* Warenkorb-Panel */
.cart-panel {
  width: 320px;
  background: linear-gradient(180deg, var(--rot-dunkel) 0%, var(--braun-kart) 100%);
  border-left: 3px solid var(--gold);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  min-height: 0;
}

.cart-header {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 2px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(212,175,55,0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cart-menu-btn {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(212,175,55,0.3);
  color: rgba(253,246,227,0.5);
  border-radius: 7px;
  width: 30px;
  height: 30px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.cart-menu-btn:active {
  background: rgba(212,175,55,0.3);
  color: var(--gold);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  min-height: 0;
}

.cart-empty {
  text-align: center;
  color: rgba(253,246,227,0.4);
  padding: 30px 16px;
  font-size: 0.9rem;
  font-style: italic;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
  margin-bottom: 6px;
}

.cart-item-emoji { font-size: 1.3rem; flex-shrink: 0; }

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.8rem; font-weight: 700; color: var(--creme); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: 0.75rem; color: var(--gold); }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.qty-btn {
  background: rgba(212,175,55,0.2);
  border: 1px solid rgba(212,175,55,0.4);
  color: var(--gold);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.qty-btn:active { background: rgba(212,175,55,0.5); }
.qty-btn.remove { color: #ff6b6b; border-color: rgba(255,107,107,0.4); }

.qty-num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--creme);
  min-width: 20px;
  text-align: center;
}

/* Summe */
.cart-total {
  border-top: 2px solid var(--gold);
  padding: 12px 16px;
  background: rgba(0,0,0,0.2);
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.total-label { font-size: 0.9rem; color: var(--creme); }
.total-amount {
  font-size: var(--fs-display);
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

/* Wechselgeld */
.change-calc {
  border-top: 1px solid rgba(212,175,55,0.3);
  padding: 10px 16px;
}

.change-label { font-size: 0.75rem; color: rgba(253,246,227,0.6); margin-bottom: 4px; }

.change-input-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 4px;
}

.cash-input {
  flex: 1;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(212,175,55,0.5);
  border-radius: 8px;
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 6px 10px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.cash-input:focus { border-color: var(--gold); }

.change-result {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: right;
  color: var(--gruen-hell);
  min-height: 1.4em;
  font-variant-numeric: tabular-nums;
}
.change-result.negativ { color: var(--gefahr); }

/* Buttons */
.cart-buttons { padding: var(--sp-sm) var(--sp-md); display: flex; flex-direction: column; gap: var(--sp-sm); }

.btn-send {
  background: linear-gradient(135deg, var(--gruen), var(--gruen-dunkel));
  border: 2px solid var(--gruen-hell);
  color: white;
  border-radius: var(--radius);
  padding: var(--sp-lg);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.1s, box-shadow 0.2s;
}
.btn-send:active { transform: scale(0.97); box-shadow: 0 2px 6px rgba(0,0,0,0.4); }
.btn-send:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-clear {
  background: rgba(139,0,0,0.4);
  border: 1px solid rgba(212,175,55,0.3);
  color: rgba(253,246,227,0.7);
  border-radius: var(--radius);
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-clear:active { background: rgba(139,0,0,0.7); }

/* ── DISPLAY-LAYOUT ─────────────────────────────────────────── */
#cashier-view {
  position: relative;
}

#display-view {
  background: var(--braun);
  position: relative;
}


.display-menu-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(212,175,55,0.3);
  color: rgba(253,246,227,0.5);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.display-menu-btn:active {
  background: rgba(212,175,55,0.3);
  color: var(--gold);
}

.stats-bar {
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(212,175,55,0.3);
  padding: var(--sp-sm) var(--sp-xl);
  display: flex;
  gap: var(--sp-xl);
  align-items: center;
  flex-shrink: 0;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-value { font-size: 1.4rem; font-weight: 700; color: var(--gold); }
.stat-label { font-size: var(--fs-micro); color: rgba(253,246,227,0.5); letter-spacing: 1px; text-transform: uppercase; }

.orders-grid {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  align-content: start;
}

.no-orders {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 20px;
  color: rgba(253,246,227,0.3);
  font-size: 1.2rem;
  font-style: italic;
}

/* Bestell-Kachel */
.order-card {
  background: linear-gradient(145deg, var(--braun-hell), var(--braun-tief));
  border: 2px solid rgba(212,175,55,0.35);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--schatten);
  transition: opacity 0.4s, transform 0.3s;
}

.order-card.done {
  opacity: 0.35;
  border-color: rgba(212,175,55,0.1);
}

.order-card-header {
  background: rgba(0,0,0,0.3);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(212,175,55,0.2);
}

.order-number {
  font-family: 'Cinzel', serif;
  font-size: var(--fs-sub);
  font-weight: 700;
  color: var(--gold);
}

.order-time {
  font-size: var(--fs-small);
  color: rgba(253,246,227,0.5);
}

.order-items { padding: 6px 10px; }

.order-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 2px;
}

.order-item:active { background: rgba(255,255,255,0.05); }
.order-item.checked { opacity: 0.45; }

.order-item-emoji { font-size: 1.2rem; flex-shrink: 0; }

.order-item-img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}

.order-item-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--creme);
  transition: text-decoration 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-item.checked .order-item-name { text-decoration: line-through; }

.order-item-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.order-item-check {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  color: var(--gruen-hell);
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.order-item.checked .order-item-check { opacity: 1; }

.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid rgba(212,175,55,0.2);
  background: rgba(0,0,0,0.2);
}

.order-total {
  font-size: var(--fs-head);
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.station-full-total {
  font-size: var(--fs-display);
  letter-spacing: 1px;
}

/* Station-Items: eigene Artikel hervorgehoben, fremde gedimmt */
.station-item-mine {
  background: rgba(212,175,55,0.08);
  border-radius: 8px;
  padding: 6px 8px;
  margin: 2px 0;
}
.station-item-mine .order-item-name { font-size: 1rem; font-weight: 700; }
.station-item-mine .order-item-img  { width: 44px; height: 44px; }

.station-item-other {
  opacity: 0.4;
  padding: 3px 8px;
  margin: 1px 0;
}
.station-item-other .order-item-name { font-size: 0.8rem; }
.station-item-other .order-item-img  { width: 26px; height: 26px; }
.station-item-other .order-item-price { font-size: 0.75rem; }

.station-divider {
  border-top: 1px dashed rgba(212,175,55,0.2);
  margin: 6px 0 4px;
}

.btn-done {
  background: linear-gradient(135deg, var(--gruen), var(--gruen-dunkel));
  border: 2px solid var(--gruen-hell);
  color: white;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s;
}
.btn-done:active { transform: scale(0.95); }
.order-card.done .btn-done { display: none; }

/* ── LIVE-CART KACHEL ───────────────────────────────────────── */
.live-cart-card {
  border-color: var(--gold) !important;
  box-shadow: 0 0 20px rgba(212,175,55,0.3);
  animation: live-glow 2s ease-in-out infinite;
}

@keyframes live-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(212,175,55,0.2); }
  50%       { box-shadow: 0 0 28px rgba(212,175,55,0.5); }
}

.live-cart-header {
  background: rgba(212,175,55,0.12) !important;
}

.live-cart-label {
  font-size: 0.95rem !important;
  color: var(--gold-hell) !important;
}

.live-cart-pulse {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-dot 1s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* ── HAPPY HOUR BANNER ──────────────────────────────────────── */
.happy-hour-banner {
  background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.1));
  border: 1px solid var(--gold);
  border-radius: 8px;
  text-align: center;
  padding: 8px;
  color: var(--gold-hell);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 10px;
  animation: live-glow 2s ease-in-out infinite;
}

.product-btn.on-sale {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212,175,55,0.3);
}

.sale-price s {
  font-size: 0.75em;
  opacity: 0.6;
  margin-right: 2px;
}

.cart-original-price {
  text-decoration: line-through;
  opacity: 0.5;
  font-size: 0.85em;
  margin-right: 4px;
}

/* ── MENÜ-VIEW ──────────────────────────────────────────────── */
#menu-view {
  background: linear-gradient(180deg, var(--braun-kart) 0%, var(--braun-tief) 100%);
}

.menu-page {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.menu-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.menu-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  background: rgba(212,175,55,0.08);
  border: 2px solid rgba(212,175,55,0.35);
  border-radius: 14px;
  color: var(--creme);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.menu-nav-btn:active {
  background: rgba(212,175,55,0.2);
  border-color: var(--gold);
}
.menu-nav-icon  { font-size: 2rem; }
.menu-nav-label { font-family: 'Cinzel', serif; font-size: 1rem; color: var(--gold); letter-spacing: 1px; }
.menu-nav-sub   { font-size: 0.75rem; color: rgba(253,246,227,0.45); }

.settings-tabs {
  display: flex;
  border-bottom: 1px solid rgba(212,175,55,0.3);
  flex-shrink: 0;
}
.stab-btn {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  color: rgba(253,246,227,0.5);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.stab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.scontent {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  user-select: text;
  -webkit-user-select: text;
}

/* Produkt-Zeilen */
.settings-product-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(212,175,55,0.12);
}
.sp-emoji { width: 52px; text-align: center; font-size: 1.2rem; }
.sp-name  { flex: 1; }
.sp-cat   { width: 105px; }
.sp-price-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--gold);
  font-size: 0.9rem;
}
.sp-price  { width: 62px; }
.sp-delete {
  background: none;
  border: 1px solid rgba(255,100,100,0.4);
  color: var(--gefahr);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.menu-page input[type="text"],
.menu-page input[type="number"],
.menu-page input[type="time"],
.menu-page select {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(212,175,55,0.4);
  border-radius: 6px;
  color: var(--creme);
  padding: 6px 8px;
  font-size: 0.85rem;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}
.menu-page input:focus,
.menu-page select:focus { border-color: var(--gold); }

.btn-add-product {
  margin-top: 14px;
  padding: 11px 20px;
  background: rgba(212,175,55,0.12);
  border: 1px dashed var(--gold);
  color: var(--gold);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}
.btn-add-product:active { background: rgba(212,175,55,0.25); }

.btn-reset-products {
  margin-top: 8px;
  padding: 9px 20px;
  background: none;
  border: 1px solid rgba(255,100,100,0.3);
  color: rgba(255,120,120,0.6);
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: pointer;
  width: 100%;
}
.btn-reset-products:active { background: rgba(255,100,100,0.1); }

/* Happy Hour */
/* Promo-Karten (Happy Hour / Familiennachmittag) */
.promo-card {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}
.promo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.promo-card-title {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 1px;
}
.promo-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.promo-toggle-label { font-size: 0.8rem; color: rgba(253,246,227,0.5); }
.hh-checkbox { width: 20px; height: 20px; cursor: pointer; accent-color: var(--gold); }

/* Wochentag-Buttons */
.hh-weekday-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.hh-wd-label {
  font-size: 0.75rem;
  color: rgba(253,246,227,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 4px;
  flex-shrink: 0;
}
.wd-btn {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(212,175,55,0.3);
  background: transparent;
  color: rgba(253,246,227,0.5);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.wd-btn.active {
  background: rgba(212,175,55,0.25);
  border-color: var(--gold);
  color: var(--gold);
}

.hh-time-row {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
}
.hh-time-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--creme);
  font-size: 0.9rem;
}
.hh-time-input { font-size: 1rem !important; color: var(--gold) !important; }

.hh-section-label {
  font-size: 0.72rem;
  color: rgba(253,246,227,0.5);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(212,175,55,0.2);
  margin-bottom: 6px;
}
.hh-product-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(212,175,55,0.08);
}
.hh-emoji    { font-size: 1.1rem; flex-shrink: 0; }
.hh-name     { flex: 1; font-size: 0.88rem; color: var(--creme); }
.hh-original { font-size: 0.82rem; color: rgba(253,246,227,0.4); min-width: 48px; text-align: right; }
.hh-discount-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  font-size: 0.88rem;
  flex-shrink: 0;
}
.hh-discount { width: 58px !important; text-align: center; }
.hh-product-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  cursor: pointer;
}
.hh-product-check { width: 18px; height: 18px; accent-color: var(--gold); flex-shrink: 0; }
.hh-strikethrough { text-decoration: line-through; opacity: 0.4; }
.hh-reduced-price { font-size: 0.88rem; color: var(--gold); font-weight: 600; flex-shrink: 0; }

/* ── HISTORIE MODAL ─────────────────────────────────────────── */
.history-panel {
  max-width: 700px;
}

.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: rgba(253,246,227,0.3);
  font-style: italic;
}

/* Statistik-Zeilen */
.stat-product-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(212,175,55,0.1);
}
.stat-p-emoji { font-size: 1.3rem; flex-shrink: 0; width: 28px; text-align: center; }
.stat-p-name  { flex: 1; font-size: 0.95rem; color: var(--creme); }
.stat-p-qty   { font-size: 1rem; font-weight: 700; color: var(--gold); min-width: 40px; text-align: right; }
.stat-p-rev   { font-size: 0.95rem; color: rgba(253,246,227,0.6); min-width: 80px; text-align: right; font-variant-numeric: tabular-nums; }

.stat-total-row {
  border-top: 2px solid rgba(212,175,55,0.4);
  border-bottom: none;
  margin-top: 4px;
}
.stat-total-row .stat-p-name { font-weight: 700; color: var(--gold); }
.stat-total-row .stat-p-rev  { color: var(--gold); font-weight: 700; font-size: 1rem; }

/* ── HISTORIE VIEW ─────────────────────────────────────────── */
.hv-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  flex-shrink: 0;
  border-bottom: 2px solid rgba(212,175,55,0.2);
}
.hvtab-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(212,175,55,0.25);
  border-bottom: none;
  color: var(--creme);
  padding: 8px 20px;
  border-radius: 8px 8px 0 0;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s;
}
.hvtab-btn:hover { background: rgba(212,175,55,0.15); }
.hvtab-btn.active {
  background: rgba(212,175,55,0.2);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 700;
}

.hvsect {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* History orders list */
.history-orders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 900px;
  margin: 0 auto;
}

/* Zeitraum-Filter */
.stats-range-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.stats-range-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(212,175,55,0.25);
  color: rgba(253,246,227,0.7);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.stats-range-btn:hover {
  background: rgba(212,175,55,0.15);
  color: var(--creme);
}
.stats-range-btn.active {
  background: rgba(212,175,55,0.25);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 700;
}

/* KPI row */
.kpi-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.kpi-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: var(--radius);
  padding: 14px 20px;
  flex: 1;
  min-width: 140px;
  text-align: center;
}
.kpi-value {
  font-size: var(--fs-display);
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.kpi-label {
  font-size: var(--fs-micro);
  color: rgba(253,246,227,0.55);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Charts grid */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.chart-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chart-full {
  grid-column: 1 / -1;
}
.chart-title {
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
}
.chart-body {
  overflow-x: auto;
}
.chart-body svg text {
  font-family: 'Lato', sans-serif;
}
.chart-empty {
  text-align: center;
  padding: 30px;
  color: rgba(253,246,227,0.3);
  font-style: italic;
  font-size: 0.9rem;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--creme);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Stats loading */
.stats-loading {
  text-align: center;
  padding: 60px 20px;
  color: rgba(253,246,227,0.4);
  font-style: italic;
}

/* Happy Hour compare */
.hh-compare-grid {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
}
.hh-compare-col {
  flex: 1;
  text-align: center;
}
.hh-compare-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(253,246,227,0.5);
  margin-bottom: 8px;
}
.hh-compare-stat {
  margin-bottom: 10px;
}
.hh-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
  font-variant-numeric: tabular-nums;
}
.hh-stat-unit {
  font-size: 0.78rem;
  color: rgba(253,246,227,0.5);
}
.hh-compare-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
  padding: 0 var(--sp-md);
}
.hh-compare-divider::before,
.hh-compare-divider::after {
  content: '';
  flex: 1;
  width: 1px;
  background: rgba(212,175,55,0.25);
  min-height: 20px;
}
.hh-vs-label {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(253,246,227,0.4);
}

.hv-pdf-btn {
  margin-left: auto;
  background: rgba(212,175,55,0.15);
  border: 1px solid rgba(212,175,55,0.4);
  color: var(--gold);
}
.hv-pdf-btn:hover { background: rgba(212,175,55,0.25); }

.btn-reset-day {
  display: block;
  width: 100%;
  margin-top: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  background: rgba(255,107,107,0.08);
  border: 1px solid rgba(255,107,107,0.3);
  border-radius: 10px;
  color: #FF6B6B;
  font-size: var(--fs-sm);
  cursor: pointer;
  text-align: center;
}
.btn-reset-day:hover { background: rgba(255,107,107,0.15); }

.hh-lost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sp-md);
  padding: var(--sp-sm) var(--sp-md);
  background: rgba(255,107,107,0.08);
  border: 1px solid rgba(255,107,107,0.25);
  border-radius: 10px;
}
.hh-lost-label {
  font-size: var(--fs-sm);
  color: rgba(253,246,227,0.7);
}
.hh-lost-value {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: #FF6B6B;
}

/* ── SETTINGS SECTION HEADER ────────────────────────────────── */
.settings-section-header {
  padding: var(--sp-md) var(--sp-lg) var(--sp-xs);
  font-family: 'Cinzel', serif;
  font-size: var(--fs-small);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  border-top: 1px solid rgba(212,175,55,0.15);
  margin-top: var(--sp-sm);
}

/* ── STATION SETTINGS ───────────────────────────────────────── */
.station-settings-box {
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}
.station-settings-title {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: var(--fs-sub);
  margin-bottom: var(--sp-xs);
}
.station-settings-row {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  cursor: pointer;
  padding: var(--sp-md) var(--sp-lg);
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 10px;
  transition: background 0.2s;
}
.station-settings-row:hover { background: rgba(212,175,55,0.14); }
.station-settings-row input[type="checkbox"] {
  width: 22px; height: 22px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
}
.station-settings-label {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--creme);
}
.station-settings-hint {
  font-size: var(--fs-small);
  color: rgba(253,246,227,0.6);
  line-height: 1.5;
  padding: 0 var(--sp-xs);
}

/* ── SCROLLBARS ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.3); border-radius: 3px; }

/* ── MOBIL (iPhone) ─────────────────────────────────────────── */
@media (max-width: 600px) {
  /* Scrollen wieder erlauben */
  html, body { overflow: auto; }

  .view { height: auto; min-height: 100dvh; }

  /* Header kompakter */
  header { padding: var(--sp-xs) var(--sp-md); }
  header h1 { font-size: var(--fs-body); letter-spacing: 1px; }
  #clock-display, #clock { font-size: var(--fs-body); letter-spacing: 1px; }
  .view-switch-btn { padding: var(--sp-xs) var(--sp-sm); font-size: var(--fs-micro); }

  /* Display: Stats-Leiste kompakt */
  .stats-bar {
    gap: var(--sp-md);
    padding: var(--sp-xs) var(--sp-md);
    flex-wrap: wrap;
    justify-content: space-around;
  }
  .stat-value { font-size: var(--fs-sub); }
  .stat-label { font-size: 0.6rem; }

  /* Display: Bestellgitter einspaltig */
  .orders-grid {
    grid-template-columns: 1fr;
    overflow-y: visible;
    padding: var(--sp-sm);
    gap: var(--sp-sm);
  }

  /* Bestellkacheln schmaler */
  .order-card-header { padding: var(--sp-xs) var(--sp-sm); }
  .order-number { font-size: var(--fs-body); }
  .order-time   { font-size: var(--fs-micro); }
  .order-items  { padding: var(--sp-xs) var(--sp-sm); }
  .order-item   { padding: var(--sp-xs) var(--sp-sm); min-height: 36px; }
  .order-item-emoji { font-size: var(--fs-sub); }
  .order-item-name  { font-size: var(--fs-small); }
  .order-card-footer { padding: var(--sp-xs) var(--sp-sm); }
  .order-total  { font-size: var(--fs-sub); }
  .btn-done     { padding: var(--sp-xs) var(--sp-md); font-size: var(--fs-small); }

  /* History View: KPI-Karten gestapelt */
  .kpi-row { flex-direction: column; gap: var(--sp-sm); }
  .kpi-card { min-width: unset; padding: var(--sp-sm) var(--sp-md); }
  .kpi-value { font-size: var(--fs-head); }

  /* Charts: volle Breite, einspaltig */
  .charts-grid { grid-template-columns: 1fr; gap: var(--sp-sm); }
  .chart-full  { grid-column: 1; }

  /* Tabs */
  .hvtab-btn    { padding: var(--sp-xs) var(--sp-md); font-size: var(--fs-small); }
  .stats-range-row { gap: var(--sp-xs); }
  .stats-range-btn { padding: 5px var(--sp-sm); font-size: var(--fs-micro); }

  /* Happy Hour Vergleich: gestapelt */
  .hh-compare-grid { flex-direction: column; gap: var(--sp-md); }
  .hh-compare-divider { flex-direction: row; padding: var(--sp-xs) 0; }
  .hh-compare-divider::before,
  .hh-compare-divider::after { width: 100%; height: 1px; min-height: unset; flex: 1; }
}

/* ── CONNECTION STATUS ──────────────────────────────────────── */
.conn-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gefahr);
  display: inline-block;
  margin-right: 6px;
  transition: background 0.3s;
}
.conn-dot.connected { background: var(--gruen-hell); }
.conn-label { font-size: 0.75rem; color: rgba(253,246,227,0.6); }
