/* DoorDash-Inspired Design System */
:root {
  --primary: #eb1700;
  --primary-hover: #d11400;
  --primary-light: #fff0ed;
  --dark-bg: #111827;
  --dark-surface: #1f2937;
  --dark-border: #374151;
  --text-main: #191919;
  --text-muted: #6b7280;
  --bg-light: #f7f7f7;
  --card-bg: #ffffff;
  --border-light: #e5e7eb;
  --status-new: #3b82f6;
  --status-accepted: #f59e0b;
  --status-preparing: #8b5cf6;
  --status-ready: #10b981;
  --status-dispatched: #06b6d4;
  --status-delivered: #059669;
  --status-cancelled: #ef4444;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: #ffffff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-logo svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: #f3f4f6;
  color: var(--text-main);
}
.btn-secondary:hover {
  background-color: #e5e7eb;
}

.btn-dark {
  background-color: #1f2937;
  color: #ffffff;
}
.btn-dark:hover {
  background-color: #111827;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

/* Alert Banners */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-success {
  background-color: #def7ec;
  color: #03543f;
  border: 1px solid #bcf0da;
}
.alert-error {
  background-color: #fde8e8;
  color: #9b1c1c;
  border: 1px solid #f8b4b4;
}

/* Storefront Home Hero & Filters */
.hero-section {
  background: linear-gradient(180deg, #fff5f3 0%, #ffffff 100%);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.75px;
  margin-bottom: 0.75rem;
  color: #111827;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.search-box {
  max-width: 550px;
  margin: 0 auto;
  position: relative;
  display: flex;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  border: 1px solid var(--border-light);
  border-radius: 9999px;
  box-shadow: var(--shadow-sm);
  outline: none;
}
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(235, 23, 0, 0.15);
}

.cuisine-pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.pill {
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  background: #f3f4f6;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.pill:hover, .pill.active {
  background: var(--primary);
  color: #ffffff;
}

/* Restaurant Grid */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.restaurant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.restaurant-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #ffffff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.restaurant-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background-color: #f3f4f6;
}

.card-body {
  padding: 1rem;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.25rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}
.badge-open {
  background-color: #d1fae5;
  color: #065f46;
}
.badge-closed {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Restaurant Menu View */
.restaurant-hero {
  height: 260px;
  width: 100%;
  position: relative;
  background-size: cover;
  background-position: center;
}

.restaurant-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  color: #ffffff;
}

.category-nav {
  position: sticky;
  top: 57px;
  z-index: 30;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0.75rem 1.5rem;
}

.category-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.category-nav a.active, .category-nav a:hover {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 0.25rem;
}

.menu-section {
  margin-top: 2rem;
}

.menu-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.menu-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1rem;
}

.menu-item-card {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}
.menu-item-card:hover {
  border-color: #d1d5db;
  box-shadow: var(--shadow-sm);
}

.item-info {
  flex: 1;
  padding-right: 1rem;
}
.item-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.item-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-price {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.item-thumb {
  width: 95px;
  height: 95px;
  border-radius: 8px;
  object-fit: cover;
  background-color: #f3f4f6;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
}

.modal-card {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}

/* Cart Drawer / Bar */
.cart-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 380px;
  background: #ffffff;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

/* Kitchen Display Board (Dark Mode) */
.kitchen-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  padding: 1rem;
  min-height: calc(100vh - 70px);
  background-color: #0f172a;
  overflow-x: auto;
}

.kitchen-col {
  background-color: #1e293b;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.kitchen-col-header {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #334155;
}

.kitchen-card {
  background-color: #334155;
  border-radius: 6px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  color: #f1f5f9;
  border-left: 4px solid #38bdf8;
  animation: fadeIn 0.3s ease-in;
}

.kitchen-card-new {
  border-left-color: #ef4444;
  background-color: #451a1a;
}

.kitchen-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Order Stepper */
.stepper {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0;
  position: relative;
}
.stepper::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 3px;
  background: #e5e7eb;
  z-index: 1;
}
.step-item {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}
.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
}
.step-item.active .step-icon {
  background: var(--primary);
  color: #ffffff;
}
.step-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.step-item.active .step-label {
  color: #111827;
  font-weight: 600;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   NovaDash Custom Popups, Modals & Toast Notification System
   ========================================================================== */
.novadash-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}
.novadash-modal-backdrop.active {
  opacity: 1;
}
.novadash-modal {
  background: #ffffff;
  color: #0f172a;
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.92) translateY(8px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease-in-out;
  opacity: 0;
  border: 1px solid rgba(226, 232, 240, 0.8);
}
.novadash-modal-backdrop.active .novadash-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.novadash-modal-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.novadash-modal-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.novadash-modal-icon.info {
  background: #eff6ff;
  color: #2563eb;
}
.novadash-modal-icon.warning {
  background: #fffbeb;
  color: #d97706;
}
.novadash-modal-icon.error {
  background: #fef2f2;
  color: #dc2626;
}
.novadash-modal-icon.success {
  background: #f0fdf4;
  color: #16a34a;
}
.novadash-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}
.novadash-modal-body {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  word-break: break-word;
}
.novadash-modal-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  margin-bottom: 1.25rem;
}
.novadash-modal-input:focus {
  border-color: var(--primary);
}
.novadash-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}
.novadash-modal-btn {
  padding: 0.65rem 1.35rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease-in-out;
}
.novadash-modal-btn.primary {
  background: var(--primary);
  color: #ffffff;
}
.novadash-modal-btn.primary:hover {
  background: var(--primary-hover);
}
.novadash-modal-btn.danger {
  background: #ef4444;
  color: #ffffff;
}
.novadash-modal-btn.danger:hover {
  background: #dc2626;
}
.novadash-modal-btn.secondary {
  background: #f1f5f9;
  color: #334155;
}
.novadash-modal-btn.secondary:hover {
  background: #e2e8f0;
}

/* Toast Container */
.novadash-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.novadash-toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--primary);
}
.novadash-toast.active {
  opacity: 1;
  transform: translateY(0);
}
.novadash-toast.success { border-left-color: #22c55e; }
.novadash-toast.error { border-left-color: #ef4444; }
.novadash-toast.info { border-left-color: #3b82f6; }
