:root {
  /* Color Palette - "Zest & Zinc" (Modern Industrial Canteen) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-accent: #1e293b;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-on-accent: #ffffff;
  --brand-primary: #f97316; /* Vibrant Orange */
  --brand-hover: #ea580c;
  --border-color: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-2xl: 64px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Layout */
.app-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background-color: var(--bg-accent);
  color: var(--text-on-accent);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  position: sticky;
  top: 0;
  height: 100vh;
}

.main-content {
  padding: var(--space-xl);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
}

.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.875rem; }

/* Components */
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--brand-primary);
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.nav-link {
  text-decoration: none;
  color: #94a3b8;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-link:hover, .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-link.active {
  border-left: 4px solid var(--brand-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: white;
}

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

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background-color: var(--bg-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-main);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  font-size: 0.9rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  background: var(--bg-secondary);
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Tables & Lists */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

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

.card-body {
  padding: var(--space-lg);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: var(--space-md);
  background: #f1f5f9;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.table td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

/* Badges */
.badge {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-veg { background: #dcfce7; color: #166534; }
.badge-nonveg { background: #fee2e2; color: #991b1b; }
.badge-status-ready { background: #dcfce7; color: #166534; }
.badge-status-pending { background: #fef3c7; color: #92400e; }

/* Placeholders */
.placeholder-image {
  background: #e2e8f0;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.8rem;
  aspect-ratio: 16/9;
}

.placeholder-avatar {
  width: 40px;
  height: 40px;
  background: #cbd5e1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
}

/* Grid layout for menu builder */
.menu-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-lg);
}

/* User Storefront Styles */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.product-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #f1f5f9;
}

.filter-bar {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  overflow-x: auto;
  padding-bottom: var(--space-sm);
}

.filter-chip {
  padding: 8px 20px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 99px;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.filter-chip.active {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

.floating-cart {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  background: var(--brand-primary);
  color: white;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 100;
  transition: transform 0.2s;
}

.floating-cart:hover {
  transform: scale(1.1);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--text-main);
  color: white;
  font-size: 0.75rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.search-container {
  max-width: 600px;
  margin-bottom: var(--space-lg);
  position: relative;
}

.search-container .form-input {
  padding-left: 3rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Page Specifics */
header.page-header {
  margin-bottom: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-row {
  display: grid;
  grid-template-columns: 60px 1fr 100px 100px 80px;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.item-row:last-child { border-bottom: none; }

.drag-handle {
  cursor: grab;
  color: var(--text-muted);
}

/* Live Order Board Styles */
.order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.order-card {
  border-top: 4px solid var(--brand-primary);
}

.order-items-list {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0;
}

.order-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px dashed var(--border-color);
}

.order-footer {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
