/* ============================================================
   CHICKEN KING — style.css
   ============================================================ */

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

:root {
  --primary: #b5161e;
  --primary-dim: #a40113;
  --secondary: #755700;
  --surface: #fff4f4;
  --on-surface: #4d2129;
  --on-surface-variant: #824c54;
  --surface-container: #ffe1e4;
  --surface-container-high: #ffd9dd;
  --surface-container-highest: #ffd2d7;
  --surface-container-low: #ffeced;
  --surface-container-lowest: #ffffff;
  --background: #fff4f4;
  --on-background: #4d2129;
  --secondary-container: #ffca4d;
  --on-secondary-container: #5c4400;
  --font-headline: "Plus Jakarta Sans", sans-serif;
  --font-body: "Be Vietnam Pro", sans-serif;
}

html { font-size: 16px; }

body {
  background-color: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* --- Utilities --- */
.hidden { display: none !important; }
.flex-row-gap { display: flex; align-items: center; gap: 0.75rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-12 > * + * { margin-top: 3rem; }
.text-primary { color: var(--primary); }
.text-green-500 { color: #22c55e; }
.text-green-600 { color: #16a34a; }
.text-neutral-400 { color: #9ca3af; }
.text-neutral-500 { color: #6b7280; }
.w-full { width: 100%; }
.overflow-x-auto { overflow-x: auto; }
.text-center { text-align: center; }
.text-right { text-right: right; }
.text-left { text-align: left; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.bg-neutral-50 { background-color: #f9fafb; }
.text-2xs { font-size: 0.625rem; }
.tracking-widest { letter-spacing: 0.25em; }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.w6 { width: 1.5rem; } .h6 { height: 1.5rem; }
.w5 { width: 1.25rem; } .h5 { height: 1.25rem; }
.w4 { width: 1rem; } .h4 { height: 1rem; }
.w3-5 { width: 0.875rem; } .h3-5 { height: 0.875rem; }
.w3h3 { width: 0.875rem; height: 0.875rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-8 { padding-top: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.flex-grow { flex: 1; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.relative { position: relative; }
.text-3xl { font-size: 1.875rem; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.bg-white { background-color: #ffffff; }
.divide-y-neutral > * + * { border-top: 1px solid #f5f5f5; }
.border-t { border-top: 1px solid #e5e7eb; }
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fill-white { fill: #ffffff; }
.rounded-2xl { border-radius: 1rem; }
.shadow-card { box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.border-card { border: 1px solid #f3f4f6; }
.p-8 { padding: 2rem; }
.overflow-hidden { overflow: hidden; }
.bg-surface { background-color: var(--surface); }
.font-body { font-family: var(--font-body); }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-60 { z-index: 60; }
.backdrop-blur-md { backdrop-filter: blur(12px); }
.fixed { position: fixed; }
.bg-black-60 { background-color: rgba(0,0,0,0.6); }
.w3-5 { width: 0.875rem; }
.h3-5 { height: 0.875rem; }
.fill-amber-500 { fill: #f59e0b; }
.text-amber-500 { color: #f59e0b; }
.w3 { width: 0.75rem; } .h3 { height: 0.75rem; }
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-weight: 900;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}
.btn-primary:hover { background-color: var(--primary-dim); }
.btn-primary:active { transform: scale(0.95); }
.btn-full { width: 100%; justify-content: center; }
.shadow-red { box-shadow: 0 20px 40px rgba(185,28,28,0.2); }
.px-login { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-login { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.btn-checkout {
  padding: 1.25rem 0;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  box-shadow: 0 25px 50px -12px rgba(185,28,28,0.25);
}

/* --- Toast --- */
.toast {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 1rem 1.5rem;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 320px;
  backdrop-filter: blur(12px);
  animation: toastIn 0.3s ease;
  border: 1px solid transparent;
}
.toast-success { background-color: rgba(34,197,94,0.9); color: #fff; border-color: rgba(74,222,128,0.6); }
.toast-error { background-color: rgba(244,63,94,0.9); color: #fff; border-color: rgba(251,113,133,0.6); }
.toast span { font-weight: 700; font-size: 0.875rem; flex: 1; }
.toast button { background: none; border: none; cursor: pointer; padding: 0.25rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center; }
.toast button:hover { background-color: rgba(255,255,255,0.2); }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-30px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
#toast-container { pointer-events: none; }
.toast { pointer-events: all; }

/* --- Auth View --- */
.auth-bg {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(circle at 20% 20%, #ffca4d 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, #ff766d 0%, transparent 50%),
              var(--surface);
}
.auth-card {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  width: 100%;
  max-width: 448px;
  border-radius: 3rem;
  padding: 2.5rem;
  box-shadow: 0 32px 64px rgba(77,33,41,0.15);
  border: 1px solid rgba(255,255,255,0.5);
  position: relative;
}
.auth-back-btn {
  position: absolute;
  left: 2rem;
  top: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-back-btn:hover { background-color: #f3f4f6; }
.icon-variant { color: var(--on-surface-variant); }
.auth-header { padding-top: 1rem; margin-bottom: 2rem; }
.auth-title {
  font-size: 2.25rem;
  font-weight: 900;
  font-style: italic;
  color: #991b1b;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-family: var(--font-headline);
}
.auth-subtitle { color: var(--on-surface-variant); font-weight: 500; margin-top: 0.5rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.field-group { display: flex; flex-direction: column; gap: 0.5rem; }
.field-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #9ca3af;
  padding-left: 1rem;
}
.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: #9ca3af;
  pointer-events: none;
}
.text-input {
  background-color: rgba(243,244,246,0.5);
  border: 2px solid transparent;
  border-radius: 1rem;
  padding: 1rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--on-surface);
  transition: border-color 0.2s, background-color 0.2s;
  outline: none;
}
.text-input:focus { border-color: var(--primary); background-color: #fff; }
.pl-input { padding-left: 3rem; }
.auth-mode-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--on-surface-variant);
  font-weight: 700;
  font-size: 0.875rem;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: color 0.2s;
}
.auth-mode-toggle:hover { color: var(--primary); }

/* --- Admin View --- */
.admin-header {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.admin-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #991b1b;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  font-family: var(--font-headline);
}
.admin-nav-tabs { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.admin-nav-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
  font-family: var(--font-body);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--on-surface-variant);
  transition: background-color 0.2s, color 0.2s;
}
.admin-nav-btn:hover { background-color: #f3f4f6; }
.admin-nav-btn.active-tab { background-color: var(--primary); color: #fff; }
.border-btn { border: 1px solid #e5e7eb; }
.admin-logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--on-surface-variant);
  transition: color 0.2s;
}
.admin-logout-btn:hover { color: #dc2626; }
.admin-main { padding: 1.5rem; max-width: 72rem; margin: 0 auto; }
.admin-tab-content { }
.section-title { font-size: 1.5rem; font-weight: 700; }
.section-title-italic {
  font-size: 1.5rem;
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  color: var(--on-surface);
  font-family: var(--font-headline);
}
.admin-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.admin-product-card {
  background: #fff;
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #f3f4f6;
  display: flex;
  gap: 1rem;
  transition: box-shadow 0.2s;
}
.admin-product-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.admin-product-card img { width: 5rem; height: 5rem; object-fit: cover; border-radius: 0.75rem; background: #f3f4f6; flex-shrink: 0; }
.admin-product-info { flex: 1; }
.admin-product-info h4 { font-size: 1.125rem; font-weight: 700; }
.admin-product-info .cat { font-size: 0.75rem; color: #9ca3af; font-weight: 500; margin-bottom: 0.25rem; }
.admin-product-info .desc { font-size: 0.625rem; color: #9ca3af; font-style: italic; margin-bottom: 0.5rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.admin-product-info .price { color: var(--primary); font-weight: 900; }
.admin-product-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.icon-btn-edit { color: #9ca3af; padding: 0.5rem; background-color: #f9fafb; border-radius: 0.5rem; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color 0.2s, background-color 0.2s; }
.icon-btn-edit:hover { color: var(--primary); background-color: #f3f4f6; }
.icon-btn-delete { color: #f87171; padding: 0.5rem; background-color: #f9fafb; border-radius: 0.5rem; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: color 0.2s, background-color 0.2s; }
.icon-btn-delete:hover { color: #dc2626; background-color: #fff1f2; }
.icon-btn-neutral { background-color: #f3f4f6; border: none; cursor: pointer; padding: 0.5rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s; }
.icon-btn-neutral:hover { background-color: #e5e7eb; }
.admin-order-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #f3f4f6;
}
.admin-order-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.admin-order-meta p:first-child { font-size: 0.75rem; color: #9ca3af; font-family: monospace; margin-bottom: 0.25rem; }
.admin-order-meta h4 { font-weight: 700; font-size: 1.125rem; }
.admin-order-meta p:last-child { font-size: 0.875rem; color: #6b7280; }
.admin-order-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.btn-complete { background-color: #dcfce7; color: #15803d; padding: 0.5rem 1rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 700; font-family: var(--font-body); border: none; cursor: pointer; display: flex; align-items: center; gap: 0.25rem; }
.btn-complete:hover { background-color: #bbf7d0; }
.btn-cancel-order { background-color: #fee2e2; color: #b91c1c; padding: 0.5rem 1rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 700; font-family: var(--font-body); border: none; cursor: pointer; display: flex; align-items: center; gap: 0.25rem; }
.btn-cancel-order:hover { background-color: #fecaca; }
.status-badge { padding: 0.5rem 1rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.status-pending { background-color: #fef3c7; color: #92400e; }
.status-completed { background-color: #16a34a; color: #fff; }
.status-cancelled { background-color: #4b5563; color: #fff; }
.order-items-section { border-top: 1px solid #f3f4f6; padding-top: 1rem; }
.order-item-row { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 0.25rem 0; }
.order-total-row { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #f3f4f6; }
.order-total-row span:first-child { font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: #9ca3af; }
.order-total-row span:last-child { font-size: 1.25rem; font-weight: 900; color: var(--primary); }
/* Revenue */
.revenue-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.revenue-card { background: #fff; padding: 1.5rem; border-radius: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06); border: 1px solid #f3f4f6; }
.revenue-icon { display: inline-flex; padding: 0.75rem; border-radius: 1rem; }
.revenue-icon.green { background-color: #f0fdf4; color: #16a34a; }
.revenue-icon.amber { background-color: #fffbeb; color: #d97706; }
.revenue-icon.rose { background-color: #fff1f2; color: #e11d48; }
.revenue-label { font-size: 0.875rem; color: #9ca3af; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; }
.revenue-value { font-size: 1.875rem; font-weight: 900; color: var(--on-background); }
.table-header { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: #9ca3af; border-bottom: 1px solid #f3f4f6; }
.th-cell { padding: 1rem 0.5rem; font-weight: 600; }
.th-cell-lg { padding: 1.5rem 2rem; font-weight: 600; }
.revenue-row td { padding: 1rem 0.5rem; border-bottom: 1px solid #f9fafb; }
.revenue-row:last-child td { border-bottom: none; }
.revenue-row:hover td { background-color: rgba(249,250,251,0.5); }
.revenue-row td:first-child { font-family: monospace; font-size: 0.75rem; }
.revenue-row td:last-child { text-align: right; font-weight: 900; color: #16a34a; }
/* Users table */
.users-row td { padding: 1.5rem 2rem; }
.users-row:hover td { background-color: rgba(249,250,251,0.3); }
.users-row td:first-child { display: flex; align-items: center; gap: 1rem; }
.user-initial { width: 2.5rem; height: 2.5rem; border-radius: 9999px; background-color: #f3f4f6; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--primary); flex-shrink: 0; }
.role-badge { padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; }
.role-admin { background-color: #fef3c7; color: #92400e; }
.role-user { background-color: #f3f4f6; color: #6b7280; }
.icon-btn-del-user { padding: 0.75rem; color: #f87171; border: none; background: none; cursor: pointer; border-radius: 1rem; transition: color 0.2s, background-color 0.2s; display: flex; align-items: center; justify-content: center; }
.icon-btn-del-user:hover { color: #dc2626; background-color: #fff1f2; }
/* Product Form Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.modal-box { background: #fff; width: 100%; max-width: 448px; border-radius: 2.5rem; padding: 2rem; }
.modal-title { font-size: 1.5rem; font-weight: 900; text-transform: uppercase; letter-spacing: -0.04em; }
.img-upload-btn { background-color: #f3f4f6; padding: 0.75rem 1rem; border-radius: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s; }
.img-upload-btn:hover { background-color: #e5e7eb; }

/* --- Main Header --- */
.main-header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(255,244,244,0.8);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(77,33,41,0.06);
}
.brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.04em;
  color: #991b1b;
  text-transform: uppercase;
  font-family: var(--font-headline);
}
.icon-btn-red { background: none; border: none; cursor: pointer; color: #b91c1c; padding: 0.5rem; border-radius: 9999px; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s; }
.icon-btn-red:hover { background-color: rgba(255,241,242,0.5); }
.admin-badge-btn {
  margin-left: 1rem;
  background-color: #fef3c7;
  color: #b45309;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border: 1px solid #fde68a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color 0.2s;
}
.admin-badge-btn:hover { background-color: #fde68a; }
.cart-header-btn { padding: 0.75rem; background-color: var(--surface-container-high); border-radius: 9999px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background-color 0.2s; position: relative; }
.cart-header-btn:hover { background-color: #ffd2d7; }
.cart-badge { position: absolute; top: -4px; right: -4px; background-color: var(--primary); color: #fff; font-size: 0.625rem; font-weight: 900; width: 1.25rem; height: 1.25rem; display: flex; align-items: center; justify-content: center; border-radius: 9999px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); border: 2px solid #fff; }
.avatar-btn { width: 2.5rem; height: 2.5rem; border-radius: 9999px; background-color: var(--surface-container-high); overflow: hidden; border: 2px solid var(--surface-container); cursor: pointer; }

/* --- Main Content --- */
.main-content { margin-top: 6rem; padding: 0 1.5rem; max-width: 80rem; margin-left: auto; margin-right: auto; padding-bottom: 8rem; margin-top: 6rem; }

/* --- Hero --- */
.hero-section { background: #fff; border-radius: 3rem; padding: 2.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04); border: 1px solid #f3f4f6; overflow: hidden; position: relative; margin-bottom: 1rem; margin-top: 1rem; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
}
.hero-text { }
.hero-badge { color: var(--primary); font-weight: 900; text-transform: uppercase; letter-spacing: 0.3em; font-size: 0.625rem; }
.hero-heading { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; color: var(--on-background); text-transform: uppercase; font-style: italic; line-height: 0.95; letter-spacing: -0.04em; font-family: var(--font-headline); margin-top: 1rem; }
.hero-desc { color: var(--on-surface-variant); line-height: 1.7; font-weight: 500; font-size: 0.9rem; margin-top: 1rem; }
.hero-img-wrap { position: relative; }
.hero-blur-bg { position: absolute; inset: 0; background: rgba(181,22,30,0.05); border-radius: 9999px; transform: scale(1.1); filter: blur(48px); opacity: 0.5; }
.hero-img { width: 100%; height: 400px; object-fit: cover; border-radius: 2.5rem; box-shadow: 0 25px 60px rgba(0,0,0,0.15); position: relative; z-index: 1; transition: transform 0.5s; }
.hero-img:hover { transform: rotate(2deg); }

/* --- Search --- */
.search-wrap { position: relative; margin-top: 1.5rem; }
.search-icon { position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%); width: 1.25rem; height: 1.25rem; color: #9ca3af; pointer-events: none; }
.search-input { width: 100%; background: #fff; border: 1px solid #f3f4f6; border-radius: 9999px; padding: 1rem 1rem 1rem 3.5rem; font-family: var(--font-body); font-weight: 500; font-size: 0.95rem; color: var(--on-surface); outline: none; transition: box-shadow 0.2s, border-color 0.2s; }
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(181,22,30,0.1); }

/* --- Categories --- */
.category-scroll { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 1rem; padding-top: 0.5rem; margin-top: 1rem; }
.cat-btn { flex-shrink: 0; padding: 0.875rem 2rem; border-radius: 9999px; font-weight: 900; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; display: flex; align-items: center; gap: 0.5rem; transition: all 0.3s; cursor: pointer; border: 1px solid #f3f4f6; background: #fff; color: #9ca3af; font-family: var(--font-body); }
.cat-btn.active { background-color: var(--primary); color: #fff; transform: scale(1.05); box-shadow: 0 20px 40px rgba(181,22,30,0.15); border-color: var(--primary); }
.cat-btn:hover:not(.active) { border-color: rgba(181,22,30,0.3); color: var(--primary); }

/* --- Menu --- */
.menu-header { display: flex; justify-content: space-between; align-items: flex-end; }
.menu-title { font-size: 1.5rem; font-weight: 900; color: var(--on-background); letter-spacing: -0.04em; text-transform: uppercase; font-style: italic; font-family: var(--font-headline); }
.menu-underline { height: 6px; width: 4rem; background: var(--primary); border-radius: 9999px; margin-top: 6px; box-shadow: 0 4px 12px rgba(185,28,28,0.2); }
.explore-btn { font-size: 0.75rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.15em; background: var(--surface-container-high); border: none; cursor: pointer; padding: 0.5rem 1rem; border-radius: 9999px; color: var(--on-surface); font-family: var(--font-body); }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (min-width: 1024px) { .menu-grid { grid-template-columns: repeat(4, 1fr); } }
.menu-card { display: flex; flex-direction: column; cursor: pointer; }
.menu-card-img-wrap { background-color: var(--surface-container-low); border-radius: 2rem; padding: 1rem; position: relative; height: 12rem; margin-bottom: 1rem; transition: all 0.3s; border: 1px solid transparent; overflow: hidden; }
.menu-card:hover .menu-card-img-wrap { box-shadow: 0 20px 40px rgba(0,0,0,0.1); background: #fff; border-color: rgba(181,22,30,0.05); }
.menu-card-img-wrap img { width: 100%; height: 100%; object-fit: contain; transform: translateY(-2rem) scale(1.1); transition: transform 0.5s; }
.menu-card:hover .menu-card-img-wrap img { transform: translateY(-2rem) scale(1.25); }
.menu-card-rating { position: absolute; top: 1rem; right: 1rem; background: rgba(255,255,255,0.9); backdrop-filter: blur(8px); padding: 0.25rem 0.5rem; border-radius: 9999px; font-size: 0.625rem; font-weight: 700; color: #f59e0b; display: flex; align-items: center; gap: 0.25rem; box-shadow: 0 2px 4px rgba(0,0,0,0.06); }
.menu-card-info { padding: 0 0.25rem; }
.menu-card-name { font-family: var(--font-headline); font-weight: 700; font-size: 1.125rem; color: var(--on-background); line-height: 1.2; }
.menu-card-desc { color: var(--on-surface-variant); font-size: 0.75rem; font-style: italic; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; margin-top: 0.25rem; }
.menu-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 0.5rem; }
.menu-card-price { color: var(--primary); font-weight: 900; font-size: 1.25rem; font-style: italic; letter-spacing: -0.04em; }
.menu-card-add { background: rgba(181,22,30,0.05); color: var(--primary); padding: 0.625rem; border-radius: 9999px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.04); }
.menu-card-add:hover { background: var(--primary); color: #fff; }
.menu-card-add:active { transform: scale(0.9); }

/* --- Orders Tab --- */
.orders-title { font-size: 1.5rem; font-weight: 900; color: var(--on-background); font-family: var(--font-headline); text-transform: uppercase; font-style: italic; }
.order-user-card { background: #fff; padding: 1.5rem; border-radius: 2.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04); border: 1px solid #f3f4f6; display: flex; justify-content: space-between; align-items: center; transition: box-shadow 0.2s; }
.order-user-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.order-user-left { display: flex; gap: 1rem; align-items: center; }
.order-icon-wrap { padding: 0.75rem; border-radius: 1rem; }
.order-icon-wrap.completed { background-color: #dcfce7; color: #16a34a; }
.order-icon-wrap.pending { background-color: #fef3c7; color: #d97706; }
.order-icon-wrap.cancelled { background-color: #f3f4f6; color: #9ca3af; }
.order-user-info h4 { font-weight: 700; }
.order-user-info .date { font-size: 0.75rem; color: #9ca3af; font-weight: 500; }
.order-user-info .total { color: var(--primary); font-weight: 900; margin-top: 0.25rem; }
.order-status-badge { padding: 0.625rem 1.25rem; border-radius: 9999px; font-size: 0.625rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.2em; }
.order-status-badge.completed { background-color: #16a34a; color: #fff; box-shadow: 0 8px 16px rgba(22,163,74,0.2); }
.order-status-badge.pending { background-color: #fbbf24; color: #451a03; box-shadow: 0 8px 16px rgba(251,191,36,0.15); }
.order-status-badge.cancelled { background-color: #e5e7eb; color: #6b7280; }
.orders-empty { padding: 5rem 0; text-align: center; color: #9ca3af; font-weight: 500; font-style: italic; }

/* --- Profile Tab --- */
.profile-tab { display: flex; flex-direction: column; align-items: center; padding: 2.5rem 0; gap: 2rem; }
.profile-avatar-wrap { position: relative; display: inline-block; }
.profile-avatar { width: 9rem; height: 9rem; border-radius: 9999px; background: var(--surface-container-high); overflow: hidden; border: 4px solid #fff; box-shadow: 0 20px 50px rgba(185,28,28,0.15); }
.profile-star-badge { position: absolute; bottom: -0.5rem; right: -0.5rem; background: var(--primary); color: #fff; padding: 0.5rem; border-radius: 9999px; z-index: 2; box-shadow: 0 4px 8px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; }
.profile-name { font-size: 1.875rem; font-weight: 900; color: var(--on-background); font-style: italic; text-transform: uppercase; font-family: var(--font-headline); }
.profile-subtitle { color: var(--on-surface-variant); font-weight: 700; font-size: 0.875rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.6; }
.logout-btn { background-color: #f3f4f6; color: #4b5563; padding: 1rem 2.5rem; border-radius: 9999px; font-weight: 900; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.2em; border: none; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: background-color 0.2s, color 0.2s; font-family: var(--font-body); }
.logout-btn:hover { background-color: #fff1f2; color: #dc2626; }
.logout-btn:active { transform: scale(0.95); }

/* --- Cart Panel --- */
.cart-panel {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: 100%;
  max-width: 448px;
  background: #fff;
  z-index: 70;
  padding: 2rem;
  overflow-y: auto;
  box-shadow: -20px 0 80px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}
.cart-closed { transform: translateX(100%); }
.cart-open { transform: translateX(0); }
.cart-title { font-size: 1.875rem; font-weight: 900; color: var(--on-background); font-style: italic; text-transform: uppercase; letter-spacing: -0.04em; line-height: 1; font-family: var(--font-headline); }
.cart-clear-btn { font-size: 0.625rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.15em; color: #9ca3af; background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: 0.25rem; transition: color 0.2s; }
.cart-clear-btn:hover { color: var(--primary); }
.cart-items-wrap { flex: 1; overflow-y: auto; padding-right: 0.5rem; }
.cart-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1.5rem; opacity: 0.3; }
.cart-empty-icon { width: 6rem; height: 6rem; background-color: #fff1f2; border-radius: 9999px; display: flex; align-items: center; justify-content: center; }
.cart-empty p { font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.75rem; }
.cart-empty button { color: var(--primary); background: none; border: none; cursor: pointer; font-weight: 900; font-size: 0.75rem; text-transform: uppercase; border-bottom: 2px solid var(--primary); padding-bottom: 0.25rem; font-family: var(--font-body); }
.cart-item { display: flex; gap: 1rem; align-items: center; background: rgba(249,250,251,0.5); padding: 1rem; border-radius: 1.5rem; border: 1px solid transparent; transition: border-color 0.2s; }
.cart-item:hover { border-color: #f3f4f6; }
.cart-item + .cart-item { margin-top: 1.5rem; }
.cart-item img { width: 5rem; height: 5rem; object-fit: cover; border-radius: 1rem; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.06); flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-weight: 700; font-size: 1rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.cart-item-info .price { color: var(--primary); font-weight: 900; font-size: 0.875rem; font-style: italic; }
.cart-item-controls { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.qty-ctrl { display: flex; align-items: center; gap: 0.75rem; background: #fff; padding: 0.375rem 0.75rem; border-radius: 9999px; font-weight: 900; border: 1px solid #f3f4f6; box-shadow: 0 2px 4px rgba(0,0,0,0.04); font-size: 0.875rem; }
.qty-btn { background: none; border: none; cursor: pointer; color: #9ca3af; font-weight: 900; font-size: 1rem; font-family: var(--font-body); transition: color 0.2s; }
.qty-btn:hover { color: var(--primary); }
.qty-num { width: 1rem; text-align: center; }
.cart-remove-btn { color: #fca5a5; background: none; border: none; cursor: pointer; font-size: 0.5625rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.15em; display: flex; align-items: center; gap: 0.25rem; transition: color 0.2s; font-family: var(--font-body); }
.cart-remove-btn:hover { color: #dc2626; }

/* --- Bottom Nav --- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; width: 100%;
  z-index: 50;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 1rem 1rem 2rem;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(40px);
  border-radius: 3.5rem 3.5rem 0 0;
  box-shadow: 0 -15px 60px rgba(0,0,0,0.08);
  border-top: 1px solid rgba(245,245,245,0.5);
}
.nav-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.75rem; border-radius: 9999px; background: none; border: none; cursor: pointer; transition: all 0.3s; position: relative; }
.nav-label { font-size: 0.625rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.375rem; line-height: 1; }
.active-home { background-color: var(--primary); color: #fff; transform: scale(1.1); box-shadow: 0 20px 40px rgba(181,22,30,0.25); padding-left: 1.5rem; padding-right: 1.5rem; }
.nav-orders-default { color: #d1d5db; }
.nav-orders-default:hover { color: #9ca3af; }
.nav-orders-active { background-color: #fbbf24; color: #451a03; box-shadow: 0 16px 32px rgba(251,191,36,0.15); transform: scale(1.05); }
.nav-cart-btn { background-color: #f3f4f6; color: #6b7280; }
.nav-cart-btn:hover { background-color: #e5e7eb; }
.nav-cart-btn:active { transform: scale(0.9); }
.nav-profile-default { color: #d1d5db; }
.nav-profile-default:hover { color: #9ca3af; }
.nav-profile-active { background-color: #4f46e5; color: #fff; box-shadow: 0 16px 32px rgba(79,70,229,0.15); transform: scale(1.05); }
.cart-badge-nav { position: absolute; top: -4px; right: -4px; width: 1.5rem; height: 1.5rem; background-color: var(--primary); color: #fff; font-size: 0.625rem; font-weight: 900; border-radius: 9999px; display: flex; align-items: center; justify-content: center; border: 3px solid #fff; box-shadow: 0 4px 8px rgba(0,0,0,0.15); }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #d1d5db; }

/* Profile tab centering */
#tab-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  gap: 2rem;
}
#tab-profile.hidden { display: none !important; }

/* Fix for main-content margin-top override */
.main-content {
  margin-top: 0;
  padding-top: 6rem;
}

/* Rounded card */
.rounded-card { border-radius: 2.5rem; }

/* ============================================================
   Bổ sung cho phiên bản ASP.NET Core MVC
   ============================================================ */

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  height: 100%;
  width: 100%;
  max-width: 320px;
  background: #fff;
  z-index: 80;
  padding: 2rem;
  overflow-y: auto;
  box-shadow: 20px 0 80px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}
.sidebar-closed { transform: translateX(-100%); }
.sidebar-open { transform: translateX(0); }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 1.25rem;
  font-weight: 700;
  color: var(--on-surface-variant);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.sidebar-link:hover { background-color: var(--surface-container-low); color: var(--primary); }

/* --- News cards --- */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-card {
  background: #fff;
  border-radius: 2rem;
  overflow: hidden;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.news-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,0.1); transform: translateY(-4px); }
.news-card-img { position: relative; height: 11rem; overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-cat {
  position: absolute; top: 1rem; left: 1rem;
  background: var(--primary); color: #fff;
  padding: 0.25rem 0.875rem; border-radius: 9999px;
  font-size: 0.625rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.15em;
}
.news-card-body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.news-card-title { font-family: var(--font-headline); font-weight: 700; font-size: 1.05rem; color: var(--on-background); line-height: 1.3; }
.news-card-excerpt { color: var(--on-surface-variant); font-size: 0.8rem; line-height: 1.6; }
.news-card-date { font-size: 0.7rem; color: #9ca3af; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }

/* --- News detail --- */
.news-detail { max-width: 760px; margin: 0 auto; }
.news-detail-img { margin-top: 1.5rem; border-radius: 2.5rem; overflow: hidden; box-shadow: 0 25px 60px rgba(0,0,0,0.12); }
.news-detail-img img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.news-detail-content { margin-top: 2rem; color: var(--on-surface); line-height: 1.9; font-size: 1rem; }
.news-detail-content p + p { margin-top: 1rem; }

/* --- Contact --- */
.contact-card {
  background: #fff;
  border-radius: 2.5rem;
  padding: 2rem;
  border: 1px solid #f3f4f6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
