:root {
  /* === TRANSPARENT SPATIAL GLASS (STANDARD / WELLNESSIST-STIL ÜBER SCHIEFER & GEWÜRZEN) === */
  --bg: #12161D;
  --glass-shell: rgba(24, 30, 38, 0.26);
  --glass-sidebar: rgba(10, 14, 20, 0.42);
  --glass-topbar: rgba(14, 19, 28, 0.28);
  --surface: rgba(255, 255, 255, 0.10);
  --surface-strong: rgba(255, 255, 255, 0.15);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-input: rgba(12, 17, 25, 0.44);
  --surface-table: rgba(12, 17, 25, 0.28);
  --border: rgba(255, 255, 255, 0.22);
  --border-soft: rgba(255, 255, 255, 0.13);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.30);
  --text: #FFFFFF;
  --text-muted: rgba(235, 241, 248, 0.78);
  --navy: rgba(15, 23, 38, 0.72);
  --navy-solid: #0F172A;
  --navy-2: #1E293B;
  --orange: #F97316;
  --orange-bright: #FB923C;
  --orange-soft: rgba(249, 115, 22, 0.24);
  --blue: #3B82F6;
  --blue-soft: rgba(59, 130, 246, 0.26);
  --green: #22C55E;
  --green-soft: rgba(34, 197, 94, 0.24);
  --amber-soft: rgba(245, 158, 11, 0.26);
  --amber-txt: #FDE68A;
  --red: #EF4444;
  --red-soft: rgba(239, 68, 68, 0.26);
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.48);
  --sidebar-w: 258px;
  --topbar-h: 64px;
  --bnav-h: 68px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

/* === ZWEITER MODUS: HELLES MILCHGLAS (PERLMUTT-GLAS ÜBER DEMSELBEN SCHIEFER-HINTERGRUND) === */
body.dark {
  --bg: #181D25;
  --glass-shell: rgba(248, 250, 252, 0.68);
  --glass-sidebar: rgba(15, 23, 42, 0.72);
  --glass-topbar: rgba(15, 23, 42, 0.62);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.90);
  --surface-2: rgba(241, 245, 249, 0.72);
  --surface-input: rgba(255, 255, 255, 0.88);
  --surface-table: rgba(255, 255, 255, 0.80);
  --border: rgba(15, 23, 42, 0.12);
  --border-soft: rgba(15, 23, 42, 0.08);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --text: #0F172A;
  --text-muted: #475569;
  --navy: #0F172A;
  --orange: #EA580C;
  --orange-bright: #F97316;
  --orange-soft: rgba(234, 88, 12, 0.14);
  --blue: #2563EB;
  --blue-soft: rgba(37, 99, 235, 0.14);
  --green: #16A34A;
  --green-soft: rgba(22, 163, 74, 0.15);
  --amber-soft: rgba(245, 158, 11, 0.18);
  --amber-txt: #92400E;
  --red: #DC2626;
  --red-soft: rgba(220, 38, 38, 0.14);
  --shadow: 0 8px 26px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 22px 54px rgba(15, 23, 42, 0.24);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  margin: 0; padding: 0;
  background: var(--bg);
  min-height: 100%;
  overflow-x: clip;
  scroll-padding-top: calc(var(--topbar-h) + var(--sat) + 18px);
}
body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: transparent;
  color: var(--text);
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* FIXIERTER KULINARISCHER SCHIEFER- & GEWÜRZ-HINTERGRUND (DESKTOP, IPAD & IPHONE) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 14, 20, 0.16) 0%, rgba(10, 14, 20, 0.08) 58%, rgba(10, 14, 20, 0.04) 100%),
    url("bg-kitchen.jpg") center bottom / cover no-repeat;
  transform: translateZ(0);
}

@media (min-width: 961px) {
  body {
    padding: 20px 26px 46px;
  }
}
@media (min-width: 1220px) {
  body {
    padding: 26px 46px 68px;
  }
}

.hidden { display: none !important; }
.sr-date { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }

/* LOGIN GATE (VOLLBILD-KÜCHENHINTERGRUND + SCHWEBENDE GLASKARTE) */
.login-gate {
  position: fixed; inset: 0; z-index: 200;
  background:
    radial-gradient(circle at 50% 35%, rgba(15, 23, 38, 0.14), rgba(8, 12, 18, 0.40) 80%),
    url("bg-kitchen.jpg") center bottom / cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 396px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.08) 100%);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  color: #FFFFFF;
  border-radius: 26px; padding: 32px 26px 28px;
  text-align: center;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.login-card h2 { margin: 0 0 4px; font-size: 23px; font-weight: 900; color: #FFFFFF; letter-spacing: -0.02em; }
.login-card p { margin: 0 0 20px; font-size: 13px; color: rgba(235, 241, 248, 0.82); }
.login-card label { color: rgba(235, 241, 248, 0.88) !important; }
.login-card .input {
  background: rgba(12, 17, 25, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
}
.login-card .input::placeholder { color: rgba(226, 232, 240, 0.62); }
.login-err {
  background: rgba(239, 68, 68, 0.28); color: #FECACA;
  border: 1px solid rgba(248, 113, 113, 0.45);
  padding: 8px 12px; border-radius: 10px;
  font-size: 12.5px; font-weight: 700; margin-bottom: 12px;
}
.pwd-wrap { position: relative; margin-bottom: 10px; }
.pwd-input { text-align: center; font-size: 16px; padding: 12px 44px; }
.pwd-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: none; border-radius: 9px;
  background: transparent; cursor: pointer; font-size: 17px;
  display: grid; place-items: center; color: rgba(255, 255, 255, 0.8);
}
.pwd-eye:hover { background: rgba(255, 255, 255, 0.14); }

/* FLOATING SPATIAL GLASS WINDOW SHELL */
.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  background: var(--glass-shell);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}
@media (min-width: 961px) {
  .app-shell {
    max-width: 1460px;
    margin: 0 auto;
    min-height: calc(100vh - 94px);
    border-radius: 26px;
    overflow: clip;
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: 0 32px 96px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  }
}

/* DESKTOP SIDEBAR (DUNKLES RAUCHGLAS-SEITENMENÜ WIE WELLNESSIST) */
.sidebar {
  width: var(--sidebar-w);
  background: var(--glass-sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: calc(100vh - 94px);
  max-height: 100vh;
  flex-shrink: 0;
  z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.brand-logo {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, #EA580C, #F97316);
  color: #fff; font-weight: 900; font-size: 20px;
  display: grid; place-items: center; position: relative;
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4);
  flex-shrink: 0;
}
.brand-logo.sm { width: 32px; height: 32px; font-size: 16px; border-radius: 9px; }
.brand-logo-pill {
  background: rgba(255, 255, 255, 0.94); border-radius: 12px; padding: 6px 12px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.26); border-bottom: 3px solid var(--orange);
}
.brand-logo-pill.sm { border-radius: 8px; padding: 3px 7px; border-bottom-width: 2px; }
.brand-logo-img { height: 32px; width: auto; display: block; object-fit: contain; }
.brand-logo-img.sm { height: 22px; }
.login-logo-box {
  background: rgba(255, 255, 255, 0.95); border-radius: 16px; padding: 12px 18px;
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 14px; border: 1px solid rgba(255,255,255,0.6); border-bottom: 4px solid var(--orange);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.30);
}
.login-logo-img { height: 48px; width: auto; display: block; object-fit: contain; }
.preview-logo-pill {
  background: #FFFFFF; border-radius: 9px; padding: 4px 10px;
  display: inline-flex; align-items: center;
}
.preview-logo-img { height: 26px; width: auto; display: block; }
.brand-title { font-weight: 800; letter-spacing: 0.06em; font-size: 15px; line-height: 1.1; }
.brand-sub { font-size: 11px; color: rgba(226, 232, 240, 0.72); margin-top: 2px; }

.nav-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.10em; color: rgba(203, 213, 225, 0.58);
  padding: 14px 16px 6px;
}
.side-nav { flex: 1; overflow-y: auto; padding: 0 12px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.20) transparent; }
.side-nav::-webkit-scrollbar { width: 5px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.20); border-radius: 99px; }

.nav-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 3px;
  background: transparent; border: 1px solid transparent; border-radius: 12px;
  color: rgba(241, 245, 249, 0.80); font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-align: left; transition: all .16s ease;
  position: relative;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #FFFFFF;
}
.nav-item.active {
  background: rgba(255, 255, 255, 0.19);
  border-color: rgba(255, 255, 255, 0.26);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30), 0 6px 18px rgba(0, 0, 0, 0.22);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px; width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #FB923C, #EA580C);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.75);
}
.nav-ic { font-size: 16px; width: 22px; text-align: center; }

.sidebar-footer { padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.btn-theme {
  width: 100%; padding: 9px 12px; border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10); color: #FFFFFF;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: .16s ease;
}
.btn-theme:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.30); }

/* MAIN WRAP */
.main-wrap {
  flex: 1;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* STICKY FROSTED GLASS TOPBAR */
.topbar {
  position: sticky; top: 0; z-index: 45;
  height: var(--topbar-h);
  background: var(--glass-topbar);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mobile-brand { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.mobile-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #FFFFFF; }

.kw-switcher { display: flex; align-items: center; gap: 5px; position: relative; }
.kw-btn {
  width: 34px; height: 34px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 12px;
  cursor: pointer; display: grid; place-items: center; transition: .15s;
}
.kw-btn:hover, .kw-btn:active { background: var(--orange); border-color: var(--orange); }
.kw-pill {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px; border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer;
  transition: .15s;
}
.kw-pill:hover { background: rgba(255, 255, 255, 0.20); }
.kw-badge {
  background: linear-gradient(135deg, #EA580C, #F97316); color: #fff;
  padding: 2px 9px; border-radius: 7px; font-weight: 800; font-size: 12px;
  white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.42);
}
.kw-dates { font-size: 12px; font-weight: 600; color: rgba(241, 245, 249, 0.92); white-space: nowrap; }

.topbar-right { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12); color: #fff;
  font-size: 15px; cursor: pointer; display: grid; place-items: center;
  transition: .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.22); }
.mobile-only { display: none; }

/* GLOBAL FERIEN ALERT */
.global-alert {
  padding: 10px 16px; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-align: center;
  backdrop-filter: blur(12px);
}
.global-alert.holiday { background: linear-gradient(90deg, rgba(220, 38, 38, 0.88), rgba(234, 88, 12, 0.88)); color: #fff; }
.global-alert.greeting { background: rgba(254, 243, 199, 0.92); color: #92400E; border-bottom: 1px solid #F59E0B; }

/* CONTENT */
.content {
  padding: 22px 24px 36px;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  animation: fadeUp .18s ease;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* PAGE HEADERS & TABS */
.page-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.page-head h1 {
  margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}
body.dark .page-head h1 { text-shadow: none; }
.page-head p { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }

.seg-tabs {
  display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px;
  margin-bottom: 16px; scrollbar-width: none;
}
.seg-tabs::-webkit-scrollbar { display: none; }
.seg-tab {
  padding: 9px 15px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: .16s ease; flex-shrink: 0;
  box-shadow: var(--glass-highlight);
}
.seg-tab:hover { background: var(--surface-strong); color: var(--text); }
.seg-tab.active {
  background: linear-gradient(135deg, #EA580C, #F97316);
  color: #FFFFFF; border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* GLASS CARDS & GRIDS */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.card {
  background: linear-gradient(145deg, var(--surface-strong) 0%, var(--surface) 100%);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow), var(--glass-highlight);
}
.card-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 15.5px; font-weight: 800; margin: 0 0 12px; color: var(--text);
}

/* KPI CARDS (WELLNESSIST GLASS STAT CARDS) */
.kpi-card {
  background: linear-gradient(145deg, var(--surface-strong) 0%, var(--surface) 100%);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow), var(--glass-highlight);
  position: relative; overflow: hidden;
  transition: transform .16s ease, border-color .16s ease;
}
.kpi-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.34); }
.kpi-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, #FB923C, #EA580C);
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.65);
}
.kpi-card.blue::before { background: linear-gradient(180deg, #60A5FA, #2563EB); box-shadow: 0 0 14px rgba(59, 130, 246, 0.65); }
.kpi-card.green::before { background: linear-gradient(180deg, #4ADE80, #16A34A); box-shadow: 0 0 14px rgba(34, 197, 94, 0.65); }
.kpi-card.red::before { background: linear-gradient(180deg, #F87171, #DC2626); box-shadow: 0 0 14px rgba(239, 68, 68, 0.65); }
.kpi-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi-val { font-size: 28px; font-weight: 900; margin: 4px 0 2px; letter-spacing: -0.02em; color: var(--text); }
.kpi-sub { font-size: 12px; color: var(--text-muted); }

/* QUICK ACTION TILES ON ZENTRALE (GLAS-KACHELN MIT LEUCHTENDEN ICON-KÄSTEN) */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
.action-tile {
  background: linear-gradient(145deg, var(--surface-strong) 0%, var(--surface) 100%);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 15px 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  text-align: left; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
  color: var(--text);
  box-shadow: var(--shadow), var(--glass-highlight);
}
.action-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(249, 115, 22, 0.65);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}
.action-tile .t-ic {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, #EA580C, #F97316);
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.42);
  display: grid; place-items: center; font-size: 19px; color: #FFFFFF;
}
.action-tile:nth-child(5n+2) .t-ic { background: linear-gradient(135deg, #16A34A, #22C55E); box-shadow: 0 6px 16px rgba(22, 163, 74, 0.40); }
.action-tile:nth-child(5n+3) .t-ic { background: linear-gradient(135deg, #2563EB, #3B82F6); box-shadow: 0 6px 16px rgba(37, 99, 235, 0.40); }
.action-tile:nth-child(5n+4) .t-ic { background: linear-gradient(135deg, #0D9488, #14B8A6); box-shadow: 0 6px 16px rgba(13, 148, 136, 0.40); }
.action-tile:nth-child(5n+5) .t-ic { background: linear-gradient(135deg, #7C3AED, #8B5CF6); box-shadow: 0 6px 16px rgba(124, 58, 237, 0.40); }
.action-tile strong { font-size: 13.5px; font-weight: 800; color: var(--text); }
.action-tile small { font-size: 11.5px; color: var(--text-muted); }

/* BADGES & CHIPS (HOHER KONTRAST AUF GLAS) */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.badge-orange { background: var(--orange-soft); color: #FDBA74; border-color: rgba(249, 115, 22, 0.38); }
.badge-blue   { background: var(--blue-soft); color: #93C5FD; border-color: rgba(59, 130, 246, 0.38); }
.badge-green  { background: var(--green-soft); color: #86EFAC; border-color: rgba(34, 197, 94, 0.38); }
.badge-red    { background: var(--red-soft); color: #FCA5A5; border-color: rgba(239, 68, 68, 0.42); }
.badge-amber  { background: var(--amber-soft); color: var(--amber-txt); border-color: rgba(245, 158, 11, 0.38); }
.badge-slate  { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }

body.dark .badge-orange { color: #C2410C; }
body.dark .badge-blue   { color: #1D4ED8; }
body.dark .badge-green  { color: #15803D; }
body.dark .badge-red    { color: #B91C1C; }

/* HOHER KONTRAST FÜR BADGES AUF WEISSEN DRUCKVORSCHAU-BLÄTTERN */
.preview-paper .badge-amber,  .bs-print-sheet .badge-amber  { background: #FEF3C7; color: #92400E; border-color: #F59E0B; }
.preview-paper .badge-purple, .bs-print-sheet .badge-purple { background: #EDE9FE; color: #5B21B6; border-color: #C4B5FD; }
.preview-paper .badge-orange, .bs-print-sheet .badge-orange { background: #FFEDD5; color: #9A3412; border-color: #FDBA74; }
.preview-paper .badge-blue,   .bs-print-sheet .badge-blue   { background: #DBEAFE; color: #1E40AF; border-color: #93C5FD; }
.preview-paper .badge-green,  .bs-print-sheet .badge-green  { background: #DCFCE7; color: #166534; border-color: #86EFAC; }
.preview-paper .badge-red,    .bs-print-sheet .badge-red    { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.preview-paper .badge-slate,  .bs-print-sheet .badge-slate  { background: #F1F5F9; color: #334155; border-color: #CBD5E1; }

/* BUTTONS & INPUTS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-strong); color: var(--text); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: .16s ease; text-decoration: none;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--glass-highlight);
}
.btn:hover { border-color: var(--orange); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #EA580C, #F97316);
  color: #fff; border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-navy { background: rgba(15, 23, 42, 0.78); color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }

.input, .select {
  width: 100%; padding: 9px 12px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface-input);
  color: var(--text); font-size: 13.5px; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.input::placeholder { color: var(--text-muted); opacity: 0.75; }
.input:focus, .select:focus { outline: 2px solid var(--orange); border-color: transparent; }
select option { background: #1E293B; color: #FFFFFF; }
body.dark select option { background: #FFFFFF; color: #0F172A; }

/* MEAL DAY CARDS */
.day-card {
  background: linear-gradient(145deg, var(--surface-strong) 0%, var(--surface) 100%);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow), var(--glass-highlight);
  margin-bottom: 16px;
}
.day-card-head {
  background: rgba(15, 23, 38, 0.56);
  color: #fff; padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  display: flex; align-items: center; justify-content: space-between;
}
body.dark .day-card-head { background: rgba(15, 23, 42, 0.88); }
.day-card-body { padding: 14px 16px; display: grid; gap: 12px; }
.meal-box {
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: 13px; padding: 13px;
}
.meal-box.m1 { border-left: 4px solid var(--blue); }
.meal-box.m2 { border-left: 4px solid var(--green); }
.meal-box.erg { border-left: 4px solid #F59E0B; }
.meal-box.suppe { border-left: 4px solid var(--orange); }
.meal-box h4 { margin: 0 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); display: flex; justify-content: space-between; }
.comp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.comp-list li { font-size: 14px; line-height: 1.35; color: var(--text); }
.comp-list li:first-child { font-weight: 800; font-size: 15px; color: var(--text); }

.greeting-banner {
  background: linear-gradient(135deg, rgba(254, 249, 195, 0.92), rgba(253, 230, 138, 0.92));
  border: 2px solid #F59E0B; color: #78350F;
  border-radius: 14px; padding: 14px 18px;
  text-align: center; font-size: 16px; font-weight: 800;
  margin: 14px 0;
}

/* TABLES (GLAS-TABELLEN MIT KLAREM KONTRAST) */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface-table);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; background: transparent; color: var(--text); }
th {
  background: rgba(15, 23, 38, 0.62); color: #fff; padding: 11px 10px;
  text-align: left; font-weight: 700; font-size: 12px; white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
body.dark th { background: rgba(15, 23, 42, 0.90); }
td { padding: 9px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; color: var(--text); }
tbody tr:hover td { background: rgba(255, 255, 255, 0.06); }
body.dark tbody tr:hover td { background: rgba(15, 23, 42, 0.04); }
tr:last-child td { border-bottom: none; }
tr.row-greyed { opacity: 0.48; background: var(--surface-2); }
tr.row-sum td { background: var(--orange-soft); font-weight: 800; color: var(--text); }
tr.row-total td { background: rgba(15, 23, 38, 0.72); color: #fff; font-weight: 800; }
body.dark tr.row-total td { background: #0F172A; }

/* STATUS BANNERS IN STATISTIK */
.status-banner {
  padding: 13px 16px; border-radius: 14px; font-weight: 800; font-size: 14px;
  margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.status-banner.closed { background: rgba(220, 38, 38, 0.88); color: #fff; border: 1px solid rgba(254, 202, 202, 0.35); }
.status-banner.sub { background: rgba(234, 88, 12, 0.88); color: #fff; border: 1px solid rgba(254, 215, 170, 0.35); }

/* TOUCH STEPPER FOR STATISTIK */
.num-input {
  width: 62px; padding: 6px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-input); color: var(--text);
  font-weight: 700; text-align: center; font-size: 14px;
}
.num-input:focus { outline: 2px solid var(--orange); background: rgba(15, 23, 38, 0.72); }
body.dark .num-input:focus { background: #FFFFFF; }

/* ETIKETTEN GRID (3x9 A4 READY! HELLE DRUCKETIKETTEN AUF GLAS) */
.etiketten-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.sticker {
  border: 1.5px solid rgba(255, 255, 255, 0.65); border-radius: 12px;
  overflow: hidden; background: rgba(255, 255, 255, 0.94); color: #0F172A;
  font-size: 12px; break-inside: avoid;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.sticker-head {
  padding: 5px 8px; font-weight: 800; text-align: center; font-size: 11px;
}
.sticker.m1 .sticker-head { background: #DBEAFE; color: #1E3A8A; }
.sticker.m2 .sticker-head { background: #DCFCE7; color: #14532D; }
.sticker.erg .sticker-head { background: #FEF3C7; color: #78350F; }
.sticker-date {
  text-align: center; font-weight: 700; padding: 4px 6px;
  border-bottom: 1px dashed #CBD5E1; font-size: 11.5px; color: #0F172A;
}
.sticker-body { padding: 6px 8px; display: grid; gap: 4px; color: #0F172A; }
.sticker-body small { color: #475569 !important; }
.sticker-row { display: flex; justify-content: space-between; gap: 6px; }
.sticker-prod { font-weight: 800; font-size: 12.5px; color: #0F172A; }

/* ZENTRALE LIVE SPEISEPLAN PREVIEW SHEET */
.preview-shell {
  background: linear-gradient(145deg, var(--surface-strong) 0%, var(--surface) 100%);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow), var(--glass-highlight);
  margin-bottom: 16px;
}
.preview-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.preview-kw-bar {
  display: flex; align-items: center; gap: 6px;
  background: rgba(15, 23, 38, 0.68); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.20);
  padding: 5px 8px; border-radius: 12px;
}
.preview-kw-bar .kw-btn { width: 30px; height: 30px; }
.preview-kw-label {
  font-size: 12.5px; font-weight: 800; padding: 0 8px; white-space: nowrap;
}
.preview-paper {
  background: rgba(255, 255, 255, 0.94);
  color: #0F172A;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}
.preview-paper-head {
  background: linear-gradient(135deg, #0F172A, #1E293B);
  color: #fff;
  padding: 14px 18px;
  border-bottom: 3px solid #EA580C;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
}
.preview-paper-head h3 { margin: 0; font-size: 16px; font-weight: 900; letter-spacing: 0.02em; }
.preview-paper-head small { color: #CBD5E1; font-size: 12px; }
.preview-alts {
  background: #FFF7ED; color: #9A3412;
  padding: 8px 16px; font-size: 12px; font-weight: 700;
  border-bottom: 1px solid #FED7AA;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.preview-day-row {
  display: grid;
  grid-template-columns: 96px 1fr 1fr;
  border-bottom: 1px solid #E2E8F0;
}
.preview-day-row:last-child { border-bottom: none; }
.preview-day-lbl {
  background: #F8FAFC; padding: 10px 12px;
  border-right: 1px solid #E2E8F0;
  display: flex; flex-direction: column; justify-content: center;
}
.preview-day-lbl strong { font-size: 13px; color: #0F172A; }
.preview-day-lbl span { font-size: 11px; color: #64748B; }
.preview-col {
  padding: 10px 12px; font-size: 12.5px; line-height: 1.38;
  border-right: 1px solid #E2E8F0;
}
.preview-col:last-child { border-right: none; }
.preview-col-tag {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 4px; display: inline-block; padding: 2px 7px; border-radius: 6px;
}
.preview-col-tag.m1 { background: #DBEAFE; color: #1E40AF; }
.preview-col-tag.m2 { background: #DCFCE7; color: #166534; }
.preview-col-tag.erg { background: #FEF3C7; color: #92400E; }
.preview-col-tag.sup { background: #FFEDD5; color: #C2410C; }
.preview-dish-main { font-weight: 800; color: #0F172A; margin-bottom: 2px; }
.preview-dish-sub { color: #475569; font-size: 11.5px; }
.preview-paper-foot {
  background: #F8FAFC; padding: 8px 16px; font-size: 11px; color: #64748B;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
  border-top: 1px solid #E2E8F0;
}
@media (max-width: 720px) {
  .preview-day-row { grid-template-columns: 1fr; }
  .preview-day-lbl { flex-direction: row; justify-content: space-between; border-right: none; border-bottom: 1px solid #E2E8F0; padding: 7px 12px; }
  .preview-col { border-right: none; border-bottom: 1px dashed #E2E8F0; }
  .preview-col:last-child { border-bottom: none; }
}

/* VISUAL ANNUAL CALENDAR */
.cal-table { font-size: 11px; min-width: 780px; }
.cal-table th, .cal-table td { padding: 4px 2px; text-align: center; border: 1px solid var(--border-soft); }
.cal-table td.m-lbl { text-align: left; padding: 4px 8px; font-weight: 800; background: rgba(15, 23, 38, 0.56); color: #fff; position: sticky; left: 0; z-index: 2; }
body.dark .cal-table td.m-lbl { background: #F1F5F9; color: #0F172A; }
.cal-day-ferien { background: #DC2626 !important; color: #fff !important; font-weight: 800; }
.cal-day-active { background: #2563EB !important; color: #fff !important; font-weight: 800; }
.cal-day-wknd { background: var(--surface-2); color: var(--text-muted); }

/* MOBILE BOTTOM NAV & SHEET */
.bottom-nav {
  display: none;
  position: fixed;
  left: max(10px, var(--sal));
  right: max(10px, var(--sar));
  bottom: max(10px, var(--sab));
  height: var(--bnav-h);
  background: rgba(14, 19, 28, 0.84);
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
  border-radius: 22px; padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  z-index: 65;
  grid-template-columns: repeat(5, 1fr);
  transform: translateZ(0);
}
.bnav-item {
  border: none; background: transparent; color: rgba(226, 232, 240, 0.72);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 15px; cursor: pointer; font-family: inherit; transition: .15s;
}
.bnav-item.active {
  background: linear-gradient(135deg, #EA580C, #F97316);
  color: #fff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.45);
}
.bnav-ic { font-size: 19px; line-height: 1; }
.bnav-lbl { font-size: 10.5px; font-weight: 700; }

.sheet-backdrop, .modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(5, 9, 16, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-backdrop { align-items: center; padding: 16px; }
.bottom-sheet {
  width: 100%; max-width: 540px;
  background: rgba(18, 24, 34, 0.86);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-bottom: none;
  border-radius: 26px 26px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
  color: #FFFFFF;
}
body.dark .bottom-sheet {
  background: rgba(255, 255, 255, 0.92);
  color: #0F172A;
}
.sheet-handle { width: 42px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.30); margin: 0 auto 12px; }
body.dark .sheet-handle { background: rgba(15, 23, 42, 0.22); }
.sheet-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 16px; }
.sheet-header .icon-btn { color: var(--text); border-color: var(--border); background: var(--surface-2); }
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.more-tile {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 15px; padding: 13px; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  color: var(--text); text-align: left;
}
.more-tile span { font-size: 22px; }
.more-tile strong { font-size: 13.5px; }
.more-tile small { font-size: 11px; color: var(--text-muted); }

.modal-card {
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  background: rgba(20, 27, 38, 0.86);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border-radius: 22px; padding: 22px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--text);
}
body.dark .modal-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.14);
}

.toast {
  position: fixed; bottom: calc(var(--bnav-h) + var(--sab) + 22px); left: 50%; transform: translateX(-50%);
  background: rgba(15, 23, 38, 0.90);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  color: #fff; padding: 10px 18px; border-radius: 13px;
  font-size: 13px; font-weight: 700; z-index: 100;
  border: 1px solid rgba(249, 115, 22, 0.65); box-shadow: var(--shadow-lg);
}

/* VERHINDERT VERDECKUNG BEIM FOKUSSIEREN / ANKER-SCROLLEN UNTER STICKY TOPBAR */
.page-head, .card, .input, input, select, textarea, .help-slide {
  scroll-margin-top: calc(var(--topbar-h) + var(--sat) + 18px);
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 960px) {
  .app-shell {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .sidebar { display: none; }
  .main-wrap {
    margin-left: 0;
    padding-top: calc(var(--topbar-h) + var(--sat));
  }
  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    height: auto;
    min-height: calc(var(--topbar-h) + var(--sat));
    padding: calc(10px + var(--sat)) calc(12px + var(--sar)) 10px calc(12px + var(--sal));
    background: rgba(12, 18, 30, 0.86);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.34);
    transform: translateZ(0);
  }
  body.dark .topbar {
    background: rgba(15, 23, 42, 0.90);
  }
  .bottom-nav { display: grid; }
  .mobile-only { display: grid; }
  .content {
    padding: 14px calc(12px + var(--sar)) calc(var(--bnav-h) + var(--sab) + 38px) calc(12px + var(--sal));
  }
  .help-player-bar {
    top: calc(var(--topbar-h) + var(--sat) + 8px);
    z-index: 40;
  }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .etiketten-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kw-dates { display: none; }
}
@media (max-width: 540px) {
  .topbar { gap: 6px; padding-left: calc(10px + var(--sal)); padding-right: calc(10px + var(--sar)); }
  .mobile-title { display: none; }
  .kw-switcher { gap: 4px; flex-shrink: 0; }
  .kw-btn { width: 32px; height: 32px; border-radius: 10px; }
  .kw-pill { height: 32px; padding: 0 8px; border-radius: 10px; }
  .topbar-right { gap: 4px; flex-shrink: 0; }
  .icon-btn { width: 32px; height: 32px; font-size: 14px; border-radius: 10px; }
}
@media (max-width: 480px) {
  .etiketten-grid { grid-template-columns: 1fr; }
}

/* V2 EXTENSIONS: PORTIONSGRÖSSEN, EINHEITEN (kg/Stk/L), KREISHAUS GEGENPOL & ALLERGEN-LEGENDE */
.badge-teal { background: rgba(20, 184, 166, 0.26); color: #5EEAD4; border-color: rgba(20, 184, 166, 0.40); }
body.dark .badge-teal { background: #CCFBF1; color: #0F766E; border-color: rgba(15, 118, 110, 0.22); }

.unit-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 800;
  white-space: nowrap;
}
.unit-kg  { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.unit-stk { background: var(--blue-soft); color: #93C5FD; border: 1px solid rgba(59, 130, 246, 0.35); }
.unit-l   { background: rgba(20, 184, 166, 0.26); color: #5EEAD4; border: 1px solid rgba(20, 184, 166, 0.35); }
body.dark .unit-stk { color: #1D4ED8; }
body.dark .unit-l   { background: #CCFBF1; color: #0F766E; }

.prod-comp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.prod-comp-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border-soft);
}
.prod-comp-main { min-width: 0; }
.prod-comp-name { font-weight: 700; font-size: 13.5px; color: var(--text); }
.prod-comp-row:first-child .prod-comp-name { font-weight: 800; font-size: 14.5px; }
.prod-comp-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.prod-comp-qty { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

tr.row-divider td {
  background: var(--surface-2);
  color: var(--orange-bright);
  font-weight: 900;
  letter-spacing: 0.03em;
  font-size: 12.5px;
  border-top: 2px solid var(--border);
}
body.dark tr.row-divider td { color: var(--orange); }

.rez-port-inp {
  width: 72px; padding: 5px 6px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-input);
  color: var(--text); font-weight: 700; text-align: right; font-size: 13px;
}
.rez-unit-sel {
  width: 68px; padding: 5px 6px; border-radius: 8px;
  border: 1px solid var(--border); font-weight: 800; font-size: 12.5px;
  cursor: pointer;
}
.rez-unit-sel.u-kg  { background: var(--surface-input); color: var(--text); }
.rez-unit-sel.u-stk { background: var(--blue-soft); color: #93C5FD; }
.rez-unit-sel.u-l   { background: rgba(20, 184, 166, 0.26); color: #5EEAD4; }
body.dark .rez-unit-sel.u-stk { color: #1D4ED8; }
body.dark .rez-unit-sel.u-l   { background: #CCFBF1; color: #0F766E; }

.allergen-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 6px; margin-top: 10px;
}
.allergen-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 9px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  font-size: 12px; color: var(--text);
}
.allergen-chip strong {
  min-width: 24px; text-align: center; padding: 2px 5px; border-radius: 6px;
  background: var(--amber-soft); color: var(--amber-txt); font-weight: 800;
}

.tausch-strip {
  font-size: 11.5px; font-weight: 700; color: var(--text-muted);
  background: var(--surface-2); border: 1px dashed var(--border);
  padding: 5px 10px; border-radius: 9px; margin-bottom: 8px;
  display: inline-flex; align-items: center; gap: 6px;
}

.cal-day-feiertag { background: #7C3AED !important; color: #fff !important; font-weight: 800; }
.badge-purple { background: rgba(139, 92, 246, 0.28); color: #DDD6FE; border-color: rgba(139, 92, 246, 0.42); }
body.dark .badge-purple { background: #EDE9FE; color: #5B21B6; border-color: rgba(124, 58, 237, 0.24); }
.ft-sel-zu    { background: var(--red-soft) !important; color: #FCA5A5 !important; font-weight: 800 !important; }
.ft-sel-offen { background: var(--green-soft) !important; color: #86EFAC !important; font-weight: 800 !important; }
body.dark .ft-sel-zu    { color: #991B1B !important; }
body.dark .ft-sel-offen { color: #166534 !important; }
.holiday-closed-box {
  background: rgba(124, 58, 237, 0.22); border: 1.5px solid rgba(167, 139, 250, 0.65); color: #EDE9FE;
  border-radius: 13px; padding: 12px 14px; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
body.dark .holiday-closed-box { background: #F5F3FF; color: #5B21B6; border-color: #8B5CF6; }

/* === WEB 2.2: BRÖTCHEN & SALATE (A4 HOCHFORMAT DRUCKBLATT) & OBJEKTE TEILEN === */
.btn-purple {
  background: linear-gradient(135deg, #7C3AED, #8B5CF6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.36);
}
.btn-purple:hover { filter: brightness(1.08); }
.btn-xs {
  padding: 3px 8px;
  font-size: 11.5px;
  border-radius: 7px;
}

.bs-print-sheet {
  background: rgba(255, 255, 255, 0.95);
  color: #0F172A;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  padding: 22px 26px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
}
.bs-print-top {
  display: grid;
  grid-template-columns: 1fr 195px;
  gap: 14px;
  align-items: stretch;
  border-bottom: 3px solid #0F172A;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.bs-print-title-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.bs-print-banner {
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  padding: 8px 14px;
  border-radius: 7px;
  text-align: center;
}
.bs-print-banner.dtz { background: #115E59; }
.bs-print-banner.kh  { background: #1E3A8A; }
.bs-print-banner.rod { background: #9A3412; }
.bs-print-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-weight: 800;
  font-size: 13.5px;
  padding: 0 4px;
  color: #0F172A;
}
.bs-legend-box {
  border: 2px solid #0F172A;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  background: #fff;
}
.bs-day-block {
  border-bottom: 2px solid #0F172A;
  padding: 10px 0 8px;
}
.bs-day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.bs-day-title {
  font-weight: 800;
  font-size: 14px;
  color: #0F172A;
}
.bs-day-date {
  font-size: 12.5px;
  color: #475569;
  font-weight: 700;
  margin-left: 8px;
}
.bs-day-table {
  width: 100%;
  border-collapse: collapse;
}
.bs-day-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #E2E8F0;
  font-size: 13px;
  color: #0F172A;
  vertical-align: middle;
}
.bs-day-table tr:last-child td { border-bottom: none; }
.bs-day-qty {
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  width: 78px;
  background: #FFFBEB;
  border-radius: 4px;
  color: #0F172A;
}
.bs-day-split {
  font-size: 11.5px;
  color: #475569;
  width: 190px;
}
.bs-day-empty {
  color: #94A3B8;
  font-style: italic;
  font-size: 12.5px;
  padding: 4px 0;
}
.bs-day-holiday {
  background: #FEE2E2;
  color: #B91C1C;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
}
.bs-week-sum {
  margin-top: 14px;
  border: 1.5px solid #0F172A;
  border-radius: 8px;
  overflow: hidden;
}
.bs-week-sum-head {
  background: #1E293B;
  color: #fff;
  padding: 7px 12px;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}
.bs-week-sum-foot {
  background: #EA580C;
  color: #fff;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

/* === 100 % SAUBERER A4-DRUCK (KEIN DUNKLER HINTERGRUND, KEIN TONERVERBRAUCH!) === */
@media print {
  body::before { display: none !important; }
  html, body {
    padding: 0 !important;
    background: #FFFFFF !important;
    color: #0F172A !important;
  }
  .no-print { display: none !important; }
  .app-shell {
    background: #FFFFFF !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    max-width: none !important;
    margin: 0 !important;
    min-height: auto !important;
  }
  .main-wrap { margin-left: 0 !important; padding-top: 0 !important; }
  .topbar, .bottom-nav { display: none !important; }
  .content { padding: 0 !important; max-width: 100% !important; }
  .page-head h1, .page-head p, .card-title, .kpi-val, .kpi-label, .kpi-sub,
  .prod-comp-name, .prod-comp-sub, .comp-list li, td, .allergen-chip {
    color: #0F172A !important;
    text-shadow: none !important;
  }
  .card, .day-card, .kpi-card, .meal-box, .table-wrap, table, .preview-shell, .prod-comp-row, .allergen-chip {
    background: #FFFFFF !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border-color: #CBD5E1 !important;
  }
  .card, .day-card { break-inside: avoid; }
  .day-card-head, th, tr.row-total td {
    background: #0F172A !important;
    color: #FFFFFF !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .etiketten-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 4mm !important; }
  .sticker { border: 1px solid #94A3B8 !important; font-size: 9pt !important; box-shadow: none !important; }
  .bs-print-sheet {
    background: #FFFFFF !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
}


/* === V3 SYNOLOGY: ROLLEN, ADMIN-PANEL, HACCP-ABSCHLUSS, PDF-ARCHIV & EXCEL DRUCKZENTRALE === */
.role-hint-pills {
  display: flex; justify-content: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.sidebar-role-box {
  padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}
.topbar-role-pill { font-size: 11px; }
@media (max-width: 640px) { .topbar-role-pill { display: none; } }

.haccp-submit-bar {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.24), rgba(15, 23, 42, 0.56));
  border: 1.5px solid rgba(74, 222, 128, 0.45);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: var(--shadow);
}
body.dark .haccp-submit-bar {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.92), rgba(255, 255, 255, 0.94));
  border-color: #16A34A;
}
.readonly-banner {
  background: var(--blue-soft);
  border: 1px solid rgba(59, 130, 246, 0.42);
  color: #DBEAFE;
  padding: 10px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 700;
  margin-bottom: 14px;
}
body.dark .readonly-banner { color: #1E3A8A; }

.perm-chk {
  width: 19px; height: 19px;
  accent-color: var(--orange);
  cursor: pointer;
}

/* EXCEL DRUCKZENTRALE A4 BLATT */
.excel-sheet-paper {
  background: #FFFFFF;
  color: #0F172A;
  border-radius: 14px;
  padding: 20px 24px;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
  overflow-x: auto;
}
.excel-sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-bottom: 3px solid #EA580C;
  padding-bottom: 10px; margin-bottom: 14px;
}
.excel-sheet-head h2 { margin: 0; font-size: 18px; font-weight: 900; color: #0F172A; }
.excel-sheet-head small { color: #475569; font-size: 12px; }
.excel-sheet-paper table {
  width: 100%; border-collapse: collapse; font-size: 12px; color: #0F172A; background: #FFFFFF;
}
.excel-sheet-paper th {
  background: #0F172A !important; color: #FFFFFF !important;
  padding: 7px 8px; border: 1px solid #334155; font-size: 11.5px;
}
.excel-sheet-paper td {
  padding: 6px 8px; border: 1px solid #CBD5E1; color: #0F172A !important; vertical-align: top;
}
.excel-sheet-paper tr:nth-child(even) td { background: #F8FAFC; }
.excel-sheet-paper tr.row-sum td { background: #FFEDD5 !important; font-weight: 800; }
.excel-sheet-paper tr.row-total td { background: #0F172A !important; color: #FFFFFF !important; font-weight: 800; }
.excel-sign-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px;
  margin-top: 28px; padding-top: 8px;
}
.excel-sign-line {
  border-top: 1px solid #475569;
  padding-top: 5px; font-size: 11px; color: #475569;
}

@media print {
  .excel-sheet-paper {
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
  }
  .excel-sheet-paper th, .excel-sheet-paper tr.row-total td {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}


/* =========================================================================
   HILFE & INTERAKTIVE ANLEITUNGEN (TRANSPARENT SPATIAL GLASS + MP3 PLAYER)
   ========================================================================= */
.help-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 720px) {
  .help-switcher { grid-template-columns: 1fr; gap: 8px; }
}
.help-tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  box-shadow: var(--glass-highlight), var(--shadow);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: transform .16s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.help-tab-btn:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
  border-color: rgba(249, 115, 22, 0.55);
}
.help-tab-btn.active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.30), rgba(15, 23, 42, 0.58));
  border-color: rgba(249, 115, 22, 0.90);
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  color: #FFFFFF;
}
body.dark .help-tab-btn.active {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.92), rgba(15, 23, 42, 0.92));
  color: #FFFFFF;
}
.help-tab-ic {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex: 0 0 44px;
}
.help-tab-btn.active .help-tab-ic { background: rgba(255, 255, 255, 0.22); }
.help-tab-meta { min-width: 0; }
.help-tab-meta strong { display: block; font-size: 15.5px; line-height: 1.2; }
.help-tab-meta small { display: block; font-size: 12px; opacity: 0.82; margin-top: 3px; }

/* STICKY GLASS AUDIO PLAYER BAR WITH SIGNATURE ORANGE PLAY BUTTON */
.help-player-bar {
  position: sticky;
  top: calc(var(--topbar-h, 64px) + 8px);
  z-index: 35;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  padding: 13px 16px;
  margin-bottom: 18px;
  border-radius: 18px;
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}
body.dark .help-player-bar {
  background: rgba(15, 23, 42, 0.86);
  color: #FFFFFF;
}
.help-standalone .help-player-bar { top: 12px; }

.help-btn-orange {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 13px;
  border: none;
  background: linear-gradient(135deg, #FB923C 0%, #EA580C 100%);
  color: #FFFFFF;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(234, 88, 12, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform .15s ease, box-shadow .18s ease, filter .15s ease;
  white-space: nowrap;
}
.help-btn-orange:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 10px 26px rgba(234, 88, 12, 0.60);
}
.help-btn-orange.playing {
  animation: helpPulseOrange 2.2s infinite;
}
@keyframes helpPulseOrange {
  0%, 100% { box-shadow: 0 8px 22px rgba(234, 88, 12, 0.48), 0 0 0 0 rgba(249, 115, 22, 0.45); }
  50%      { box-shadow: 0 8px 26px rgba(234, 88, 12, 0.65), 0 0 0 7px rgba(249, 115, 22, 0); }
}

.help-ctrl-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.help-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.11);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease;
  text-decoration: none;
  white-space: nowrap;
}
.help-mini-btn:hover { background: rgba(255, 255, 255, 0.22); transform: translateY(-1px); }

.help-progress-wrap {
  flex: 1 1 220px;
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.help-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(241, 245, 249, 0.88);
}
.help-chapter-now {
  font-weight: 700;
  color: #FDBA74;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.help-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}
.help-seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  outline: none;
  cursor: pointer;
}
.help-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FB923C;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.help-seek::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FB923C;
  border: 2px solid #FFFFFF;
  cursor: pointer;
}

/* SLIDE CARDS (1:1 PDF DESIGN IN TRANSPARENT GLASSMORPHISM) */
.help-slides-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.help-slide {
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  box-shadow: var(--glass-highlight), var(--shadow);
  overflow: hidden;
  transition: border-color .22s ease, box-shadow .22s ease, transform .2s ease;
}
.help-slide.is-speaking {
  border-color: rgba(249, 115, 22, 0.95);
  box-shadow: 0 14px 36px rgba(249, 115, 22, 0.28), 0 0 0 2px rgba(249, 115, 22, 0.45);
}

/* COVER SLIDE (PAGE 1) */
.help-slide-cover {
  background: linear-gradient(135deg, rgba(11, 18, 32, 0.86) 0%, rgba(18, 28, 48, 0.78) 100%);
  border-top: 5px solid #EA580C;
  padding: 32px 30px 24px;
  color: #FFFFFF;
}
.help-cover-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: #EA580C;
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.help-slide-cover h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}
.help-cover-sub {
  font-size: 18px;
  font-weight: 800;
  color: #FB923C;
  margin-bottom: 12px;
}
.help-cover-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.90);
  max-width: 720px;
  margin: 0 0 20px;
}
.help-cover-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  color: rgba(203, 213, 225, 0.78);
}

/* CONTENT SLIDES (PAGES 2..N) */
.help-slide-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: rgba(11, 18, 32, 0.78);
  border-bottom: 3px solid #EA580C;
  color: #FFFFFF;
}
.help-slide-head-left { display: flex; flex-direction: column; gap: 5px; }
.help-slide-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 12px;
  border-radius: 999px;
  background: #EA580C;
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.help-slide-head h3 {
  margin: 0;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 800;
  color: #FFFFFF;
}
.help-slide-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(251, 146, 60, 0.65);
  background: rgba(234, 88, 12, 0.24);
  color: #FFEDD5;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease;
  white-space: nowrap;
}
.help-slide-play-btn:hover { background: rgba(234, 88, 12, 0.55); transform: translateY(-1px); color: #FFFFFF; }
.help-slide.is-speaking .help-slide-play-btn {
  background: #EA580C;
  color: #FFFFFF;
  border-color: #FDBA74;
}

.help-slide-body {
  padding: 18px 20px 14px;
}
.help-cols {
  display: grid;
  gap: 14px;
}
.help-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.help-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) {
  .help-cols-2, .help-cols-3 { grid-template-columns: 1fr; }
}
.help-box {
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.help-box-head {
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 800;
  color: #FFFFFF;
  background: rgba(15, 23, 42, 0.80);
}
.help-box.accent .help-box-head {
  background: linear-gradient(135deg, #F97316, #EA580C);
}
.help-box-body {
  padding: 13px 15px;
  font-size: 13.8px;
  line-height: 1.56;
  color: var(--text);
}
.help-box-body ul, .help-box-body ol {
  margin: 4px 0;
  padding-left: 18px;
}
.help-box-body li { margin-bottom: 6px; }
.help-box-body p { margin: 0 0 8px; }
.help-box-body p:last-child, .help-box-body li:last-child { margin-bottom: 0; }

.help-tip {
  margin-top: 14px;
  padding: 11px 15px;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.50);
  background: var(--amber-soft);
  color: var(--amber-txt);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.help-slide-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 20px 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
}

/* === PAKET 2: MITARBEITER-ACCOUNTS, PUSH-TEXTE, CRON-TOKEN & NATIVER WEB-PUSH === */
.sidebar-user-line {
  width: 100%;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(241, 245, 249, 0.90);
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.dark .sidebar-user-line {
  color: #334155;
  border-top-color: rgba(15, 23, 42, 0.10);
}
.btn-push-active {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.34), rgba(16, 185, 129, 0.24)) !important;
  border-color: rgba(74, 222, 128, 0.55) !important;
  color: #DCFCE7 !important;
}
body.dark .btn-push-active {
  background: #DCFCE7 !important;
  border-color: #16A34A !important;
  color: #14532D !important;
}
.adm-textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-input);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
}
.adm-textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.22);
}
.cron-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
body.dark .cron-code-row {
  background: #F1F5F9;
  border-color: #CBD5E1;
}
.cron-code-row code {
  font-size: 11.5px;
  word-break: break-all;
  color: #FDBA74;
  flex: 1;
}
body.dark .cron-code-row code {
  color: #0F172A;
}
.user-row-inactive td {
  opacity: 0.62;
}
.push-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.push-chip {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.push-chip:hover {
  border-color: var(--orange);
  background: var(--orange-soft);
}

/* === PAKET 3: HACCP-FREIGABE-WORKFLOW, DRAFT-RECOVERY, VALIDIERUNG & AUDIT-LOG === */
.haccp-submit-bar.status-wartet {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(15, 23, 42, 0.60));
  border-color: rgba(251, 191, 36, 0.68);
}
body.dark .haccp-submit-bar.status-wartet {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.94), rgba(255, 255, 255, 0.95));
  border-color: #D97706;
}
.haccp-submit-bar.status-abgeschlossen {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.28), rgba(15, 23, 42, 0.58));
  border-color: rgba(74, 222, 128, 0.65);
}
body.dark .haccp-submit-bar.status-abgeschlossen {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.94), rgba(255, 255, 255, 0.95));
  border-color: #16A34A;
}
.haccp-submit-bar.status-offen {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(15, 23, 42, 0.56));
  border-color: var(--border);
}
body.dark .haccp-submit-bar.status-offen {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.94), rgba(255, 255, 255, 0.95));
  border-color: #94A3B8;
}
.btn-approve {
  background: linear-gradient(135deg, #15803D, #22C55E);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-weight: 800;
  box-shadow: 0 5px 16px rgba(22, 163, 74, 0.42);
}
.btn-approve:hover { filter: brightness(1.08); }

.draft-recovery-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(15, 23, 42, 0.64));
  border: 1.5px solid rgba(251, 191, 36, 0.72);
  border-radius: 14px;
  padding: 12px 15px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
}
body.dark .draft-recovery-banner {
  background: rgba(254, 243, 199, 0.94);
  border-color: #D97706;
  color: #78350F;
}
.haccp-lock-banner {
  background: rgba(22, 163, 74, 0.20);
  border: 1px solid rgba(74, 222, 128, 0.55);
  color: #DCFCE7;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}
body.dark .haccp-lock-banner {
  background: #DCFCE7;
  border-color: #16A34A;
  color: #14532D;
}
.input-invalid {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28) !important;
  background: rgba(239, 68, 68, 0.12) !important;
}
.field-err-msg {
  color: #FCA5A5;
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
  display: block;
}
body.dark .field-err-msg {
  color: #B91C1C;
}
.haccp-val-err {
  width: 100%;
  background: rgba(220, 38, 38, 0.22);
  border: 1px solid rgba(248, 113, 113, 0.65);
  color: #FECACA;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 4px;
}
body.dark .haccp-val-err {
  background: #FEE2E2;
  border-color: #DC2626;
  color: #991B1B;
}
.audit-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.audit-table-wrap {
  max-height: 390px;
  overflow-y: auto;
}

/* === PAKET 4: HILFE-PLAYER STIMMEN-UMSCHALTER (STANDARD / WEIBLICH) === */
.help-voice-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.20);
}
.help-voice-btn {
  border: none;
  background: transparent;
  color: rgba(241, 245, 249, 0.80);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.help-voice-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}
.help-voice-btn.active {
  background: linear-gradient(135deg, #FB923C, #EA580C);
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.42);
}
.help-voice-notice {
  margin: -8px 0 16px;
  padding: 11px 15px;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.58);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(15, 23, 42, 0.62));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #FEF3C7;
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
body.dark .help-voice-notice {
  background: rgba(254, 243, 199, 0.94);
  border-color: #D97706;
  color: #78350F;
}

/* =========================================================================
   TEMPERATUR-PLAUSIBILITÄTSPRÜFUNG (SANFTE WARNUNG BEI TIPPFEHLERN)
   ========================================================================= */
.input-warn {
  border-color: #F59E0B !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.28) !important;
}
.field-warn-msg {
  color: #FDE68A;
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
  display: block;
}
body.dark .field-warn-msg {
  color: #B45309;
}

/* =========================================================================
   KI-BOT-MÄNNCHEN (KROG-BOT-STIL IN ESSWERK-ORANGE · FROSTED GLASS)
   ========================================================================= */
.ew-bot-root {
  position: fixed;
  right: calc(22px + env(safe-area-inset-right, 0px));
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.ew-bot-root.panel-open {
  z-index: 135;
}
body.ew-chat-open .ew-bot-root {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.84);
}
body.ew-chat-open .ew-bot-root > * {
  pointer-events: none !important;
}
.ew-bot-root.hidden {
  display: none !important;
}
.ew-bot-root > * {
  pointer-events: auto;
}

/* Begrüßungs-Sprechblase beim App-Start */
.ew-bot-greet {
  max-width: 280px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px 16px 4px 16px;
  background: rgba(15, 23, 42, 0.90);
  border: 1px solid rgba(251, 146, 60, 0.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  color: #FFFFFF;
  font-size: 12.5px;
  line-height: 1.4;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
  cursor: pointer;
  animation: ewBotPopIn 0.28s ease-out;
}
.ew-bot-greet.hidden {
  display: none !important;
}
body.dark .ew-bot-greet {
  background: rgba(255, 255, 255, 0.95);
  color: #0F172A;
  border-color: rgba(234, 88, 12, 0.45);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}
.ew-bot-greet-close {
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  font-size: 12px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.ew-bot-greet-close:hover {
  opacity: 1;
}

/* Schwebender Bot-Button (unten rechts) */
.ew-bot-fab {
  position: relative;
  width: 68px;
  height: 68px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  background: radial-gradient(circle at 30% 25%, rgba(251, 146, 60, 0.34), rgba(15, 23, 42, 0.82));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(249, 115, 22, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: ewBotFloat 3.6s ease-in-out infinite;
}
body.dark .ew-bot-fab {
  background: radial-gradient(circle at 30% 25%, rgba(255, 237, 213, 0.96), rgba(255, 255, 255, 0.92));
  border-color: rgba(234, 88, 12, 0.50);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
}
.ew-bot-fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.38);
}
.ew-bot-fab.open {
  animation: none;
  border-color: #FB923C;
}
.ew-bot-fab.listening {
  box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.32), 0 12px 28px rgba(234, 88, 12, 0.5);
}
.ew-bot-fab-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
}
.ew-bot-fab-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #0F172A;
}
body.dark .ew-bot-fab-dot {
  border-color: #FFFFFF;
}
.ew-bot-fab-dot.warn {
  background: #F97316;
  box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7);
  animation: ewBotPulse 1.9s infinite;
}
.ew-bot-fab-dot.ok {
  background: #22C55E;
}
.ew-bot-fab-timer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: #EA580C;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.ew-bot-fab-timer.hidden {
  display: none !important;
}

/* Sprach- & Chat-Fenster (darf offen bleiben) */
.ew-bot-panel {
  width: 372px;
  max-width: calc(100vw - 24px);
  max-height: min(560px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(13, 20, 34, 0.90);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  color: #F8FAFC;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  overflow: hidden;
  animation: ewBotPopIn 0.2s ease-out;
}
.ew-bot-panel.hidden {
  display: none !important;
}
body.dark .ew-bot-panel {
  background: rgba(255, 255, 255, 0.94);
  color: #0F172A;
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.ew-bot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.24), rgba(15, 23, 42, 0.35));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
body.dark .ew-bot-head {
  background: linear-gradient(135deg, rgba(254, 215, 170, 0.62), rgba(241, 245, 249, 0.88));
  border-bottom-color: rgba(15, 23, 42, 0.10);
}
.ew-bot-head-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.ew-bot-mini-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ew-bot-head-meta {
  min-width: 0;
}
.ew-bot-head-meta strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ew-bot-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
}
.ew-bot-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
}
body.dark .ew-bot-pill {
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}
.ew-bot-pill.ok {
  background: rgba(34, 197, 94, 0.22);
  color: #86EFAC;
}
body.dark .ew-bot-pill.ok {
  background: #DCFCE7;
  color: #166534;
}
.ew-bot-pill.warn {
  background: rgba(249, 115, 22, 0.24);
  color: #FED7AA;
}
body.dark .ew-bot-pill.warn {
  background: #FFEDD5;
  color: #9A3412;
}
.ew-bot-head-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.ew-bot-ic-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.10);
  color: inherit;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.ew-bot-ic-btn:hover {
  background: rgba(255, 255, 255, 0.20);
}
.ew-bot-ic-btn.muted {
  opacity: 0.6;
}
.ew-bot-ic-btn.hidden {
  display: none !important;
}
body.dark .ew-bot-ic-btn {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.06);
}

/* Timer-Fortschrittsbalken */
.ew-bot-timer-bar {
  padding: 7px 12px;
  background: rgba(234, 88, 12, 0.20);
  border-bottom: 1px solid rgba(251, 146, 60, 0.35);
}
.ew-bot-timer-bar.hidden {
  display: none !important;
}
body.dark .ew-bot-timer-bar {
  background: #FFF7ED;
  border-bottom-color: #FDBA74;
}
.ew-bot-timer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 800;
  margin-bottom: 5px;
}
.ew-bot-timer-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
body.dark .ew-bot-timer-track {
  background: rgba(234, 88, 12, 0.18);
}
.ew-bot-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #FB923C, #EA580C);
  transition: width 0.35s linear;
}

/* Küchen-Extras Leiste */
.ew-bot-extras-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 10px 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
body.dark .ew-bot-extras-bar {
  border-bottom-color: rgba(15, 23, 42, 0.09);
}
.ew-bot-extra-btn {
  flex: 1 1 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 7px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ew-bot-extra-btn:hover,
.ew-bot-extra-btn.active {
  background: rgba(249, 115, 22, 0.25);
  border-color: rgba(251, 146, 60, 0.65);
}
body.dark .ew-bot-extra-btn {
  border-color: rgba(15, 23, 42, 0.13);
  background: rgba(15, 23, 42, 0.04);
}
body.dark .ew-bot-extra-btn:hover,
body.dark .ew-bot-extra-btn.active {
  background: #FFEDD5;
  border-color: #EA580C;
  color: #9A3412;
}

/* Aufklappbare Tools-/Text-Helfer-Leiste */
.ew-bot-drawer {
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ew-bot-drawer.hidden {
  display: none !important;
}
body.dark .ew-bot-drawer {
  background: rgba(241, 245, 249, 0.90);
  border-bottom-color: rgba(15, 23, 42, 0.10);
}
.ew-bot-drawer-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.ew-bot-drawer-lbl {
  font-size: 11px;
  color: var(--text-muted);
}
body.dark .ew-bot-drawer-lbl {
  color: #475569;
}
.ew-bot-chip-xs {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 7px;
  cursor: pointer;
}
.ew-bot-chip-xs.ew-bot-chip-accent {
  background: linear-gradient(135deg, #FB923C, #EA580C);
  border-color: transparent;
  color: #FFFFFF;
}
body.dark .ew-bot-chip-xs {
  border-color: rgba(15, 23, 42, 0.15);
  background: #FFFFFF;
}
body.dark .ew-bot-chip-xs.ew-bot-chip-accent {
  background: linear-gradient(135deg, #FB923C, #EA580C);
  color: #FFFFFF;
}
.ew-bot-mini-inp {
  width: 56px;
  padding: 4px 7px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(15, 23, 42, 0.65);
  color: #FFFFFF;
  font-size: 11.5px;
}
.ew-bot-mini-inp.wide {
  flex: 1 1 120px;
  width: auto;
}
body.dark .ew-bot-mini-inp {
  background: #FFFFFF;
  color: #0F172A;
  border-color: rgba(15, 23, 42, 0.18);
}

/* Chatverlauf */
.ew-bot-messages {
  flex: 1 1 auto;
  min-height: 155px;
  max-height: 250px;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ew-bot-empty {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  font-size: 12.5px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.dark .ew-bot-empty {
  background: rgba(241, 245, 249, 0.85);
  border-color: rgba(15, 23, 42, 0.16);
}
.ew-bot-msg {
  display: flex;
}
.ew-bot-msg.user {
  justify-content: flex-end;
}
.ew-bot-msg.bot {
  justify-content: flex-start;
}
.ew-bot-bubble {
  max-width: 88%;
  padding: 8px 11px;
  border-radius: 14px;
  font-size: 12.8px;
  line-height: 1.44;
  word-break: break-word;
}
.ew-bot-msg.user .ew-bot-bubble {
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}
.ew-bot-msg.bot .ew-bot-bubble {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-left-radius: 4px;
}
body.dark .ew-bot-msg.bot .ew-bot-bubble {
  background: #F1F5F9;
  border-color: rgba(15, 23, 42, 0.10);
  color: #0F172A;
}
.ew-bot-bubble-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.72;
}
.ew-bot-msg-src {
  font-weight: 700;
}
.ew-bot-copy-msg {
  margin-left: auto;
  border: 1px solid rgba(251, 146, 60, 0.65);
  background: rgba(249, 115, 22, 0.22);
  color: inherit;
  border-radius: 7px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
body.dark .ew-bot-copy-msg {
  background: #FFEDD5;
  color: #9A3412;
}

/* 3 Schnell-Tasten direkt über dem Mikrofon */
.ew-bot-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 7px 10px 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
body.dark .ew-bot-quick-row {
  border-top-color: rgba(15, 23, 42, 0.09);
}
.ew-bot-quick-chip {
  flex: 1 1 auto;
  border: 1px solid rgba(251, 146, 60, 0.42);
  background: rgba(249, 115, 22, 0.14);
  color: #FFEDD5;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.12s ease;
}
.ew-bot-quick-chip:hover {
  background: rgba(249, 115, 22, 0.30);
  transform: translateY(-1px);
}
body.dark .ew-bot-quick-chip {
  background: #FFF7ED;
  color: #9A3412;
  border-color: #FDBA74;
}
body.dark .ew-bot-quick-chip:hover {
  background: #FFEDD5;
}

/* Eingabeleiste mit Mikrofon & Textfeld */
.ew-bot-composer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 10px;
}
.ew-bot-mic-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(251, 146, 60, 0.55);
  background: linear-gradient(135deg, #FB923C, #EA580C);
  color: #FFFFFF;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ew-bot-mic-btn.listening {
  background: linear-gradient(135deg, #EF4444, #B91C1C);
  border-color: #FCA5A5;
  animation: ewBotPulse 1.2s infinite;
}
.ew-bot-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.65);
  color: #FFFFFF;
  font-size: 13px;
}
.ew-bot-input:focus {
  outline: none;
  border-color: #FB923C;
}
body.dark .ew-bot-input {
  background: #FFFFFF;
  color: #0F172A;
  border-color: rgba(15, 23, 42, 0.18);
}
.ew-bot-send-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
body.dark .ew-bot-send-btn {
  background: #0F172A;
  color: #FFFFFF;
}
.ew-bot-send-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Mobil: Sauber ÜBER der unteren Navigationsleiste (.bottom-nav) */
@media (max-width: 900px) {
  .ew-bot-root {
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  .ew-bot-fab {
    width: 60px;
    height: 60px;
  }
  .ew-bot-fab-svg {
    width: 52px;
    height: 52px;
  }
  .ew-bot-panel {
    width: min(370px, calc(100vw - 20px));
    max-height: calc(100vh - 175px - env(safe-area-inset-bottom, 0px));
  }
}

@media print {
  .ew-bot-root {
    display: none !important;
  }
}

@keyframes ewBotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes ewBotPopIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ewBotPulse {
  0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.65); }
  70% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
  100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .ew-bot-fab, .ew-bot-fab-dot.warn, .ew-bot-mic-btn.listening {
    animation: none !important;
  }
}

/* =========================================================================
   INTERNER TEAM-CHAT (1:1 IM ESSWERK-BOT GALAXY-/GLAS-DESIGN)
   Schwebendes Papierflieger-Icon direkt über dem Esswerk-Bot (unten rechts)
   ========================================================================= */
.ew-chat-root {
  position: fixed;
  right: calc(29px + env(safe-area-inset-right, 0px));
  bottom: calc(102px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, bottom 0.2s ease, right 0.2s ease;
}
.ew-chat-root.panel-open {
  z-index: 135;
  right: calc(22px + env(safe-area-inset-right, 0px));
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}
body.ew-bot-open .ew-chat-root {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.84);
}
body.ew-bot-open .ew-chat-root > * {
  pointer-events: none !important;
}
.ew-chat-root.bot-hidden {
  right: calc(22px + env(safe-area-inset-right, 0px));
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
}
.ew-chat-root.hidden {
  display: none !important;
}
.ew-chat-root > * {
  pointer-events: auto;
}

/* Dezente Hinweis-Sprechblase neben/über dem Chat-Icon */
.ew-chat-hint {
  max-width: 265px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 16px 16px 4px 16px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(251, 146, 60, 0.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  color: #FFFFFF;
  font-size: 12px;
  line-height: 1.38;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
  cursor: pointer;
  animation: ewBotPopIn 0.24s ease-out;
}
.ew-chat-hint.hidden {
  display: none !important;
}
body.dark .ew-chat-hint {
  background: rgba(255, 255, 255, 0.96);
  color: #0F172A;
  border-color: rgba(234, 88, 12, 0.45);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}
.ew-chat-hint-close {
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  font-size: 11px;
  cursor: pointer;
  padding: 0 2px;
}
.ew-chat-hint-close:hover {
  opacity: 1;
}

/* Schwebendes Papierflieger-Icon (etwas kleiner & dezenter als der Bot) */
.ew-chat-fab {
  position: relative;
  width: 54px;
  height: 54px;
  padding: 0;
  border-radius: 999px;
  border: 1.8px solid rgba(255, 255, 255, 0.40);
  background: radial-gradient(circle at 28% 24%, rgba(251, 146, 60, 0.36), rgba(15, 23, 42, 0.84));
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.40), 0 0 0 1px rgba(249, 115, 22, 0.32);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: ewBotFloat 3.6s ease-in-out -1.6s infinite;
}
body.dark .ew-chat-fab {
  background: radial-gradient(circle at 28% 24%, rgba(255, 237, 213, 0.96), rgba(255, 255, 255, 0.92));
  border-color: rgba(234, 88, 12, 0.46);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.20);
}
.ew-chat-fab:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.38);
}
.ew-chat-fab.open {
  animation: none;
  border-color: #FB923C;
}
.ew-chat-fab.has-unread {
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.28), 0 10px 26px rgba(234, 88, 12, 0.48);
}
.ew-chat-fab-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-1px, 1px);
}
.ew-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #F97316, #DC2626);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0F172A;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.55);
  animation: ewBotPulse 1.8s infinite;
}
body.dark .ew-chat-badge {
  border-color: #FFFFFF;
}
.ew-chat-badge.hidden,
.ew-chat-online-dot.hidden {
  display: none !important;
}
.ew-chat-online-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22C55E;
  border: 2px solid #0F172A;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75);
}
body.dark .ew-chat-online-dot {
  border-color: #FFFFFF;
}

/* Team-Chat Fenster (1:1 Galaxy-/Glas-Look wie .ew-bot-panel) */
.ew-chat-panel {
  width: 372px;
  max-width: calc(100vw - 24px);
  height: min(500px, calc(100vh - 180px));
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(13, 20, 34, 0.92);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  color: #F8FAFC;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  overflow: hidden;
  animation: ewBotPopIn 0.2s ease-out;
}
.ew-chat-panel.hidden {
  display: none !important;
}
body.dark .ew-chat-panel {
  background: rgba(255, 255, 255, 0.95);
  color: #0F172A;
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.ew-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.24), rgba(15, 23, 42, 0.35));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}
body.dark .ew-chat-head {
  background: linear-gradient(135deg, rgba(254, 215, 170, 0.62), rgba(241, 245, 249, 0.88));
  border-bottom-color: rgba(15, 23, 42, 0.10);
}
.ew-chat-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ew-chat-head-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(249, 115, 22, 0.20);
  border: 1px solid rgba(251, 146, 60, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ew-chat-head-meta {
  min-width: 0;
}
.ew-chat-head-meta strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ew-chat-status-row {
  display: flex;
  gap: 4px;
  margin-top: 3px;
}
.ew-chat-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
}
body.dark .ew-chat-pill {
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}
.ew-chat-pill.ok {
  background: rgba(34, 197, 94, 0.22);
  color: #86EFAC;
}
body.dark .ew-chat-pill.ok {
  background: #DCFCE7;
  color: #166534;
}
.ew-chat-head-actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}
.ew-chat-ic-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.10);
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ew-chat-ic-btn:hover {
  background: rgba(255, 255, 255, 0.20);
}
.ew-chat-ic-btn.hidden {
  display: none !important;
}
body.dark .ew-chat-ic-btn {
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.06);
}

/* Kollegenliste */
.ew-chat-roster {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ew-chat-roster.hidden,
.ew-chat-newgrp.hidden,
.ew-chat-convo.hidden {
  display: none !important;
}
.ew-chat-sec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 4px 2px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.78;
}
.ew-chat-newgrp-btn {
  border: 1px solid rgba(251, 146, 60, 0.55);
  background: rgba(249, 115, 22, 0.18);
  color: #FFEDD5;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.ew-chat-newgrp-btn.limit-full {
  opacity: 0.72;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}
body.dark .ew-chat-newgrp-btn {
  background: #FFF7ED;
  color: #9A3412;
  border-color: #FDBA74;
}
.ew-chat-group-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}
.ew-chat-group-wrap .ew-chat-contact {
  flex: 1 1 auto;
}
.ew-chat-grp-del {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 12px;
}
.ew-chat-grp-del:hover {
  background: rgba(220, 38, 38, 0.28);
}
.ew-chat-avatar.grp {
  background: linear-gradient(135deg, #38BDF8, #0284C7);
  font-size: 16px;
}
.ew-chat-newgrp {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px;
}
.ew-chat-lbl {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 5px;
}
.ew-chat-member-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 190px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
body.dark .ew-chat-member-list {
  background: #F8FAFC;
  border-color: rgba(15, 23, 42, 0.12);
}
.ew-chat-member-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
}
.ew-chat-member-row input {
  width: 16px;
  height: 16px;
  accent-color: #F97316;
}
.ew-chat-smiley-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 7px 10px;
  background: rgba(15, 23, 42, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.ew-chat-smiley-bar.hidden {
  display: none !important;
}
body.dark .ew-chat-smiley-bar {
  background: #F1F5F9;
  border-top-color: rgba(15, 23, 42, 0.10);
}
.ew-chat-em-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ew-chat-em-btn:hover {
  background: rgba(249, 115, 22, 0.24);
  border-color: rgba(251, 146, 60, 0.45);
}
.ew-chat-contact {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.ew-chat-contact:hover {
  background: rgba(249, 115, 22, 0.16);
  border-color: rgba(251, 146, 60, 0.45);
  transform: translateY(-1px);
}
.ew-chat-contact.team {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.20), rgba(255, 255, 255, 0.06));
  border-color: rgba(251, 146, 60, 0.42);
}
body.dark .ew-chat-contact {
  background: #F8FAFC;
  border-color: rgba(15, 23, 42, 0.10);
}
body.dark .ew-chat-contact.team {
  background: #FFF7ED;
  border-color: #FDBA74;
}
body.dark .ew-chat-contact:hover {
  background: #FFEDD5;
  border-color: #FB923C;
}
.ew-chat-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.36), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ew-chat-avatar.team {
  background: linear-gradient(135deg, #FB923C, #EA580C);
  font-size: 17px;
}
.ew-chat-presence {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #0F172A;
}
body.dark .ew-chat-presence {
  border-color: #FFFFFF;
}
.ew-chat-presence.online {
  background: #22C55E;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.8);
}
.ew-chat-presence.offline {
  background: #64748B;
}
.ew-chat-contact-main {
  flex: 1 1 auto;
  min-width: 0;
}
.ew-chat-contact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ew-chat-contact-top strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ew-chat-time {
  font-size: 10.5px;
  opacity: 0.72;
  white-space: nowrap;
}
.ew-chat-contact-sub {
  font-size: 11.5px;
  opacity: 0.76;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ew-chat-on-txt {
  color: #4ADE80;
  font-weight: 700;
}
body.dark .ew-chat-on-txt {
  color: #15803D;
}
.ew-chat-cnt {
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Aktiver Chat-Verlauf */
.ew-chat-convo {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ew-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ew-chat-empty {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  font-size: 12.2px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.dark .ew-chat-empty {
  background: rgba(241, 245, 249, 0.85);
  border-color: rgba(15, 23, 42, 0.16);
}
.ew-chat-date-sep {
  text-align: center;
  margin: 4px 0;
}
.ew-chat-date-sep span {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  opacity: 0.82;
}
body.dark .ew-chat-date-sep span {
  background: rgba(15, 23, 42, 0.08);
}
.ew-chat-msg {
  display: flex;
}
.ew-chat-msg.mine {
  justify-content: flex-end;
}
.ew-chat-msg.other {
  justify-content: flex-start;
}
.ew-chat-bubble {
  max-width: 86%;
  padding: 8px 11px;
  border-radius: 15px;
  font-size: 12.8px;
  line-height: 1.42;
  word-break: break-word;
}
.ew-chat-msg.mine .ew-chat-bubble {
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}
.ew-chat-msg.other .ew-chat-bubble {
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-bottom-left-radius: 4px;
}
body.dark .ew-chat-msg.other .ew-chat-bubble {
  background: #F1F5F9;
  border-color: rgba(15, 23, 42, 0.10);
  color: #0F172A;
}
.ew-chat-sender {
  font-size: 10.5px;
  font-weight: 800;
  color: #FDBA74;
  margin-bottom: 2px;
}
body.dark .ew-chat-sender {
  color: #C2410C;
}
.ew-chat-bubble-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 3px;
  font-size: 10px;
  opacity: 0.74;
}

/* Schnellantwort-Chips & Composer (1:1 wie Esswerk-Bot) */
.ew-chat-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}
body.dark .ew-chat-quick-row {
  border-top-color: rgba(15, 23, 42, 0.09);
}
.ew-chat-quick-chip {
  flex: 1 1 auto;
  border: 1px solid rgba(251, 146, 60, 0.42);
  background: rgba(249, 115, 22, 0.14);
  color: #FFEDD5;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.ew-chat-quick-chip:hover {
  background: rgba(249, 115, 22, 0.30);
}
body.dark .ew-chat-quick-chip {
  background: #FFF7ED;
  color: #9A3412;
  border-color: #FDBA74;
}
.ew-chat-composer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px 10px;
}
.ew-chat-mic-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  color: inherit;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ew-chat-mic-btn.listening {
  background: linear-gradient(135deg, #EF4444, #B91C1C);
  border-color: #FCA5A5;
  color: #FFFFFF;
  animation: ewBotPulse 1.2s infinite;
}
body.dark .ew-chat-mic-btn {
  background: #F1F5F9;
  border-color: rgba(15, 23, 42, 0.16);
}
.ew-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.65);
  color: #FFFFFF;
  font-size: 13px;
}
.ew-chat-input:focus {
  outline: none;
  border-color: #FB923C;
}
body.dark .ew-chat-input {
  background: #FFFFFF;
  color: #0F172A;
  border-color: rgba(15, 23, 42, 0.18);
}
.ew-chat-send-btn {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #FB923C, #EA580C);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}
.ew-chat-send-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* Mobil: Direkt über dem Esswerk-Bot (und sauber über .bottom-nav) */
@media (max-width: 900px) {
  .ew-chat-root {
    right: calc(20px + env(safe-area-inset-right, 0px));
    bottom: calc(156px + env(safe-area-inset-bottom, 0px));
  }
  .ew-chat-root.bot-hidden,
  .ew-chat-root.panel-open {
    right: calc(14px + env(safe-area-inset-right, 0px));
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  .ew-chat-fab {
    width: 48px;
    height: 48px;
  }
  .ew-chat-panel {
    width: min(370px, calc(100vw - 20px));
    height: min(490px, calc(100vh - 175px - env(safe-area-inset-bottom, 0px)));
  }
}

@media print {
  .ew-chat-root {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ew-chat-fab, .ew-chat-badge, .ew-chat-mic-btn.listening {
    animation: none !important;
  }
}

/* =========================================================================
   PHASE 1 & 2: PASSWORT-STÄRKE-ANZEIGE, LIVE-SYNC-AMPEL & LOGIN-ROLLENWAHL
   (100 % passend im bestehenden Esswerk-Glas-Design)
   ========================================================================= */
.pw-strength-wrap {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pw-strength-track {
  flex: 1 1 auto;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}
body.dark .pw-strength-track {
  background: rgba(15, 23, 42, 0.12);
}
.pw-strength-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease, background-color 0.2s ease;
  background: rgba(148, 163, 184, 0.45);
}
.pw-strength-bar.weak { background: #EF4444; }
.pw-strength-bar.medium { background: #F59E0B; }
.pw-strength-bar.strong { background: #22C55E; }
.pw-strength-lbl {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}
.pw-strength-lbl.weak { color: #FCA5A5; }
.pw-strength-lbl.medium { color: #FDE68A; }
.pw-strength-lbl.strong { color: #86EFAC; }
body.dark .pw-strength-lbl.weak { color: #B91C1C; }
body.dark .pw-strength-lbl.medium { color: #B45309; }
body.dark .pw-strength-lbl.strong { color: #15803D; }

/* Live-Sync-Ampel in der oberen Leiste (Topbar) */
.sync-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.48);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.sync-status-pill:hover {
  transform: translateY(-1px);
}
body.dark .sync-status-pill {
  background: rgba(255, 255, 255, 0.88);
  color: #0F172A;
}
.sync-status-pill .sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sync-status-pill.synced {
  border-color: rgba(34, 197, 94, 0.42);
}
.sync-status-pill.synced .sync-dot {
  background: #22C55E;
  box-shadow: 0 0 7px rgba(34, 197, 94, 0.85);
}
.sync-status-pill.pending {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.16);
}
.sync-status-pill.pending .sync-dot {
  background: #F59E0B;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.85);
  animation: ewBotPulse 1.5s infinite;
}
.sync-status-pill.offline {
  border-color: rgba(239, 68, 68, 0.65);
  background: rgba(220, 38, 38, 0.22);
  color: #FECACA;
}
body.dark .sync-status-pill.offline {
  background: #FEE2E2;
  color: #991B1B;
}
.sync-status-pill.offline .sync-dot {
  background: #EF4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.9);
}
@media (max-width: 680px) {
  .sync-status-pill {
    padding: 0 8px;
    height: 32px;
  }
  .sync-status-pill.synced .sync-lbl {
    display: none;
  }
}

/* Deutlicher Offline-Hinweisbalken unterhalb der Topbar */
.offline-notice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(90deg, rgba(185, 28, 28, 0.92), rgba(153, 27, 27, 0.88));
  border-bottom: 1px solid rgba(252, 165, 165, 0.45);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
}
.offline-notice-bar.hidden {
  display: none !important;
}

/* Klickbare Rollen-Vorauswahl auf dem Login-Screen */
.login-role-pill {
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.login-role-pill:hover {
  transform: translateY(-1px);
}
.login-role-pill.active {
  border-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.42);
  transform: translateY(-1px) scale(1.04);
}
body.dark .login-role-pill.active {
  border-color: #EA580C;
}
.login-role-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: -4px 0 12px;
  line-height: 1.35;
}

/* 4-Schritte Ersteinrichtungs-Assistent (First-Run-Wizard) */
.ew-wiz-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.ew-wiz-step {
  padding: 7px 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}
body.dark .ew-wiz-step {
  background: #F8FAFC;
}
.ew-wiz-step.active {
  border-color: var(--orange);
  background: rgba(249, 115, 22, 0.20);
  color: #FFFFFF;
}
body.dark .ew-wiz-step.active {
  background: #FFF7ED;
  color: #9A3412;
}
.ew-wiz-step.done {
  border-color: rgba(34, 197, 94, 0.48);
  color: #86EFAC;
}
body.dark .ew-wiz-step.done {
  background: #F0FDF4;
  color: #166534;
}

/* =========================================================================
   PHASE 3 (P3a): HEUTE-MODUS, TOUCH-DREHRAD, NUMPAD, SCHICHTNOTIZ & KÜCHEN-MODUS
   ========================================================================= */

/* Heute-Modus Schalter & Tagesansicht */
.ew-hidden-by-today {
  display: none !important;
}
.ew-today-switch {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
}
body.dark .ew-today-switch {
  background: #F1F5F9;
}
.ew-today-sw-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.ew-today-sw-btn.active {
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.35);
}
.ew-today-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.ew-today-cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ew-today-big-cta {
  padding: 12px 20px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.38);
}
.ew-today-print-btn {
  padding: 12px 16px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
}
.ew-today-meals,
.ew-today-check-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ew-today-meal-row,
.ew-today-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}
body.dark .ew-today-meal-row,
body.dark .ew-today-check-row {
  background: #F8FAFC;
}
.ew-today-cool-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.ew-today-cool-tile:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
}
body.dark .ew-today-cool-tile {
  background: #FFFFFF;
}
.ew-today-cool-tile.is-ok {
  border-color: rgba(34, 197, 94, 0.52);
}
.ew-today-cool-tile.is-bad {
  border-color: rgba(239, 68, 68, 0.75);
  background: rgba(220, 38, 38, 0.12);
}
body.dark .ew-today-cool-tile.is-bad {
  background: #FEF2F2;
}

/* Schnelle Schichtübergabe-Notiz */
.ew-shift-wrap {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ew-shift-open-list {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.14);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
body.dark .ew-shift-open-list {
  background: #FFFBEB;
  border-color: #F59E0B;
}
.ew-shift-open-head {
  font-size: 12.5px;
}
.ew-shift-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
body.dark .ew-shift-item {
  background: #FFFFFF;
  border-color: rgba(15, 23, 42, 0.12);
}
.ew-shift-item-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}
.ew-shift-composer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.38);
}
body.dark .ew-shift-composer {
  background: rgba(255, 255, 255, 0.88);
}
.ew-shift-lbl {
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}
.ew-shift-inp {
  flex: 1 1 230px;
  min-width: 180px;
  padding: 7px 10px !important;
  font-size: 12.8px !important;
}
.ew-shift-kit {
  width: auto !important;
  min-width: 125px;
  padding: 7px 10px !important;
  font-size: 12.5px !important;
}
.ew-shift-history {
  position: relative;
  font-size: 11.5px;
  color: var(--text-muted);
}
.ew-shift-history summary {
  cursor: pointer;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.ew-shift-history-pop {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
body.dark .ew-shift-history-pop {
  background: #FFFFFF;
}
.ew-shift-done-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
}

/* Touch-Drehrad (iPhone-Stil) & Großes Numpad */
.ew-wheel-trigger {
  margin-left: 3px;
  margin-right: 3px;
  padding: 5px 8px !important;
}
.ew-tw-modal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ew-tw-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.ew-tw-live {
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: rgba(15, 23, 42, 0.55);
  text-align: center;
  transition: background 0.16s ease, border-color 0.16s ease;
}
body.dark .ew-tw-live {
  background: #F8FAFC;
}
.ew-tw-live.is-ok {
  border-color: #22C55E;
  background: rgba(22, 163, 74, 0.20);
}
body.dark .ew-tw-live.is-ok {
  background: #DCFCE7;
  color: #14532D;
}
.ew-tw-live.is-bad {
  border-color: #EF4444;
  background: rgba(220, 38, 38, 0.24);
}
body.dark .ew-tw-live.is-bad {
  background: #FEE2E2;
  color: #7F1D1D;
}
.ew-tw-live-val {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.ew-tw-live-rule {
  font-size: 12.5px;
  font-weight: 700;
  margin-top: 4px;
}
.ew-tw-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ew-tw-tab {
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
body.dark .ew-tw-tab {
  background: #F1F5F9;
}
.ew-tw-tab.active {
  background: linear-gradient(135deg, #F97316, #EA580C);
  border-color: transparent;
  color: #FFFFFF;
}

.ew-wheel-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 0;
}
.ew-wheel-col-box {
  flex: 1 1 0;
  max-width: 175px;
}
.ew-wheel-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}
.ew-wheel-step-btns {
  display: flex;
  gap: 4px;
}
.ew-wheel-comma {
  font-size: 34px;
  font-weight: 900;
  padding-top: 22px;
  opacity: 0.85;
}
.ew-wheel-stage {
  position: relative;
  height: 176px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
}
body.dark .ew-wheel-stage {
  background: #F1F5F9;
}
.ew-wheel-highlight {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 66px;
  height: 44px;
  border-radius: 10px;
  border: 1.5px solid rgba(249, 115, 22, 0.72);
  background: rgba(249, 115, 22, 0.18);
  pointer-events: none;
  z-index: 1;
}
.ew-wheel-drum {
  position: relative;
  z-index: 2;
  height: 176px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ew-wheel-drum::-webkit-scrollbar {
  display: none;
}
.ew-wheel-spacer {
  height: 66px;
  flex-shrink: 0;
}
.ew-wheel-item {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  font-size: 19px;
  font-weight: 700;
  opacity: 0.45;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.ew-wheel-item.active {
  opacity: 1;
  font-size: 23px;
  font-weight: 900;
  transform: scale(1.06);
}

/* Großes mobiles Zahlenfeld (Numpad) */
.ew-numpad-display {
  font-size: 24px !important;
  font-weight: 800 !important;
  text-align: center;
  height: 50px !important;
}
.ew-numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ew-np-key {
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.09);
  color: inherit;
  font-size: 23px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, transform 0.08s ease;
}
.ew-np-key:active {
  transform: scale(0.96);
  background: rgba(249, 115, 22, 0.35);
}
body.dark .ew-np-key {
  background: #FFFFFF;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06);
}
.ew-np-fn {
  background: rgba(249, 115, 22, 0.16);
}
body.dark .ew-np-fn {
  background: #FFF7ED;
  color: #9A3412;
}

/* 1-Klick-Korrekturmaßnahmen & Abweichungs-Foto */
.ew-dev-box {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid rgba(239, 68, 68, 0.65);
  background: rgba(185, 28, 28, 0.16);
}
body.dark .ew-dev-box {
  background: #FEF2F2;
  border-color: #FCA5A5;
}
.ew-dev-title {
  font-size: 12.5px;
  font-weight: 800;
  margin-bottom: 7px;
}
.ew-dev-chips,
.ew-inline-dev-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ew-dev-chip {
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid rgba(251, 146, 60, 0.55);
  background: rgba(15, 23, 42, 0.65);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
body.dark .ew-dev-chip {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #FDBA74;
}
.ew-dev-chip.active {
  background: linear-gradient(135deg, #F97316, #EA580C);
  border-color: transparent;
  color: #FFFFFF;
}
.ew-dev-photo-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.ew-tw-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}

.ew-inline-dev-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}
.ew-inline-dev-bar.is-bad {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(239, 68, 68, 0.6);
}
body.dark .ew-inline-dev-bar.is-bad {
  background: #FEF2F2;
}
.ew-inline-dev-lbl {
  font-size: 12px;
  font-weight: 800;
}
.ew-cool-dev-panel {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

/* Zuschaltbarer Küchen-Modus (NUR aktiv wenn body.kitchen-mode gesetzt ist!) */
.ew-kmode-top-btn.active {
  width: auto !important;
  padding: 0 10px !important;
  background: linear-gradient(135deg, #F97316, #EA580C) !important;
  color: #FFFFFF !important;
  border-color: transparent !important;
  font-weight: 800;
  font-size: 12px;
  gap: 5px;
}
.ew-kmode-side-btn {
  width: 100%;
  margin-bottom: 6px;
  justify-content: center;
}

body.kitchen-mode {
  font-size: 17px;
}
body.kitchen-mode .card,
body.kitchen-mode .day-card,
body.kitchen-mode .kpi-card,
body.kitchen-mode .topbar,
body.kitchen-mode .sidebar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: #0B1120 !important;
  border-color: rgba(255, 255, 255, 0.34) !important;
}
body.kitchen-mode.dark .card,
body.kitchen-mode.dark .day-card,
body.kitchen-mode.dark .kpi-card,
body.kitchen-mode.dark .topbar,
body.kitchen-mode.dark .sidebar {
  background: #FFFFFF !important;
  border-color: #334155 !important;
}
body.kitchen-mode .btn,
body.kitchen-mode .seg-tab,
body.kitchen-mode .input,
body.kitchen-mode .select,
body.kitchen-mode .num-input {
  min-height: 46px;
  font-size: 15.5px !important;
  font-weight: 800;
}
body.kitchen-mode .nav-item {
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 700;
}
body.kitchen-mode .ew-dev-chip {
  padding: 11px 14px;
  font-size: 14px;
}
body.kitchen-mode .rd-chk {
  width: 26px !important;
  height: 26px !important;
}

/* =========================================================================
   PHASE 4 (P3b): STANDORT-KACHELN, 7/14-TAGE-TREND, TOUR-CHECK & SCHUL-NOTIZEN
   ========================================================================= */

/* Standort-Kacheln auf der Zentrale */
.ew-loc-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.ew-loc-tile:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
}
body.dark .ew-loc-tile {
  background: #FFFFFF;
}
.ew-loc-tile.is-selected {
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.45);
}
.ew-loc-tile.state-done {
  border-color: rgba(34, 197, 94, 0.58);
  background: rgba(22, 163, 74, 0.12);
}
body.dark .ew-loc-tile.state-done {
  background: #F0FDF4;
}
.ew-loc-tile.state-pending {
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.13);
}
body.dark .ew-loc-tile.state-pending {
  background: #FFFBEB;
}
.ew-loc-tile.state-open {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.05);
}
body.dark .ew-loc-tile.state-open {
  background: #F8FAFC;
  border-color: rgba(15, 23, 42, 0.12);
}
.ew-loc-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 4px;
}
.ew-loc-name {
  font-size: 16px;
  font-weight: 800;
}
.ew-loc-icon {
  font-size: 19px;
}
.ew-loc-lbl {
  font-size: 12.8px;
  font-weight: 700;
}
.ew-loc-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 7-/14-Tage-Trend-Ansicht */
.ew-trend-loc-box {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}
body.dark .ew-trend-loc-box {
  background: #F8FAFC;
}
.ew-trend-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.ew-trend-dot {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  display: inline-block;
}
.ew-trend-dot.ok {
  background: #22C55E;
}
.ew-trend-dot.bad {
  background: #EF4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.75);
}
.ew-trend-dot.none {
  background: rgba(148, 163, 184, 0.35);
}
.ew-trend-dev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}
.ew-trend-dev-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px;
}
body.dark .ew-trend-dev-pill {
  background: #FFFFFF;
}

/* Gelber Ferien- & Schließtage-Warnbalken in der Produktion */
.ew-prod-holiday-warn {
  margin-bottom: 14px;
  padding: 11px 15px;
  border-radius: 14px;
  border: 1.5px solid #F59E0B;
  background: rgba(245, 158, 11, 0.18);
  color: #FEF3C7;
  line-height: 1.45;
}
body.dark .ew-prod-holiday-warn {
  background: #FFFBEB;
  color: #92400E;
  border-color: #F59E0B;
}

/* Verlade- & Abfahrts-Check für Schultouren */
.ew-tour-checks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.ew-tour-chk-lbl {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
body.dark .ew-tour-chk-lbl {
  background: #F8FAFC;
}
.ew-tour-chk-lbl input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--orange);
  flex-shrink: 0;
}

/* Mini-Rückmeldungs-Gedächtnis pro Schule */
.ew-scn-inline-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  margin-right: 4px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.55);
  font-size: 11.5px;
  font-weight: 700;
  color: #FDE68A;
}
body.dark .ew-scn-inline-pill {
  background: #FEF3C7;
  color: #92400E;
  border-color: #F59E0B;
}
.ew-scn-inline-done {
  border: none;
  background: rgba(34, 197, 94, 0.28);
  color: inherit;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
