/* ==============================================================================
   BestellOS Operations Design System
   Modern, ultra-clean UI inspired by Linear & Stripe
   Font: Inter (System UI Fallback), Monospace: JetBrains Mono / SFMono
============================================================================== */

:root {
  --bg-page: #08090a;
  --bg-panel: #0f1011;
  --bg-surface: #191a1b;
  --bg-surface-hover: rgba(255, 255, 255, 0.06);
  --bg-surface-active: rgba(255, 255, 255, 0.09);
  --bg-ghost: rgba(255, 255, 255, 0.03);
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-standard: rgba(255, 255, 255, 0.08);
  --border-focus: #f59e0b;

  --text-primary: #f7f8f8;
  --text-secondary: #d0d6e0;
  --text-muted: #8a8f98;
  --text-subtle: #62666d;

  --brand-primary: #f59e0b;
  --brand-hover: #fbbf24;
  --brand-subtle: rgba(245, 158, 11, 0.16);

  --brand-accent: #f59e0b;
  --brand-accent-hover: #fbbf24;
  --brand-accent-subtle: rgba(245, 158, 11, 0.16);
  --brand-accent-glow: rgba(245, 158, 11, 0.35);

  --accent-red: #e5484d;
  --accent-red-subtle: rgba(229, 72, 77, 0.15);
  --accent-green: #30a46c;
  --accent-green-subtle: rgba(48, 164, 108, 0.15);
  --accent-amber: #f59e0b;
  --accent-amber-subtle: rgba(245, 158, 11, 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-subtle);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--border-standard);
  --border: var(--border-subtle);
  --surface-raised: var(--bg-surface);

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Berkeley Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  color-scheme: dark;
}

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

body {
  font-family: var(--font-sans);
  font-feature-settings: 'cv01' 1, 'ss03' 1;
  background: radial-gradient(1200px 800px at 80% -10%, rgba(245, 158, 11, 0.07), transparent 45%), var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
}

h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 590;
  letter-spacing: -0.02em;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

a {
  color: var(--brand-hover);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #fff;
}

/* ---------------------------------------------------------------- Cards & Panels */

.brand-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5rem 0 1rem;
}

.brand-logo-img {
  max-width: 13rem;
  height: auto;
  display: block;
}

.panel, .card, .section-block {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1.25rem;
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease;
}

.panel:hover, .section-block:hover {
  border-color: var(--border-standard);
}

.login-panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  margin: 8vh auto;
  padding: 2.4rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.4);
}

/* ---------------------------------------------------------------- Van animiert direkt auf der oberen Kante der Login-Box */
.box-track-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  pointer-events: none;
  z-index: 10;
}

.box-van-wrap {
  position: absolute;
  bottom: 0px;
  left: 0;
  width: var(--van-w, 3.4rem);
  height: auto;
  pointer-events: none;
  will-change: transform, opacity;
  animation: drive-over-box 8s linear infinite;
}

.box-van-img {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
  animation: van-subtle-bounce 0.35s ease-in-out infinite alternate;
}

@keyframes van-subtle-bounce {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-1px);
  }
}

@keyframes drive-over-box {
  0% {
    transform: translate3d(calc(-1 * var(--van-w, 3.4rem) - 0.2rem), 0, 0);
    opacity: 0;
  }
  2% {
    opacity: 1;
  }
  /* Schnell von links bis exakt in die Mitte (Box-Breite * 50% minus halbe Van-Breite) */
  20% {
    transform: translate3d(calc(var(--box-w, 28rem) * 0.5 - var(--van-w, 3.4rem) * 0.5), 0, 0);
    opacity: 1;
  }
  /* Exakt 2 Sekunden Stillstand in der Mitte (20% bis 45% = 2.0s bei 8s Loop) */
  45% {
    transform: translate3d(calc(var(--box-w, 28rem) * 0.5 - var(--van-w, 3.4rem) * 0.5), 0, 0);
    opacity: 1;
  }
  /* Schnell weiter von Mitte bis zur rechten Kante */
  65% {
    transform: translate3d(calc(var(--box-w, 28rem) - var(--van-w, 3.4rem)), 0, 0);
    opacity: 1;
  }
  /* Schnell und sauber an der Kante ausfaden */
  70% {
    transform: translate3d(var(--box-w, 28rem), 0, 0);
    opacity: 0;
  }
  100% {
    transform: translate3d(var(--box-w, 28rem), 0, 0);
    opacity: 0;
  }
}

@media (max-width: 560px) {
  .login-panel {
    --box-w: calc(100vw - 3rem);
    --van-w: 3.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .box-van-wrap {
    animation: none;
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .box-van-wrap {
    animation: none;
    display: none;
  }
}

.login-recovery-link-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.1rem;
}

.text-link {
  background: none;
  border: none;
  padding: 0;
  min-height: auto;
  box-shadow: none;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.15);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.text-link:hover {
  background: none;
  transform: none;
  box-shadow: none;
  color: var(--brand-hover);
  text-decoration-color: var(--brand-hover);
}

.login-panel h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-panel p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.login-eyebrow {
  color: var(--brand-accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.login-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.35rem;
}

/* ---------------------------------------------------------------- Form & Inputs */

form {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}

input, select, textarea {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  min-height: 44px;
  outline: none;
  transition: all 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 1px var(--border-focus), 0 0 16px rgba(245, 158, 11, 0.15);
}

input::placeholder {
  color: var(--text-subtle);
}

input:disabled, select:disabled {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-subtle);
  border-color: var(--border-subtle);
  cursor: not-allowed;
}

/* ---------------------------------------------------------------- Buttons */

button, .button-link, .btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--brand-primary);
  color: #08090a;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

button:hover, .button-link:hover, .btn:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  color: #08090a;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
}

button:active, .button-link:active, .btn:active {
  transform: translateY(0);
}

button:focus-visible, .button-link:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

button.secondary, .button-link.secondary, .btn-secondary {
  background: rgba(255, 255, 255, 0.035);
  color: #8a8f98;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 500;
  box-shadow: none;
}

button.secondary:hover, .button-link.secondary:hover, .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.12);
}

button.danger, .btn-delete, .danger-button, button.danger-button, .btn-danger {
  background: var(--accent-red-subtle);
  color: var(--accent-red);
  border: 1px solid rgba(229, 72, 77, 0.3);
}

button.danger:hover, .btn-delete:hover, .danger-button:hover, button.danger-button:hover, .btn-danger:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
  box-shadow: 0 4px 14px rgba(229, 72, 77, 0.35);
}

.btn-delete {
  background: var(--accent-red-subtle);
  color: var(--accent-red);
  border: 1px solid rgba(229, 72, 77, 0.3);
}

/* ---------------------------------------------------------------- Header & Navigation */

.app-header-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.app-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.app-header-logo-img {
  max-width: 9.5rem;
  height: auto;
  display: block;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.8rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

header h1 {
  font-size: 1.4rem;
  margin: 0;
}

header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

#identity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.identity-name {
  color: var(--text-secondary);
}

.role-badge {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: var(--brand-accent-subtle);
  color: #fbbf24;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: var(--font-mono);
}

.connection {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.connection span:first-child,
.connection #connection-dot,
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-amber);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  animation: dot-pulse 1.8s ease-in-out infinite;
  display: inline-block;
}

.connection.live span:first-child,
.connection.live #connection-dot,
.status-dot.connected {
  background: var(--accent-green);
  box-shadow: 0 0 10px rgba(48, 164, 108, 0.5);
}

.connection.offline span:first-child,
.connection.offline #connection-dot,
.status-dot.offline {
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red-subtle);
  animation: none;
}

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

.connection.offline {
  color: var(--accent-red);
}

nav#tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0.05rem 0.75rem;
  margin-bottom: 1.5rem;
  scrollbar-width: thin;
  scroll-snap-type: inline proximity;
  border-bottom: 1px solid var(--border-subtle);
}

.tab-button,
nav#tabs button {
  position: relative;
  background: rgba(255, 255, 255, 0.035);
  color: #8a8f98;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 510;
  letter-spacing: -0.01em;
  white-space: nowrap;
  min-height: 44px;
  scroll-snap-align: start;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: none;
}

.tab-button:hover,
nav#tabs button:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.08);
}

.tab-button[aria-current="page"],
nav#tabs button[aria-current="page"] {
  background: #1c1e22;
  color: #f7f8f8;
  font-weight: 590;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 8px rgba(0, 0, 0, 0.35);
}

nav#tabs button[aria-current="page"]::after,
.tab-button[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 9999px;
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* ---------------------------------------------------------------- Operational Kanban & Cards */

.kitchen-wrap, .driver-wrap {
  display: grid;
  gap: 1.5rem;
}

.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.column {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  min-height: 12rem;
}

.column h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cards {
  display: grid;
  gap: 0.85rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--brand-accent);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  border-left-color: var(--brand-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.driver-wrap .card {
  border-left-width: 4px;
  border-left-color: var(--brand-accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.driver-wrap .card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  border-left-color: var(--brand-accent);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ticket-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 245, 248, 0.98));
  color: #0f1114;
  border: 1px solid rgba(20, 22, 26, 0.18);
  border-left: 4px solid var(--brand-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.ticket-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.45) inset;
}

.ticket-perforation {
  height: 0.45rem;
  margin: -0.3rem 0 0.75rem;
  border-top: 1px dashed rgba(15, 17, 20, 0.3);
  border-bottom: 1px dotted rgba(15, 17, 20, 0.14);
}

.ticket-head {
  align-items: flex-start;
}

.ticket-number-group {
  display: grid;
  gap: 0.2rem;
}

.ticket-number {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 780;
  color: #08090a;
  letter-spacing: 0.02em;
}

.ticket-number::before {
  content: 'BESTELL:OS ';
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #b45309;
  margin-bottom: -0.1rem;
}

.ticket-age-badge {
  display: inline-flex;
  width: fit-content;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.18rem 0.55rem;
  background: #14171d;
  color: #f7f8f8;
}

.ticket-card .badge {
  border-color: rgba(15, 17, 20, 0.18);
}

.ticket-stamp {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 730;
}


.card.large-order {
  border-left-color: var(--accent-amber);
}

.card.priority-order {
  border-left-color: var(--brand-accent);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.4), var(--shadow-sm);
}

.card.cancelled {
  border-left-color: var(--text-subtle);
  opacity: 0.6;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.card-head h3 {
  font-size: 1.15rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.ticket-card .card-head h3,
.ticket-card h3 {
  color: #08090a !important;
  font-weight: 780;
}

.driver-wrap .card-head h3 {
  font-size: 1.35rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  color: var(--text-secondary);
  border: 1px solid var(--border-standard);
}

.badge-delivery {
  background: var(--brand-accent-subtle);
  color: var(--brand-accent-hover);
  border-color: rgba(245, 158, 11, 0.35);
}

.ticket-card .badge-delivery {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.45);
}

.driver-wrap .badge-delivery {
  font-size: 0.9rem;
  min-height: 2.1rem;
  padding: 0.4rem 0.85rem;
}

.badge-pickup {
  background: var(--accent-green-subtle);
  color: #4ade80;
  border-color: rgba(48, 164, 108, 0.3);
}

.ticket-card .badge-pickup {
  background: rgba(48, 164, 108, 0.16);
  color: #1b6a43;
  border-color: rgba(48, 164, 108, 0.45);
}

.badge-large {
  background: var(--accent-amber-subtle);
  color: #fde047;
  border-color: rgba(245, 217, 10, 0.3);
  margin-bottom: 0.75rem;
  display: inline-block;
}

.items {
  color: var(--text-primary);
  line-height: 1.45;
}

.ticket-items {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.ticket-item {
  border-bottom: 1px dashed rgba(15, 17, 20, 0.16);
  padding-bottom: 0.45rem;
}

.ticket-item:last-child {
  border-bottom: 0;
}

.ticket-item-main {
  display: flex;
  align-items: baseline;
  gap: 0.42rem;
}

.ticket-check {
  color: #3e454f;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.ticket-item-qty {
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 780;
  min-width: 2.2rem;
  color: #08090a;
}

.ticket-item-name {
  font-size: 1rem;
  font-weight: 700;
  color: #0f1114;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ticket-item-meta {
  margin-left: 2.65rem;
  margin-top: 0.2rem;
  color: #555b66;
}

.ticket-item-note {
  margin-left: 2.65rem;
  color: #6e4a08;
}

.order-note {
  color: var(--accent-amber);
  font-weight: 600;
  margin-top: 0.4rem;
}

.order-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-standard);
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 550;
}

.summary-chip.summary-price {
  color: var(--brand-hover);
  border-color: rgba(245, 158, 11, 0.4);
  background: var(--brand-subtle);
  font-family: var(--font-mono);
  font-weight: 600;
}

.ticket-card .summary-chip {
  border-color: rgba(15, 17, 20, 0.16);
  background: rgba(255, 255, 255, 0.75);
  color: #2d3440;
}

.ticket-card .summary-chip.summary-price {
  border-color: rgba(15, 17, 20, 0.3);
  background: rgba(15, 17, 20, 0.08);
  color: #08090a;
  font-family: var(--font-mono);
  font-weight: 700;
}

.meta {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.order-channel-icon {
  margin-top: 0.35rem;
}

.meta.address {
  color: var(--text-primary);
  font-weight: 500;
  margin-top: 0.35rem;
}

.driver-wrap .meta.address {
  margin-top: 0.65rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-size: 0.96rem;
  line-height: 1.45;
}

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

.order-timer {
  margin-top: 0.35rem;
  color: #c3cae6;
  font-weight: 510;
}

.ticket-card .order-timer,
.ticket-card .meta,
.ticket-card .order-note {
  color: #4c5460;
}

.ticket-card .order-note {
  font-weight: 700;
}

.ticket-customer {
  margin-top: 0.45rem;
  border-top: 1px dashed rgba(15, 17, 20, 0.16);
  padding-top: 0.4rem;
  font-size: 0.82rem;
  color: #636b77;
}

.kitchen-wrap .order-timer {
  font-size: 0.98rem;
  font-weight: 620;
  letter-spacing: 0.01em;
}

/* ---------------------------------------------------------------- Kitchen Status & Controls */

.kitchen-status {
  display: grid;
  gap: 1rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 16px rgba(0, 0, 0, 0.35);
}

.kitchen-status.mode-normal { border-color: rgba(48, 164, 108, 0.28); }
.kitchen-status.mode-high-load { border-color: rgba(245, 217, 10, 0.32); }
.kitchen-status.mode-overloaded { border-color: rgba(229, 72, 77, 0.34); }
.kitchen-status.mode-paused { border-color: rgba(255, 255, 255, 0.14); }

.kitchen-status-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.current-eta {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.05rem;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(8rem, 1fr));
  gap: 0.65rem;
}

.mode-button {
  background: rgba(255, 255, 255, 0.035);
  color: #8a8f98;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 50px;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.12);
}

.mode-button[aria-pressed="true"] {
  background: #1c1e22;
  color: #f7f8f8;
  font-weight: 600;
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 8px rgba(0, 0, 0, 0.4);
  position: relative;
}

.mode-button[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 0.3rem;
  height: 1.5px;
  border-radius: 9999px;
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.45);
}

.paused-warning {
  margin: 0;
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--accent-red);
  border-radius: var(--radius-sm);
  background: var(--accent-red-subtle);
  color: #ff8589;
  font-size: 0.95rem;
  font-weight: 600;
}

.column-empty {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.column-empty-state,
.driver-empty-state {
  display: grid;
  justify-items: start;
  gap: 0.4rem;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.015);
}

.empty-state-icon {
  font-size: 1rem;
  color: var(--text-subtle);
  line-height: 1;
}

.column-empty-title {
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 620;
}

.driver-empty-state {
  margin-bottom: 0.75rem;
}

.attention {
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-panel) 100%);
}

.attention h2 {
  margin-bottom: 0.35rem;
}

.cards.horizontal {
  grid-auto-flow: column;
  grid-auto-columns: minmax(17rem, 1fr);
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.cards.horizontal .card {
  min-width: 0;
}

/* ---------------------------------------------------------------- Settings & Navigation */

.settings-overview {
  border-left: 3px solid var(--brand-accent);
}

.settings-layout {
  gap: 1rem;
}

.settings-shell {
  display: grid;
  grid-template-columns: minmax(14.5rem, 17.5rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.settings-sidebar {
  position: sticky;
  top: 0.8rem;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  flex-direction: column;
}

.settings-nav button {
  flex: 1 1 9rem;
  background: rgba(255, 255, 255, 0.035);
  color: #8a8f98;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-sidebar button {
  width: 100%;
  justify-content: flex-start;
  min-height: 48px;
  text-align: left;
  border-radius: var(--radius-md);
}

.settings-nav button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.12);
}

.settings-nav-active, .settings-nav button.settings-nav-active {
  background: #1c1e22;
  color: #f7f8f8;
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 8px rgba(0, 0, 0, 0.4);
  position: relative;
}

.settings-nav button.settings-nav-active::after {
  content: '';
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 0.25rem;
  height: 1.5px;
  border-radius: 9999px;
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.45);
}

.settings-sidebar button.settings-nav-active::after {
  left: 0.5rem;
  top: 20%;
  bottom: 20%;
  right: auto;
  width: 2px;
  height: auto;
}

.settings-content {
  min-height: 18rem;
}

.settings-card {
  border-left-color: rgba(245, 158, 11, 0.65);
}

.settings-card-head {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.3rem;
}

.settings-section {
  display: grid;
  gap: 1rem;
}

.settings-grid-two {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.switch-row {
  align-items: center;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
}

.switch-row input[type="checkbox"] {
  width: 1.2rem;
  min-height: 1.2rem;
  accent-color: var(--brand-primary);
}

.opening-day {
  align-items: center;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: auto minmax(6rem, 1fr) minmax(6rem, auto) auto minmax(6rem, auto);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.opening-day input[type="checkbox"] {
  min-height: 1.2rem;
  width: 1.2rem;
  accent-color: var(--brand-primary);
}

/* ---------------------------------------------------------------- Tables & KPI */

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.orders-table th {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-standard);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.orders-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.orders-table tr:hover td {
  background: var(--bg-surface);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.95rem;
  margin: 1rem 0 1.2rem;
}

.kpi-card {
  position: relative;
  background: linear-gradient(160deg, rgba(20, 20, 22, 0.96), rgba(12, 13, 15, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  min-height: 6.5rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.45) 30%, rgba(245, 158, 11, 0.6) 50%, rgba(245, 158, 11, 0.45) 70%, transparent);
  pointer-events: none;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.48), 0 0 16px rgba(245, 158, 11, 0.12);
}

.kpi-card-mono .kpi-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.kpi-value {
  font-size: clamp(1.55rem, 1.9vw + 0.95rem, 2.25rem);
  font-weight: 750;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.kpi-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.report-date-nav {
  margin: 0.7rem 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  background: #121316;
  padding: 0.28rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.report-segment-btn,
.report-date-picker {
  min-height: 2.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: #8a8f98;
  box-shadow: none;
  padding: 0.45rem 0.95rem;
  font-size: 0.86rem;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.report-segment-btn.secondary {
  border-color: transparent;
  background: transparent;
  color: #8a8f98;
}

.report-segment-btn:hover,
.report-date-picker:hover,
.report-date-picker:focus {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
  transform: none;
}

.report-segment-active {
  background: #22242a !important;
  color: #f7f8f8 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  font-weight: 600 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 4px rgba(0, 0, 0, 0.3) !important;
  position: relative;
}

.report-segment-active::after {
  content: '';
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 0.2rem;
  height: 1.5px;
  border-radius: 9999px;
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.report-date-picker-wrap {
  margin: 0;
}

.report-date-picker {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.83rem;
}

.report-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.report-progress-panel,
.top-sellers-panel {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(18, 19, 21, 0.96), rgba(12, 13, 15, 0.98));
  padding: 0.95rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.report-progress-panel:hover,
.top-sellers-panel:hover {
  border-color: rgba(245, 158, 11, 0.24);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.33);
}

.report-progress-bars {
  display: grid;
  gap: 0.65rem;
}

.report-progress-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) minmax(9rem, 2fr) auto;
  gap: 0.6rem;
  align-items: center;
}

.report-progress-meta {
  display: grid;
  gap: 0.12rem;
}

.report-progress-label {
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 600;
}

.report-progress-value,
.report-progress-share {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  font-size: 0.79rem;
}

.report-progress-track {
  height: 0.48rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.report-progress-fill {
  width: var(--fill);
  min-width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.85), rgba(203, 213, 225, 0.8));
  transition: width 0.3s ease;
}

.report-progress-fill-amber {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.92), rgba(251, 191, 36, 0.95));
}

.report-progress-fill-green {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.9), rgba(34, 197, 94, 0.95));
}

.report-progress-fill-neutral {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.85), rgba(203, 213, 225, 0.8));
}

.top-sellers-list {
  list-style: none;
  display: grid;
  gap: 0.68rem;
}

.top-seller-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.78rem;
  background: rgba(255, 255, 255, 0.02);
}

.top-seller-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.top-seller-rank,
.top-seller-qty {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.16);
  color: #ffd68a;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 680;
  padding: 0.2rem 0.56rem;
}

.top-seller-name {
  color: var(--text-primary);
  font-weight: 630;
  font-size: 0.9rem;
}

.top-seller-track {
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  height: 0.48rem;
  overflow: hidden;
}

.top-seller-fill {
  width: var(--fill);
  height: 100%;
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.92), rgba(251, 191, 36, 0.98));
  border-radius: inherit;
  transition: width 0.32s ease;
}

.top-sellers-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 8rem;
  text-align: center;
  border: 1px dashed rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.06), transparent 70%);
  padding: 1.5rem 1rem;
}

.top-sellers-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--brand-accent);
  font-size: 1rem;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.report-empty {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ---------------------------------------------------------------- Dialogs & Modals */

dialog, .modal {
  background: var(--bg-panel);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  max-height: calc(100vh - 3rem);
  max-width: min(34rem, calc(100vw - 2rem));
  overflow: auto;
  padding: 2rem;
  width: 100%;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.confirm-dialog {
  max-width: 28rem;
}

.confirm-dialog h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.confirm-dialog p.meta {
  margin-bottom: 0.75rem;
}

.confirm-dialog .actions {
  margin-top: 1.5rem;
}

.setup-code, .one-time-key {
  background: var(--bg-surface);
  border: 1px dashed var(--brand-primary);
  border-radius: var(--radius-md);
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  color: var(--brand-hover);
  margin: 1.2rem 0;
  padding: 1rem;
  text-align: center;
  user-select: all;
}

.setup-qr {
  background: #fff;
  border-radius: var(--radius-sm);
  display: block;
  margin: 1.25rem auto;
  padding: 0.75rem;
  box-shadow: var(--shadow-md);
}

/* ---------------------------------------------------------------- Team Rows & Lists */

.team-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.team-row {
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(10rem, 1fr) auto minmax(7rem, auto) auto;
}

.status {
  border-radius: var(--radius-pill);
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  text-transform: uppercase;
}

.status-active, .status-redeemed {
  background: var(--accent-green-subtle);
  color: #4ade80;
}

.status-pending {
  background: var(--accent-amber-subtle);
  color: #fde047;
}

.status-suspended, .status-revoked, .status-expired {
  background: var(--accent-red-subtle);
  color: #ff8589;
}

/* ---------------------------------------------------------------- Utility & Shell */

.error {
  color: var(--accent-red);
  font-weight: 500;
  min-height: 1.3rem;
  font-size: 0.9rem;
}

.hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.simple-shell {
  min-height: 90vh;
  display: grid;
  place-items: center;
}

.simple-shell > .panel {
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.onboarding-panel {
  width: min(100%, 36rem);
  background: var(--bg-panel);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  box-shadow: var(--shadow-lg);
}

.eyebrow {
  color: var(--brand-hover);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.lead {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.recovery-codes {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, 1fr);
  list-style-position: inside;
  margin: 1.25rem 0;
  padding: 0;
}

.recovery-codes li {
  background: var(--bg-surface);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-hover);
  padding: 0.75rem;
}

.network-state {
  background: var(--accent-red-subtle);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 1rem;
  text-align: center;
  width: min(100%, 36rem);
}

#login-key,
.secret-input {
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  font-weight: 600;
}

.optional {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 0.35rem;
}

.recovery-warning {
  color: var(--accent-amber);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.check-row input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  min-height: auto;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

.login-footer {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-subtle);
}

.login-footer a {
  color: var(--text-muted);
}

.driver-wrap .actions button {
  min-height: 48px;
}

.driver-action-primary {
  min-height: 48px;
  font-size: 0.96rem;
  font-weight: 640;
  padding-inline: 1.15rem;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.table-scroll:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.menu-catalogue-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.menu-search {
  max-width: 22rem;
}

.menu-category {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.menu-category h3 {
  margin: 0 0 0.75rem;
}

.menu-product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0.65rem;
}

.menu-product {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

.menu-product p {
  margin: 0.25rem 0 0;
}

.menu-product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.menu-product-paused {
  opacity: 0.72;
}

.menu-product-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.menu-availability,
.menu-edit {
  min-height: 2.75rem;
  white-space: nowrap;
  cursor: pointer;
}

@media (max-width: 560px) {
  body {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .menu-catalogue-header { align-items: stretch; flex-direction: column; }
  .menu-search { max-width: none; }

  nav#tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    background: linear-gradient(180deg, rgba(8, 9, 10, 0.97) 0%, rgba(8, 9, 10, 0.92) 100%);
    margin: 0 -0.35rem 0.75rem;
    padding: 0.55rem 0.4rem 0.6rem;
    border-bottom: 1px solid var(--border-subtle);
  }
}

@media (max-width: 700px) {
  .mode-buttons { grid-template-columns: repeat(2, 1fr); }
  .board { grid-template-columns: 1fr; }
  .team-row { grid-template-columns: 1fr auto; }
  .team-row select, .team-row button { grid-column: 1 / -1; width: 100%; }
  .recovery-codes { grid-template-columns: 1fr; }
  .settings-shell { grid-template-columns: 1fr; }
  .settings-sidebar { position: static; }
  .report-progress-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .report-progress-track { order: 3; }
  .report-date-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .report-date-picker-wrap {
    grid-column: 1 / -1;
  }
  .report-date-picker {
    width: 100%;
  }
}

@media (max-width: 560px) {
  main { padding: 0.85rem; }
  .login-panel { padding: 1.25rem; }
  header { flex-direction: column; align-items: stretch; gap: 1rem; }
  .app-header-actions { align-items: flex-start; width: 100%; }
  .app-header-actions button#logout { width: 100%; }
  .mode-buttons { grid-template-columns: 1fr; }
  .opening-day { grid-template-columns: auto 1fr; }
  .opening-day input[type="time"] { width: 100%; }
  .board { grid-template-columns: 1fr; }
  .cards.horizontal { grid-auto-columns: minmax(15rem, 90vw); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  button:hover,
  .button-link:hover {
    transform: none;
  }
}
