:root {
  --bg: #f4f1ec;
  --panel: #fffdf9;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #e7dfd3;
  --accent: #8f643f;
  --accent-dark: #6d492c;
  --danger: #b42318;
  --shadow: 0 16px 45px rgba(52, 35, 18, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
}
textarea { resize: vertical; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
td small { display: block; color: var(--muted); margin-top: 4px; max-width: 340px; }
code { background: #efe7dc; border-radius: 6px; padding: 3px 6px; }

.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.auth-card {
  width: min(420px, 100%);
  padding: 32px;
  display: grid;
  gap: 16px;
}
.auth-card h1, .auth-card p { margin: 0; }
.auth-card p, .muted { color: var(--muted); }
.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}
.brand-mark.large { width: 52px; height: 52px; font-size: 24px; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: #1f211f;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a, .ghost-button {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: inherit;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}
.logout-form { margin-top: auto; }
.main { padding: 28px; display: grid; gap: 22px; align-content: start; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.topbar h1 { margin: 0; font-size: 28px; letter-spacing: 0; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 800; }
.flash, .alert {
  padding: 12px 14px;
  background: #e7f6ee;
  border: 1px solid #b9e3cb;
  border-radius: 8px;
}
.alert { background: #fff3f0; border-color: #ffd2c8; }
.panel { padding: 20px; }
.panel h2 { margin: 0 0 16px; font-size: 20px; }
.grid.two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 22px; }
.form-grid, .settings-form, .product-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.inline-form {
  display: grid;
  grid-template-columns: 1.4fr .5fr 1fr auto auto auto;
  gap: 12px;
  align-items: end;
}
.wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; }
.button, .danger-button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  padding: 11px 16px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}
.button.secondary {
  background: white;
  color: var(--accent-dark);
  border: 1px solid var(--line);
}
.button.small, .danger-button { min-height: 34px; padding: 7px 10px; font-size: 13px; }
.button.full { width: 100%; }
.danger-button { background: #fff3f0; color: var(--danger); border: 1px solid #ffd2c8; }
.metric-row, .stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-row div, .stat {
  background: #f7f1e9;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.metric-row strong, .stat strong { display: block; font-size: 30px; }
.metric-row span, .stat span { color: var(--muted); }
.split-actions, .qr-panel { display: flex; justify-content: space-between; align-items: center; gap: 22px; }
.actions, .row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.thumb { width: 58px; height: 58px; object-fit: cover; border-radius: 8px; background: #eee; }
.badge-picker { display: flex; flex-wrap: wrap; gap: 9px; align-content: center; }
.qr-image { width: min(280px, 100%); border: 12px solid white; border-radius: 8px; box-shadow: var(--shadow); }

.public-menu { background: var(--menu-bg); min-height: 100vh; }
.menu-hero {
  min-height: 86vh;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: white;
}
.menu-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: rgba(0,0,0,var(--hero-overlay)); }
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px;
}
.hero-inner p { text-transform: uppercase; letter-spacing: 0; font-weight: 800; }
.hero-inner h1 {
  margin: 10px 0;
  font-size: clamp(48px, 10vw, 118px);
  color: var(--cafe-title);
  letter-spacing: 0;
}
.hero-inner span { display: block; font-size: 20px; margin-bottom: 26px; }
.hero-inner a {
  display: inline-flex;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  padding: 13px 20px;
  font-weight: 800;
}
.menu-body { max-width: 920px; margin: 0 auto; padding: 32px 18px 70px; }
.menu-contact, .featured-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.menu-contact a {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
}
.featured-strip article {
  min-width: 180px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.featured-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.featured-strip strong, .featured-strip span { display: block; margin-top: 8px; }
.public-category { margin-top: 28px; }
.category-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.category-heading img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; }
.category-heading p { margin: 0; color: var(--accent); font-weight: 800; text-transform: uppercase; font-size: 12px; }
.category-heading h2 { margin: 2px 0 0; font-size: 28px; }
.public-products { display: grid; gap: 10px; }
.public-products article {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  gap: 14px;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.public-products article > img { width: 82px; height: 82px; border-radius: 6px; object-fit: cover; }
.public-products h3, .public-products p { margin: 0; }
.public-products p { color: var(--muted); margin-top: 3px; }
.public-products strong { color: var(--accent); font-size: 18px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.badges span { background: #f3eadf; color: var(--accent-dark); padding: 4px 7px; border-radius: 999px; font-size: 12px; font-weight: 800; }

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 18px; }
  .topbar, .split-actions, .qr-panel { align-items: stretch; flex-direction: column; }
  .grid.two, .form-grid, .settings-form, .product-form, .stats-grid, .inline-form { grid-template-columns: 1fr; }
  .public-products article { grid-template-columns: 68px 1fr; }
  .public-products article > strong { grid-column: 2; }
}

.qrm-menu {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(250, 247, 241, .88), rgba(245, 239, 230, .96)),
    radial-gradient(circle at 20% 0, rgba(166, 124, 82, .18), transparent 28%),
    var(--menu-bg);
  color: #2c2418;
  font-family: "DM Sans", system-ui, sans-serif;
}

.qrm-sitebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(18px, calc((100vw - 1120px) / 2));
  background: rgba(13, 10, 7, .92);
  border-bottom: 1px solid rgba(220, 184, 130, .16);
  backdrop-filter: blur(16px);
}

.qrm-site-logo {
  font-family: "Playfair Display", Georgia, serif;
  color: #d3a968;
  font-size: 24px;
  font-weight: 700;
}

.qrm-sitebar nav {
  display: flex;
  gap: 18px;
}

.qrm-sitebar nav a {
  color: #eadfce;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.qrm-hero {
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(38, 26, 17, .92), rgba(110, 76, 45, .72)),
    #20170f;
}

.qrm-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qrm-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .24), rgba(0, 0, 0, .14) 34%, rgba(0, 0, 0, .58)),
    rgba(30, 22, 14, var(--hero-overlay));
}

.qrm-hero-top {
  position: absolute;
  top: 88px;
  left: max(20px, calc((100vw - 1120px) / 2));
  right: max(20px, calc((100vw - 1120px) / 2));
  z-index: 1;
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, .74);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.qrm-hero-content {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100% - 32px));
  text-align: center;
  color: white;
  padding: 24px 0;
}

.qrm-hero-content p {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .82);
}

.qrm-hero-content h1 {
  margin: 12px 0 14px;
  color: var(--cafe-title);
  font-size: clamp(50px, 12vw, 118px);
  font-weight: 700;
  line-height: .92;
  letter-spacing: 0;
  text-shadow: 0 18px 50px rgba(0, 0, 0, .36);
}

.qrm-hero-content i {
  display: block;
  width: 42px;
  height: 2px;
  margin: 0 auto 18px;
  background: rgba(255, 255, 255, .44);
}

.qrm-hero-content strong {
  display: block;
  margin-bottom: 34px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 19px;
  font-style: italic;
  font-weight: 600;
}

.qrm-hero-content a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 34px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
  color: white;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.qrm-menu-panel {
  width: min(900px, 100%);
  margin: 0 auto;
  background: #f7f1e8;
  box-shadow: 0 -22px 70px rgba(35, 22, 10, .12);
}

.qrm-contact-bar {
  position: sticky;
  top: 68px;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 22px;
  background: rgba(247, 241, 232, .94);
  border-bottom: 1px solid #e7d9c7;
  backdrop-filter: blur(14px);
}

.qrm-contact-bar > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.qrm-contact-bar > div:last-child {
  justify-content: flex-end;
}

.qrm-contact-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #e3d4bf;
  border-radius: 999px;
  background: #fffaf2;
  color: #5b4630;
  font-size: 12px;
  font-weight: 800;
}

.qrm-contact-bar a.whatsapp { color: #167640; }
.qrm-contact-bar a.maps { color: #a33b2d; }
.qrm-contact-bar a.instagram { color: #9c2f65; }
.qrm-contact-bar a.review { color: #8f5c0f; }

.qrm-contact-bar img,
.qrm-logo-fallback {
  width: 62px;
  height: 62px;
  border: 3px solid #e8d2ae;
  border-radius: 50%;
  background: #fffaf2;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(135, 91, 42, .16);
}

.qrm-logo-fallback {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  font-weight: 800;
}

.qrm-featured,
.qrm-categories {
  padding: 0 18px;
}

.qrm-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 0 16px;
  color: #8a745b;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.qrm-section-title::before,
.qrm-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #deccb8;
}

.qrm-section-title span {
  white-space: nowrap;
}

.qrm-featured-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 0 4px 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.qrm-featured-track::-webkit-scrollbar {
  display: none;
}

.qrm-featured-item {
  flex: 0 0 92px;
  scroll-snap-align: start;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 2px 0;
  text-align: center;
}

.qrm-featured-item div {
  width: 76px;
  height: 76px;
  border: 3px solid #e8d2ae;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #ead6b6, #9f7045);
  box-shadow: 0 8px 20px rgba(72, 46, 20, .12);
}

.qrm-featured-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qrm-featured-item div span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: white;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 34px;
  font-weight: 800;
}

.qrm-featured-item strong {
  width: 100%;
  min-height: 32px;
  color: #2d2419;
  font-size: 12px;
  line-height: 1.25;
}

.qrm-featured-item em {
  color: var(--accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.qrm-category {
  scroll-margin-top: 150px;
  margin-bottom: 12px;
  border: 1px solid #e5d3bc;
  border-radius: 8px;
  overflow: hidden;
  background: #fffaf2;
  box-shadow: 0 10px 30px rgba(75, 48, 20, .07);
}

.qrm-category[open] {
  border-color: #d8bc96;
  box-shadow: 0 16px 42px rgba(75, 48, 20, .12);
}

.qrm-category summary {
  position: relative;
  min-height: 122px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 18px 18px 22px;
  color: white;
  cursor: pointer;
  list-style: none;
  overflow: hidden;
}

.qrm-category summary::-webkit-details-marker {
  display: none;
}

.qrm-category-art {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #775635, #b68a5a);
}

.qrm-category-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 19, 12, .78), rgba(28, 19, 12, .42), rgba(28, 19, 12, .14));
}

.qrm-category-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qrm-category-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.qrm-category-copy small {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .68);
}

.qrm-category-copy strong {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  line-height: 1;
  color: white;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

.qrm-category-copy em {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.qrm-category summary b {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}

.qrm-category summary b::before,
.qrm-category summary b::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 2px;
  background: white;
  transform: translate(-50%, -50%);
}

.qrm-category summary b::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform .2s ease;
}

.qrm-category[open] summary b::after {
  transform: translate(-50%, -50%) rotate(0);
}

.qrm-products {
  display: grid;
  background: #fffaf2;
  animation: qrmProductsIn .22s ease;
}

@keyframes qrmProductsIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.qrm-product {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid #eee0d1;
  transition: background .18s ease;
}

.qrm-product:hover {
  background: rgba(166, 124, 82, .05);
}

.qrm-product-image {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #efe3d1, #caa16c);
}

.qrm-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qrm-product-image span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #8d643e;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  font-weight: 900;
}

.qrm-product-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.qrm-product-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.qrm-product h3 {
  margin: 0;
  color: #292018;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.qrm-product strong {
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.qrm-product p {
  margin: 0;
  color: #7c6b5b;
  font-size: 13px;
  line-height: 1.45;
}

.qrm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qrm-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.qrm-badge.vegan { background: #dff2e4; color: #1d6a3b; }
.qrm-badge.gluten-free { background: #fff0c8; color: #76520b; }
.qrm-badge.spicy { background: #ffe0db; color: #963226; }
.qrm-badge.new { background: #dfeaff; color: #284f9f; }
.qrm-badge.recommended { background: #fff5bf; color: #80570a; }
.qrm-badge.special { background: #ece4ff; color: #5a389d; }

.qrm-empty {
  margin: 0;
  padding: 22px;
  color: #8a745b;
  text-align: center;
}

.qrm-menu-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 34px 18px 48px;
  color: #9b846d;
  font-size: 12px;
}

.qrm-menu-footer span {
  font-weight: 900;
}

@media (min-width: 900px) {
  .qrm-menu-panel {
    margin-top: -54px;
    position: relative;
    z-index: 2;
    border: 1px solid #e3d2bc;
    border-radius: 8px 8px 0 0;
  }

  .qrm-featured-track {
    flex-wrap: wrap;
    overflow: visible;
  }

  .qrm-featured-item {
    flex-basis: 104px;
  }
}

@media (max-width: 640px) {
  .qrm-sitebar {
    height: 62px;
    padding: 0 16px;
  }

  .qrm-sitebar nav {
    display: none;
  }

  .qrm-site-logo {
    font-size: 22px;
  }

  .qrm-hero-top {
    top: 82px;
    left: 16px;
    right: 16px;
    font-size: 10px;
  }

  .qrm-hero-content h1 {
    font-size: clamp(48px, 18vw, 82px);
  }

  .qrm-hero-content strong {
    font-size: 17px;
  }

  .qrm-contact-bar {
    top: 62px;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    padding: 12px 12px;
  }

  .qrm-contact-bar a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 11px;
  }

  .qrm-contact-bar img,
  .qrm-logo-fallback {
    width: 54px;
    height: 54px;
  }

  .qrm-featured,
  .qrm-categories {
    padding: 0 12px;
  }

  .qrm-featured-item {
    flex-basis: 86px;
  }

  .qrm-featured-item div {
    width: 70px;
    height: 70px;
  }

  .qrm-category summary {
    min-height: 112px;
    padding: 16px 14px 16px 16px;
  }

  .qrm-category-copy strong {
    font-size: 24px;
  }

  .qrm-product {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 11px;
    padding: 12px;
  }

  .qrm-product-image {
    width: 58px;
    height: 58px;
  }

  .qrm-product h3,
  .qrm-product strong {
    font-size: 14px;
  }

  .qrm-product p {
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .qrm-contact-bar a {
    min-height: 31px;
    padding: 0 7px;
    font-size: 10px;
  }

  .qrm-product-top {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
