/* ============================================================
   HORDELY DESIGN SYSTEM v3.0
   Design moderno, chamativo e unificado
   Foco: Desktop first
============================================================ */

/* ============================================================
   DESIGN TOKENS
============================================================ */
:root {
  /* Primary — sobrescrito por restaurante via JS */
  --primary:        #ea1d2c;
  --primary-dark:   #c41822;
  --primary-light:  #fff1f2;
  --primary-faint:  rgba(234,29,44,.08);
  --primary-rgb:    234,29,44;

  /* Semantic */
  --success:        #10b981;
  --success-dark:   #059669;
  --success-light:  #d1fae5;
  --warning:        #f59e0b;
  --warning-dark:   #d97706;
  --warning-light:  #fef3c7;
  --error:          #ef4444;
  --error-dark:     #dc2626;
  --error-light:    #fee2e2;
  --info:           #3b82f6;
  --info-dark:      #2563eb;
  --info-light:     #dbeafe;

  /* Accent */
  --accent:         #8b5cf6;
  --accent-dark:    #7c3aed;
  --accent-light:   #ede9fe;

  /* Neutrals */
  --n-0:   #ffffff;
  --n-50:  #f9fafb;
  --n-100: #f3f4f6;
  --n-200: #e5e7eb;
  --n-300: #d1d5db;
  --n-400: #9ca3af;
  --n-500: #6b7280;
  --n-600: #4b5563;
  --n-700: #374151;
  --n-800: #1f2937;
  --n-900: #111827;
  --n-950: #030712;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:  0 12px 32px rgba(0,0,0,.10);
  --shadow-xl:  0 20px 48px rgba(0,0,0,.12);
  --shadow-2xl: 0 32px 64px rgba(0,0,0,.16);
  --shadow-glow: 0 0 30px rgba(var(--primary-rgb), .20);

  /* Radius */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-2xl:  24px;
  --r-3xl:  32px;
  --r-full: 9999px;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body { 
  font-family: var(--font); 
  background: var(--n-100); 
  color: var(--n-800); 
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { font-family: inherit; }

/* ============================================================
   LAYOUT
============================================================ */
.container { 
  max-width: 1400px; 
  margin: 0 auto; 
  padding: 0 var(--s-6); 
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: var(--s-6);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); }

/* ============================================================
   BUTTONS - Design moderno com gradientes
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--font);
  position: relative;
  overflow: hidden;
  /* Estilo padrão = primário */
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), .35);
}

.btn:hover { 
  transform: translateY(-1px); 
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), .45);
}

.btn:active { 
  transform: translateY(0); 
}

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

/* Button Sizes */
.btn-xs { min-height: 28px; padding: 0 10px; font-size: 11px; border-radius: var(--r-sm); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; font-weight: 700; }
.btn-xl { min-height: 60px; padding: 0 36px; font-size: 18px; font-weight: 700; }
.btn-full { width: 100%; }

/* Button Variants - Suporte para .btn-X e .btn.btn-X */
.btn-primary,
.btn.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), .35);
}
.btn-primary:hover,
.btn.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), .45);
}

.btn-secondary,
.btn.btn-secondary {
  background: var(--n-700);
  color: white;
  border: none;
}
.btn-secondary:hover,
.btn.btn-secondary:hover {
  background: var(--n-800);
}

.btn-success,
.btn.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, .35);
}
.btn-success:hover,
.btn.btn-success:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, .45);
}

.btn-warning,
.btn.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(245, 158, 11, .35);
}
.btn-warning:hover,
.btn.btn-warning:hover {
  box-shadow: 0 6px 20px rgba(245, 158, 11, .45);
}

.btn-danger,
.btn.btn-danger {
  background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(239, 68, 68, .35);
}
.btn-danger:hover,
.btn.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, .45);
}

.btn-accent,
.btn.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
}

.btn-outline,
.btn.btn-outline {
  background: transparent;
  border: 2px solid var(--n-300);
  color: var(--n-700);
  box-shadow: none;
}
.btn-outline:hover,
.btn.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-faint);
}

.btn-ghost,
.btn.btn-ghost {
  background: transparent;
  color: var(--n-600);
  box-shadow: none;
}
.btn-ghost:hover,
.btn.btn-ghost:hover {
  background: var(--n-100);
  color: var(--n-900);
}

.btn-white,
.btn.btn-white {
  background: rgba(255,255,255,.15);
  color: white;
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(10px);
  box-shadow: none;
}
.btn-white:hover,
.btn.btn-white:hover {
  background: rgba(255,255,255,.25);
}

.btn-link,
.btn.btn-link {
  background: none;
  color: var(--primary);
  padding: 0;
  min-height: auto;
  box-shadow: none;
}
.btn-link:hover,
.btn.btn-link:hover {
  text-decoration: underline;
  transform: none;
  box-shadow: none;
}

/* FORÇA estilos base para classes legadas (btn-X sem .btn) */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-warning,
.btn-danger,
.btn-accent,
.btn-outline,
.btn-ghost {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 20px !important;
  min-height: 44px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border-radius: var(--r-md) !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  font-family: var(--font) !important;
}

/* Cores forçadas com !important */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
  color: white !important;
  box-shadow: 0 4px 14px rgba(var(--primary-rgb), .35) !important;
}

.btn-secondary {
  background: var(--n-700) !important;
  color: white !important;
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%) !important;
  color: white !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, .35) !important;
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%) !important;
  color: white !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, .35) !important;
}

.btn-danger {
  background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%) !important;
  color: white !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, .35) !important;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-warning:hover,
.btn-danger:hover,
.btn-accent:hover {
  transform: translateY(-2px) !important;
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-success:disabled,
.btn-warning:disabled,
.btn-danger:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Tamanhos de botão com !important */
.btn-sm {
  min-height: 36px !important;
  padding: 0 14px !important;
  font-size: 13px !important;
}

.btn-lg {
  min-height: 52px !important;
  padding: 0 28px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

/* ============================================================
   CARDS - Design limpo com bordas suaves
============================================================ */
.card {
  background: white;
  border-radius: var(--r-xl);
  border: 1px solid var(--n-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-elevated {
  box-shadow: var(--shadow-lg);
  border: none;
}

.card-header {
  padding: var(--s-5);
  border-bottom: 1px solid var(--n-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--n-900);
}

.card-subtitle {
  font-size: 13px;
  color: var(--n-500);
  margin-top: 2px;
}

.card-body {
  padding: var(--s-5);
}

.card-footer {
  padding: var(--s-4) var(--s-5);
  background: var(--n-50);
  border-top: 1px solid var(--n-200);
  display: flex;
  gap: var(--s-3);
  align-items: center;
  justify-content: flex-end;
}

/* ============================================================
   STAT CARDS - Cards de estatísticas modernos
============================================================ */
.stat-card {
  background: white;
  border-radius: var(--r-xl);
  padding: var(--s-6);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--n-200);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

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

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.stat-icon {
  font-size: 28px;
  margin-bottom: var(--s-3);
  display: block;
}

.stat-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--n-900);
  line-height: 1;
  margin-bottom: var(--s-2);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 13px;
  color: var(--n-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}

/* ============================================================
   ORDER CARDS - Cards de pedido com status visual
============================================================ */
.order-card {
  background: white;
  border-radius: var(--r-xl);
  border: 1px solid var(--n-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.2s ease;
}

.order-card:hover {
  box-shadow: var(--shadow-md);
}

.order-card-status {
  height: 4px;
  background: var(--n-300);
}

.order-card.status-new .order-card-status,
.order-card.status-pending .order-card-status { background: var(--info); }
.order-card.status-confirmed .order-card-status { background: var(--accent); }
.order-card.status-preparing .order-card-status,
.order-card.status-prep .order-card-status { background: var(--warning); }
.order-card.status-ready .order-card-status { background: var(--success); }
.order-card.status-delivering .order-card-status,
.order-card.status-delivery .order-card-status { background: #0ea5e9; }
.order-card.status-delivered .order-card-status,
.order-card.status-done .order-card-status { background: var(--success-dark); }
.order-card.status-cancelled .order-card-status { background: var(--error); }

.order-head {
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.order-num,
.order-number {
  font-weight: 800;
  font-size: 18px;
  color: var(--n-900);
}

.order-time {
  font-size: 12px;
  color: var(--n-500);
  background: var(--n-100);
  padding: 4px 10px;
  border-radius: var(--r-full);
}

.order-body {
  padding: 0 var(--s-5) var(--s-4);
}

.order-items {
  font-size: 14px;
  color: var(--n-600);
  line-height: 1.6;
  margin-bottom: var(--s-3);
}

.order-total {
  font-weight: 700;
  font-size: 16px;
  color: var(--n-900);
}

.order-addr {
  font-size: 13px;
  color: var(--n-500);
  margin-top: var(--s-2);
}

.order-foot {
  padding: var(--s-4) var(--s-5);
  background: var(--n-50);
  border-top: 1px solid var(--n-200);
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--s-5);
}

/* ============================================================
   MENU ITEMS - Items do cardápio
============================================================ */
.menu-item {
  background: white;
  border-radius: var(--r-xl);
  border: 1px solid var(--n-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: var(--s-4);
  padding: var(--s-4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.menu-img {
  width: 100px;
  height: 100px;
  border-radius: var(--r-lg);
  object-fit: cover;
  background: linear-gradient(135deg, var(--n-100) 0%, var(--n-200) 100%);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.menu-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.menu-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--n-900);
  margin-bottom: var(--s-1);
}

.menu-desc {
  font-size: 13px;
  color: var(--n-500);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s-3);
}

.menu-price {
  font-weight: 800;
  font-size: 18px;
  color: var(--primary);
}

.menu-add-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 300;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), .4);
  transition: all 0.2s ease;
}

.menu-add-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), .5);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-5);
}

/* ============================================================
   BADGES
============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-success { background: var(--success-light); color: var(--success-dark); }
.badge-warning { background: var(--warning-light); color: var(--warning-dark); }
.badge-error { background: var(--error-light); color: var(--error-dark); }
.badge-info { background: var(--info-light); color: var(--info-dark); }
.badge-accent { background: var(--accent-light); color: var(--accent-dark); }
.badge-neutral { background: var(--n-200); color: var(--n-700); }

/* Status badges */
.badge-new,
.badge-pending { background: var(--info-light); color: var(--info-dark); }
.badge-confirmed { background: var(--accent-light); color: var(--accent-dark); }
.badge-preparing { background: var(--warning-light); color: var(--warning-dark); }
.badge-ready { background: var(--success-light); color: var(--success-dark); }
.badge-delivering { background: #e0f2fe; color: #0369a1; }
.badge-done { background: var(--success-light); color: var(--success-dark); }
.badge-cancelled { background: var(--error-light); color: var(--error-dark); }

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

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--n-700);
  margin-bottom: var(--s-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 2px solid var(--n-200);
  border-radius: var(--r-md);
  background: white;
  transition: all 0.2s ease;
  outline: none;
  font-family: var(--font);
  color: var(--n-900);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--n-300);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-faint);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--n-400);
}

.form-hint {
  font-size: 13px;
  color: var(--n-500);
  margin-top: var(--s-2);
}

.form-error {
  font-size: 13px;
  color: var(--error);
  margin-top: var(--s-2);
}

/* Legacy form support */
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--n-700);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--n-200);
  border-radius: var(--r-md);
  font-size: 15px;
  background: white;
  transition: all 0.2s ease;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-faint);
}

/* ============================================================
   HEADER - Barra superior moderna
============================================================ */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: var(--s-4) var(--s-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.header-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.header-title {
  font-size: 20px;
  font-weight: 800;
}

.header-subtitle {
  font-size: 13px;
  opacity: 0.85;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.header-user {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 14px;
}

.logout-btn {
  background: rgba(255,255,255,.15);
  color: white;
  border: 1px solid rgba(255,255,255,.25);
  padding: 8px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(255,255,255,.25);
}

/* ============================================================
   TABS - Navegação por abas
============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  background: white;
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--n-200);
  overflow-x: auto;
}

.tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--n-500);
  background: transparent;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab:hover {
  background: var(--n-100);
  color: var(--n-700);
}

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

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============================================================
   MODALS - Modais modernos
============================================================ */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: white;
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-2xl);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s ease;
}

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

.modal-header {
  padding: var(--s-5);
  border-bottom: 1px solid var(--n-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--n-900);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: var(--n-100);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--n-500);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--n-200);
  color: var(--n-700);
}

.modal-body {
  padding: var(--s-5);
}

.modal-footer {
  padding: var(--s-4) var(--s-5);
  background: var(--n-50);
  border-top: 1px solid var(--n-200);
  display: flex;
  gap: var(--s-3);
  justify-content: flex-end;
}

/* Login Modal */
.login-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.login-modal.active {
  opacity: 1;
  visibility: visible;
}

.login-content {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: var(--r-2xl);
  padding: var(--s-8);
  box-shadow: var(--shadow-2xl);
}

.login-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--n-900);
  text-align: center;
  margin-bottom: var(--s-6);
}

/* ============================================================
   BOTTOM SHEET - Para mobile
============================================================ */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  box-shadow: var(--shadow-2xl);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
  max-height: 90vh;
  overflow-y: auto;
}

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

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--n-300);
  border-radius: 2px;
  margin: var(--s-3) auto;
}

.sheet-header {
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--n-200);
}

.sheet-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--n-900);
}

.sheet-body {
  padding: var(--s-5);
}

.sheet-footer {
  padding: var(--s-4) var(--s-5);
  background: var(--n-50);
  border-top: 1px solid var(--n-200);
}

/* ============================================================
   PROGRESS STEPS
============================================================ */
.steps {
  display: flex;
  align-items: flex-start;
  padding: var(--s-5);
  gap: 0;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: var(--n-200);
  z-index: 0;
}

.step.done:not(:last-child)::after {
  background: var(--success);
}

.step-dot {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  z-index: 1;
  transition: all 0.3s ease;
}

.step.pending .step-dot {
  background: var(--n-200);
  color: var(--n-400);
}

.step.active .step-dot {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 6px var(--primary-faint), var(--shadow-md);
}

.step.done .step-dot {
  background: var(--success);
  color: white;
}

.step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--n-500);
  margin-top: var(--s-2);
  text-align: center;
}

.step.active .step-label {
  color: var(--primary);
}

.step.done .step-label {
  color: var(--success-dark);
}

/* ============================================================
   CART BAR - Barra do carrinho
============================================================ */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: var(--s-4) var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 20px rgba(0,0,0,.15);
  z-index: 100;
}

.cart-info {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
}

.cart-total {
  font-size: 20px;
  font-weight: 800;
}

.cart-btn {
  background: white;
  color: var(--primary);
  border-radius: var(--r-full);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.cart-btn:hover {
  transform: scale(1.05);
}

/* ============================================================
   CHAT
============================================================ */
.chat-container {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-4);
}

.chat-message {
  max-width: 80%;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-lg);
  font-size: 14px;
  line-height: 1.5;
}

.chat-message.sent {
  background: var(--primary);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: var(--r-xs);
}

.chat-message.received {
  background: var(--n-100);
  color: var(--n-800);
  margin-right: auto;
  border-bottom-left-radius: var(--r-xs);
}

.chat-time {
  font-size: 11px;
  color: var(--n-400);
  margin-top: var(--s-1);
}

.chat-fab {
  position: fixed;
  right: var(--s-5);
  bottom: var(--s-5);
  width: 60px;
  height: 60px;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), .4);
  z-index: 100;
  transition: all 0.2s ease;
}

.chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(var(--primary-rgb), .5);
}

/* ============================================================
   TABLES
============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--n-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--n-200);
  background: var(--n-50);
}

.data-table td {
  padding: var(--s-4);
  border-bottom: 1px solid var(--n-200);
  color: var(--n-700);
}

.data-table tr:hover td {
  background: var(--n-50);
}

/* ============================================================
   TOASTS
============================================================ */
.toast {
  position: fixed;
  bottom: var(--s-6);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-lg);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

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

.toast-error {
  background: var(--error-dark);
  color: white;
}

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

.toast-info {
  background: var(--n-800);
  color: white;
}

/* ============================================================
   LOGIN SECTION
============================================================ */
.login-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6);
  background: linear-gradient(135deg, var(--n-100) 0%, var(--n-200) 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: var(--r-2xl);
  padding: var(--s-8);
  box-shadow: var(--shadow-xl);
}

.login-brand {
  text-align: center;
  margin-bottom: var(--s-8);
}

.login-brand-icon {
  font-size: 56px;
  margin-bottom: var(--s-3);
}

.login-brand-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--n-900);
}

.login-brand-sub {
  font-size: 14px;
  color: var(--n-500);
  margin-top: var(--s-1);
}

/* ============================================================
   UTILITIES
============================================================ */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-base { font-size: 16px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-center { text-align: center; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-muted { color: var(--n-500); }

.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-error { background: var(--error); }

.rounded { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.rounded-xl { border-radius: var(--r-xl); }
.rounded-full { border-radius: var(--r-full); }

.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

.p-2 { padding: var(--s-2); }
.p-3 { padding: var(--s-3); }
.p-4 { padding: var(--s-4); }
.p-5 { padding: var(--s-5); }
.p-6 { padding: var(--s-6); }

.m-0 { margin: 0; }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-3 { margin-bottom: var(--s-3); }
.mb-4 { margin-bottom: var(--s-4); }
.mb-5 { margin-bottom: var(--s-5); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.divider {
  height: 1px;
  background: var(--n-200);
  margin: var(--s-4) 0;
}

.page-pad {
  padding: var(--s-5);
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--n-900);
  margin-bottom: var(--s-4);
}

.inline-note {
  font-size: 13px;
  color: var(--n-500);
  line-height: 1.5;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}

.view-switcher {
  display: flex;
  gap: var(--s-2);
  background: var(--n-100);
  padding: var(--s-1);
  border-radius: var(--r-lg);
}

.view-switcher .btn {
  border-radius: var(--r-md);
}

/* ============================================================
   RESPONSIVE - Desktop first (ajustes para tablet/mobile depois)
============================================================ */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .menu-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .container { padding: 0 var(--s-4); }
  .header { padding: var(--s-3) var(--s-4); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .orders-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
