/* ==========================================
   WEBEZPRO - QR Ordering System
   Main Stylesheet
   ========================================== */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

/* ==========================================
   CSS Custom Properties (Design Tokens)
   ========================================== */
:root {
  /* Colors */
  --cream: #f7f5e8;
  --caramel: #d4a574;
  --espresso: #2c1810;
  --coffee-light: #a67b5b;
  --foam: #faf8f0;
  --caramel-dark: #b8935f;
  --success: #5a8f5e;
  --danger: #c44b4b;
  --warning: #d4a017;
  --white: #ffffff;
  --border: rgba(212, 165, 116, 0.3);
  --overlay: rgba(44, 24, 16, 0.6);

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

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

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

  /* Shadows */
  --shadow-card: 0 2px 12px rgba(44, 24, 16, 0.08);
  --shadow-float: 0 4px 20px rgba(44, 24, 16, 0.12);
  --shadow-modal: 0 8px 40px rgba(44, 24, 16, 0.2);
}

/* ==========================================
   Reset & Base
   ========================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--espresso);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
}

input, select, textarea {
  font-family: var(--font-body);
  outline: none;
}

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

/* ==========================================
   Typography
   ========================================== */
h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  line-height: 1.1;
}

h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
}

h3 {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}

.price {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--caramel);
}

.mono {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.caption {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes checkPulse {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes wave {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.5; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes badgePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideDown {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

.animate-slide-in {
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-pulse {
  animation: pulse 0.3s ease-out;
}

.animate-check {
  animation: checkPulse 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-badge-pulse {
  animation: badgePulse 0.3s ease-out;
}

/* ==========================================
   Scroll Reveal (Landing Page)
   ========================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ==========================================
   Landing Page - Grid Background
   ========================================== */
.landing-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--cream);
}

.grid-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 2px;
}

.grid-cell {
  background: var(--caramel);
  opacity: 0.15;
  transition: opacity 0.8s ease-out;
}

.grid-cell.active {
  opacity: 0.55;
}

/* Landing Logo */
.landing-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  pointer-events: none;
}

.landing-logo svg {
  width: clamp(80px, 12vw, 160px);
  height: auto;
  margin-bottom: var(--space-md);
  filter: drop-shadow(0 4px 20px rgba(44, 24, 16, 0.15));
}

.landing-logo h1 {
  font-size: clamp(48px, 10vw, 120px);
  color: var(--espresso);
  opacity: 0.9;
  letter-spacing: 4px;
  filter: drop-shadow(0 4px 20px rgba(44, 24, 16, 0.15));
}

.landing-logo .tagline {
  font-family: var(--font-body);
  font-size: clamp(14px, 2vw, 20px);
  font-weight: 500;
  color: var(--coffee-light);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-top: var(--space-sm);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--coffee-light);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: float 2s ease-in-out infinite;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
}

/* ==========================================
   Landing Page - Content Sections
   ========================================== */
.landing-content {
  position: relative;
  z-index: 5;
  background: linear-gradient(to bottom, transparent 0%, var(--cream) 200px);
  padding-top: 200px;
}

.landing-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

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

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--coffee-light);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(44, 24, 16, 0.12);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  background: rgba(212, 165, 116, 0.15);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 32px;
  height: 32px;
  color: var(--caramel);
}

.feature-card h3 {
  margin-bottom: var(--space-sm);
  color: var(--espresso);
}

.feature-card p {
  color: var(--coffee-light);
  font-size: 15px;
  line-height: 1.6;
}

/* How It Works Section */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.step-card {
  text-align: center;
  padding: var(--space-lg);
}

.step-number {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--caramel);
  opacity: 0.4;
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.step-card h3 {
  margin-bottom: var(--space-xs);
  font-size: 18px;
}

.step-card p {
  color: var(--coffee-light);
  font-size: 14px;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
}

.testimonial-card .quote {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.5;
  color: var(--espresso);
  margin-bottom: var(--space-md);
  position: relative;
  padding-left: 20px;
}

.testimonial-card .quote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -8px;
  font-size: 36px;
  color: var(--caramel);
  opacity: 0.5;
}

.testimonial-card .author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.testimonial-card .author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--caramel), var(--caramel-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 20px;
}

.testimonial-card .author-name {
  font-weight: 500;
  color: var(--espresso);
}

.testimonial-card .author-role {
  font-size: 14px;
  color: var(--coffee-light);
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  background: var(--espresso);
  border-radius: var(--radius-xl);
  margin: var(--space-xl) auto;
  max-width: 800px;
}

.cta-section h2 {
  color: var(--cream);
  margin-bottom: var(--space-sm);
}

.cta-section p {
  color: var(--coffee-light);
  margin-bottom: var(--space-lg);
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

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

.btn-primary:hover {
  background: var(--caramel-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.btn-secondary {
  background: var(--foam);
  color: var(--espresso);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--white);
}

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

.btn-danger:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

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

.btn-success:hover {
  opacity: 0.9;
}

.btn-lg {
  padding: 16px 48px;
  font-size: 18px;
  border-radius: var(--radius-lg);
}

.btn-full {
  width: 100%;
}

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

/* ==========================================
   Customer App
   ========================================== */
.customer-app {
  max-width: 768px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--cream);
  position: relative;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 12px var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header .logo {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--espresso);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.app-header .logo svg {
  width: 28px;
  height: 28px;
}

.table-badge {
  background: var(--caramel);
  color: var(--white);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
}

/* Category Tabs */
.category-tabs {
  position: sticky;
  top: 61px;
  z-index: 90;
  background: var(--cream);
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  padding: 8px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--foam);
  color: var(--coffee-light);
  border: none;
  flex-shrink: 0;
}

.category-tab:hover {
  background: var(--caramel-dark);
  color: var(--white);
}

.category-tab.active {
  background: var(--caramel);
  color: var(--white);
}

/* Menu Grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-md);
  padding: var(--space-md);
}

.menu-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
}

.menu-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 24, 16, 0.12);
}

.menu-item-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--foam);
}

.menu-item-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--foam), rgba(212, 165, 116, 0.2));
}

.menu-item-image.placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--caramel);
  opacity: 0.5;
}

.menu-item-content {
  padding: 12px;
}

.menu-item-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--espresso);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-item-price {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--caramel);
}

.menu-item-status {
  font-size: 11px;
  font-weight: 500;
  margin-top: 4px;
}

.menu-item-status.available {
  color: var(--success);
}

.menu-item-status.soldout {
  color: var(--danger);
}

.btn-add {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: var(--caramel);
  color: var(--white);
  border-radius: 50%;
  border: none;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.4);
}

.btn-add:hover {
  background: var(--caramel-dark);
  transform: scale(1.1);
}

.btn-add:active {
  transform: scale(0.95);
}

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(90deg, var(--foam) 0%, rgba(212, 165, 116, 0.15) 50%, var(--foam) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 1;
}

.skeleton-text {
  height: 16px;
  margin: 8px 12px;
  width: 70%;
}

.skeleton-price {
  height: 20px;
  margin: 4px 12px 12px;
  width: 40%;
}

/* ==========================================
   Cart (Bottom Sheet)
   ========================================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 260;
  background: var(--foam);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 70vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-sheet.active {
  transform: translateY(0);
}

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

.cart-header h3 {
  font-size: 18px;
}

.btn-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close:hover {
  background: var(--cream);
}

.btn-close svg {
  width: 18px;
  height: 18px;
  color: var(--espresso);
}

.cart-items {
  padding: var(--space-md) var(--space-lg);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-image {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--foam);
  flex-shrink: 0;
}

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

.cart-item-name {
  font-weight: 500;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-price {
  font-family: var(--font-display);
  color: var(--caramel);
  font-size: 16px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn-quantity {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--espresso);
  transition: all 0.2s;
}

.btn-quantity:hover {
  border-color: var(--caramel);
  color: var(--caramel);
}

.cart-item-quantity {
  font-family: var(--font-mono);
  font-size: 14px;
  min-width: 24px;
  text-align: center;
}

.cart-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--foam);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.cart-total-label {
  font-size: 16px;
  font-weight: 500;
}

.cart-total-amount {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--caramel);
}

/* Cart FAB */
.cart-fab {
  position: fixed;
  bottom: 24px;
  right: 16px;
  z-index: 200;
  background: var(--caramel);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
}

.cart-fab:hover {
  background: var(--caramel-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 165, 116, 0.35);
}

.cart-fab svg {
  width: 22px;
  height: 22px;
}

.cart-fab-count {
  background: var(--espresso);
  color: var(--white);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

/* Order Confirmation */
.order-confirmation {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.confirmation-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-lg);
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: checkPulse 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.confirmation-icon svg {
  width: 40px;
  height: 40px;
  color: var(--white);
}

.order-confirmation h2 {
  margin-bottom: var(--space-sm);
}

.order-confirmation .order-number {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--caramel);
  margin-bottom: var(--space-sm);
}

.order-confirmation p {
  color: var(--coffee-light);
  margin-bottom: var(--space-lg);
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  color: var(--coffee-light);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

.empty-state p {
  font-size: 16px;
}

/* ==========================================
   Toast Notifications
   ========================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  padding: 14px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  animation: slideInRight 0.3s ease-out;
  pointer-events: auto;
  max-width: 320px;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

.toast.warning {
  background: var(--warning);
}

/* ==========================================
   Admin Dashboard
   ========================================== */
.admin-page {
  min-height: 100vh;
  background: var(--cream);
}

/* Login Screen */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: var(--cream);
}

.login-card {
  max-width: 400px;
  width: 100%;
  padding: var(--space-xl);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
}

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

.login-logo svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-sm);
}

.login-logo h2 {
  font-size: 24px;
}

.login-logo p {
  color: var(--coffee-light);
  font-size: 14px;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--espresso);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--foam);
  transition: all 0.2s;
  color: var(--espresso);
}

.form-input:focus {
  border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
}

.form-input::placeholder {
  color: var(--coffee-light);
  opacity: 0.6;
}

.forgot-link {
  display: block;
  text-align: right;
  color: var(--caramel);
  font-size: 14px;
  margin-top: var(--space-sm);
}

.forgot-link:hover {
  text-decoration: underline;
}

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--white);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-logo {
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--espresso);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sidebar-logo svg {
  width: 28px;
  height: 28px;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-sm) 0;
  list-style: none;
}

.sidebar-nav-item {
  padding: 12px var(--space-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--coffee-light);
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
  background: rgba(212, 165, 116, 0.05);
}

.sidebar-nav-item.active {
  background: rgba(212, 165, 116, 0.1);
  color: var(--espresso);
  border-left-color: var(--caramel);
}

.sidebar-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--danger);
  font-size: 15px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  font-family: var(--font-body);
}

.btn-logout:hover {
  text-decoration: underline;
}

.btn-logout svg {
  width: 18px;
  height: 18px;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: var(--space-lg) 32px;
  min-height: 100vh;
  background: var(--cream);
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.main-header h2 {
  font-size: 24px;
}

.main-header .datetime {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--coffee-light);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 110;
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.mobile-menu-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--espresso);
}

/* ==========================================
   Kitchen Display
   ========================================== */
.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.order-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--warning);
  transition: all 0.3s;
}

.order-card.completed {
  border-left-color: var(--success);
  opacity: 0.6;
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.order-id {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--espresso);
}

.order-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--coffee-light);
}

.order-table {
  display: inline-block;
  background: var(--caramel);
  color: var(--white);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: var(--space-md);
}

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

.order-items li {
  padding: 4px 0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

.order-items .item-name {
  flex: 1;
}

.order-items .item-qty {
  font-family: var(--font-mono);
  color: var(--coffee-light);
  margin-left: var(--space-sm);
}

.order-total {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--caramel);
  text-align: right;
  margin-bottom: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

.btn-complete {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--success);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-complete:hover {
  opacity: 0.9;
}

/* ==========================================
   Menu Management (Admin)
   ========================================== */
.menu-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.admin-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
}

.admin-menu-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
}

.admin-menu-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 24, 16, 0.12);
}

.admin-menu-item .item-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  z-index: 5;
}

.btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-card);
}

.btn-icon:hover {
  transform: scale(1.1);
}

.btn-icon svg {
  width: 14px;
  height: 14px;
}

.btn-icon-edit {
  background: var(--white);
  color: var(--espresso);
}

.btn-icon-delete {
  background: var(--danger);
  color: var(--white);
}

.admin-menu-item-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--foam);
}

.admin-menu-item-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--foam), rgba(212, 165, 116, 0.2));
}

.admin-menu-item-image.placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--caramel);
  opacity: 0.4;
}

.admin-menu-item-content {
  padding: 12px;
}

.admin-menu-item-name {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-menu-item-price {
  font-family: var(--font-display);
  color: var(--caramel);
  font-size: 18px;
  margin-bottom: var(--space-sm);
}

.status-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--coffee-light);
}

.toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--danger);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-switch.on {
  background: var(--success);
}

.toggle-knob {
  width: 20px;
  height: 20px;
  background: var(--white);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch.on .toggle-knob {
  transform: translateX(20px);
}

/* ==========================================
   Modal
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.modal-header h3 {
  font-size: 20px;
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 40px var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.upload-area:hover {
  border-color: var(--caramel);
  background: rgba(212, 165, 116, 0.05);
}

.upload-area.drag-over {
  border-color: var(--caramel);
  background: rgba(212, 165, 116, 0.1);
}

.upload-area.has-image {
  padding: 0;
  border-style: solid;
  border-color: var(--caramel);
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-placeholder {
  pointer-events: none;
}

.upload-placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--coffee-light);
  margin-bottom: var(--space-sm);
}

.upload-placeholder p {
  color: var(--coffee-light);
  font-size: 14px;
}

.upload-preview {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: none;
}

.upload-area.has-image .upload-preview {
  display: block;
}

.upload-area.has-image .upload-placeholder {
  display: none;
}

/* ==========================================
   Spinner
   ========================================== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--white);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
  text-align: center;
  padding: var(--space-lg);
  color: var(--coffee-light);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: var(--space-xl);
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
    z-index: 200;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 199;
    display: none;
  }

  .sidebar-backdrop.active {
    display: block;
  }
}

@media (max-width: 640px) {
  .landing-section {
    padding: var(--space-lg) var(--space-md);
  }

  .features-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    padding: var(--space-sm);
  }

  .admin-menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .orders-grid {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: var(--space-md);
  }

  .cart-sheet {
    max-height: 80vh;
  }

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

@media (max-width: 480px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .menu-item-name {
    font-size: 13px;
  }

  .menu-item-price {
    font-size: 16px;
  }
}

/* Hide admin page by default (shown via JS) */
.page {
  display: none;
}

.page.active {
  display: block;
}
