/* =========================================
   Premium AI QR Menu SaaS UI Kit
   Mobile-first, modern, lightweight
   ========================================= */

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f0f4ff;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --accent: #22c55e;
  --warning: #f97316;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.06);
  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Layout */
.app {
  min-height: 100vh;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.page {
  padding: 24px 0 80px;
}

.with-bottom-bar .page {
  padding-bottom: 240px;
}

@media (max-width: 900px) {
  .page {
    padding-top: 0;
  }

  .page > .section:first-child,
  .page header.section {
    margin-top: 0;
  }

  .header-top {
  margin-top: 14px;
  }

  .menu-card .img {
    height: 230px;
  }

  .img-row .img {
    height: 230px;
  }
}

.section {
  margin-top: 18px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-2 > .card {
  min-width: 0;
}

.grid-2 .full-span {
  grid-column: 1 / -1;
}

[data-page="admin-ai"] .grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  [data-page="admin-ai"] .grid-2 {
    grid-template-columns: 1fr;
  }
}

.grid-1 {
  grid-template-columns: 1fr;
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ai-vitrine .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .ai-vitrine .card {
    min-width: 0;
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.title {
  font-size: 20px;
  margin: 0 0 4px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--brand);
  font-weight: 600;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--brand);
}

.tag.green {
  background: #dcfce7;
  color: #15803d;
}

.tag.orange {
  background: #ef4444;
  color: #ffffff;
}

.tag.red {
  background: #fee2e2;
  color: #b91c1c;
}

.btn {
  border: none;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 1px solid rgba(79, 70, 229, 0.35);
  box-shadow: none;
}

.btn-ghost {
  background: #f1f5f9;
  color: #0f172a;
  box-shadow: none;
}

.btn-accent {
  background: #22c55e;
  color: #ffffff;
}

button[data-add-card] {
  background: #16a34a;
  color: #ffffff;
}

button[data-add-card]:hover {
  background: #15803d;
}

.btn-danger {
  background: var(--danger);
}

.input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  font-size: 14px;
}

.input:focus {
  outline: 2px solid rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.6);
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
}

.filter-panel {
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.15);
  display: grid;
  gap: 12px;
}

.filter-panels-row {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.filter-panel.compact {
  align-content: start;
}

.filter-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  padding: 6px 0;
}

.filter-toggle-icon {
  transition: transform 0.2s ease;
}

.filter-panel.is-collapsed .filter-toggle-icon {
  transform: rotate(-90deg);
}

.filter-content {
  display: grid;
  gap: 12px;
}

.filter-panel.is-collapsed .filter-content {
  display: none;
}

.filter-row {
  display: grid;
  gap: 10px;
}

.filter-row.inline {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.filter-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 12px;
  background: #fff;
}

.filter-chip input {
  accent-color: var(--brand);
}

.range {
  width: 100%;
}

.range-row {
  display: grid;
  gap: 8px;
}

.range-row.inline {
  grid-template-columns: 1fr 1fr;
}

.range-values {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.search input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
}

.chip-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}

.chip-row-wrap {
  display: grid;
  gap: 10px;
}

.chip-row-wrap .chip-row {
  width: 100%;
}

.chip-nav {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #fff;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chip-nav:active {
  transform: scale(0.98);
}

.chip-row::-webkit-scrollbar {
  height: 0;
}

.chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 15px;
  text-transform: uppercase;
  font-weight: 700;
  scroll-snap-align: start;
  cursor: pointer;
}

.chip-row-emphasis {
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.16);
}

.chip-row-emphasis .chip {
  padding: 10px 18px;
  font-size: 15px;
  border-color: rgba(99, 102, 241, 0.2);
}

.chip-row-emphasis .chip.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.chip-row-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.3px;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
}

.chip.active {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

.top-slider {
  margin-top: 16px;
}

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chip-header {
  justify-content: center;
  gap: 14px;
}

.chip-header .title {
  text-align: center;
  margin: 0;
}

.chip-header .slider-btn {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid #1d4ed8;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
  font-size: 16px;
}

.chip-header .slider-btn:hover {
  background: #1d4ed8;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.35);
}

@media (max-width: 640px) {
  .top-slider .slider-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 6px;
  }

  .top-slider .slide {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }

  .top-slider .slider-track::-webkit-scrollbar {
    height: 0;
  }
}

.slider-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.slider-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #fff;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.slider-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.slider-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.slider-track::-webkit-scrollbar {
  height: 0;
}

.slide {
  flex: 0 0 auto;
  min-width: 220px;
  background: linear-gradient(120deg, #ffffff, #f1f5ff);
  border-radius: 16px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
}

.top-slider .slider-track > .slide:only-child {
  flex: 0 0 calc((100% - 12px) / 2);
  max-width: calc((100% - 12px) / 2);
}

.slide[data-info-card],
.ai-vitrine[data-info-section] {
  cursor: pointer;
}

.slide[data-info-card]:hover,
.ai-vitrine[data-info-section]:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.slide-media {
  width: 100%;
  height: 90px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.slide-media video,
.menu-card .img video,
.product-modal-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.slide-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.05) 0%,
    rgba(15, 23, 42, 0.25) 100%
  );
}

.slide strong {
  display: block;
  margin-top: 6px;
}

.top-slider .slide .subtitle {
  color: var(--text);
  text-shadow: none;
}

.admin .top-slider .slide .subtitle {
  color: var(--text);
  text-shadow: none;
}

.login-slider .slide .subtitle {
  color: var(--text);
  text-shadow: none;
}
.hero-slider {
  margin-top: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: relative;
  min-height: 190px;
  padding: 16px;
  display: none;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.2) 0%,
    rgba(15, 23, 42, 0.7) 100%
  );
}

.hero-slide.active {
  display: flex;
}

.hero-slide .content {
  position: relative;
  z-index: 1;
  padding: 0;
}

.hero-slide .subtitle {
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(15, 23, 42, 0.35);
}

.hero-dots {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  text-decoration: none;
}

.social-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.social-icon:hover {
  opacity: 0.85;
}

.modal-card label .subtitle {
  color: #0f172a;
  font-weight: 700;
}

.featured-options {
  display: grid;
  gap: 10px;
}

.featured-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.featured-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #4f46e5;
}

.featured-option .subtitle {
  font-weight: 700;
}

.tag-field .subtitle {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.tag-field {
  display: block;
  width: 100%;
  margin-top: 8px;
}

.option-box {
  margin-top: 12px;
}

.option-box .label {
  display: block;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  cursor: pointer;
}

.option-chip.active {
  background: #4f46e5;
  color: #fff;
  border-color: transparent;
}

.cart-option {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.hero {
  background: linear-gradient(120deg, #eef2ff, #e0e7ff, #f5f3ff);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  top: -40px;
  right: -30px;
}

.menu-card {
  display: grid;
  gap: 8px;
}

.img-row {
  display: block;
}

.img-row .img {
  width: 100%;
}

.img-row .notice-pill {
  margin: 0;
}

.menu-card h3 {
  margin: 0;
}

.menu-card .subtitle {
  margin-top: -6px;
}

.menu-card .allergen-mini {
  margin-top: 4px;
}

.prep-time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

@media (max-width: 640px) {
  .prep-time {
    width: fit-content;
    align-self: flex-start;
  }
}

.prep-time .prep-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.menu-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.menu-title-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.menu-title-row .tag {
  margin: 0;
}

.menu-title-row .new-tag {
  background: #eef2ff;
  color: var(--brand);
}

.notice-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 600;
  width: fit-content;
  position: absolute;
  right: 10px;
  top: 5px;
  margin: 0;
}

.menu-card .price {
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, #4f46e5, #7c3aed);
  padding: 6px 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  font-size: 15px;
}

.menu-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.menu-card-footer .footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.menu-card-footer .prep-time {
  margin-top: 0;
}

.top-slider .menu-card-footer {
  margin-top: 8px;
  align-items: center;
}

.ai-vitrine .menu-card-footer {
  align-items: center;
}

.ai-vitrine .vitrine-label {
  color: #facc15;
  font-weight: 800;
}

.ai-vitrine .price {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 14px;
  border-radius: 999px;
  color: #ffffff;
}

.ai-vitrine .footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.ai-vitrine .pill-inline {
  margin: 0;
}

.ai-vitrine .vitrine-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.ai-vitrine .vitrine-title-row .pill {
  margin: 0;
}

.ai-vitrine .menu-card-footer .pill {
  position: relative;
  top: -6px;
}

.top-slider .price {
  box-shadow: var(--shadow-soft);
  background: #f97316;
  border: 1px solid #ea580c;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 999px;
}

.menu-card .img {
  height: 190px;
  border-radius: 14px;
  background: linear-gradient(120deg, #e2e8f0, #f8fafc);
  position: relative;
  overflow: hidden;
  background-position: center 70%;
  background-size: cover;
}

.menu-card .img::after {
  content: "🍽️";
  position: absolute;
  right: 12px;
  bottom: 6px;
  font-size: 22px;
  opacity: 0.7;
}

.allergen-mini {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  overflow-x: auto;
  padding-bottom: 4px;
  white-space: nowrap;
}

.allergen-mini::-webkit-scrollbar {
  height: 0;
}

.allergen-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.ai-vitrine {
  display: grid;
  gap: 12px;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.ai-vitrine::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  top: -60px;
  right: -60px;
}

.ai-vitrine .pill {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.vitrine-media {
  width: 100%;
  height: 110px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.ai-vitrine .grid-1 .card {
  width: 100%;
}

.ai-vitrine .grid-1 .vitrine-media {
  height: 180px;
}


.vitrine-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.05) 0%,
    rgba(15, 23, 42, 0.35) 100%
  );
}

.floating-chat {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 30;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(120deg, #4f46e5, #7c3aed);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bottom-area {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, rgba(246, 248, 251, 0.2), var(--bg));
  backdrop-filter: blur(8px);
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.nav-btn {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 12px 10px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  position: relative;
}

.nav-btn.active {
  background: var(--brand);
  color: #fff;
}

.nav-badge {
  position: absolute;
  top: 6px;
  right: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-weight: 700;
}

.nav-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  font-size: 13px;
}

.nav-search input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 13px;
  color: var(--text);
}

.float-badge {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.header-top .logo .title {
  font-size: 16px;
  margin-bottom: 2px;
  margin-top: -6px;
}

.header-top .logo .subtitle {
  font-size: 12px;
}

.logo span {
  background: var(--brand);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.category-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef2ff;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 640px) {
  .header-top {
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  .header-actions {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .header-actions .select-group {
    display: inline-flex;
    flex: 0 0 auto;
  }
}

.select {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
}

.select-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 10px;
  background: #fff;
}

.select-group .select {
  border: none;
  padding: 6px 4px;
  background: transparent;
}

.select-icon {
  font-size: 14px;
  color: var(--muted);
}

.select:focus {
  outline: 2px solid rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.6);
}

/* Admin layout */
.admin {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 240px 1fr;
  align-items: start;
}

.sidebar {
  background: #0f172a;
  color: #e2e8f0;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-content: start;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .logo span {
  background: #1d4ed8;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar a {
  color: inherit;
  padding: 6px 8px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2;
}

.sidebar a.active,
.sidebar a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.news-card {
  background: #ef4444 !important;
  color: #fff !important;
}

.news-card .title,
.news-card strong {
  color: #fff !important;
}

.news-card .subtitle {
  color: #fee2e2 !important;
}

.chart-card {
  overflow: hidden;
}

.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-title {
  font-size: 18px;
  font-weight: 700;
  fill: var(--text);
}

.chart-axis {
  font-size: 11px;
  fill: #64748b;
}

.chart-grid line {
  stroke: rgba(148, 163, 184, 0.35);
  stroke-dasharray: 6 6;
}

.chart-bg {
  fill: #ffffff;
  stroke: rgba(148, 163, 184, 0.2);
  stroke-width: 1;
}

.chart-bar {
  transform-box: fill-box;
  transform-origin: center bottom;
  transition: transform 0.2s ease;
}

.chart-bar:hover {
  transform: scaleY(1.05);
}

.product-thumb {
  width: 100%;
  height: 120px;
  border-radius: 14px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 600;
}

.admin .menu-card {
  padding: 12px;
}

[data-page="admin-products"] .grid-2 {
  justify-content: start;
}

[data-page="admin-products"] .grid-2 > .card {
  max-width: 520px;
  width: 100%;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: var(--surface);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar .admin-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e0e7ff;
  display: grid;
  place-items: center;
  color: var(--brand);
}

.content {
  padding: 20px 22px 80px;
}

.stat {
  display: grid;
  gap: 8px;
}

.stat .value {
  font-size: 22px;
  font-weight: 700;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  text-align: left;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
}

.table .status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  display: inline-block;
}

.status.active {
  background: #dcfce7;
  color: #15803d;
}

.status.passive {
  background: #fef3c7;
  color: #b45309;
}

.switch {
  width: 40px;
  height: 22px;
  background: #e2e8f0;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
}

.switch::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: transform 0.2s ease;
  box-shadow: var(--shadow-soft);
}

.switch.on {
  background: #22c55e;
}

.switch.on::after {
  transform: translateX(18px);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-card {
  width: min(480px, 92vw);
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.order-toast {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 45;
  padding: 20px;
}

.order-toast.active {
  display: flex;
}

.order-toast-card {
  width: min(420px, 90vw);
  background: #16a34a;
  color: #fff;
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 10px;
  text-align: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
}

.order-toast-card .subtitle {
  color: rgba(255, 255, 255, 0.9);
}

.order-toast-card .btn {
  background: #ffffff;
  color: #14532d;
}

.product-modal {
  width: min(520px, 92vw);
  display: grid;
  gap: 12px;
}

.info-modal {
  width: min(520px, 92vw);
  display: grid;
  gap: 12px;
}

.cart-modal {
  width: min(520px, 92vw);
  display: grid;
  gap: 12px;
}

.search-modal {
  width: min(520px, 92vw);
  display: grid;
  gap: 12px;
}

.cart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.cart-modal-body {
  display: grid;
  gap: 12px;
  background: #f8fafc;
  border-radius: 14px;
  padding: 10px;
}

.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}

.cart-item > div {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.cart-thumb {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background-color: #e2e8f0;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.cart-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.qty-value {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
  color: var(--text);
}

.remove-btn {
  border: none;
  background: transparent;
  color: var(--danger);
  font-size: 12px;
  cursor: pointer;
}

.cart-empty {
  color: var(--muted);
  font-size: 13px;
}

.cart-note {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.cart-note span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

.cart-note textarea {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  resize: vertical;
  font-family: inherit;
}

.cart-note textarea:focus {
  outline: 2px solid rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.6);
}

.cart-summary {
  display: grid;
  gap: 6px;
}

.cart-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-list-modern .cart-item {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px;
}

.cart-summary.modern {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px;
}

.cart-modal-footer {
  display: grid;
  gap: 10px;
}

.total-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.info-modal-media {
  width: 100%;
  height: 180px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.info-modal-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.05) 0%,
    rgba(15, 23, 42, 0.35) 100%
  );
}

.product-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-modal-media {
  width: 100%;
  height: 180px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.product-modal-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.05) 0%,
    rgba(15, 23, 42, 0.35) 100%
  );
}

.product-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.allergen-box {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.allergen-box .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}

.allergen-box .value {
  font-size: 13px;
  color: var(--text);
}

.placeholder {
  background: linear-gradient(120deg, #e2e8f0, #f8fafc);
  border-radius: 16px;
  min-height: 140px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
}

.premium {
  background: radial-gradient(circle at top left, #fdf4ff, #eef2ff);
  border: 1px dashed rgba(79, 70, 229, 0.5);
}

.badge-soft {
  background: #fef9c3;
  color: #a16207;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.2);
  margin: 12px 0;
}

.footer {
  margin-top: 24px;
  padding: 18px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: var(--muted);
  font-size: 13px;
}

.with-bottom-bar .footer {
  margin-bottom: 90px;
}

.footer.admin-footer {
  padding: 18px 22px 30px;
}

.footer.login-footer {
  width: min(420px, 92vw);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(120deg, #eef2ff, #f8fafc);
  padding: 20px;
}

.login-card {
  width: min(420px, 92vw);
  padding: 22px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.login-slider {
  width: min(420px, 92vw);
}

.login-actions {
  width: min(420px, 92vw);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Animations */
@keyframes floatUp {
  from {
    transform: translateY(8px);
    opacity: 0.9;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate {
  animation: floatUp 0.5s ease both;
}

/* Responsive */
@media (max-width: 900px) {
  .admin {
    grid-template-columns: 1fr;
  }

  .filter-panels-row {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .content {
    padding: 28px 32px 80px;
  }

  .page {
    padding: 32px 0 80px;
  }
}
