/* ===================== BAZAR237 GLOBAL CSS ===================== */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --green: #00b67a;
  --green-dark: #008f60;
  --green-light: #e6f9f2;
  --orange: #ff6b35;
  --dark: #0d1117;
  --dark2: #161b22;
  --dark3: #21262d;
  --gray: #6e7681;
  --gray-light: #f0f2f5;
  --white: #ffffff;
  --border: #30363d;
  --text: #1a1a2e;
  --text-muted: #6e7681;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.14);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--gray-light);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, h4 { font-family: 'Syne', sans-serif; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; border: none;
  cursor: pointer; transition: all 0.2s; text-decoration: none;
  font-family: 'Inter', sans-serif;
}
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover { background: var(--green-dark); color: white; transform: translateY(-1px); }
.btn-danger { background: #e53e3e; color: white; }
.btn-danger:hover { background: #c53030; color: white; }
.btn-outline { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn-outline:hover { background: var(--green); color: white; }
.btn-ghost { background: var(--gray-light); color: var(--text); }
.btn-ghost:hover { background: #e2e8f0; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* ===================== FORMS ===================== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.form-control {
  width: 100%; padding: 11px 14px; border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm); font-size: 15px; font-family: 'Inter', sans-serif;
  background: white; transition: border-color 0.2s; outline: none;
}
.form-control:focus { border-color: var(--green); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }

/* ===================== ALERTS ===================== */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.alert-success { background: var(--green-light); color: var(--green-dark); border-left: 4px solid var(--green); }
.alert-error { background: #fff5f5; color: #c53030; border-left: 4px solid #e53e3e; }
.alert-info { background: #ebf8ff; color: #2b6cb0; border-left: 4px solid #3182ce; }

/* ===================== CARDS ===================== */
.card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.card-header { padding: 20px 24px; border-bottom: 1px solid #f0f2f5; display: flex; align-items: center; justify-content: space-between; }
.card-body { padding: 24px; }
.card-title { font-size: 18px; font-weight: 700; }

/* ===================== BADGES ===================== */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
.badge-success { background: var(--green-light); color: var(--green-dark); }
.badge-warning { background: #fffbeb; color: #b45309; }
.badge-danger { background: #fff5f5; color: #c53030; }
.badge-info { background: #ebf8ff; color: #2b6cb0; }
.badge-gray { background: #f0f2f5; color: var(--gray); }

/* ===================== TABLE ===================== */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--gray-light); padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
td { padding: 14px 16px; border-bottom: 1px solid #f0f2f5; font-size: 14px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafbfc; }

/* ===================== AUTH PAGES ===================== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0d1117 0%, #1a2744 50%, #0d2818 100%); padding: 20px; }
.auth-card { background: white; border-radius: 20px; padding: 48px 40px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo-text { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--green); }
.auth-logo-sub { font-size: 13px; color: var(--text-muted); }
.auth-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.auth-subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }

/* ===================== DASHBOARD LAYOUT ===================== */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px; background: var(--dark); color: white;
  display: flex; flex-direction: column; position: fixed;
  height: 100vh; overflow-y: auto; z-index: 100;
}
.sidebar-logo { padding: 24px 20px; border-bottom: 1px solid var(--border); }
.sidebar-logo-text { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--green); }
.sidebar-logo-sub { font-size: 11px; color: var(--gray); }

.sidebar-section { padding: 16px 0; }
.sidebar-label { padding: 6px 20px; font-size: 11px; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; color: #c9d1d9; font-size: 14px; font-weight: 500;
  transition: all 0.2s; text-decoration: none; border-left: 3px solid transparent;
}
.sidebar-link:hover { color: white; background: var(--dark3); }
.sidebar-link.active { color: var(--green); background: rgba(0,182,122,0.08); border-left-color: var(--green); }
.sidebar-link span { font-size: 18px; }
.sidebar-user { padding: 16px 20px; border-top: 1px solid var(--border); margin-top: auto; }
.sidebar-user-name { font-weight: 600; font-size: 14px; }
.sidebar-user-role { font-size: 12px; color: var(--gray); }

.main-content { margin-left: 260px; flex: 1; min-height: 100vh; }
.topbar { background: white; padding: 0 32px; height: 64px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f0f2f5; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 8px rgba(0,0,0,0.06); }
.topbar-title { font-size: 18px; font-weight: 700; font-family: 'Syne', sans-serif; }
.page-content { padding: 32px; }

/* ===================== STAT CARDS ===================== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.stat-icon-green { background: var(--green-light); }
.stat-icon-orange { background: #fff7ed; }
.stat-icon-blue { background: #ebf8ff; }
.stat-icon-purple { background: #f5f3ff; }
.stat-value { font-size: 28px; font-weight: 800; font-family: 'Syne', sans-serif; }
.stat-label { font-size: 13px; color: var(--text-muted); }

/* ===================== MENU ITEMS GRID ===================== */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.menu-item-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s; }
.menu-item-card:hover { transform: translateY(-3px); }
.menu-item-img { width: 100%; height: 180px; object-fit: cover; background: var(--gray-light); }
.menu-item-img-placeholder { width: 100%; height: 180px; background: linear-gradient(135deg, var(--green-light), #e8f4fd); display: flex; align-items: center; justify-content: center; font-size: 48px; }
.menu-item-body { padding: 16px; }
.menu-item-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.menu-item-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.menu-item-price { font-size: 18px; font-weight: 700; color: var(--green); font-family: 'Syne', sans-serif; }
.menu-item-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ===================== QR PAGE ===================== */
.qr-container { text-align: center; padding: 40px; }
.qr-image { border: 8px solid white; border-radius: 16px; box-shadow: var(--shadow-lg); max-width: 300px; }

/* ===================== ORDER STATUS COLORS ===================== */
.status-pending { background: #fffbeb; color: #b45309; }
.status-confirmed { background: #ebf8ff; color: #2b6cb0; }
.status-preparing { background: #f0fff4; color: #276749; }
.status-ready { background: var(--green-light); color: var(--green-dark); }
.status-served { background: #f0f2f5; color: var(--gray); }
.status-cancelled { background: #fff5f5; color: #c53030; }

/* ===================== EMPTY STATE ===================== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state-icon { font-size: 56px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }

/* ===================== LANDING PAGE ===================== */
.landing-hero {
  background: linear-gradient(135deg, #0d1117 0%, #1a2744 60%, #0d2818 100%);
  color: white; padding: 80px 20px; text-align: center; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.landing-title { font-size: clamp(42px, 7vw, 80px); font-weight: 800; line-height: 1.05; margin-bottom: 20px; }
.landing-title .accent { color: var(--green); }
.landing-subtitle { font-size: clamp(16px, 2.5vw, 22px); color: rgba(255,255,255,0.7); max-width: 600px; margin: 0 auto 40px; }
.landing-features { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; padding: 60px 20px; background: white; }
.feature-card { background: var(--gray-light); border-radius: var(--radius); padding: 28px; max-width: 300px; text-align: center; }
.feature-icon { font-size: 40px; margin-bottom: 14px; }
.feature-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-desc { font-size: 14px; color: var(--text-muted); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .page-content { padding: 20px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ===================== CUSTOMER MENU ===================== */
.customer-header { background: var(--dark); color: white; padding: 24px 20px; }
.customer-restaurant-name { font-size: 28px; font-weight: 800; font-family: 'Syne', sans-serif; }
.customer-cover { width: 100%; height: 240px; object-fit: cover; }
.category-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 16px 20px; background: white; border-bottom: 1px solid #f0f2f5; position: sticky; top: 0; z-index: 40; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab { padding: 8px 18px; border-radius: 20px; border: 2px solid #e2e8f0; background: white; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; transition: all 0.2s; }
.cat-tab.active, .cat-tab:hover { background: var(--green); color: white; border-color: var(--green); }

.customer-menu-section { padding: 24px 20px; }
.section-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--green-light); display: flex; align-items: center; gap: 10px; }
.customer-item {
  background: white; border-radius: var(--radius); padding: 16px;
  display: flex; gap: 16px; align-items: center; margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: all 0.2s;
  border: 2px solid transparent; cursor: pointer;
}
.customer-item:hover { border-color: var(--green); transform: translateX(4px); }
.customer-item.selected { border-color: var(--green); background: var(--green-light); }
.customer-item-img { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.customer-item-img-ph { width: 80px; height: 80px; border-radius: 10px; background: var(--green-light); display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; }
.customer-item-info { flex: 1; }
.customer-item-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.customer-item-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.customer-item-price { font-weight: 700; color: var(--green); font-size: 17px; font-family: 'Syne', sans-serif; }
.customer-item-qty { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.qty-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: white; border: none; cursor: pointer; font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.qty-count { font-weight: 700; font-size: 16px; min-width: 20px; text-align: center; }

.cart-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--dark); color: white; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  transform: translateY(100%); transition: transform 0.3s; z-index: 200;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}
.cart-bar.visible { transform: translateY(0); }
.cart-count { background: var(--green); color: white; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 300; display: none; align-items: flex-end; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: white; border-radius: 20px 20px 0 0; padding: 28px 24px; width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto; }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; }

/* Print QR */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin-left: 0; }
  .qr-print-card { page-break-inside: avoid; }
}
