/* ==========================================================================
   eOrder - Master Design System & Premium UI Theme
   Built with CSS Custom Properties, Glassmorphism, Modern Food-Commerce Aesthetic
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Brand Primary Colors (Warm Culinary Orange) */
  --primary: #FF6B00;
  --primary-hover: #E05A00;
  --primary-light: #FFF3EC;
  --primary-gradient: linear-gradient(135deg, #FF6B00 0%, #FF8800 100%);
  --primary-glow: rgba(255, 107, 0, 0.2);

  /* Secondary & Accent Colors */
  --accent-green: #10B981;
  --accent-green-bg: #ECFDF5;
  --accent-indigo: #6366F1;
  --accent-indigo-bg: #EEF2FF;
  --accent-amber: #F59E0B;
  --accent-amber-bg: #FFFBEB;
  --accent-rose: #EF4444;
  --accent-rose-bg: #FEF2F2;

  /* Light & Clean Palette */
  --bg-main: #FAFAFA;
  --surface-card: #FFFFFF;
  --surface-muted: #F8FAFC;
  --surface-glass: rgba(255, 255, 255, 0.95);
  
  --text-main: #11142D;
  --text-secondary: #5F6472;
  --text-muted: #8A8F9D;
  --border-light: #EEEEEE;
  --border-focus: #FF6B00;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows & Elevation */
  --shadow-sm: 0 2px 8px rgba(17, 20, 45, 0.04);
  --shadow-md: 0 6px 20px rgba(17, 20, 45, 0.06);
  --shadow-lg: 0 12px 32px rgba(17, 20, 45, 0.09);
  --shadow-hover: 0 16px 36px rgba(255, 107, 0, 0.12);
  --shadow-glass: 0 8px 24px rgba(17, 20, 45, 0.05);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Global Reset & Base Typography
   ========================================================================== */

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

/* Container Spacing */
main.container, main.container-fluid {
  min-height: calc(100vh - 180px);
}

/* ==========================================================================
   Header & Navbar (Clean Light Header)
   ========================================================================== */

.navbar-responsive {
  background: #FFFFFF !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 1050;
  box-shadow: 0 4px 20px rgba(17, 20, 45, 0.04);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--text-main) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand i {
  color: var(--primary);
  font-size: 1.6rem;
}

.navbar-nav .nav-link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: #CBD5E1 !important;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link.active {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.1);
}

.navbar-nav .badge {
  background: var(--primary-gradient) !important;
  font-weight: 700;
  padding: 0.35em 0.65em;
  font-size: 0.75rem;
}

/* ==========================================================================
   Hero & Banner Sections
   ========================================================================== */

.hero-section {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #334155 100%);
  border-radius: var(--radius-xl);
  padding: 4rem 2.5rem;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.5rem;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section h1 {
  color: #FFFFFF;
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-section .lead {
  color: #94A3B8;
  font-size: 1.15rem;
  max-width: 600px;
}

.search-bar-hero {
  background: var(--surface-card);
  padding: 0.4rem;
  border-radius: var(--radius-full);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
}

.search-bar-hero .form-control {
  border: none !important;
  box-shadow: none !important;
  padding-left: 1.25rem;
  font-size: 1rem;
  background: transparent;
}

.search-bar-hero .btn {
  border-radius: var(--radius-full) !important;
  padding: 0.75rem 1.75rem;
  font-weight: 700;
}

/* ==========================================================================
   Cards (Vendor, Food Item, Dashboard Cards)
   ========================================================================== */

.card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 82, 0, 0.2);
}

/* Food Item Card */
.food-item-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  position: relative;
}

.food-item-card .card-img-top {
  height: 190px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.food-item-card:hover .card-img-top {
  transform: scale(1.06);
}

.food-item-card .badge-price {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
}

.food-item-card .card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.food-item-card .card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.food-item-card .card-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-grow: 1;
}

.veg-tag {
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}

.veg-tag::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
}

.non-veg-tag {
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent-rose);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}

.non-veg-tag::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-rose);
  border-radius: 50%;
}

/* Vendor Cards */
.vendor-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #FFFFFF;
  transition: var(--transition-normal);
}

.vendor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.vendor-card-header {
  height: 140px;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}

.vendor-avatar {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-lg);
  background: var(--primary-gradient);
  border: 3px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.75rem;
  box-shadow: var(--shadow-md);
}

.vendor-status-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-open {
  background: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-closed {
  background: var(--accent-rose-bg);
  color: var(--accent-rose);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Stat Cards (Dashboard) */
.stats-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: #FFFFFF;
  padding: 1.5rem;
  position: relative;
  transition: var(--transition-normal);
}

.stats-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stats-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.stats-icon.primary { background: var(--primary-light); color: var(--primary); }
.stats-icon.success { background: var(--accent-green-bg); color: var(--accent-green); }
.stats-icon.info { background: var(--accent-indigo-bg); color: var(--accent-indigo); }
.stats-icon.warning { background: var(--accent-amber-bg); color: var(--accent-amber); }

.stats-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.stats-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Buttons & Inputs
   ========================================================================== */

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.4rem;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary-gradient);
  border: none;
  color: #FFFFFF;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, #E04800 0%, #FF5200 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 18px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #E2E8F0;
  color: var(--text-main);
  border: none;
}

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

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

/* Form Controls */
.form-control, .form-select {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: #FFFFFF;
  transition: var(--transition-fast);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  outline: none;
}

.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

/* Quantity Control Stepper */
.quantity-stepper {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  border-radius: var(--radius-full);
  padding: 3px;
  border: 1px solid var(--border-light);
}

.quantity-stepper .btn-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #FFFFFF;
  color: var(--text-main);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  cursor: pointer;
}

.quantity-stepper .btn-step:hover {
  background: var(--primary);
  color: #FFFFFF;
}

.quantity-stepper .qty-number {
  padding: 0 0.8rem;
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 32px;
  text-align: center;
}

/* ==========================================================================
   Tables & Data Presentation
   ========================================================================== */

.table-responsive {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.table {
  margin-bottom: 0;
  vertical-align: middle;
}

.table thead th {
  background: #F8FAFC;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.table tbody td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 0.925rem;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background-color: #F8FAFC;
}

/* ==========================================================================
   Status Timeline & Badges
   ========================================================================== */

.badge-status {
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.4em 0.8em;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-status.pending { background: var(--accent-amber-bg); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-status.confirmed { background: var(--accent-indigo-bg); color: var(--accent-indigo); border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-status.preparing { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(255, 82, 0, 0.3); }
.badge-status.ready { background: var(--accent-green-bg); color: var(--accent-green); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-status.delivered { background: #F1F5F9; color: var(--text-muted); border: 1px solid var(--border-light); }
.badge-status.cancelled { background: var(--accent-rose-bg); color: var(--accent-rose); border: 1px solid rgba(239, 68, 68, 0.3); }

/* Timeline UI */
.order-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 2rem 0;
}

.order-timeline::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 5%;
  right: 5%;
  height: 4px;
  background: var(--border-light);
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  background: var(--surface-card);
  padding: 0 0.5rem;
}

.step-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #E2E8F0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  transition: var(--transition-normal);
}

.timeline-step.active .step-icon {
  background: var(--primary-gradient);
  color: #FFFFFF;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.timeline-step.completed .step-icon {
  background: var(--accent-green);
  color: #FFFFFF;
}

.step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.timeline-step.active .step-label {
  color: var(--primary);
  font-weight: 700;
}

/* ==========================================================================
   Sidebar & Portal Layouts (Vendor & Admin)
   ========================================================================== */

.sidebar {
  background: #0F172A !important;
  color: #94A3B8;
  min-height: calc(100vh - 75px);
  border-right: 1px solid #1E293B;
  padding-top: 1.5rem;
}

.sidebar .nav-link {
  color: #94A3B8 !important;
  font-weight: 600;
  padding: 0.8rem 1.25rem !important;
  border-radius: var(--radius-md);
  margin-bottom: 0.35rem;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
  color: #FFFFFF !important;
  background: #1E293B !important;
  border-left: 4px solid var(--primary);
}

.sidebar .nav-link i {
  font-size: 1.1rem;
  width: 24px;
}

/* ==========================================================================
   Modals, Toasts & Alerts
   ========================================================================== */

.modal-content {
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-light);
  padding: 1.25rem 1.75rem;
}

.modal-title {
  font-weight: 700;
  font-size: 1.2rem;
}

.modal-body {
  padding: 1.75rem;
}

.modal-footer {
  border-top: 1px solid var(--border-light);
  padding: 1rem 1.75rem;
  background: #F8FAFC;
}

.alert {
  border-radius: var(--radius-md);
  border: none;
  padding: 1rem 1.25rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success { background: var(--accent-green-bg); color: #065F46; }
.alert-danger { background: var(--accent-rose-bg); color: #991B1B; }
.alert-warning { background: var(--accent-amber-bg); color: #92400E; }
.alert-info { background: var(--accent-indigo-bg); color: #3730A3; }

/* ==========================================================================
   Footer Component
   ========================================================================== */

footer.bg-dark {
  background-color: #0F172A !important;
  border-top: 1px solid #1E293B;
  color: #94A3B8 !important;
  padding: 3.5rem 0 2.5rem 0 !important;
  margin-top: 4rem !important;
}

footer h5 {
  color: #FFFFFF;
  font-weight: 700;
  margin-bottom: 1rem;
}

footer a {
  color: #94A3B8;
}

footer a:hover {
  color: var(--primary);
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1040;
  justify-content: space-around;
  align-items: center;
}

.mobile-bottom-nav .nav-item-mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #94A3B8;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.mobile-bottom-nav .nav-item-mobile.active,
.mobile-bottom-nav .nav-item-mobile:hover {
  color: var(--primary);
}

.mobile-bottom-nav .nav-item-mobile i {
  font-size: 1.25rem;
  margin-bottom: 2px;
}
