:root {
  /* Color Palette - Broekpop Light Theme */
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --bg-solid: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(15, 23, 42, 0.08);
  --card-hover-border: rgba(30, 64, 175, 0.3);
  
  --primary: hsl(219, 70%, 40%);      /* Broekpop Royal Blue */
  --primary-hover: hsl(219, 70%, 32%);
  --primary-glow: rgba(30, 64, 175, 0.15);
  
  --secondary-brand: hsl(40, 50%, 48%); /* Broekpop Saxophone Gold */
  
  --success: hsl(142, 70%, 38%);      /* Emerald green */
  --success-glow: rgba(16, 185, 129, 0.15);
  
  --text-primary: #0f172a;            /* Slate 900 */
  --text-secondary: #475569;          /* Slate 600 */
  --text-muted: #64748b;              /* Slate 500 */
  
  --header-height: 75px;
  --safe-padding: 16px;
  --font-family: 'Outfit', sans-serif;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
}

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

body {
  font-family: var(--font-family);
  background: #f1f5f9;
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

/* Base App Layout */
.app-container {
  width: 100%;
  max-width: 500px; /* Mobile focused container */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 90px; /* Room for floating cart bar */
}

/* Header */
.app-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--safe-padding);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.02);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.logo-text h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo-text .subtitle {
  font-size: 10px;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: -1px;
}

.table-badge {
  background: rgba(180, 141, 63, 0.08);
  border: 1px solid rgba(180, 141, 63, 0.25);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  color: var(--secondary-brand);
  box-shadow: 0 2px 8px rgba(180, 141, 63, 0.03);
}

/* Categories Bar */
.categories-nav {
  display: flex;
  gap: 8px;
  padding: 14px var(--safe-padding);
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  position: sticky;
  top: var(--header-height);
  z-index: 9;
  background: rgba(241, 245, 249, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.02);
}

.categories-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.category-tab {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.category-tab:hover {
  background: #ffffff;
  color: var(--text-primary);
}

.category-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 15px var(--primary-glow);
  transform: translateY(-1px);
}

/* Main content */
.menu-container {
  padding: var(--safe-padding);
  flex-grow: 1;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Menu Item Card */
.menu-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.menu-card:hover {
  border-color: var(--card-hover-border);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.menu-info {
  flex: 1;
  padding-right: 12px;
}

.menu-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.menu-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.menu-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.menu-action {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Add/Quantity Buttons */
.btn-add {
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.quantity-control {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 20px;
  padding: 2px;
}

.btn-qty {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-qty:hover {
  background: rgba(15, 23, 42, 0.05);
}

.qty-val {
  min-width: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Floating Cart Bar */
.cart-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - (var(--safe-padding) * 2));
  max-width: 468px;
  z-index: 100;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-bar.hidden {
  bottom: -80px;
  pointer-events: none;
}

.cart-bar-content {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--primary);
  border-radius: var(--border-radius-lg);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08), 0 0 15px var(--primary-glow);
}

.cart-icon-wrapper {
  position: relative;
}

.cart-icon {
  font-size: 22px;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}

.cart-bar-info {
  flex-grow: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-bar-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}

.cart-bar-total {
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: flex-end; /* Drawer bottom style on mobile */
  justify-content: center;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Table Selection Modal Specifics */
#table-select-modal {
  align-items: center; /* Center horizontally/vertically */
  padding: 20px;
}

.glass-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.table-dialog h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.table-dialog p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.form-group input {
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 16px;
  outline: none;
  transition: all 0.25s ease;
}

.form-group input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Cart Drawer */
.cart-drawer {
  background: #ffffff;
  border-top: 1px solid var(--card-border);
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.08);
}

.modal-overlay.hidden .cart-drawer {
  transform: translateY(100%);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--safe-padding);
  border-bottom: 1px solid var(--card-border);
}

.drawer-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.close-btn {
  font-size: 28px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.drawer-body {
  padding: var(--safe-padding);
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.cart-item-price {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}

.cart-summary {
  background: rgba(15, 23, 42, 0.02);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.summary-row.highlight {
  border-top: 1px solid var(--card-border);
  padding-top: 10px;
  margin-top: 5px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.summary-row.highlight span:last-child {
  color: var(--primary);
}

.drawer-footer {
  padding: var(--safe-padding);
}

/* General Buttons */
.btn {
  padding: 14px 20px;
  border-radius: var(--border-radius-md);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 0.06);
}

/* Order Tracker Modal Specifics */
#tracker-modal {
  align-items: center;
  padding: 20px;
}

.status-card {
  text-align: center;
  max-width: 440px;
}

.status-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.pulse-ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--primary);
  border-radius: 50%;
  animation: pulse-ring-animation 1.5s ease-out infinite;
  position: absolute;
  top: 0;
}

.status-header::before {
  content: '⏳';
  font-size: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  z-index: 2;
}

.status-header h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.order-id-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
}

.tracker-steps {
  text-align: left;
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}

.tracker-step {
  display: flex;
  gap: 16px;
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

.tracker-step.active {
  opacity: 1;
}

.tracker-step.completed {
  opacity: 0.75;
}

.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.tracker-step.active .step-dot {
  background: var(--primary);
  border-color: #ffffff;
  box-shadow: 0 0 10px var(--primary-glow);
}

.tracker-step.completed .step-dot {
  background: var(--success);
  border-color: #ffffff;
}

.step-line {
  width: 2px;
  height: 40px;
  background: var(--card-border);
  transition: background 0.3s ease;
}

.tracker-step.completed .step-line {
  background: var(--success);
}

.step-content {
  padding-bottom: 16px;
}

.step-content h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.step-content p {
  font-size: 12px;
  color: var(--text-secondary);
}

.tracker-footer-note {
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(3deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulse-ring-animation {
  0% {
    transform: scale(0.75);
    opacity: 1;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.loading-spinner {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 0;
  font-size: 14px;
}

/* Utility classes */
.hidden {
  display: none !important;
}
