/* ========================================
   MOBILE-FIRST CSS FOR ANDROID APP
   ======================================== */

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* --- Scrollbar Optimization (Premium Desktop Feel) --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
  border: 2px solid #f8fafc;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

:root {
  /* Color Palette */
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --success: #059669;
  --success-dark: #047857;
  --success-light: #f0fdf4;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --danger-light: #fef2f2;
  --warning: #f59e0b;
  --secondary: #e5e7eb;
  --secondary-dark: #d1d5db;

  /* Grays */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Spacing (Android 8dp grid) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;

  /* Touch Targets */
  --touch-target: 48px;
  --touch-target-small: 40px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

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

  /* Z-index layers */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-toast: 600;
}

/* Safe area support for notched displays */
body {
  font-family: 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  font-size: 16px;
  padding-bottom: env(safe-area-inset-bottom);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
  height: 100vh;
  width: 100%;
}

.screen {
  min-height: 100vh;
  padding-bottom: 80px;
  /* Space for bottom nav */
}

/* === MOBILE LOGIN SCREEN === */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-4);
  width: 100%;
  max-width: 400px;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  text-align: center;
  margin-bottom: var(--space-4);
}

.icon {
  font-size: 4rem;
  margin-bottom: var(--space-2);
  animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.login-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-1);
  color: var(--gray-900);
}

.login-header p {
  color: var(--gray-500);
  font-size: 0.9375rem;
}

/* === FORMS === */
.form-group {
  margin-bottom: var(--space-2);
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
  color: var(--gray-700);
}

.form-group input,
.admin-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: all 0.2s;
  background: white;
  min-height: var(--touch-target);
}

.form-group input:focus,
.admin-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

/* === BUTTONS (Touch-Optimized) === */
.btn {
  padding: 14px var(--space-3);
  min-height: var(--touch-target);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark);
  box-shadow: var(--shadow-lg);
}

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

.btn-outline:hover,
.btn-outline:focus {
  background: var(--primary-light);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--secondary-dark);
}

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-success:hover,
.btn-success:focus {
  background: var(--success-dark);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-danger:hover,
.btn-danger:focus {
  background: var(--danger-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  padding: var(--space-1) var(--space-2);
  min-height: var(--touch-target-small);
}

.btn-ghost:hover,
.btn-ghost:focus {
  background: var(--gray-100);
}

.btn-sm {
  padding: 10px var(--space-2);
  font-size: 0.875rem;
  min-height: var(--touch-target-small);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* === MAIN SCREEN LAYOUT === */
.container {
  max-width: 100%;
  padding: var(--space-2);
  padding-top: calc(var(--space-2) + env(safe-area-inset-top));
  margin: 0 auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-3);
  gap: var(--space-2);
  flex-wrap: wrap;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--gray-900);
}

.header p {
  color: var(--gray-500);
  font-size: 0.875rem;
}

/* Mobile: Stack layout */
.main-content {
  display: block;
  margin-bottom: var(--space-2);
}

/* === CARDS === */
.card {
  background: white;
  border-radius: var(--radius);
  padding: var(--space-2);
  box-shadow: var(--shadow);
  margin-bottom: var(--space-2);
}

/* === SEARCH BAR === */
.search-bar {
  position: sticky;
  top: var(--space-1);
  z-index: var(--z-sticky);
  margin-bottom: var(--space-2);
}

.search-input {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 12px var(--space-2);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: white;
  min-height: var(--touch-target);
}

.search-input span {
  font-size: 1.25rem;
}

.search-input input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 1rem;
  background: transparent;
  min-height: unset;
  padding: 0;
}

/* === FOOD ITEMS === */
.food-section {
  width: 100%;
}

.food-grid {
  display: block;
  margin-bottom: var(--space-6);
}

.category-section {
  margin-bottom: var(--space-4);
}

.category-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-4);
  padding: 0.5rem 0;
  color: #1e293b;
  border-bottom: none;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-title::before {
  content: "";
  display: block;
  width: 4px;
  height: 24px;
  background: var(--primary);
  border-radius: 99px;
}

.food-card {
  background: white;
  border-radius: 16px;
  padding: 16px 20px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  margin-bottom: 4px;
}

.food-card:active {
  transform: scale(0.98);
  background: #f8fafc;
}

.food-card-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.food-info {
  flex: 1;
}

.food-info h3 {
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}

.food-price {
  font-size: 1.125rem;
  color: #4f46e5;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.food-price::before {
  content: "Rs.";
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
}

.food-card.unavailable {
  opacity: 0.6;
  filter: grayscale(1);
  cursor: not-allowed;
}

.food-card.unavailable::after {
  content: "Unavailable";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: #f1f5f9;
  color: #64748b;
  padding: 4px 12px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.75rem;
  pointer-events: none;
}

/* === BOTTOM NAVIGATION (Mobile) === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: white;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: var(--z-fixed);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: var(--space-1);
  min-width: 64px;
  min-height: var(--touch-target);
  cursor: pointer;
  color: var(--gray-500);
  transition: all 0.2s;
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 500;
  position: relative;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item:active {
  transform: scale(0.95);
}

.nav-item span:first-child {
  font-size: 1.5rem;
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  background: var(--danger);
  color: white;
  border-radius: var(--radius-full);
  padding: 2px 6px;
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

/* === FLOATING ACTION BUTTON (Cart) === */
.fab {
  position: fixed;
  bottom: 80px;
  right: var(--space-2);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-xl);
  cursor: pointer;
  border: none;
  z-index: var(--z-fixed);
  transition: all 0.2s;
}

.fab:active {
  transform: scale(0.95);
}

.fab .fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  border-radius: var(--radius-full);
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  border: 2px solid white;
}

/* === BOTTOM SHEET CART (Mobile) === */
.cart-section {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: var(--z-modal);
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overscroll-behavior: contain;
  overflow: hidden;
  /* Ensure content doesn't spill out */
}

.cart-section .card {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cart-section.open {
  transform: translateY(0);
}

.cart-handle,
#orders-handle {
  width: 40px;
  height: 4px;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  margin: var(--space-1) auto;
  cursor: grab;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.cart-header div {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.cart-header strong {
  font-size: 1.125rem;
  font-weight: 700;
}

.badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2);
  -webkit-overflow-scrolling: touch;
}

.empty-cart {
  text-align: center;
  padding: var(--space-5) var(--space-2);
  color: var(--gray-500);
}

.empty-cart p {
  font-size: 1rem;
  margin-bottom: var(--space-1);
  font-weight: 500;
}

.empty-cart small {
  font-size: 0.875rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-1);
  border: 2px solid var(--gray-200);
  background: white;
  transition: all 0.2s;
  gap: var(--space-2);
}

.cart-item.draft {
  background-color: #fffbeb;
  border-color: var(--warning);
}

.cart-item.synced {
  background-color: #f0fdf4;
  border-color: var(--success);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-info strong {
  display: block;
  font-size: 1rem;
  margin-bottom: var(--space-1);
  color: var(--gray-900);
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.quantity-controls button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gray-300);
  background: white;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.quantity-controls button:active {
  transform: scale(0.95);
  background: var(--gray-100);
}

.quantity-controls span {
  min-width: 28px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
}

.remove-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  color: var(--danger);
  font-size: 1.25rem;
  min-width: var(--touch-target-small);
  min-height: var(--touch-target-small);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.remove-btn:active {
  background: var(--danger-light);
  transform: scale(0.95);
}

#checkout-section {
  padding: var(--space-2);
  border-top: 2px solid var(--gray-200);
  background: white;
  position: sticky;
  bottom: 0;
}

.divider {
  height: 1px;
  background: var(--gray-200);
  margin: var(--space-2) 0;
}

/* === ORDERS === */
#my-orders-container {
  margin-bottom: var(--space-2);
}

.order-card,
.order-card-client {
  background: white;
  border-radius: var(--radius);
  padding: var(--space-2);
  border: 2px solid var(--gray-200);
  margin-bottom: var(--space-2);
  box-shadow: var(--shadow);
}

.order-header,
.order-header-client {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--gray-200);
}

.order-id {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gray-700);
  font-family: monospace;
}

.order-status {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.order-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.order-status.completed {
  background: var(--success-light);
  color: #065f46;
}

.order-status.cancelled {
  background: var(--danger-light);
  color: #991b1b;
}

.order-details {
  margin-bottom: var(--space-2);
}

.order-details p {
  margin-bottom: var(--space-1);
  font-size: 0.9375rem;
  color: var(--gray-700);
}

.order-items-compact {
  background: var(--gray-50);
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--gray-600);
}

.order-items-compact div {
  padding: 4px 0;
}

.ready-badge {
  background: var(--success);
  color: white;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 700;
  margin-top: var(--space-1);
}

/* === LOADING STATES === */
.loading {
  text-align: center;
  padding: var(--space-5);
  color: var(--gray-500);
}

.spinner {
  border: 3px solid var(--gray-200);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-full);
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-2);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* === ERROR MESSAGES === */
.error-message {
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  font-size: 0.9375rem;
  font-weight: 500;
}

.error-message:not(:empty) {
  background: var(--danger-light);
  color: var(--danger-dark);
  border: 2px solid var(--danger);
}

.error-message.success {
  background: var(--success-light);
  color: #065f46;
  border: 2px solid var(--success);
}

/* === BACKDROP OVERLAY === */
.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.backdrop.show {
  opacity: 1;
  pointer-events: all;
}

/* === ADMIN SPECIFIC === */
.toggle-availability-btn {
  margin-top: var(--space-1);
  width: 100%;
  padding: var(--space-1);
  font-size: 0.875rem;
  min-height: var(--touch-target-small);
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.toggle-availability-btn.active {
  background-color: var(--danger);
  color: white;
}

.toggle-availability-btn.inactive {
  background-color: var(--success);
  color: white;
}

.load-more-container {
  text-align: center;
  margin-top: var(--space-2);
}

/* ========================================
   RESPONSIVE: TABLET & DESKTOP
   ======================================== */

/* Tablet (768px+) */
@media (min-width: 768px) {
  .container {
    max-width: 1200px;
    padding: var(--space-3);
  }

  .items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .login-card {
    padding: var(--space-5);
  }

  .header h1 {
    font-size: 2.25rem;
  }

  /* Hide bottom nav on tablet+ */
  .bottom-nav {
    display: none;
  }

  .fab {
    display: none;
  }

  /* Show cart as sidebar on larger screens */
  .main-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-3);
  }

  .cart-section {
    position: sticky;
    top: var(--space-2);
    transform: none;
    max-height: calc(100vh - var(--space-4));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    align-self: start;
  }

  .cart-handle {
    display: none;
  }

  .screen {
    padding-bottom: 0;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .container {
    max-width: 1400px;
  }

  .items-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .main-content {
    grid-template-columns: 1fr 400px;
  }

  .food-card:hover {
    transform: translateY(-4px);
  }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
  .items-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========================================
   ACCESSIBILITY & POLISH
   ======================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  /* Future: Add dark mode styles */
}

/* ========================================
   ADMIN REDESIGN (Premium Dashboard)
   ======================================== */

.admin-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #f8fafc;
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: #1e293b;
  color: white;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.sidebar-header {
  padding: 24px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header .logo {
  font-size: 2rem;
}

.sidebar-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
  color: white;
}

.sidebar-nav {
  flex: 1;
  padding: 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav .nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #94a3b8 !important;
  font-weight: 600;
  font-size: 0.9375rem;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  box-shadow: none !important;
}

.sidebar-nav .nav-item .icon {
  font-size: 1.25rem;
}

.sidebar-nav .nav-item:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: white !important;
}

.sidebar-nav .nav-item.active {
  background: #4f46e5 !important;
  color: white !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3) !important;
}

.sidebar-footer {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Area */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
}

.admin-header {
  padding: 24px 32px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 90;
}

.admin-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #f1f5f9;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
}

.status-indicator .dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Admin Sections */
.admin-section {
  padding: 32px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-item {
  position: relative;
  overflow: hidden;
}

.nav-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.nav-item.active::after {
  transform: translateX(0);
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stats-card {
  background: white;
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #f1f5f9;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.stats-card h3 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.stats-card .value {
  font-size: 2.25rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 8px;
}

.stats-card .sub {
  font-size: 0.8125rem;
  color: #94a3b8;
}

/* Stat Variants */
.stats-card.pending {
  border-left: 4px solid #f59e0b;
}

.stats-card.revenue {
  border-left: 4px solid #10b981;
}

/* Admin Order Cards v2 */
.order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.order-card-v2 {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 24px;
  position: relative;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-card-v2:hover {
  border-color: #818cf8;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.order-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.625rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #f1f5f9;
  letter-spacing: 0.05em;
}

.order-card-v2.pending .order-badge {
  background: #fff7ed;
  color: #c2410c;
}

.order-card-v2.confirmed .order-badge {
  background: #eff6ff;
  color: #1d4ed8;
}

.order-card-v2.completed .order-badge {
  background: #f0fdf4;
  color: #15803d;
}

.order-card-v2.cancelled .order-badge {
  background: #fef2f2;
  color: #991b1b;
}

.order-header {
  display: flex;
  flex-direction: column;
}

.order-id {
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
}

.order-time {
  font-size: 0.8125rem;
  color: #94a3b8;
}

.customer-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.customer-info strong {
  font-size: 1.125rem;
  color: #0f172a;
}

.customer-info span {
  font-size: 0.875rem;
  color: #64748b;
}

.order-items-minimal {
  background: #f8fafc;
  padding: 12px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-items-minimal span {
  font-size: 0.875rem;
  color: #334155;
  display: flex;
  justify-content: space-between;
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.order-footer .total {
  font-size: 1.25rem;
  font-weight: 800;
  color: #4f46e5;
}

.order-footer .actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.8125rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-action.approve {
  background: #4f46e5;
  color: white;
}

.btn-action.ready {
  background: #10b981;
  color: white;
}

.btn-action.approve:hover {
  background: #4338ca;
}

.btn-icon.reject {
  height: 32px;
  width: 32px;
  border-radius: 6px;
  background: #fee2e2;
  color: #ef4444;
  border: none;
  cursor: pointer;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Admin Food Management v2 */
.admin-food-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-food-card .card-top {
  display: flex;
  gap: 16px;
}

.admin-food-card .img-wrap {
  width: 64px;
  height: 64px;
  background: #f1f5f9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
  flex-shrink: 0;
}

.admin-food-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-food-card .info {
  flex: 1;
}

.admin-food-card .info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.admin-food-card .info p {
  font-weight: 700;
  color: #4f46e5;
  font-size: 0.875rem;
  margin: 0;
}

.btn-toggle {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.8125rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.btn-toggle.on {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.btn-toggle.off {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.admin-food-card.unavailable {
  opacity: 0.8;
}

/* Utilities */
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #f1f5f9;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 80px auto;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #94a3b8;
  font-weight: 700;
  background: white;
  border-radius: 12px;
  border: 2px dashed #e2e8f0;
}

/* Sticky Headers in Admin */
.admin-section .category-title {
  position: sticky;
  top: 88px;
  background: #f8fafc;
  z-index: 10;
  padding: 8px 0;
}

@media (max-width: 1024px) {
  .admin-sidebar {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
  }

  .sidebar-header,
  .sidebar-footer {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    padding: 8px;
  }

  .sidebar-nav .nav-item {
    white-space: nowrap;
    padding: 8px 12px;
  }

  .admin-section {
    padding: 16px;
  }
}
