/* ============================================================
   LUGANO · Cardápio Digital — Design System
   Extraído pixel-a-pixel do handoff Claude Design (Lugano Cardapio.dc.html)
   Marca: Chocolate Lugano — Lauro de Freitas (Serra Gaúcha → Bahia)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* superfícies (chocolate/espresso) */
  --bg:          #19110A;
  --bg-2:        #16100A;
  --bg-3:        #150E08;
  --bg-top:      #1F140B;
  --card:        #221710;
  --card-2:      #1d150e;
  --inset:       #2A2018;
  --black:       #0E0A06;

  /* dourados */
  --gold:        #C79A4B;
  --gold-price:  #D8B062;
  --gold-deep:   #9c7c1e;

  /* texto */
  --cream:       #F4EADB;
  --cream-soft:  #F4EFE6;
  --body:        #C3B09A;
  --muted:       #A08A6E;
  --muted-2:     #9A876C;
  --muted-3:     #8A7763;
  --muted-4:     #73624E;
  --muted-5:     #6F5D49;

  /* superfície clara (review/desktop) */
  --paper:       #ECE4D8;
  --paper-2:     #DDD3C5;

  /* status */
  --green:       #1FA855;
  --green-soft:  #5FCB8A;
  --red:         #9A3B2A;
  --red-soft:    #E08A6E;
  --amber:       #E0A24B;

  /* bordas */
  --bd:          rgba(244,234,219,.06);
  --bd-2:        rgba(244,234,219,.12);
  --bd-3:        rgba(244,234,219,.14);

  /* tipografia */
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans:  'Manrope', system-ui, sans-serif;

  --radius:  18px;
  --radius-sm: 13px;
  --radius-lg: 24px;
  --shadow: 0 40px 80px -28px rgba(40,23,8,.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--sans); -webkit-font-smoothing: antialiased; font-optical-sizing: auto; text-rendering: optimizeLegibility; }

/* esconde scrollbar mantendo scroll */
.hsb { scrollbar-width: none; -ms-overflow-style: none; }
.hsb::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* números tabulares (preços alinhados) */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

@keyframes luFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes luPop  { from { opacity: 0; transform: scale(.97); }      to { opacity: 1; transform: none; } }
@keyframes luSlideUp { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: none; } }
@keyframes luPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(199,154,75,.55); } 50% { box-shadow: 0 0 0 12px rgba(199,154,75,0); } }
@keyframes luBlink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.fade { animation: luFade .32s ease both; }
.pop  { animation: luPop .25s ease both; }

/* tipografia utilitária */
.serif { font-family: var(--serif); }
.h-xl  { font-family: var(--serif); font-weight: 700; font-size: 30px; color: var(--cream); line-height: 1.08; }
.h-lg  { font-family: var(--serif); font-weight: 700; font-size: 25px; color: var(--cream); }
.h-md  { font-family: var(--serif); font-weight: 700; font-size: 21px; color: var(--cream); }

/* botões base */
button { font-family: var(--sans); cursor: pointer; }

.btn-gold {
  background: linear-gradient(180deg, #d7ac5e, var(--gold));
  color: #1A1109; border: none; border-radius: var(--radius-sm);
  padding: 15px; font-size: 15px; font-weight: 800; font-family: var(--sans);
  box-shadow: 0 12px 26px -12px rgba(199,154,75,.7);
  transition: transform .12s ease, filter .12s ease;
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-gold:active { transform: translateY(1px) scale(.995); }

.btn-wa {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--green); color: #fff; text-decoration: none;
  border-radius: 16px; padding: 16px; font-size: 15.5px; font-weight: 700;
  box-shadow: 0 12px 26px -10px rgba(31,168,85,.6);
}

/* pílulas de categoria */
.pill {
  background: rgba(244,234,219,.06); color: var(--body);
  border: 1px solid var(--bd-2); border-radius: 999px;
  padding: 8px 15px; font-size: 13px; font-weight: 600; font-family: var(--sans);
  white-space: nowrap; flex: none; transition: all .15s ease;
}
.pill.on { background: var(--gold); color: #1A1109; border-color: var(--gold); font-weight: 700; }

/* foto placeholder por categoria (gradiente radial) */
.ph { display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.ph[data-cat="cafes"]      { background: radial-gradient(120% 100% at 50% 16%, #5A4128, #2A1C10); }
.ph[data-cat="chocolates"] { background: radial-gradient(120% 100% at 50% 16%, #46271A, #22130C); }
.ph[data-cat="lanches"]    { background: radial-gradient(120% 100% at 50% 16%, #5C4426, #2E2011); }
.ph[data-cat="sobremesas"] { background: radial-gradient(120% 100% at 50% 16%, #5A3326, #2C1812); }
.ph[data-cat="tacas"]      { background: radial-gradient(120% 100% at 50% 16%, #5A2E26, #2A1310); }
.ph[data-cat="bebidas"]    { background: radial-gradient(120% 100% at 50% 16%, #4E4A24, #22200F); }
.ph[data-cat="especiais-casa"] { background: radial-gradient(120% 100% at 50% 16%, #5C4A28, #2C2110); }
.ph[data-cat="combos"]     { background: radial-gradient(120% 100% at 50% 16%, #4A3A22, #241A0E); }
.ph[data-cat="adicionais"] { background: radial-gradient(120% 100% at 50% 16%, #3E3320, #1E160C); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .ph-mark { opacity: .5; }

/* rótulo de etapa no estúdio do admin */
.step { font-size: 12px; color: var(--gold); font-weight: 700; letter-spacing: .05em; }

/* tag chip (gelado, vegano, combo…) */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 6px; margin-right: 5px;
  background: rgba(199,154,75,.14); color: var(--gold-price); border: 1px solid rgba(199,154,75,.3);
}
.tag.vegano { background: rgba(95,203,138,.12); color: var(--green-soft); border-color: rgba(95,203,138,.32); }
.tag.gelado { background: rgba(120,170,220,.12); color: #9FC4E6; border-color: rgba(120,170,220,.3); }

/* selo esgotado sobre a foto */
.soldout {
  position: absolute; inset: 0; background: rgba(14,10,6,.62);
  display: flex; align-items: center; justify-content: center;
}
.soldout span {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; color: var(--cream);
  background: var(--red); padding: 3px 7px; border-radius: 6px;
}

/* ============ CLIENTE (mobile cardápio) ============ */
.mobile {
  min-height: 100dvh; background: var(--bg);
  display: flex; flex-direction: column; max-width: 460px; margin: 0 auto;
  position: relative;
}

.appbar { padding: env(safe-area-inset-top) 18px 12px; background: linear-gradient(var(--bg-top), var(--bg)); }
.appbar-inner { padding-top: 16px; display: flex; align-items: center; gap: 11px; }
.logo-badge {
  width: 48px; height: 48px; border-radius: 50%; background: var(--cream-soft);
  display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.logo-badge img { width: 100%; height: 100%; object-fit: contain; }
.appbar .logo-badge img { transform: scale(1.62); }

.search {
  margin-top: 13px; display: flex; align-items: center; gap: 9px;
  background: rgba(244,234,219,.07); border: 1px solid var(--bd-3);
  border-radius: 14px; padding: 11px 13px;
}
.search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--cream); font-size: 14px; font-family: var(--sans);
}
.search input::placeholder { color: var(--muted-2); }

.cattabs {
  display: flex; gap: 8px; overflow-x: auto; padding: 13px 18px;
  background: var(--bg); border-bottom: 1px solid var(--bd);
}

.list { flex: 1; overflow-y: auto; background: var(--bg); padding: 16px 18px 130px; }

.item-card {
  display: flex; gap: 13px; align-items: center; cursor: pointer;
  background: var(--card); border: 1px solid var(--bd);
  border-radius: var(--radius); padding: 10px; transition: transform .12s, border-color .15s;
}
.item-card:active { transform: scale(.99); }
.item-card:hover { border-color: rgba(199,154,75,.35); }
.item-thumb { width: 84px; height: 84px; border-radius: var(--radius-sm); flex: none; }
.item-name { font-size: 15.5px; font-weight: 700; color: var(--cream); line-height: 1.15; }
.item-desc {
  font-size: 12.5px; color: var(--muted); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-price { font-family: var(--serif); font-weight: 700; font-size: 18px; color: var(--gold-price); margin-top: 2px; }

/* ============ Detalhe ============ */
.detail-hero { position: relative; height: 320px; flex: none; }
.detail-hero .scrim { position: absolute; inset: 0; background: linear-gradient(transparent 55%, var(--bg)); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(14,10,6,.55);
  backdrop-filter: blur(6px); border: 1px solid var(--bd-3); color: var(--cream);
  font-size: 18px; display: flex; align-items: center; justify-content: center;
}

/* ============ Carrinho / qty stepper ============ */
.qty {
  display: flex; align-items: center; gap: 0; background: rgba(244,234,219,.06);
  border: 1px solid var(--bd-3); border-radius: 12px; overflow: hidden;
}
.qty button {
  width: 40px; height: 40px; background: transparent; border: none; color: var(--gold);
  font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.qty button:active { background: rgba(199,154,75,.12); }
.qty .val { min-width: 34px; text-align: center; color: var(--cream); font-weight: 700; font-size: 16px; }

/* barra de carrinho flutuante */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-width: 460px; margin: 0 auto; padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 26%);
}
.cartbar-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; background: linear-gradient(180deg, #d7ac5e, var(--gold));
  color: #1A1109; border: none; border-radius: 16px; padding: 14px 18px;
  font-size: 15px; font-weight: 800; box-shadow: 0 14px 30px -10px rgba(199,154,75,.6);
}
.cart-badge {
  background: #1A1109; color: var(--gold); border-radius: 999px;
  min-width: 26px; height: 26px; padding: 0 8px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 800;
}

/* sheet/modal */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 80; background: rgba(8,5,2,.62);
  backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 460px; background: var(--bg-2);
  border-radius: 26px 26px 0 0; border-top: 1px solid var(--bd-3);
  max-height: 90dvh; display: flex; flex-direction: column; animation: luSlideUp .3s ease both;
}
.sheet-grab { width: 40px; height: 4px; border-radius: 999px; background: var(--muted-5); margin: 12px auto 4px; }

.field label { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.field input, .field textarea {
  width: 100%; background: rgba(244,234,219,.06); border: 1px solid var(--bd-2);
  border-radius: 11px; padding: 13px; color: var(--cream); font-size: 14.5px;
  font-family: var(--sans); outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); }

/* ============ DESKTOP: Painel KDS + Admin ============ */
.desk {
  min-height: 100dvh; background: radial-gradient(140% 90% at 50% -10%, #20160C, var(--bg));
  color: var(--cream); padding: 22px clamp(14px, 4vw, 40px) 60px;
}
.desk-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.brandrow { display: flex; align-items: center; gap: 13px; }
.brandrow .logo-badge { width: 60px; height: 60px; }
.brandrow .logo-badge img { width: 100%; height: 100%; transform: scale(1.55); }

.kpi { display: flex; gap: 12px; flex-wrap: wrap; }
.kpi-card {
  background: var(--card); border: 1px solid var(--bd); border-radius: 16px;
  padding: 14px 20px; min-width: 120px;
}
.kpi-num { font-family: var(--serif); font-weight: 700; font-size: 30px; color: var(--gold-price); }
.kpi-lbl { font-size: 12px; color: var(--muted); font-weight: 600; }

/* colunas KDS */
.kds { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.kds-col { background: rgba(34,23,16,.55); border: 1px solid var(--bd); border-radius: 18px; padding: 14px; min-height: 200px; }
.kds-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 0 4px; }
.kds-col-title { font-weight: 800; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.kds-count { background: rgba(244,234,219,.08); color: var(--cream); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 800; }

.order {
  background: var(--card); border: 1px solid var(--bd-2); border-radius: 14px;
  padding: 14px; margin-bottom: 12px; animation: luPop .25s ease both;
}
.order.new { border-color: var(--gold); animation: luPop .25s ease both, luPulse 1.6s ease 3; }
.order-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mesa-chip {
  background: var(--gold); color: #1A1109; border-radius: 9px; padding: 4px 10px;
  font-weight: 800; font-size: 14px;
}
.order-time { font-size: 12px; color: var(--muted-2); }
.order-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--body); padding: 3px 0; }
.order-line b { color: var(--cream); font-weight: 700; }
.order-foot { display: flex; gap: 8px; margin-top: 12px; }
.order-foot button { flex: 1; border-radius: 10px; padding: 10px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--bd-2); background: rgba(244,234,219,.05); color: var(--cream); }
.order-foot .adv { background: var(--gold); color: #1A1109; border-color: var(--gold); }
.order-total { font-family: var(--serif); font-weight: 700; color: var(--gold-price); font-size: 18px; }

.empty-col { text-align: center; color: var(--muted-4); font-size: 13px; padding: 30px 10px; }

/* toggle som */
.soundtoggle {
  display: inline-flex; align-items: center; gap: 8px; background: var(--card);
  border: 1px solid var(--bd-2); border-radius: 999px; padding: 8px 14px;
  color: var(--cream); font-size: 13px; font-weight: 600;
}

/* responsivo */
@media (max-width: 520px) {
  .desk { padding: 18px 14px 50px; }
}

/* ============ Cliente em telas grandes (desktop / tablet) ============
   Mobile fica IGUAL (coluna unica ate 760px). Acima disso, o cardapio
   vira grade e o container respira, sem quebrar o layout do celular. */
.menu-grid { display: flex; flex-direction: column; gap: 12px; }

@media (min-width: 760px) {
  .mobile { max-width: 920px; box-shadow: 0 0 0 1px var(--bd), var(--shadow); }
  .appbar { padding-left: 26px; padding-right: 26px; }
  .cattabs { padding: 14px 26px; }
  .list { padding: 22px 26px 120px; }
  .menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .detail-wrap { max-width: 660px; margin: 0 auto; border-left: 1px solid var(--bd); border-right: 1px solid var(--bd); }
  .cartbar { max-width: 920px; }
  .cartbar-btn { max-width: 360px; margin: 0 auto; }
}
@media (min-width: 1200px) {
  .mobile { max-width: 1100px; }
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
  .cartbar { max-width: 1100px; }
}

/* ============================================================
   ADMIN · Shell adaptativo (inspiração Habibi Bites)
   Mobile: bottom-nav (igual ao app que o lojista já conhece).
   Desktop (>=900px): sidebar fixa + área de conteúdo, o admin
   vira o hub central. Tudo escopado em #admin / .ash-* para
   nunca tocar o cardápio do cliente nem o painel da cozinha.
   ============================================================ */
.ash { display: flex; flex-direction: column; min-height: 100dvh; }
.ash-side { display: none; }
.ash-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ash-content { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* faixa de conteúdo legível no desktop (forms/estúdio centralizam) */
.ash-wrap { width: 100%; }

/* cartões de seção (editor "Mi menú", ajustes) */
.ash-card { background: var(--card); border: 1px solid var(--bd); border-radius: 16px; padding: 15px; display: flex; flex-direction: column; gap: 12px; }
.ash-card-t { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; color: var(--gold-price); text-transform: uppercase; }

/* lista de itens do cardápio (vira 2 colunas no desktop) */
.ash-itemgrid { display: flex; flex-direction: column; gap: 10px; }

/* ---------- sidebar (desktop) ---------- */
.ash-link {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: none; border-radius: 12px; padding: 11px 13px;
  color: var(--muted); font-size: 14px; font-weight: 600; text-align: left;
  transition: background .15s ease, color .15s ease;
}
.ash-link:hover { background: rgba(244,234,219,.05); color: var(--cream); }
.ash-link.on { background: rgba(199,154,75,.14); color: var(--cream); font-weight: 700; }
.ash-link.on .ash-ico { color: var(--gold-price); }
.ash-ico { font-size: 17px; width: 22px; text-align: center; flex: none; }

.ash-cook {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(180deg, #d7ac5e, var(--gold)); color: #1A1109;
  border: none; border-radius: 13px; padding: 13px; font-size: 13.5px; font-weight: 800;
  box-shadow: 0 12px 24px -12px rgba(199,154,75,.7);
}
.ash-help {
  background: linear-gradient(135deg, rgba(199,154,75,.13), rgba(154,59,42,.08));
  border: 1px solid var(--bd-2); border-radius: 14px; padding: 13px;
  display: flex; flex-direction: column; gap: 8px;
}
.ash-help-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--green); color: #fff; text-decoration: none; border: none;
  border-radius: 10px; padding: 9px 12px; font-size: 12.5px; font-weight: 700;
}
.ash-logout {
  display: flex; align-items: center; gap: 10px; background: none; border: none;
  color: var(--muted-3); font-size: 13px; font-weight: 600; padding: 9px 13px;
  transition: color .15s ease;
}
.ash-logout:hover { color: var(--red-soft); }

/* ---------- bottom-nav (mobile) ---------- */
.ash-mobnav {
  flex: none; display: flex; align-items: stretch; gap: 7px;
  background: var(--bg-top); border-top: 1px solid var(--bd-2);
  padding: 9px 10px calc(14px + env(safe-area-inset-bottom));
  position: sticky; bottom: 0; z-index: 20;
}
.ash-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: var(--muted-3); font-size: 11px; font-weight: 600;
}
.ash-tab .i { font-size: 17px; line-height: 1; }
.ash-tab.on { color: var(--gold-price); font-weight: 700; }
.ash-tab.cook {
  flex: 1.5; justify-content: center; color: #1A1109;
  background: linear-gradient(180deg, #d7ac5e, var(--gold)); border-radius: 13px;
  box-shadow: 0 10px 22px -10px rgba(199,154,75,.75);
}
.ash-tab.cook .i { font-size: 18px; }
.ash-tab.cook span:last-child { font-weight: 800; }

/* ---------- Início: stats + ações ---------- */
.ash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ash-stat { background: var(--card); border: 1px solid var(--bd); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.ash-stat-n { font-family: var(--serif); font-weight: 700; font-size: 26px; color: var(--gold-price); }
.ash-stat-l { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ash-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ash-act {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  background: var(--card); border: 1px solid var(--bd); border-radius: 14px; padding: 14px;
  color: var(--cream); transition: border-color .15s ease, transform .12s ease;
}
.ash-act:hover { border-color: rgba(199,154,75,.4); }
.ash-act:active { transform: scale(.99); }
.ash-act-i { font-size: 20px; line-height: 1; }
.ash-act-t { font-size: 13.5px; font-weight: 700; color: var(--cream); }
.ash-act-s { font-size: 11px; color: var(--muted-2); line-height: 1.3; }
.ash-act.gold { background: linear-gradient(160deg, rgba(199,154,75,.18), rgba(199,154,75,.05)); border-color: rgba(199,154,75,.5); }

.only-mobile { display: flex; }

@media (min-width: 720px) {
  .ash-stats { grid-template-columns: repeat(4, 1fr); }
  .ash-acts  { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  #admin.mobile { max-width: 1240px; box-shadow: none; }
  .ash { flex-direction: row; }
  .ash-side {
    display: flex; flex-direction: column; gap: 5px; flex: none; width: 256px;
    height: 100dvh; position: sticky; top: 0; overflow-y: auto;
    background: var(--bg-top); border-right: 1px solid var(--bd); padding: 22px 16px 18px;
  }
  .ash-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
  .ash-spacer { flex: 1; min-height: 14px; }
  .ash-main { height: 100dvh; overflow: hidden; }
  .ash-mobnav { display: none; }
  .ash-wrap { max-width: 820px; margin: 0 auto; }
  .ash-itemgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
  .only-mobile { display: none !important; }
}
