/* ============================================================
   CHEIRIN BÃO · Parque Shopping Bahia — Cardápio Digital
   Paleta AMOSTRADA DA LOGO OFICIAL (não inventada):
     #3A2212  disco central (marrom torrado)
     #74492A  anel externo
     #C09868  volutas de vapor (o "dourado" da marca é bege, não amarelo)
     #F8F8F8  lettering
   As superfícies ficam ABAIXO do #3A2212 do disco para a logo destacar.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,500;1,600;1,700&family=DM+Sans:opsz,wght@9..40,400..800&display=swap');

:root {
  /* PRIMÁRIA: bege light da logo. Superfícies claras, arejadas. */
  --bg:          #F7E3C8;
  --bg-2:        #F3DDBF;
  --bg-3:        #EFD7B6;
  --bg-top:      #FCEEDC;
  /* TERCEIRA: branco — os cards SALTAM do bege (é onde mora o detalhe). */
  --card:        #FFFFFF;
  --card-2:      #FDF8F1;
  --inset:       #F7EFE4;
  --black:       #3A2212;

  /* SECUNDÁRIA: o marrom da logo (anel #74492A / disco #3A2212).
     Substitui o "dourado" — a marca não tem amarelo, tem marrom. */
  --gold:        #7A4E2B;
  --gold-price:  #5E3A1E;
  --gold-deep:   #472B16;
  --on-gold:     #FFF8EE;   /* texto/icone EM CIMA do marrom de destaque */

  /* texto (marrom da logo sobre bege) */
  --cream:       #3A2212;
  --cream-soft:  #2A1810;
  --body:        #5B4436;
  --muted:       #8A7159;
  --muted-2:     #937B62;
  --muted-3:     #9E886F;
  --muted-4:     #AB9679;
  --muted-5:     #B7A487;

  /* superfície de papel */
  --paper:       #FFFFFF;
  --paper-2:     #F7EFE4;

  /* status (escurecidos p/ contraste sobre claro) */
  --green:       #1F9E50;
  --green-soft:  #157A3A;
  --red:         #A33A26;
  --red-soft:    #8F3320;
  --amber:       #B07A2A;

  /* bordas (marrom translúcido, não branco) */
  --bd:          rgba(58,34,18,.10);
  --bd-2:        rgba(58,34,18,.16);
  --bd-3:        rgba(58,34,18,.20);

  /* tokens semânticos (default = CLARO; o admin ainda alterna por tema) */
  --surf:        rgba(58,34,18,.05);
  --surf-2:      rgba(58,34,18,.07);
  --surf-soft:   rgba(58,34,18,.035);
  --hair:        rgba(58,34,18,.12);
  --dash:        rgba(58,34,18,.24);
  --ico-warm:    #6A533C;
  --track-off:   #E0CDB4;
  --gold-tint:   rgba(122,78,43,.10);
  --gold-line:   rgba(122,78,43,.28);
  --app-bg:      radial-gradient(140% 90% at 50% -10%, #FDF2E2, #F5E1C5);
  --card-elev:   #FFFFFF;
  --card-elev-2: #FDF8F1;
  --card-bd:     rgba(58,34,18,.08);
  --shadow-card: 0 1px 2px rgba(58,34,18,.05), 0 10px 26px -12px rgba(58,34,18,.16);
  --shadow-card-hover: 0 2px 4px rgba(58,34,18,.07), 0 16px 34px -14px rgba(58,34,18,.22);

  /* tipografia */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'DM Sans', system-ui, -apple-system, sans-serif;

  --radius:  18px;
  --radius-sm: 13px;
  --radius-lg: 24px;
  --shadow: 0 40px 80px -28px rgba(58,34,18,.22);
}

* { 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; }

/* Mobile: o shell do admin entra SEM animacao. Animar translateY num container
   que envolve TODO o painel forcava uma camada de composicao no 1o paint e
   causava artefatos ("listras"/render parcial) em navegadores mobile reais
   (nao reproduz no Chromium emulado). E decorativo -> custo zero remover. */
@media (max-width: 899px) {
  #admin .ash-content.fade { animation: none; }
}

/* 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, #8E5C33, var(--gold));
  color: var(--on-gold); 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: var(--surf); 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: var(--on-gold); 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; }
/* placeholder por categoria — tons da logo (vapor #C09868 -> anel #74492A).
   IDs batem com as categorias do data.js; sem isso o item sem foto fica vazio. */
.ph[data-cat="cafes"]      { background: radial-gradient(120% 100% at 50% 16%, #D7B48A, #A5703F); }
.ph[data-cat="geladas"]    { background: radial-gradient(120% 100% at 50% 16%, #DCC2A0, #9E7B54); }
.ph[data-cat="salgados"]   { background: radial-gradient(120% 100% at 50% 16%, #E3CBA6, #B08650); }
.ph[data-cat="sanduiches"] { background: radial-gradient(120% 100% at 50% 16%, #DFC59E, #A87C48); }
.ph[data-cat="sobremesas"] { background: radial-gradient(120% 100% at 50% 16%, #D4AE85, #8E5C33); }
.ph[data-cat="refeicoes"]  { background: radial-gradient(120% 100% at 50% 16%, #D9C3A2, #97764E); }
.ph[data-cat="emporio"]    { background: radial-gradient(120% 100% at 50% 16%, #C9A277, #74492A); }
.ph[data-cat="bebidas"]    { background: radial-gradient(120% 100% at 50% 16%, #DDCBA8, #9A8355); }
.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, #8E5C33, var(--gold));
  color: var(--on-gold); 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: var(--gold); color: var(--on-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: var(--surf); 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: var(--on-gold); 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: var(--on-gold); 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; }

/* pane com header + corpo rolável (Início). No desktop rola por dentro (pai = 100dvh real).
   No mobile flui com o scroll da pagina: a tela inicial e renderizada no boot, quando o
   100dvh do mobile ainda nao assentou (a barra do navegador muda a altura), entao um
   flex:1+overflow:auto contra altura indefinida vinha "bugado" no primeiro paint. */
.ash-pane { flex: 1; overflow-y: auto; min-height: 0; }
@media (max-width: 899px) { .ash-pane { flex: none; overflow: visible; } }

/* faixa de conteúdo legível no desktop (forms/estúdio centralizam) */
.ash-wrap { width: 100%; }

/* ══ Estúdio: REDESIGN EDITORIAL estilo Santiago (cartões + profundidade) ══ */
/* fundo = palco (mais escuro/saturado) p/ os cartões saltarem */
#admin #studiobody { background: var(--app-bg); padding: 18px 16px 28px; }

/* single-pane (Texto): coluna única centralizada */
.studio-solo { display: flex; flex-direction: column; gap: 20px; max-width: 680px; margin-inline: auto; }

/* grade 2 colunas — trilho central + coluna direita LARGA */
.studio-grid { display: flex; flex-direction: column; gap: 20px; max-width: 1280px; margin-inline: auto; }
.studio-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.studio-aside { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (min-width: 1000px) {
  #admin #studiobody { padding: 26px 26px 44px; }
  .studio-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(380px,1fr); column-gap: 32px; align-items: start; }
  .studio-aside { position: sticky; top: 6px; }
}
@media (min-width: 1320px) {
  .studio-grid { grid-template-columns: minmax(0,1.55fr) minmax(412px,1fr); column-gap: 38px; }
}

/* cartão base — a peça que cria profundidade */
.studio-card { background: var(--card-elev); border: 1px solid var(--card-bd); border-radius: 18px; padding: 22px 24px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 14px; min-width: 0; transition: box-shadow .18s ease; }
.studio-card--step { padding: 18px 20px; gap: 12px; border-radius: 16px; }
.studio-card--preview { padding: 16px; gap: 12px; box-shadow: var(--shadow-card-hover); }

/* cabeçalho rico do cartão: eyebrow dourado + título serif + ajuda */
.sc-head { display: flex; flex-direction: column; gap: 3px; }
.sc-eyebrow { font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-price); display: inline-flex; align-items: center; gap: 8px; }
.sc-eyebrow .sc-num { width: 18px; height: 18px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font: 800 10px/1 var(--sans); color: var(--on-gold); background: var(--gold); }
.sc-title { font: 600 21px/1.15 var(--serif); color: var(--cream); margin: 0; }
.sc-help { font: 400 12.5px/1.45 var(--sans); color: var(--muted); margin: 1px 0 0; }
.sc-help b { color: var(--cream); font-weight: 600; }

/* prévia grande (coluna direita) */
.studio-prev { display: flex; flex-direction: column; gap: 12px; }
.studio-prev .sp-eyebrow { font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-price); margin: 0; }
.studio-prev-cap { font: 500 18px/1.25 var(--serif); color: var(--cream); margin: 0; }
.studio-prev-sub { font: 400 13px/1.4 var(--sans); color: var(--body); margin: 0; }

/* estado vazio = stage tracejado dentro do cartão */
.studio-prev-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--muted-4); background: var(--surf-soft); border: 1px dashed var(--bd-2); border-radius: 16px; padding: 48px 24px; font-size: 12.5px; line-height: 1.5; aspect-ratio: 4/5; }
.studio-prev-empty svg { opacity: .45; }

/* mural "peças criadas" — masonry leve via CSS columns */
.studio-pieces { background: var(--card-elev-2); border: 1px solid var(--card-bd); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.studio-pieces:hover { border-color: var(--gold-line); box-shadow: var(--shadow-card-hover); }
.studio-pieces .sp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.studio-pieces .sp-head .sp-ttl { font: 500 18px/1.15 var(--serif); color: var(--cream); }
.studio-pieces .sp-head .sp-ttl b { color: var(--gold-price); font-weight: 600; font-variant-numeric: tabular-nums; }
.studio-pieces .sp-link { color: var(--gold-price); font: 600 12px/1 var(--sans); white-space: nowrap; }
.studio-pieces .sp-row { display: flex; gap: 8px; }
.studio-pieces .sp-tile { position: relative; flex: 1 1 0; min-width: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--card-elev-2); border: 1px solid var(--card-bd); }
.studio-pieces .sp-tile img, .studio-pieces .sp-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.studio-pieces .sp-aud { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--gold-price); background: var(--gold-tint); }
.studio-pieces .sp-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10,7,4,.62); color: #fff; font: 700 14px/1 var(--sans); }

/* mobile: cartões mais justos, mural 1 coluna, prévia não estoura */
@media (max-width: 999px) {
  .studio-card { padding: 18px 18px; border-radius: 16px; }
  .studio-prev-empty { aspect-ratio: 1/1; }
}

/* 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: 1px solid transparent; border-radius: 12px; padding: 10px 12px;
  color: var(--side-muted); font-size: 14px; font-weight: 600; text-align: left;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ash-link:hover { background: var(--side-hover); border-color: var(--side-hair); color: var(--side-fg); }
.ash-link.on { background: var(--side-on-bg); border-color: var(--side-on-bd); color: var(--side-fg); font-weight: 700; }
.ash-link.on .ash-ico { color: var(--side-gold); }
.ash-ico { font-size: 17px; width: 22px; text-align: center; flex: none; }
.ash-link .ia-badge { margin-left: auto; }

.ash-cook {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(180deg, #8E5C33, var(--gold)); color: var(--on-gold);
  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: var(--on-gold);
  background: linear-gradient(180deg, #8E5C33, 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; }
.ash-tab.cook.on { filter: brightness(1.04); }

/* ---------- Painel da Cozinha embutido no admin (sidebar permanece = volta imediata) ---------- */
/* Header fixo-escuro (independe do tema): casa com o KDS, que é sempre escuro. */
.ash-cozinha { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ash-cozhead {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(16px + env(safe-area-inset-top)) 18px 14px; background: #1E150D; border-bottom: 1px solid rgba(244,234,219,.10);
}
.ash-cozico {
  width: 38px; height: 38px; border-radius: 11px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(216,176,98,.16); color: #D8B062; border: 1px solid rgba(216,176,98,.3);
}
.ash-cozinha iframe { flex: 1; width: 100%; border: 0; display: block; min-height: 0; background: #19110A; }
/* No mobile, prende a tela da Cozinha entre o topo e o bottom-nav (~84px) p/ não criar scroll duplo. */
@media (max-width: 899px) { .ash-cozinha { height: calc(100dvh - 84px - env(safe-area-inset-bottom)); } }

/* ---------- 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 ocupa a tela toda: a sidebar gruda na borda esquerda (sem espaço vago) */
  #admin.mobile { max-width: none; width: 100%; margin: 0; 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(--side-bg); border-right: 1px solid var(--side-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; background: var(--bg); }
  .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; }
}

/* ============================================================
   ADMIN · TEMAS (claro creme / escuro chocolate) + toggle
   Tudo escopado em #admin: redefine as variáveis que o admin
   inteiro consome. O cardápio do cliente (sem #admin) e os
   overlays (anexados ao body) seguem o :root ESCURO, intocados.
   ============================================================ */
#admin.theme-dark {
  --bg: #19110A; --bg-top: #1F140B; --card: #221710; --card-2: #1d150e;
  --cream: #F4EADB; --cream-soft: #F4EFE6; --body: #C3B09A;
  --muted: #A08A6E; --muted-2: #9A876C; --muted-3: #8A7763; --muted-4: #73624E; --muted-5: #6F5D49;
  --gold: #C79A4B; --gold-price: #D8B062; --gold-deep: #9c7c1e;
  --green: #1FA855; --green-soft: #5FCB8A; --red: #9A3B2A; --red-soft: #E08A6E;
  --bd: rgba(244,234,219,.06); --bd-2: rgba(244,234,219,.12); --bd-3: rgba(244,234,219,.14);
  --surf: rgba(244,234,219,.06); --surf-2: rgba(244,234,219,.07); --surf-soft: rgba(244,234,219,.05);
  --hair: rgba(244,234,219,.10); --dash: rgba(244,234,219,.22); --ico-warm: #E7D9C4; --track-off: #4A3526;
  --gold-tint: rgba(199,154,75,.12); --gold-line: rgba(199,154,75,.35);
  --app-bg: radial-gradient(140% 90% at 50% -10%, #20160C, #19110A);
  /* elevacao editorial do Estudio (cartao salta do fundo) */
  --card-elev: #271B12; --card-elev-2: #211610; --card-bd: rgba(244,234,219,.10);
  --shadow-card: 0 1px 0 rgba(244,234,219,.05) inset, 0 10px 24px -12px rgba(0,0,0,.62), 0 2px 6px -3px rgba(0,0,0,.50);
  --shadow-card-hover: 0 1px 0 rgba(244,234,219,.07) inset, 0 16px 34px -14px rgba(0,0,0,.68), 0 4px 10px -4px rgba(0,0,0,.55);
  /* sidebar = bloco de contraste (no tema escuro, a sidebar fica CLARA) */
  --side-bg: #ECE1CF; --side-fg: #2B2018; --side-muted: #7C6A53;
  --side-bd: rgba(43,32,24,.14); --side-hair: rgba(43,32,24,.12); --side-hover: rgba(43,32,24,.05);
  --side-on-bg: rgba(188,142,60,.18); --side-on-bd: rgba(140,106,24,.40); --side-gold: #8A6A18;
}
#admin.theme-light {
  --bg: #F1E7D7; --bg-top: #ECE1CF; --card: #FCF8F1; --card-2: #F5EEE1;
  --cream: #2B2018; --cream-soft: #FFFCF6; --body: #5B4A39;
  --muted: #7C6A53; --muted-2: #8A7860; --muted-3: #998A72; --muted-4: #A8997E; --muted-5: #B6A789;
  --gold: #BC8E3C; --gold-price: #8A6A18; --gold-deep: #6F5512;
  --green: #1F9E50; --green-soft: #157A3A; --red: #A33A26; --red-soft: #8F3320;
  --bd: rgba(43,32,24,.10); --bd-2: rgba(43,32,24,.16); --bd-3: rgba(43,32,24,.20);
  --surf: rgba(43,32,24,.05); --surf-2: rgba(43,32,24,.07); --surf-soft: rgba(43,32,24,.035);
  --hair: rgba(43,32,24,.12); --dash: rgba(43,32,24,.24); --ico-warm: #6A533C; --track-off: #D9CDBA;
  --gold-tint: rgba(188,142,60,.14); --gold-line: rgba(140,106,24,.30);
  --app-bg: radial-gradient(140% 90% at 50% -10%, #F8F1E4, #EFE4D2);
  /* elevacao editorial do Estudio (branco salta do creme) */
  --card-elev: #FFFFFF; --card-elev-2: #FCF8F1; --card-bd: rgba(43,32,24,.08);
  --shadow-card: 0 1px 2px rgba(43,32,24,.05), 0 10px 26px -12px rgba(43,32,24,.16);
  --shadow-card-hover: 0 2px 4px rgba(43,32,24,.07), 0 16px 34px -14px rgba(43,32,24,.22);
  /* sidebar = bloco de contraste (no tema claro, a sidebar fica ESCURA) */
  --side-bg: #1E150D; --side-fg: #F4EADB; --side-muted: #B7A488;
  --side-bd: rgba(244,234,219,.10); --side-hair: rgba(244,234,219,.12); --side-hover: rgba(244,234,219,.06);
  --side-on-bg: rgba(199,154,75,.20); --side-on-bd: rgba(199,154,75,.45); --side-gold: #D8B062;
}
/* logo ganha um anel sutil no tema claro p/ separar do creme (só fora da sidebar escura) */
#admin.theme-light .ash-content .logo-badge { box-shadow: 0 0 0 1px rgba(43,32,24,.08); }

/* selo "IA" (botão de criar conteúdo) */
.ia-badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: .04em; line-height: 1;
  padding: 2px 6px; border-radius: 999px; background: var(--gold); color: var(--on-gold);
  flex: none; display: inline-flex; align-items: center;
}

/* cabeçalho de passo numerado (substitui ".step" no Estúdio) */
.lu-stephead { display: flex; align-items: center; gap: 9px; }
.lu-stepnum {
  width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--on-gold);
  font-size: 11.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none;
}
.lu-stephead > span:last-child {
  font-size: 12px; font-weight: 800; letter-spacing: .05em; color: var(--gold-price); text-transform: uppercase;
}

/* stepper de topo = pílula compacta de orientação (régua orienta, cartões executam) */
.lu-stepper { display: inline-flex; align-items: center; gap: 0; align-self: flex-start; padding: 7px 14px; border-radius: 999px; background: var(--card-elev); border: 1px solid var(--card-bd); box-shadow: var(--shadow-card); margin-bottom: 2px; max-width: 100%; overflow-x: auto; }
.lu-snode { display: flex; align-items: center; gap: 7px; flex: none; }
.lu-sdot {
  width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; flex: none; border: 1.5px solid var(--bd-2); color: var(--muted-2); background: transparent;
}
.lu-snode.now .lu-sdot { border-color: var(--gold); color: var(--gold-price); background: var(--gold-tint); }
.lu-snode.done .lu-sdot { border-color: var(--gold); background: var(--gold); color: var(--on-gold); }
.lu-slbl { font-size: 11px; font-weight: 600; color: var(--muted-2); white-space: nowrap; }
.lu-snode.now .lu-slbl { color: var(--cream); font-weight: 700; }
.lu-snode.done .lu-slbl { color: var(--body); }
.lu-sbar { flex: none; width: 18px; min-width: 18px; height: 1.5px; background: var(--bd-2); margin: 0 6px; }
.lu-sbar.done { background: var(--gold); }
@media (max-width: 560px) {
  .lu-snode:not(.now) .lu-slbl { display: none; }
  .lu-sbar { margin: 0 5px; }
}

/* toggle de tema (segmented) */
.ash-themetoggle {
  display: inline-flex; padding: 3px; gap: 2px; background: var(--surf); border: 1px solid var(--bd-2);
  border-radius: 999px;
}
.ash-themetoggle button {
  display: inline-flex; align-items: center; gap: 5px; border: none; background: none; cursor: pointer;
  border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 700; color: var(--muted); font-family: var(--sans);
}
.ash-themetoggle button.on { background: var(--gold); color: var(--on-gold); }
.ash-themebtn {
  width: 38px; height: 38px; border-radius: 10px; background: var(--surf); border: 1px solid var(--bd-2);
  color: var(--cream); font-size: 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}

/* dentro da sidebar (bloco invertido) os componentes seguem as cores --side-* */
.ash-side .ash-themetoggle { background: var(--side-hover); border-color: var(--side-hair); }
.ash-side .ash-themetoggle button { color: var(--side-muted); }
.ash-side .ash-themetoggle button.on { background: var(--side-gold); color: var(--side-bg); }
.ash-side .ash-logout { color: var(--side-muted); }
.ash-side .ash-logout:hover { color: var(--red); }

/* ============================================================
   LOGIN · split-screen (hero escuro + form creme), estilo Habibi.
   Cores fixas (independe do tema do admin): é a porta de entrada,
   sempre elegante. Mobile: só o form (hero escondido).
   ============================================================ */
.lg-login { display: flex; min-height: 100dvh; background: #F1E7D7; }
.lg-hero { display: none; }
.lg-form {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 40px 30px calc(34px + env(safe-area-inset-bottom)); background: #F1E7D7;
}
.lg-formwrap { width: 100%; max-width: 358px; margin: 0 auto; display: flex; flex-direction: column; gap: 17px; }
.lg-brandmini { display: flex; align-items: center; gap: 11px; margin-bottom: 4px; }
.only-login-mobile { display: flex; }
.lg-eyebrow { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; font-weight: 700; color: #9c7c1e; }
.lg-title { font-family: var(--serif); font-weight: 700; font-size: 33px; line-height: 1.04; color: #2B2018; }
.lg-sub { font-size: 13px; color: #7C6A53; line-height: 1.55; }
.lg-field label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .09em; color: #8A7860; margin-bottom: 8px; text-transform: uppercase; }
.lg-input {
  width: 100%; box-sizing: border-box; background: #FCF8F1; border: 1px solid rgba(43,32,24,.18);
  border-radius: 12px; padding: 14px 15px; font-size: 15px; color: #2B2018; letter-spacing: .12em;
  font-family: var(--sans); transition: border-color .15s ease, box-shadow .15s ease;
}
.lg-input::placeholder { color: #B6A789; letter-spacing: .2em; }
.lg-input:focus { outline: none; border-color: #BC8E3C; box-shadow: 0 0 0 3px rgba(188,142,60,.16); }
.lg-btn {
  width: 100%; border: none; border-radius: 12px; padding: 15px; cursor: pointer; margin-top: 2px;
  background: #1E150D; color: #F4EADB; font-family: var(--sans); font-size: 14.5px; font-weight: 700; letter-spacing: .01em;
  transition: filter .15s ease, transform .1s ease;
}
.lg-btn:hover { filter: brightness(1.18); }
.lg-btn:active { transform: translateY(1px); }
.lg-err { font-size: 12.5px; color: #8F3320; }
.lg-hint { text-align: center; font-size: 11.5px; color: #A8997E; }
.lg-foot { text-align: center; font-size: 10.5px; letter-spacing: .04em; color: #BCAE94; margin-top: 2px; }

/* hero (desktop) */
.lg-hero-top { display: flex; align-items: center; gap: 13px; position: relative; z-index: 1; }
.lg-hero-mid { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 15px; max-width: 460px; }
.lg-hero-head { font-family: var(--serif); font-weight: 700; font-size: 46px; line-height: 1.05; color: #F4EADB; letter-spacing: .005em; }
.lg-hero-head em { font-style: italic; color: #D8B062; }
.lg-hero-lead { font-size: 14px; line-height: 1.6; color: #CBB69C; max-width: 410px; }
.lg-stats { display: flex; gap: 30px; position: relative; z-index: 1; }
.lg-stat-n { font-family: var(--serif); font-weight: 700; font-size: 30px; color: #D8B062; line-height: 1; }
.lg-stat-l { font-size: 10.5px; letter-spacing: .04em; color: #A28C6E; margin-top: 4px; }
.lg-beans { position: absolute; right: -54px; bottom: -46px; width: 360px; height: 360px; opacity: .07; color: #D8B062; z-index: 0; }

@media (min-width: 900px) {
  .lg-hero {
    display: flex; flex: 1.08; flex-direction: column; justify-content: space-between;
    position: relative; overflow: hidden; padding: 50px 48px;
    background: radial-gradient(125% 95% at 16% 6%, #2A1D11, #150E07 72%);
    color: #F4EADB; border-right: 1px solid rgba(216,176,98,.14);
  }
  .lg-form { flex: .92; }
  .only-login-mobile { display: none; }
}
