/* ============================================================
   FestKassa Design System — Festzelt-Industrial Theme
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --bg:        #1a1512;
  --surface:   #241e19;
  --surface-2: #2e2620;
  --line:      #3a302a;
  --text:      #f5ede0;
  --muted:     #b3a08c;
  --gold:      #f0a830;
  --gold-deep: #d4882a;
  --green:     #5aa86a;
  --red:       #d9584a;

  --radius:    14px;
  --radius-lg: 20px;
  --shadow:    0 6px 20px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.05) inset;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.06) inset;

  --font-display: 'Bricolage Grotesque', serif;
  --font-ui:      'Archivo', sans-serif;

  --transition: 150ms cubic-bezier(.22,.68,0,1.2);
  --transition-fast: 100ms ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100%;
  overflow-x: hidden;
  /* Warm noise texture + radial atmosphere */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(240,168,48,.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 70% 80%, rgba(212,136,42,.04) 0%, transparent 55%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tabular numbers for all price/qty displays */
.num, .price, .qty, [data-num] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p { line-height: 1.6; }

.text-muted  { color: var(--muted); }
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.75rem; }
.text-lg     { font-size: 1.125rem; }
.text-xl     { font-size: 1.25rem; }
.font-bold   { font-weight: 700; }
.font-display { font-family: var(--font-display); }

/* --- Wordmark --- */
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  line-height: 1;
}
.wordmark .mark-fest { color: var(--text); }
.wordmark .mark-kassa {
  color: var(--gold);
  position: relative;
}
.wordmark .mark-kassa::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  border-radius: 2px;
  opacity: 0.7;
}
.wordmark .mark-dot {
  color: var(--gold);
  font-size: 1.8em;
  line-height: 0;
  vertical-align: -0.1em;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 56px;
  padding: 0 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition-fast), opacity var(--transition-fast);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.08) 0%, transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}

.btn:active {
  transform: scale(0.97) translateY(1px);
  box-shadow: 0 1px 4px rgba(0,0,0,.5) !important;
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

/* Gold — primary CTA */
.btn-gold {
  background: linear-gradient(170deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #1a1512;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(240,168,48,.35), 0 1px 0 rgba(255,255,255,.2) inset;
}
.btn-gold:hover:not(:disabled) {
  box-shadow: 0 6px 24px rgba(240,168,48,.5), 0 1px 0 rgba(255,255,255,.25) inset;
  transform: translateY(-1px);
}

/* Green — confirm/positive */
.btn-green {
  background: linear-gradient(170deg, #6bc57c 0%, var(--green) 100%);
  color: #0d1f12;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(90,168,106,.35), 0 1px 0 rgba(255,255,255,.15) inset;
}
.btn-green:hover:not(:disabled) {
  box-shadow: 0 6px 24px rgba(90,168,106,.5), 0 1px 0 rgba(255,255,255,.2) inset;
  transform: translateY(-1px);
}

/* Red — danger/cancel */
.btn-red {
  background: linear-gradient(170deg, #e8685a 0%, var(--red) 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(217,88,74,.35), 0 1px 0 rgba(255,255,255,.12) inset;
}
.btn-red:hover:not(:disabled) {
  box-shadow: 0 6px 24px rgba(217,88,74,.5);
  transform: translateY(-1px);
}

/* Ghost — secondary/outline */
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--muted);
  color: var(--text);
  background: rgba(255,255,255,.04);
}

/* Large kasse variant */
.btn-kasse {
  min-height: 72px;
  font-size: 1.125rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  padding: 0 2rem;
}

/* Full-width utility */
.btn-block { width: 100%; }

/* Icon button */
.btn-icon {
  min-height: 44px;
  width: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn-icon:hover:not(:disabled) {
  background: rgba(255,255,255,.1);
  color: var(--text);
}

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body {
  padding: 1.5rem;
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.15);
}

/* --- Form Fields --- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  min-height: 52px;
  padding: 0 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

.field input::placeholder,
.field select::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,168,48,.2);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: none;
}

.field textarea {
  min-height: 100px;
  padding: 0.75rem 1rem;
  resize: vertical;
}

.field-error input,
.field-error select {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(217,88,74,.15);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.field-err-msg {
  font-size: 0.75rem;
  color: var(--red);
}

/* PIN input — big digits */
.pin-input {
  font-size: 2rem !important;
  letter-spacing: 0.4em !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums !important;
  font-weight: 700 !important;
  min-height: 68px !important;
}

/* Passwort/PIN sichtbar-schalten (👁) */
.pw-wrap {
  position: relative;
}
.pw-wrap input {
  padding-right: 3rem;
}
.pw-toggle {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0.65;
  transition: opacity var(--transition-fast);
}
.pw-toggle:hover,
.pw-toggle:focus-visible {
  opacity: 1;
  outline: none;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
}

.tab {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
  border: none;
  background: transparent;
  font-family: var(--font-ui);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.tab:hover { color: var(--text); background: rgba(255,255,255,.05); }

.tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* --- Toast/Notifications --- */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 3rem));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  pointer-events: auto;
  animation: toast-in 0.25s cubic-bezier(.22,.68,0,1.2) forwards;
  border-left: 3px solid transparent;
}

.toast-success {
  background: color-mix(in srgb, var(--green) 15%, var(--surface));
  border-color: var(--green);
}
.toast-error {
  background: color-mix(in srgb, var(--red) 15%, var(--surface));
  border-color: var(--red);
}
.toast-info {
  background: color-mix(in srgb, var(--gold) 12%, var(--surface));
  border-color: var(--gold);
}
.toast-warn {
  background: color-mix(in srgb, #e8873a 15%, var(--surface));
  border-color: #e8873a;
}

.toast-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; }
.toast-title { font-weight: 700; }
.toast-msg   { color: var(--muted); font-size: 0.8125rem; margin-top: 2px; }

.toast.toast-out {
  animation: toast-out 0.2s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(8px) scale(0.95); }
}

/* --- Loading Spinner --- */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(240,168,48,.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 200px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- App Layout --- */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* --- Header --- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
  /* Warm gold accent bar at top */
  background-image: linear-gradient(to bottom, rgba(240,168,48,.12) 0%, transparent 100%);
}

.app-header::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep));
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  padding-top: calc(0.85rem + 3px); /* compensate the accent bar */
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  gap: 1rem;
}

/* --- User Chip --- */
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.35rem 0.75rem 0.35rem 0.45rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  transition: background var(--transition-fast);
}
.user-chip:empty { display: none; }
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #1a1512;
  flex-shrink: 0;
  font-family: var(--font-display);
}
.role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 100px;
  background: rgba(240,168,48,.15);
  color: var(--gold);
  border: 1px solid rgba(240,168,48,.25);
}

/* --- Main content area --- */
#app {
  flex: 1;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0)
           env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

/* --- View container --- */
.view {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.view-narrow {
  max-width: 520px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* --- Responsive Grid --- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-kasse { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .view, .view-narrow { padding: 1.25rem 1rem; }
  .header-inner { padding: 0.75rem 1rem; padding-top: calc(0.75rem + 3px); }
}

/* --- Flex helpers --- */
.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1  { gap: 0.5rem; }
.gap-2  { gap: 1rem; }
.gap-3  { gap: 1.5rem; }
.gap-4  { gap: 2rem; }

/* --- Spacing --- */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-1  { padding: 0.5rem; }
.p-2  { padding: 1rem; }
.p-3  { padding: 1.5rem; }
.p-4  { padding: 2rem; }

/* --- Divider --- */
.divider {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 1.5rem 0;
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-gold  { background: rgba(240,168,48,.15); color: var(--gold); border: 1px solid rgba(240,168,48,.3); }
.badge-green { background: rgba(90,168,106,.15); color: var(--green); border: 1px solid rgba(90,168,106,.3); }
.badge-red   { background: rgba(217,88,74,.15);  color: var(--red);   border: 1px solid rgba(217,88,74,.3); }
.badge-muted { background: rgba(179,160,140,.1); color: var(--muted); border: 1px solid rgba(179,160,140,.2); }

/* --- Table --- */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(58,48,42,.5);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* --- Empty state --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 2rem;
  color: var(--muted);
  text-align: center;
}
.empty-icon { font-size: 3rem; opacity: 0.4; }

/* --- Price display --- */
.price-display {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}

/* --- Scroll utilities --- */
.scroll-y { overflow-y: auto; }
.scroll-x { overflow-x: auto; }

/* --- Visually hidden (a11y) --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Page transition fade --- */
.page-enter {
  animation: page-fade-in 0.2s ease forwards;
}
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Login view specific --- */
.login-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  /* Dramatic centered warm glow */
  background-image:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(240,168,48,.08) 0%, transparent 65%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.login-card {
  width: 100%;
  max-width: 440px;
  animation: login-appear 0.35s cubic-bezier(.22,.68,0,1.2) forwards;
}

@keyframes login-appear {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.login-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.login-wordmark .icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 8px 24px rgba(240,168,48,.35);
  margin-bottom: 0.25rem;
}

.login-wordmark h1 {
  font-size: 2rem;
}

.login-wordmark .tagline {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ============================================================
   Kasse View — Festzelt-Industrial ordering screen
   ============================================================ */

/* ── Main two-panel layout ── */
.kasse-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  grid-template-rows: 100%;
  height: calc(100dvh - 64px); /* below sticky header */
  overflow: hidden;
}

@media (max-width: 900px) {
  .kasse-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    height: auto;
    overflow: visible;
  }
}

/* ── Left panel: Speisekarte ── */
.kasse-menu {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--bg);
}

.kasse-fest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.kasse-fest-bar-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.kasse-fest-switch {
  min-height: 36px;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  gap: 0.4rem;
  flex-shrink: 0;
  border-radius: var(--radius);
}

.kasse-menu-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.25rem 1.5rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* ── Category grouping ── */
.kasse-kategorie + .kasse-kategorie {
  margin-top: 1.5rem;
}

.kasse-kat-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.625rem;
  padding-left: 2px;
}

/* ── Product grid ── */
.kasse-produkt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.625rem;
}

@media (max-width: 560px) {
  .kasse-produkt-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

/* Product button — large, thumb-friendly */
.kasse-produkt-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 88px;
  padding: 0.75rem 1rem;
  gap: 0.25rem;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: left;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition),
    box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.kasse-produkt-btn:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(240,168,48,.3), var(--shadow);
  transform: translateY(-2px);
}

.kasse-produkt-btn:active {
  transform: scale(0.96) translateY(1px) !important;
  box-shadow: var(--shadow-sm) !important;
}

.kasse-produkt-name {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  word-break: break-word;
}

.kasse-produkt-preis {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold);
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}

/* ── Right panel: Cart ── */
.kasse-cart-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  overflow: hidden;
}

@media (max-width: 900px) {
  .kasse-cart-panel {
    border-left: none;
    border-top: 1px solid var(--line);
    max-height: 50dvh;
  }
}

.kasse-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--surface);
}

/* Cart lines list */
.kasse-cart-lines {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0;
}

.kasse-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  min-height: 120px;
}

/* Individual cart line */
.kasse-cart-line {
  padding: 0.625rem 1.25rem;
  border-bottom: 1px solid rgba(58,48,42,.4);
  transition: background var(--transition-fast);
}

.kasse-cart-line:last-child { border-bottom: none; }
.kasse-cart-line:hover { background: rgba(255,255,255,.02); }

.kasse-line-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.kasse-line-name {
  font-size: 0.9375rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kasse-line-total {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.kasse-line-bottom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.375rem;
}

/* Qty stepper */
.kasse-qty-stepper {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2px;
}

.kasse-qty-btn {
  min-height: 32px;
  width: 32px;
  font-size: 1.125rem;
  font-weight: 700;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.kasse-qty-btn:hover:not(:disabled) { background: rgba(255,255,255,.08); }
.kasse-qty-btn:active { transform: scale(0.9); }
.kasse-qty-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.kasse-qty {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Notiz toggle */
.kasse-notiz-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.375rem;
  border-radius: var(--radius);
  transition: background var(--transition-fast), color var(--transition-fast);
  font-family: var(--font-ui);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  flex: 1;
}

.kasse-notiz-toggle:hover { background: rgba(255,255,255,.06); color: var(--text); }

.kasse-notiz-field {
  margin-top: 0.375rem;
}

.kasse-notiz-input {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  min-height: 40px;
  padding: 0 0.75rem;
  transition: border-color var(--transition-fast);
}

.kasse-notiz-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,168,48,.15);
}

/* ── Summe bar ── */
.kasse-cart-summe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.15);
  flex-shrink: 0;
}

.kasse-summe-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* ── Checkout section ── */
.kasse-checkout {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--surface);
}

.kasse-checkout .field label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.kasse-checkout .field input {
  min-height: 44px;
  font-size: 0.9375rem;
}

/* Payment toggle */
.kasse-payment-toggle {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.kasse-pay-btn {
  flex: 1;
  min-height: 44px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.kasse-pay-btn + .kasse-pay-btn {
  border-left: 1px solid var(--line);
}

.kasse-pay-btn:hover:not(.active) {
  background: rgba(255,255,255,.05);
  color: var(--text);
}

.kasse-pay-btn.active {
  background: linear-gradient(170deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #1a1512;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}

/* Submit button — slightly bigger for Kasse */
.kasse-submit-btn {
  min-height: 56px;
  font-size: 1.0625rem;
}

/* ── Fest selection screen ── */
.kasse-fest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.kasse-fest-card {
  display: block;
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-ui);
  color: var(--text);
  transition: border-color var(--transition-fast), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow);
}

.kasse-fest-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(240,168,48,.3), var(--shadow-lg);
  transform: translateY(-2px);
}

.kasse-fest-card-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.kasse-fest-icon { font-size: 1.75rem; flex-shrink: 0; }

.kasse-fest-name {
  font-size: 1.0625rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.kasse-fest-ort { margin-top: 2px; }

/* ── Confirmation overlay ── */
.kasse-confirm-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 64px);
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(240,168,48,.08) 0%, transparent 70%),
    var(--bg);
}

.kasse-confirm-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  overflow: visible;
  text-align: center;
}

/* Amber glow ring behind the card */
.kasse-confirm-glow {
  position: absolute;
  inset: -20px;
  border-radius: calc(var(--radius-lg) + 20px);
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(240,168,48,.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  animation: confirm-glow-pulse 2s ease-in-out infinite alternate;
}

@keyframes confirm-glow-pulse {
  from { opacity: 0.6; transform: scale(0.97); }
  to   { opacity: 1;   transform: scale(1.03); }
}

.kasse-confirm-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-deep), var(--gold));
  color: #1a1512;
  font-size: 2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(240,168,48,.45), 0 0 0 6px rgba(240,168,48,.12);
  animation: confirm-icon-in 0.4s cubic-bezier(.22,.68,0,1.3) both;
  margin-bottom: 0.25rem;
}

@keyframes confirm-icon-in {
  from { opacity: 0; transform: scale(0.4) rotate(-10deg); }
  to   { opacity: 1; transform: scale(1)   rotate(0deg); }
}

.kasse-confirm-title {
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  color: var(--text);
}

.kasse-confirm-nr {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-top: 0.25rem;
}

.kasse-nr-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}

.kasse-confirm-summe {
  font-size: 1.5rem;
  margin-top: 0.25rem;
}

/* ============================================================
   Monitor View — Stations-/Küchenboard
   Kitchen-friendly: large text, high contrast, wall-tablet.
   ============================================================ */

/* ── Overall layout ── */
.monitor-layout {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 64px);
  overflow: hidden;
}

/* ── Top bar ── */
.monitor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.monitor-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.0625rem;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.monitor-topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* ── Live dot ── */
.monitor-live-dot {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.monitor-live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.monitor-live-dot--connected .monitor-live-pulse {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(90,168,106,.6);
  animation: live-pulse 1.8s ease-in-out infinite;
}

.monitor-live-dot--connected .monitor-live-label {
  color: var(--green);
}

.monitor-live-dot--disconnected .monitor-live-pulse {
  background: var(--red);
}

.monitor-live-dot--disconnected .monitor-live-label {
  color: var(--red);
}

@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(90,168,106,.6); }
  70%  { box-shadow: 0 0 0 7px rgba(90,168,106,0); }
  100% { box-shadow: 0 0 0 0 rgba(90,168,106,0); }
}

/* ── Station filter chips ── */
.monitor-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.monitor-chip {
  padding: 0.375rem 1rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-ui);
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  min-height: 40px;
  -webkit-tap-highlight-color: transparent;
}

.monitor-chip:hover {
  background: var(--surface);
  color: var(--text);
}

.monitor-chip.active {
  background: rgba(240,168,48,.18);
  color: var(--gold);
  border-color: rgba(240,168,48,.4);
}

/* ── Board wrapper (scrollable) ── */
.monitor-board-wrap {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem;
}

/* ── Board ── */
.monitor-board {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ── Empty state ── */
.monitor-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 2rem;
  text-align: center;
}

/* ── Station group ── */
.monitor-station-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.monitor-station-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 2px;
}

/* ── Cards grid ── */
.monitor-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

@media (max-width: 640px) {
  .monitor-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Position card ── */
.monitor-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Status-based left accent border */
.monitor-card--offen {
  border-left-color: var(--gold);
  border-left-width: 4px;
}

.monitor-card--in_arbeit {
  border-left-color: #e8873a;
  border-left-width: 4px;
  background: color-mix(in srgb, #e8873a 5%, var(--surface));
}

/* Urgency overlays */
.monitor-card--aging {
  border-top-color: #e8873a;
}

.monitor-card--urgent {
  border-top-color: var(--red);
  box-shadow: 0 0 0 1px rgba(217,88,74,.2), var(--shadow);
  animation: card-urgent-pulse 2.5s ease-in-out infinite;
}

@keyframes card-urgent-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(217,88,74,.2), var(--shadow); }
  50%       { box-shadow: 0 0 0 4px rgba(217,88,74,.15), var(--shadow-lg); }
}

/* ── Card header ── */
.monitor-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem 0.5rem;
}

.monitor-bestell-nr {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.04em;
  line-height: 1;
}

/* ── Position rows ── */
.monitor-positions {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 1rem 0.75rem;
  flex: 1;
}

.monitor-pos-row {
  padding: 0.625rem 0;
  border-top: 1px solid rgba(58,48,42,.4);
}

.monitor-pos-row:first-child { border-top: none; }

.monitor-pos-main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.monitor-pos-qty {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--muted);
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  min-width: 2.5rem;
  flex-shrink: 0;
}

.monitor-pos-name {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1.2;
  word-break: break-word;
}

.monitor-pos-notiz {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  background: rgba(240,168,48,.1);
  border: 1px solid rgba(240,168,48,.2);
  border-radius: var(--radius);
  padding: 0.25rem 0.5rem;
  margin-top: 0.375rem;
  word-break: break-word;
}

.monitor-pos-actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Action buttons — large touch targets */
.monitor-action-btn {
  min-height: 52px;
  font-size: 1rem;
  font-weight: 700;
  padding: 0 1.25rem;
  border-radius: var(--radius);
  flex: 1;
}

/* ── Card footer ── */
.monitor-card-footer {
  padding: 0.5rem 1rem 0.75rem;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.monitor-nachdruck-btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  min-height: 36px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.monitor-nachdruck-btn:hover:not(:disabled) {
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-color: var(--muted);
}

.monitor-nachdruck-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .monitor-board-wrap { padding: 0.875rem; }
  .monitor-bestell-nr { font-size: 1.75rem; }
  .monitor-pos-name   { font-size: 1.2rem; }
}

/* ============================================================
   Admin Dashboard — Festzelt-Industrial Management Screen
   ============================================================ */

/* ── Admin two-column layout: sidebar + content ── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100dvh - 67px);
}

@media (max-width: 860px) {
  .admin-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
}

/* ── Sidebar ── */
.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.75rem;
  gap: 0.25rem;
}

.admin-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.5rem;
}

.admin-nav-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--muted);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  text-align: left;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

.admin-nav-item:hover:not(.active) {
  background: rgba(255,255,255,.05);
  color: var(--text);
}

.admin-nav-item.active {
  background: rgba(240,168,48,.12);
  color: var(--gold);
}

.admin-nav-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ── Content area ── */
.admin-content {
  overflow-y: auto;
  padding: 0;
}

/* ── Section inside content ── */
.admin-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Feste grid ── */
.admin-feste-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.admin-fest-card {
  transition: box-shadow var(--transition), border-color var(--transition);
}

.admin-fest-card:hover {
  border-color: rgba(240,168,48,.3);
  box-shadow: 0 8px 28px rgba(0,0,0,.5), 0 0 0 1px rgba(240,168,48,.15);
}

/* ── Inline add form ── */
.admin-inline-form {
  background: var(--surface-2);
  margin-bottom: 0.25rem;
}

/* ── Fest detail page ── */
.admin-fest-detail {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 67px);
}

.admin-fest-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.admin-fest-topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  min-width: 0;
}

.admin-fest-topbar-title {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.admin-fest-topbar-cta {
  flex-shrink: 0;
}

.admin-cta-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(240,168,48,.08);
  border: 1px solid rgba(240,168,48,.25);
  border-radius: var(--radius);
  padding: 0.5rem 0.875rem;
  flex-wrap: wrap;
}

/* ── Tabs bar ── */
.admin-tabs-bar {
  padding: 1rem 1.5rem 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

/* ── Tab content ── */
.admin-tab-content {
  flex: 1;
  overflow-y: auto;
}

.admin-tab-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Modal overlay ── */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: page-fade-in 0.15s ease forwards;
}

.admin-modal {
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  overflow-y: auto;
  animation: modal-rise 0.2s cubic-bezier(.22,.68,0,1.2) forwards;
}

@keyframes modal-rise {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Toggle switch ── */
.admin-toggle {
  display: inline-flex;
  cursor: pointer;
}

.admin-toggle-track {
  display: inline-block;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: var(--line);
  border: 1.5px solid rgba(255,255,255,.08);
  position: relative;
  transition: background var(--transition-fast);
}

.admin-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.admin-toggle-track.active {
  background: var(--green);
}

.admin-toggle-track.active::after {
  transform: translateX(16px);
  background: #fff;
}

/* ── Responsive mobile ── */
@media (max-width: 860px) {
  .admin-sidebar {
    flex-direction: row;
    padding: 0.75rem 1rem;
    border-right: none;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }
  .admin-sidebar-logo { display: none; }
  .admin-nav-items { flex-direction: row; gap: 0.25rem; }
  .admin-nav-item { padding: 0.5rem 0.875rem; }
  .admin-section { padding: 1.25rem 1rem; }
  .admin-tab-section { padding: 1rem; }
  .admin-fest-topbar { padding: 0.875rem 1rem; }
  .admin-tabs-bar { padding: 0.75rem 1rem 0; }
  .admin-feste-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .admin-modal { max-width: 100%; }
  .admin-modal .card-body > div[style*="grid"] {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   Offline indicator (header chip)
   ============================================================ */

.offline-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-ui);
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 200ms ease;
}

/* Grey — device is offline, no pending orders */
.offline-chip-offline {
  background: rgba(179,160,140,.15);
  color: var(--muted);
  border: 1px solid rgba(179,160,140,.3);
}

/* Amber — pending orders buffered */
.offline-chip-pending {
  background: rgba(240,168,48,.15);
  color: var(--gold);
  border: 1px solid rgba(240,168,48,.35);
  animation: offline-pulse 2.5s ease-in-out infinite;
}

@keyframes offline-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}

/* ============================================================
   Offline confirmation screen (kasse view)
   ============================================================ */

.kasse-confirm-offline {
  border-color: rgba(240,168,48,.25);
}

.kasse-confirm-icon-offline {
  background: rgba(240,168,48,.12);
  color: var(--gold);
  border: 2px solid rgba(240,168,48,.35);
}

.offline-confirm-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  background: rgba(240,168,48,.12);
  color: var(--gold);
  border: 1px solid rgba(240,168,48,.3);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}
