@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #060c18;
  --bg2: #0a1526;
  --panel: #0e1d34;
  --panel-light: #15294a;
  --gold: #c9973e;
  --gold-soft: #e6c078;
  --blue: #3ea7ff;
  --blue-soft: #8fd0ff;
  --teal: #2bb3a3;
  --teal-soft: #7fe0d2;
  --rust: #9c4530;
  --cream: #e9eff8;
  --cream-dim: #93a8c2;
  --line: #1d3557;
  --good: #4caf6f;
  --bad: #e5534b;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 7px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--cream);
  font-family: var(--font-body);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(62,167,255,.10), transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(201,151,62,.08), transparent 45%),
    radial-gradient(circle at 50% 40%, rgba(43,179,163,.05), transparent 55%);
  background-attachment: fixed;
  position: relative;
}
body::before, body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-repeat: no-repeat;
}
body::before {
  opacity: .5;
  background-image:
    radial-gradient(1px 1px at 8% 12%, rgba(233,239,248,.5), transparent),
    radial-gradient(1px 1px at 22% 68%, rgba(233,239,248,.35), transparent),
    radial-gradient(1.5px 1.5px at 41% 22%, rgba(233,239,248,.4), transparent),
    radial-gradient(1px 1px at 63% 78%, rgba(233,239,248,.3), transparent),
    radial-gradient(1px 1px at 78% 15%, rgba(233,239,248,.45), transparent),
    radial-gradient(1.5px 1.5px at 92% 55%, rgba(233,239,248,.3), transparent),
    radial-gradient(1px 1px at 35% 90%, rgba(233,239,248,.25), transparent),
    radial-gradient(1px 1px at 12% 45%, rgba(233,239,248,.3), transparent),
    radial-gradient(1px 1px at 55% 8%, rgba(233,239,248,.4), transparent);
  animation: starTwinkleA 5s ease-in-out infinite, starDrift 140s linear infinite alternate;
}
body::after {
  opacity: .32;
  background-image:
    radial-gradient(1px 1px at 5% 30%, rgba(143,208,255,.55), transparent),
    radial-gradient(1.5px 1.5px at 28% 85%, rgba(233,239,248,.4), transparent),
    radial-gradient(1px 1px at 47% 55%, rgba(143,208,255,.4), transparent),
    radial-gradient(1px 1px at 68% 30%, rgba(233,239,248,.35), transparent),
    radial-gradient(1.5px 1.5px at 85% 78%, rgba(233,239,248,.45), transparent),
    radial-gradient(1px 1px at 96% 20%, rgba(143,208,255,.4), transparent),
    radial-gradient(1px 1px at 18% 6%, rgba(233,239,248,.3), transparent);
  animation: starTwinkleB 6.5s ease-in-out infinite 1.4s, starDrift 190s linear infinite alternate-reverse;
}
@keyframes starTwinkleA { 0%, 100% { opacity: .28; } 50% { opacity: .62; } }
@keyframes starTwinkleB { 0%, 100% { opacity: .16; } 50% { opacity: .42; } }
@keyframes starDrift { from { background-position: 0 0; } to { background-position: 60px -45px; } }
#login-screen, #app { position: relative; z-index: 1; }

/* ---------- Logo-Wasserzeichen im Hintergrund ---------- */
.bg-logo-watermark {
  position: fixed; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none; overflow: hidden;
}
.bg-logo-watermark img {
  width: min(62vmin, 620px); height: min(62vmin, 620px); object-fit: cover; border-radius: 50%;
  opacity: .035; filter: saturate(1.2);
  animation: watermarkBreathe 14s ease-in-out infinite;
}
@keyframes watermarkBreathe {
  0%, 100% { transform: scale(1); opacity: .03; }
  50% { transform: scale(1.04); opacity: .05; }
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; transition: filter .22s var(--ease), transform .18s var(--ease-out), box-shadow .28s var(--ease); }
button:hover { filter: brightness(1.15); }
button:active { transform: scale(.97); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: 2px; border-radius: 4px; }
input, select, textarea { font-family: inherit; background: var(--bg2); border: 1px solid var(--line); color: var(--cream); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; transition: border-color .22s var(--ease), box-shadow .22s var(--ease); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(62,167,255,.15); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); background-clip: padding-box; }
* { scrollbar-color: var(--line) transparent; scrollbar-width: thin; }

/* ---------- Übergänge ---------- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes screenIn { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }
#content.fade-in { animation: fadeInUp .4s var(--ease-out) both; }
#login-screen.screen-in .login-box, #app.screen-in { animation: screenIn .45s var(--ease-out) both; }
#login-screen.fade-out { opacity: 0; transition: opacity .3s var(--ease); }
#login-screen { transition: opacity .3s var(--ease); }

/* ---------- Logo & Neon-Animation ---------- */
.logo-img { border-radius: 50%; object-fit: cover; display: block; }
.logo-img-lg { width: 84px; height: 84px; margin: 0 auto 6px; border: 2px solid var(--gold); box-shadow: 0 0 18px rgba(62,167,255,.45), 0 0 4px rgba(201,151,62,.6); animation: logoPulse 3.5s ease-in-out infinite; }
.logo-img-sm { width: 42px; height: 42px; border: 2px solid var(--gold); box-shadow: 0 0 10px rgba(62,167,255,.4); }
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(62,167,255,.35), 0 0 4px rgba(201,151,62,.5); }
  50% { box-shadow: 0 0 26px rgba(62,167,255,.65), 0 0 8px rgba(201,151,62,.8); }
}
.bar-name {
  font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: .5px; margin-top: 6px;
  color: var(--blue-soft);
  text-shadow: 0 0 6px rgba(62,167,255,.55), 0 0 14px rgba(62,167,255,.35);
  animation: neonFlicker 4s ease-in-out infinite;
}
@keyframes neonFlicker {
  0%, 19%, 21%, 23%, 100% { text-shadow: 0 0 6px rgba(62,167,255,.55), 0 0 14px rgba(62,167,255,.35); opacity: 1; }
  20%, 22% { text-shadow: 0 0 2px rgba(62,167,255,.2); opacity: .85; }
}

/* ---------- Login ---------- */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 0%, var(--bg2), var(--bg));
}
.login-box { background: linear-gradient(180deg, var(--panel), var(--panel) 60%, #0c1a30); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px 32px; width: min(340px, 92vw); box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 50px rgba(62,167,255,.09), inset 0 1px 0 rgba(255,255,255,.04); }
.login-header { text-align: center; margin-bottom: 22px; }
.sub { font-size: 11px; color: var(--cream-dim); letter-spacing: 3px; font-weight: 600; text-transform: uppercase; }
.user-list { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; margin-bottom: 16px; }
.user-list button { display: flex; justify-content: space-between; align-items: center; padding: 10px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg2); color: var(--cream); text-align: left; }
.user-list button:hover { border-color: rgba(62,167,255,.4); transform: translateX(2px); }
.user-list button.selected { border-color: var(--blue); background: var(--panel-light); box-shadow: 0 0 10px rgba(62,167,255,.25); }
.user-avatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #1a1305; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.user-chevron { color: var(--cream-dim); font-size: 16px; opacity: .6; }
.user-list button.selected .user-chevron { color: var(--blue-soft); opacity: 1; }
#pin-input { width: 100%; margin-bottom: 10px; letter-spacing: 3px; }
.error-text { color: var(--bad); font-size: 13px; margin-bottom: 10px; min-height: 16px; }
.hint { margin-top: 14px; font-size: 11px; color: var(--cream-dim); text-align: center; }
.btn-gold { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #1a1305; border: none; border-radius: var(--radius-sm); padding: 11px 16px; font-weight: 700; font-size: 14px; letter-spacing: .2px; box-shadow: 0 2px 10px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.35); transition: filter .2s var(--ease), transform .22s var(--ease-out), box-shadow .3s var(--ease); }
.btn-gold:hover { box-shadow: 0 6px 20px rgba(201,151,62,.5), inset 0 1px 0 rgba(255,255,255,.4); transform: translateY(-1px); }
.btn-gold:active { transform: translateY(0) scale(.98); box-shadow: 0 1px 4px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-gold.full { width: 100%; }
.btn-rust { background: linear-gradient(135deg, #b6552f, var(--rust)); color: var(--cream); border: none; border-radius: var(--radius-sm); padding: 9px 15px; font-size: 13px; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.btn-rust:hover { box-shadow: 0 5px 16px rgba(156,69,48,.45); transform: translateY(-1px); }
.btn-dark { background: var(--panel-light); border: 1px solid var(--line); color: var(--cream); border-radius: var(--radius-sm); padding: 10px 16px; font-weight: 500; }
.btn-dark:hover { border-color: rgba(62,167,255,.4); transform: translateY(-1px); }
.btn-line { background: var(--panel-light); border: 1px solid var(--line); color: var(--cream); border-radius: var(--radius-sm); padding: 6px 11px; font-size: 12px; font-weight: 500; }
.btn-line:hover { border-color: var(--blue); color: var(--blue-soft); }

/* ---------- App ---------- */
.header { background: linear-gradient(90deg, var(--bg2), #0c1930); border-bottom: 2px solid var(--gold); padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 20px rgba(62,167,255,.06), 0 1px 0 rgba(255,255,255,.03) inset; }
.header-left { display: flex; align-items: center; gap: 12px; }
.sub-small { font-size: 10px; color: var(--cream-dim); letter-spacing: 2.5px; font-weight: 600; text-transform: uppercase; }
.header-right { display: flex; align-items: center; gap: 16px; }
.im-dienst-badge { font-size: 12px; font-weight: 700; color: var(--gold-soft); background: var(--panel-light); border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; white-space: nowrap; }
.who { font-size: 13px; color: var(--cream-dim); }

.tabs { display: flex; gap: 4px; background: var(--bg2); padding: 0 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs button { position: relative; display: flex; align-items: center; gap: 6px; padding: 11px 16px; background: transparent; border: none; border-bottom: 3px solid transparent; color: var(--cream-dim); font-size: 13px; font-weight: 500; transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease); }
.tabs button::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px; background: var(--cream-dim); border-radius: 3px 3px 0 0; opacity: 0; transform: scaleX(.3); transform-origin: center; transition: opacity .25s var(--ease), transform .3s var(--ease-out); }
.tabs button:not(.active):hover { color: var(--cream); }
.tabs button:not(.active):hover::after { opacity: .3; transform: scaleX(1); }
.tabs button.active { background: var(--panel); border-bottom: 3px solid var(--blue); color: var(--blue-soft); text-shadow: 0 0 8px rgba(62,167,255,.5); font-weight: 600; }
.subtabs { display: flex; gap: 6px; background: rgba(0,0,0,.15); padding: 8px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; animation: fadeInUp .25s var(--ease-out) both; }
.subtabs button { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; color: var(--cream-dim); font-size: 12px; font-weight: 500; }
.subtabs button:hover { color: var(--cream); border-color: rgba(62,167,255,.4); }
.subtabs button.active { background: rgba(62,167,255,.16); border-color: var(--blue); color: var(--blue-soft); font-weight: 600; }
.badge { background: var(--bad); color: #fff; border-radius: 10px; font-size: 10px; padding: 1px 6px; margin-left: 4px; }

.content { padding: 22px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: var(--gold); text-align: left; border-bottom: 2px solid var(--line); padding: 10px 8px; font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; font-weight: 700; }
td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
td input, td select { width: 100%; }
tbody tr { transition: background .25s var(--ease); }
tbody tr:nth-child(even) { background: rgba(255,255,255,.015); }
tbody tr:hover { background: rgba(62,167,255,.06); }

.card { background: linear-gradient(180deg, var(--panel), #0c1a30); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; box-shadow: 0 6px 22px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.03); transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .25s var(--ease-out); }
.card:hover { border-color: rgba(62,167,255,.35); }
.section-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--gold); letter-spacing: 1px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.section-title::before { content: ''; width: 3px; height: 14px; background: linear-gradient(180deg, var(--gold-soft), var(--gold)); border-radius: 2px; flex-shrink: 0; }
.warn-banner { background: rgba(229,83,75,.15); border: 1px solid var(--bad); color: var(--bad); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px; font-size: 13px; animation: fadeInUp .32s var(--ease-out) both; }
.form-row { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.stat-box { background: linear-gradient(160deg, var(--panel), #0c1a30); border: 1px solid rgba(201,151,62,.4); border-radius: var(--radius-md); padding: 18px; flex: 1; box-shadow: 0 0 22px rgba(62,167,255,.06), inset 0 1px 0 rgba(255,255,255,.03); transition: transform .3s var(--ease-out), box-shadow .3s var(--ease); position: relative; overflow: hidden; }
.stat-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--teal), var(--blue)); }
.stat-box:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(62,167,255,.16); }
.stat-label { font-size: 11.5px; color: var(--cream-dim); letter-spacing: 1.2px; text-transform: uppercase; font-weight: 600; }
.stat-value { font-family: var(--font-display); font-size: 29px; color: var(--blue-soft); font-weight: 800; text-shadow: 0 0 10px rgba(62,167,255,.4); }

.empty-state { text-align: center; padding: 32px 16px; color: var(--cream-dim); font-size: 13px; border: 1px dashed var(--line); border-radius: var(--radius-md); }
.empty-state-icon { font-size: 28px; display: block; margin-bottom: 10px; opacity: .75; animation: emptyFloat 3s ease-in-out infinite; }
@keyframes emptyFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

.low-stock-banner { display: flex; flex-direction: column; gap: 4px; }
.low-stock-detail { display: none; font-size: 12px; color: var(--cream-dim); }
.low-stock-banner.expanded .low-stock-detail { display: block; }

.zahlart-switch { display: flex; gap: 6px; margin: 10px 0; }
.zahlart-opt { flex: 1; background: var(--bg2); border: 1px solid var(--line); color: var(--cream-dim); border-radius: 6px; padding: 8px; font-size: 13px; transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease); }
.zahlart-opt.active { border-color: var(--blue); color: var(--blue-soft); background: rgba(62,167,255,.1); box-shadow: 0 0 8px rgba(62,167,255,.15); }

.stempel-aktiv { border-color: var(--good) !important; color: var(--good) !important; background: rgba(76,175,111,.12) !important; }

/* ---------- Profilbilder ---------- */
.header-avatar-btn { display: flex; align-items: center; gap: 9px; background: transparent; border: 1px solid transparent; border-radius: 20px; padding: 4px 10px 4px 4px; }
.header-avatar-btn:hover { border-color: var(--line); background: var(--panel-light); }
.header-avatar-btn .user-avatar { width: 30px; height: 30px; font-size: 13px; }
.avatar-preview-wrap { display: flex; align-items: center; justify-content: center; margin: 4px 0 14px; }
.avatar-preview, .avatar-preview-fallback { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); box-shadow: 0 0 26px rgba(201,151,62,.3); }
.avatar-preview-fallback { display: flex; align-items: center; justify-content: center; font-size: 42px; }

/* ---------- Stempel-Effekt (Ein-/Austempeln) ---------- */
.stempel-fx { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.stempel-fx.hidden { display: none !important; }
.stempel-fx::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,.4), transparent 70%);
  opacity: 0; animation: stempelDim 1.4s ease both;
}
.stempel-fx-inner { position: relative; display: flex; align-items: center; justify-content: center; }
.stempel-fx-ring {
  position: absolute; width: 210px; height: 210px; border-radius: 50%; border: 3px solid var(--good);
  opacity: 0; animation: stempelRing .65s ease-out .27s both;
}
.stempel-fx-out .stempel-fx-ring { border-color: var(--rust); }
.stempel-fx-mark {
  position: relative; font-family: var(--font-body); font-weight: 800; font-size: clamp(22px, 5vw, 36px);
  letter-spacing: 3px; text-transform: uppercase; color: var(--good);
  padding: 16px 30px; border: 5px double var(--good); border-radius: 10px;
  background: rgba(76,175,111,.08);
  box-shadow: 0 0 46px rgba(76,175,111,.4), inset 0 0 22px rgba(76,175,111,.16);
  text-shadow: 0 0 14px rgba(76,175,111,.7);
  animation: stempelSlam .5s cubic-bezier(.2,1.8,.35,1) both, stempelHoldFade 1.4s ease both;
}
.stempel-fx-out .stempel-fx-mark {
  color: var(--rust); border-color: var(--rust);
  background: rgba(156,69,48,.1);
  box-shadow: 0 0 46px rgba(156,69,48,.45), inset 0 0 22px rgba(156,69,48,.18);
  text-shadow: 0 0 14px rgba(156,69,48,.7);
}
@keyframes stempelDim { 0% { opacity: 0; } 14% { opacity: 1; } 72% { opacity: 1; } 100% { opacity: 0; } }
@keyframes stempelRing { 0% { transform: scale(.15); opacity: .65; } 100% { transform: scale(2.5); opacity: 0; } }
@keyframes stempelSlam {
  0% { transform: translateY(-280px) rotate(-22deg) scale(1.2); opacity: 0; }
  55% { transform: translateY(0) rotate(-7deg) scale(1.1); opacity: 1; }
  72% { transform: translateY(0) rotate(-7deg) scale(.95); }
  88% { transform: translateY(0) rotate(-7deg) scale(1.03); }
  100% { transform: translateY(0) rotate(-7deg) scale(1); opacity: 1; }
}
@keyframes stempelHoldFade {
  0%, 68% { opacity: 1; }
  100% { opacity: 0; }
}
.stempel-shake { animation: stempelShake .3s ease; }
@keyframes stempelShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-4px) rotate(-.3deg); }
  40% { transform: translateX(4px) rotate(.3deg); }
  60% { transform: translateX(-3px) rotate(-.2deg); }
  80% { transform: translateX(3px) rotate(.2deg); }
}

/* ---------- Laden öffnen/schließen: schwingendes Kneipenschild ---------- */
.laden-fx { position: fixed; top: 0; left: 0; right: 0; z-index: 150; display: flex; justify-content: center; pointer-events: none; height: 0; overflow: visible; }
.laden-fx.hidden { display: none !important; }
.laden-fx::before {
  content: ''; position: fixed; inset: 0;
  background: radial-gradient(circle at top, rgba(0,0,0,.35), transparent 60%);
  opacity: 0; animation: stempelDim 1.9s ease both;
}
.laden-fx-sign-wrap { transform-origin: top center; animation: ladenSwing 1.9s cubic-bezier(.36,.07,.19,.97) both; display: flex; flex-direction: column; align-items: center; }
.laden-fx-chain { width: 3px; height: 44px; background: linear-gradient(var(--cream-dim), var(--line)); }
.laden-fx-sign {
  margin-top: -2px; padding: 15px 32px; border: 4px solid var(--good); border-radius: 10px;
  background: linear-gradient(160deg, var(--panel), #0c1a30);
  font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 4.5vw, 30px); letter-spacing: 2px;
  color: var(--good); text-align: center; white-space: nowrap;
  box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 30px rgba(76,175,111,.3), inset 0 1px 0 rgba(255,255,255,.06);
  text-shadow: 0 0 12px rgba(76,175,111,.6);
}
.laden-fx.laden-fx-closed .laden-fx-sign { color: var(--rust); border-color: var(--rust); box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 30px rgba(156,69,48,.35), inset 0 1px 0 rgba(255,255,255,.06); text-shadow: 0 0 12px rgba(156,69,48,.6); }
@keyframes ladenSwing {
  0% { transform: translateY(-160px) rotate(0deg); opacity: 0; }
  9% { opacity: 1; }
  22% { transform: translateY(0) rotate(13deg); }
  36% { transform: translateY(0) rotate(-9deg); }
  50% { transform: translateY(0) rotate(6deg); }
  63% { transform: translateY(0) rotate(-3.5deg); }
  75% { transform: translateY(0) rotate(1.5deg); }
  86% { transform: translateY(0) rotate(0deg); opacity: 1; }
  94% { opacity: 1; }
  100% { transform: translateY(-160px) rotate(0deg); opacity: 0; }
}

.rabatt-popup-wrap { position: relative; margin: 8px 0; }
.rabatt-popup-wrap .btn-line.full { width: 100%; text-align: left; display: flex; align-items: center; gap: 6px; }
.rabatt-popup-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; background: var(--panel-light); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 28px rgba(0,0,0,.45); max-height: 260px; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.rabatt-popup-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; text-align: left; background: transparent; border: none; color: var(--cream); border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.rabatt-popup-item:hover { background: rgba(62,167,255,.1); }
.rabatt-popup-item.active { background: rgba(201,151,62,.16); color: var(--gold-soft); }
.rabatt-popup-item.rabatt-popup-clear { color: var(--cream-dim); border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; margin-bottom: 3px; padding-bottom: 9px; }
.rabatt-popup-value { color: var(--gold); font-weight: 700; flex-shrink: 0; }

/* Zeiterfassung */
.zeit-badge-aktiv { color: var(--good); font-weight: 700; }
.zeit-filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.zeit-summary-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.zt-status-list { display: flex; flex-direction: column; gap: 6px; }
.zt-status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--bg2); border: 1px solid var(--line); }
.zt-status-name { font-size: 13px; font-weight: 600; }
.zt-status-toggle { min-width: 150px; text-align: center; }

/* Monatsumsatz-Chart */
.mv-summary { font-size: 13px; color: var(--cream-dim); margin-bottom: 14px; }
.mv-summary b { color: var(--gold); font-size: 15px; }
.mv-chart { display: flex; align-items: flex-end; gap: 14px; height: 220px; padding-top: 10px; overflow-x: auto; justify-content: flex-start; }
.mv-col { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; width: 56px; height: 100%; }
.mv-bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.mv-bar { width: 60%; background: linear-gradient(180deg, var(--blue-soft), var(--blue)); border-radius: 4px 4px 0 0; min-height: 3px; transition: height .5s ease, filter .2s; animation: barGrow .5s ease both; }
.mv-bar:hover { filter: brightness(1.2); }
.mv-bar-current { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); box-shadow: 0 0 12px rgba(201,151,62,.4); }
@keyframes barGrow { from { height: 0 !important; } }
.mv-value { font-size: 11px; color: var(--cream); font-weight: 600; margin-bottom: 6px; white-space: nowrap; }
.mv-label { font-size: 11px; color: var(--cream-dim); margin-top: 6px; }

/* Kasse layout */
.laden-status { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.laden-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.laden-status.offen .laden-dot { background: var(--good); box-shadow: 0 0 8px var(--good); animation: dotPulse 2s ease-in-out infinite; }
.laden-status.geschlossen .laden-dot { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.kasse-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.product-card {
  background: linear-gradient(160deg, var(--panel-light), #10203a); border: 1px solid rgba(62,167,255,.18); border-radius: var(--radius-md); padding: 14px;
  transition: border-color .28s var(--ease), box-shadow .3s var(--ease), transform .25s var(--ease-out);
  box-shadow: 0 3px 12px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04);
  animation: fadeInUp .38s var(--ease-out) both;
}
.product-card:hover { border-color: var(--blue); box-shadow: 0 6px 20px rgba(62,167,255,.24), inset 0 1px 0 rgba(255,255,255,.06); transform: translateY(-3px); }
.cat-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 7px; border-bottom: 2px solid var(--gold); }
.cat-icon { font-size: 16px; }
.cat-name { font-family: var(--font-display); font-size: 13.5px; color: var(--gold); letter-spacing: 1px; font-weight: 700; text-transform: uppercase; }
.cat-count { margin-left: auto; background: var(--panel-light); color: var(--cream-dim); font-size: 11px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line); }
.cart-item { animation: fadeInUp .28s var(--ease-out) both; }
.product-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.product-price { font-size: 13px; color: var(--gold); margin-bottom: 8px; font-weight: 600; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--bg2); }
.qty-stepper button { background: transparent; border: none; color: var(--cream); padding: 5px 9px; font-size: 14px; }
.qty-stepper button:hover { background: rgba(62,167,255,.12); }
.qty-stepper input { width: 32px; text-align: center; background: transparent; border: none; padding: 5px 0; border-radius: 0; color: var(--cream); }
.add-btn { flex: 1; background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #1a1305; border: none; border-radius: 6px; padding: 7px 8px; font-size: 12px; font-weight: 700; }
.qty-row { display: flex; gap: 6px; align-items: center; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.qty-stepper button { background: var(--panel-light); border: none; color: var(--cream); padding: 5px 8px; }
.qty-stepper input { width: 32px; text-align: center; background: var(--bg2); border: none; padding: 5px 0; border-radius: 0; }
.add-btn { flex: 1; background: var(--gold); color: var(--bg); border: none; border-radius: 5px; padding: 6px 8px; font-size: 12px; font-weight: 700; }

.cart-box { position: sticky; top: 10px; align-self: start; }
.cart-item { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.cart-item input { width: 44px; text-align: center; }
.cart-sum-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--cream-dim); }
.cart-total-row { display: flex; justify-content: space-between; font-family: var(--font-display); font-size: 20px; color: var(--gold); font-weight: 800; margin-top: 8px; }
.checkout-btn { width: 100%; margin-top: 14px; padding: 13px; background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #1a1305; border: none; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; letter-spacing: .2px; animation: checkoutGlow 2.6s ease-in-out infinite; }
.checkout-btn:disabled { background: var(--line); color: var(--cream-dim); opacity: .5; cursor: not-allowed; animation: none; }
@keyframes checkoutGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(201,151,62,0); }
  50% { box-shadow: 0 0 18px rgba(201,151,62,.45); }
}

/* Modal / Bon */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 50; animation: modalBg .3s var(--ease); }
@keyframes modalBg { from { opacity: 0; } to { opacity: 1; } }
.modal-box { background: linear-gradient(180deg, var(--panel), #0c1a30); border-radius: var(--radius-md); padding: 20px; width: min(340px, 92vw); border: 1px solid var(--gold); max-height: 90vh; overflow-y: auto; position: relative; animation: fadeInUp .38s var(--ease-out) both; box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* Drucker-Gehäuse */
.printer { background: linear-gradient(180deg, #26160a, #1a0f07); border-radius: 8px 8px 3px 3px; padding: 10px 14px 14px; box-shadow: inset 0 -2px 6px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.3); }
.printer.printing { animation: printerJitter .16s steps(2) infinite; }
@keyframes printerJitter { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1px); } 50% { transform: translateX(0); } 75% { transform: translateX(1px); } }
.printer-slot { height: 6px; background: #000; border-radius: 3px; box-shadow: inset 0 2px 4px rgba(0,0,0,.8), 0 0 10px rgba(62,167,255,.15); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; }
.printer-led { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transform: translateY(-9px); box-shadow: 0 0 0 rgba(62,167,255,0); transition: background .3s, box-shadow .3s; }
.printer-led.active { background: var(--blue); box-shadow: 0 0 8px var(--blue); animation: ledBlink .5s ease-in-out infinite; }
.printer-led.done { background: var(--good); box-shadow: 0 0 8px var(--good); animation: none; }
@keyframes ledBlink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* Papier, das in gestuften Schüben aus dem Drucker fährt (wie ein echter Bondrucker) */
.bon-print-wrap {
  position: relative; margin: 0 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.15);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.3s steps(30, end);
}
.printer-head-line {
  position: absolute; left: 0; right: 0; top: 0%; height: 4px; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--blue-soft) 50%, transparent);
  box-shadow: 0 0 10px 1px var(--blue), 0 6px 14px -2px rgba(62,167,255,.5);
  transition: top 1.3s steps(30, end), opacity .25s ease;
}
.printer-head-line::after {
  content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0));
}

.bon-print {
  background: #fff; color: #1a1a1a; padding: 18px 16px 14px;
  font-family: 'Courier New', monospace; font-size: 12px; border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.bon-print .line { display: flex; justify-content: space-between; gap: 8px; padding: 1px 0; }
.bon-print .dash { border-top: 1px dashed #999; margin: 8px 0; }
.bon-head { text-align: center; margin-bottom: 2px; }
.bon-logo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; margin: 0 auto 6px; display: block; border: 2px solid #c9973e; }
.bon-barname { font-weight: 700; font-size: 15px; letter-spacing: .5px; }
.bon-sub { font-size: 10px; color: #666; letter-spacing: 1.5px; margin-top: 2px; }
.bon-total { font-weight: 700; font-size: 14px; margin-top: 4px; }
.bon-foot { text-align: center; margin-top: 12px; font-size: 11px; color: #444; letter-spacing: .5px; }

.bon-success {
  position: absolute; inset: 0; background: rgba(14,29,52,.94); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  z-index: 5; animation: successFadeIn .25s ease both; transition: opacity .35s ease;
}
.bon-success.bon-success-out { opacity: 0; }
.bon-success svg { width: 68px; height: 68px; }
.bon-success-circle { stroke: var(--good); stroke-width: 2.5; stroke-dasharray: 145; stroke-dashoffset: 145; animation: successCircle .5s ease forwards; }
.bon-success-check { stroke: var(--good); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: successCheck .3s ease .45s forwards; }
.bon-success-text { color: var(--cream); font-size: 14px; letter-spacing: .5px; opacity: 0; animation: fadeInUp .38s var(--ease-out) .55s forwards; }
@keyframes successFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes successCircle { to { stroke-dashoffset: 0; } }
@keyframes successCheck { to { stroke-dashoffset: 0; } }

.modal-actions { display: flex; gap: 8px; margin-top: 14px; opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease-out); pointer-events: none; }
.modal-actions.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

@media print {
  body * { visibility: hidden; }
  #app, #login-screen, .made-by { display: none !important; }
  .printer, .modal-actions, #toast-wrap, .bon-success, .printer-head-line { display: none !important; }
  .modal { position: static !important; background: none !important; }
  .modal-box { position: static !important; background: none !important; border: none !important; box-shadow: none !important; padding: 0 !important; width: auto !important; max-height: none !important; overflow: visible !important; }
  #bon-print-wrap { visibility: visible !important; clip-path: none !important; position: static !important; overflow: visible !important; box-shadow: none !important; margin: 0 !important; }
  #bon-print, #bon-print * { visibility: visible; }
  #bon-print { position: static !important; width: 300px; margin: 0 auto; box-shadow: none; }
  #vertrag-print, #vertrag-print * { visibility: visible; }
  #vertrag-print { position: static !important; width: auto; margin: 0; box-shadow: none; max-height: none !important; overflow: visible !important; padding: 0 !important; }
  #vertrag-print h3 { page-break-after: avoid; break-after: avoid; }
  #vertrag-print table, #vertrag-print .vertrag-sign-row { page-break-inside: avoid; break-inside: avoid; }
  #abschluss-print, #abschluss-print * { visibility: visible; }
  #abschluss-print { position: static !important; width: auto; margin: 0; box-shadow: none; max-height: none !important; overflow: visible !important; padding: 0 !important; }
}

/* ---------- Kooperationsverträge (Dokumentansicht) ---------- */
.vertrag-print {
  background: #fff; color: #1a1a1a; padding: 32px 36px; border-radius: 6px;
  font-family: Georgia, 'Times New Roman', serif; font-size: 13px; line-height: 1.55;
  max-height: 74vh; overflow-y: auto; box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.vertrag-print h2 { font-size: 20px; margin: 0 0 4px; }
.vertrag-print h3 { font-size: 14px; color: #7a5a1e; margin: 20px 0 6px; border-bottom: 1px solid #ddd; padding-bottom: 4px; }
.vertrag-print p { margin: 6px 0; }
.vertrag-print ul { margin: 6px 0; padding-left: 20px; }
.vertrag-fin-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.vertrag-fin-table th, .vertrag-fin-table td { border: 1px solid #ccc; padding: 6px 8px; text-align: left; }
.vertrag-fin-table th { background: #f3f3f3; }
.vertrag-sign-row { display: flex; gap: 40px; margin-top: 30px; }
.vertrag-sign-row > div { flex: 1; font-size: 12px; color: #333; }
.vertrag-sign-line { border-top: 1px solid #333; margin: 34px 0 6px; }

@media (max-width: 800px) {
  .kasse-grid { grid-template-columns: 1fr; }
  .cart-box { position: static; }
  .content { padding: 14px; }
  .header { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .tabs { padding: 0 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .tabs button { padding: 10px 12px; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
  .form-row .stat-box, .stat-box { min-width: 45%; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  th, td { padding: 8px 10px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
}

@media (max-width: 480px) {
  .login-box { width: 90vw; padding: 24px 20px; }
  .header-right { gap: 8px; }
  .who { display: none; }
  .im-dienst-badge { display: none; }
  .bar-name { font-size: 18px; }
  .logo-img-lg { width: 68px; height: 68px; }
  .content { padding: 10px; }
  .stat-box { min-width: 100%; }
  .form-row { gap: 6px; }
  .checkout-btn, .btn-gold { font-size: 13px; padding: 10px; }
  .cart-item input { width: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Toasts ---------- */
#toast-wrap { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 8px; z-index: 200; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  color: var(--cream); padding: 10px 16px; border-radius: 8px; font-size: 13px; box-shadow: 0 6px 22px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(12px) scale(.96); transition: opacity .25s ease, transform .25s cubic-bezier(.34,1.4,.64,1);
  max-width: min(360px, 86vw);
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast-icon { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.toast-success { border-color: var(--good); }
.toast-success .toast-icon { background: var(--good); color: #06210f; }
.toast-error { border-color: var(--bad); }
.toast-error .toast-icon { background: var(--bad); color: #2a0906; }
.toast-info .toast-icon { background: var(--blue); color: #06121f; }

/* ---------- Mikro-Interaktionen ---------- */
.product-card.bump { animation: cardBump .32s cubic-bezier(.34,1.6,.64,1); }
@keyframes cardBump { 0% { transform: scale(1); } 35% { transform: scale(1.045); border-color: var(--gold); } 100% { transform: scale(1); } }
.field-saved { animation: fieldSaved .6s ease; }
@keyframes fieldSaved { 0% { box-shadow: 0 0 0 2px rgba(76,175,111,0); } 25% { box-shadow: 0 0 0 2px rgba(76,175,111,.6); border-color: var(--good); } 100% { box-shadow: 0 0 0 2px rgba(76,175,111,0); } }
#sound-toggle-btn { font-size: 16px; padding: 6px 10px; line-height: 1; }

/* ---------- Aktivitäts-Log ---------- */
.log-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.log-good { background: rgba(76,175,111,.15); color: var(--good); border: 1px solid rgba(76,175,111,.35); }
.log-bad { background: rgba(229,83,75,.15); color: var(--bad); border: 1px solid rgba(229,83,75,.35); }
.log-neutral { background: rgba(62,167,255,.12); color: var(--blue-soft); border: 1px solid rgba(62,167,255,.3); }

.chat-thread { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding: 6px 4px; }
.chat-bubble { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.chat-bubble.kunde { align-self: flex-start; background: var(--panel-light); color: var(--cream); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-bubble.mitarbeiter { align-self: flex-end; background: linear-gradient(135deg, var(--gold-soft), var(--gold)); color: #1a1206; border-bottom-right-radius: 4px; }
.chat-meta { font-size: 10px; opacity: .65; margin-top: 5px; }
.chat-bubble.mitarbeiter .chat-meta { color: #1a1206; }
.chat-unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 6px rgba(229,83,75,.7); margin-right: 6px; animation: emptyFloat 2s ease-in-out infinite; }

.gallery-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.gallery-admin-item { position: relative; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.gallery-admin-item img { width: 100%; height: 130px; object-fit: cover; display: block; }
.gallery-admin-item .icon-btn { position: absolute; top: 6px; right: 6px; background: rgba(6,12,24,.75); }
.gallery-admin-caption { padding: 6px 8px; font-size: 11px; color: var(--cream-dim); }
.mini-log-list { display: flex; flex-direction: column; gap: 8px; }
.mini-log-row { display: flex; align-items: center; gap: 10px; font-size: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.mini-log-row:last-child { border-bottom: none; padding-bottom: 0; }

/* ---------- Admin: Benutzerverwaltung (Karten-Layout) ---------- */
.admin-users-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.user-card-list { display: flex; flex-direction: column; gap: 10px; }
.user-card {
  background: linear-gradient(180deg, var(--panel), #0c1a30);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px 16px; box-shadow: 0 4px 16px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.03);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.user-card:hover { border-color: rgba(62,167,255,.3); }
.user-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.user-card-id { display: flex; align-items: center; gap: 10px; }
.user-card-name { font-weight: 700; font-size: 14.5px; color: var(--cream); }
.user-card-you { color: var(--gold); font-weight: 600; font-size: 11px; }
.rang-badge { display: inline-block; margin-top: 3px; padding: 2px 9px; border-radius: 10px; font-size: 10px; font-weight: 700; letter-spacing: .3px; border: 1px solid; }
.user-card-actions { display: flex; gap: 8px; }
.icon-btn {
  background: var(--panel-light); border: 1px solid var(--line); color: var(--cream-dim);
  border-radius: var(--radius-sm); padding: 6px 12px; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px; transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease-out);
}
.icon-btn:hover { border-color: var(--blue); color: var(--blue-soft); transform: translateY(-1px); }
.icon-btn-bad:hover { border-color: var(--bad); color: var(--bad); }
.recht-pill-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.recht-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg2); border: 1px solid var(--line); color: var(--cream-dim);
  border-radius: 20px; padding: 6px 12px 6px 10px; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
  user-select: none;
}
.recht-pill input { margin: 0; accent-color: var(--gold); }
.recht-pill:hover { border-color: rgba(62,167,255,.4); }
.recht-pill.checked { background: rgba(201,151,62,.14); border-color: var(--gold); color: var(--gold-soft); }
.recht-pill.disabled { opacity: .45; cursor: not-allowed; }
#au-search { width: 100%; }

/* ---------- Credit ---------- */
.made-by {
  position: fixed; right: 12px; bottom: 8px;
  font-size: 11px; color: var(--cream-dim); opacity: .55;
  letter-spacing: .5px; pointer-events: none; z-index: 40;
}

/* =========================================================
   Responsive: Tablet & Handy
   ========================================================= */
@media (max-width: 900px) {
  .kasse-grid { grid-template-columns: 1fr; }
  .cart-box { position: static; margin-top: 18px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .header { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .header-left { gap: 8px; }
  .bar-name { font-size: 19px; }
  .sub-small { letter-spacing: 1.5px; }
  .header-right { gap: 8px; flex-wrap: wrap; }
  .who { display: none; }
  .header-avatar-btn { padding: 4px; }
  .tabs { padding: 0 8px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { padding: 10px 12px; font-size: 12.5px; white-space: nowrap; flex-shrink: 0; }
  .content { padding: 14px; overflow-x: auto; }
  table { min-width: 620px; font-size: 12.5px; }
  .form-row { gap: 6px; }
  .stat-value { font-size: 24px; }
  .modal-box { padding: 16px; }
  div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 560px) {
  .login-box { padding: 26px 20px; }
  .bar-name { font-size: 17px; }
  .header { padding: 8px 10px; }
  .logo-img-sm { width: 30px; height: 30px; }
  .content { padding: 10px; }
  .tabs button { padding: 9px 10px; font-size: 12px; gap: 4px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
  .product-card { padding: 10px; }
  .checkout-btn { padding: 15px; font-size: 15px; }
  button, input, select { min-height: 38px; }
  .btn-line { min-height: 32px; }
  .rc-e-value, .rabatt-popup-wrap { width: 100%; }
  .stat-box { padding: 14px; }
  .stat-value { font-size: 21px; }
  .form-row input, .form-row select { width: 100%; }
}

/* Touch-Geräte: kein Hover-„Kleben" auf Buttons, größere Klickflächen */
@media (hover: none) and (pointer: coarse) {
  button:hover { filter: none; }
  .card:hover, .product-card:hover, .stat-box:hover { transform: none; }
  button, .btn-line, .tabs button { min-height: 36px; }
}

/* ---- Wartungsmodus-Overlay (öffentliche Webseite) ---- */
html.wartung-aktiv, html.wartung-aktiv body { overflow: hidden; height: 100%; }
#wartung-overlay {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(circle at 50% 0%, var(--bg2), var(--bg));
}
#wartung-overlay::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(201,151,62,.06) 0 18px, transparent 18px 36px);
  pointer-events: none;
}
.wartung-box {
  position: relative; text-align: center; width: min(460px, 92vw);
  background: linear-gradient(180deg, var(--panel), var(--panel) 60%, #0c1a30);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 40px 32px; box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 60px rgba(201,151,62,.12), inset 0 1px 0 rgba(255,255,255,.04);
}
.wartung-logo { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; border: 2px solid var(--gold); box-shadow: 0 0 18px rgba(201,151,62,.5), 0 0 4px rgba(62,167,255,.4); animation: logoPulse 3.5s ease-in-out infinite; }
.wartung-bar-name { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--blue-soft); text-shadow: 0 0 6px rgba(62,167,255,.55); margin-bottom: 4px; }
.wartung-title { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: 1px; color: var(--gold-soft); text-shadow: 0 0 10px rgba(201,151,62,.4); margin: 10px 0 16px; }
.wartung-text { color: var(--cream-dim); font-size: 14px; line-height: 1.7; white-space: pre-wrap; }

/* ---- Mehr Atmosphäre für die öffentliche Webseite ---- */

/* Sanftes Leuchten hinter dem Hero-Titel */
.hero::before {
  content: ''; position: absolute; top: 4%; left: 50%; transform: translateX(-50%);
  width: 480px; height: 480px; max-width: 90vw; max-height: 90vw;
  background: radial-gradient(circle, rgba(62,167,255,.16), transparent 70%);
  filter: blur(6px); z-index: -1; pointer-events: none;
  animation: heroGlowPulse 6s ease-in-out infinite;
}
@keyframes heroGlowPulse {
  0%, 100% { opacity: .55; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

/* Treibende Funken/Fireflies im Hintergrund */
.fireflies { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.firefly {
  position: absolute; bottom: -12px; width: 4px; height: 4px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold-soft), transparent 70%);
  box-shadow: 0 0 6px 2px rgba(230, 192, 120, .55);
  opacity: 0; animation-name: fireflyFloat; animation-timing-function: ease-in-out; animation-iteration-count: infinite;
}
.firefly-blue {
  background: radial-gradient(circle, var(--blue-soft), transparent 70%);
  box-shadow: 0 0 6px 2px rgba(62, 167, 255, .5);
}
@keyframes fireflyFloat {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  10% { opacity: .9; }
  50% { transform: translate(var(--drift, 24px), -52vh) scale(1); }
  90% { opacity: .6; }
  100% { transform: translate(calc(var(--drift, 24px) * 1.6), -100vh) scale(.4); opacity: 0; }
}
@media (max-width: 640px), (prefers-reduced-motion: reduce) { .fireflies { display: none; } }

/* Goldener Lichtschimmer beim Hover über goldene Buttons */
.btn-gold { position: relative; overflow: hidden; }
.btn-gold::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); transition: left .55s var(--ease-out);
}
.btn-gold:hover::after { left: 130%; }

/* Sound-Toggle-Button auf der öffentlichen Webseite */
.site-nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-sound-btn {
  background: var(--panel-light); border: 1px solid var(--line); color: var(--cream-dim);
  border-radius: 50%; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer; transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease-out), box-shadow .3s var(--ease);
}
.site-sound-btn:hover { border-color: var(--blue); color: var(--blue-soft); transform: translateY(-1px); }
.site-sound-btn.on { border-color: var(--gold); color: var(--gold-soft); box-shadow: 0 0 10px rgba(201,151,62,.35); }

/* Etwas mehr Leben in den Präsentations-Karten der Webseite */
.event-card, .contact-card, .orga-card { transition: transform .3s var(--ease-out), box-shadow .3s var(--ease), border-color .3s var(--ease); }
.event-card:hover, .contact-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(62,167,255,.16); border-color: rgba(62,167,255,.35); }
.menu-item { transition: padding-left .2s var(--ease-out), color .2s var(--ease); }
.menu-item:hover { padding-left: 6px; color: var(--cream); }

/* =========================================================
   Kassensystem – zusätzliche Politur für mehr Übersicht
   ========================================================= */

/* Tabellenzeilen beim Überfahren dezent hervorheben – erleichtert das Scannen langer Listen */
table tr:hover td { background: rgba(255,255,255,.028); }
table tr { transition: background .15s var(--ease); }

/* Benachrichtigungs-Badges (offene Tickets, Lagerbestand niedrig, offener Urlaub) pulsieren dezent */
.badge { animation: badgePulse 2.2s ease-in-out infinite; }
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,83,75,.45); }
  50% { box-shadow: 0 0 0 5px rgba(229,83,75,0); }
}

/* Kennzahlen (Umsatz, Gewinn, etc.) blenden sich beim Öffnen eines Tabs sanft ein, statt abrupt zu erscheinen */
.stat-value { animation: statPop .45s var(--ease-out) both; }
@keyframes statPop { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.stat-box { animation: fadeInUp .45s var(--ease-out) both; }
.stat-box:nth-child(1) { animation-delay: .04s; }
.stat-box:nth-child(2) { animation-delay: .1s; }
.stat-box:nth-child(3) { animation-delay: .16s; }
.stat-box:nth-child(4) { animation-delay: .22s; }
.stat-box:nth-child(5) { animation-delay: .28s; }

/* Aktiver Tab wirkt jetzt etwas plastischer statt nur unterstrichen */
.tabs button.active { box-shadow: inset 0 -3px 0 var(--blue), 0 -1px 12px rgba(62,167,255,.12); }

/* Etwas mehr Luft zwischen den Produktkacheln in der Kasse */
.product-grid { gap: 14px; }

@media (prefers-reduced-motion: reduce) {
  .badge, .stat-value, .stat-box { animation: none; }
}

/* =========================================================
   Team-Kalender (Termine, Urlaub, Events kombiniert)
   ========================================================= */
.kal-legend { display: flex; gap: 18px; font-size: 12px; color: var(--cream-dim); margin: 10px 0 14px; }
.kal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.kal-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.kal-dot-termin { background: var(--blue-soft); }
.kal-dot-urlaub { background: #b98be0; }
.kal-dot-event { background: var(--gold-soft); }

.kal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.kal-weekday { text-align: center; font-size: 11px; color: var(--cream-dim); font-weight: 700; padding-bottom: 4px; }
.kal-cell {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel);
  padding: 6px; cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease), transform .15s var(--ease-out);
  display: flex; flex-direction: column; justify-content: space-between;
}
.kal-cell:hover { border-color: rgba(62,167,255,.4); transform: translateY(-1px); }
.kal-cell-empty { border: none; background: none; cursor: default; }
.kal-cell-empty:hover { transform: none; }
.kal-cell-heute { border-color: var(--gold-soft); box-shadow: 0 0 0 1px rgba(230,192,120,.3); }
.kal-cell-active { background: rgba(62,167,255,.14); border-color: var(--blue); }
.kal-daynum { font-size: 12px; color: var(--cream); font-weight: 600; }
.kal-dots { display: flex; gap: 3px; flex-wrap: wrap; }

.kal-item { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--cream); }
.kal-item:last-of-type { border-bottom: none; }
.kal-item-sub { font-size: 11.5px; color: var(--cream-dim); margin-top: 3px; }

/* =========================================================
   Digitale Stempelkarte – Kassen-Ansicht
   ========================================================= */
.stka-bar { width: 100%; height: 10px; background: var(--bg2); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.stka-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); border-radius: 20px; transition: width .5s var(--ease-out); }
