/* ==========================================================================
   estilo.css — VS Multimarcas | Arquivo único de estilo
   Reúne: base/reset, botões, header/progresso, fluxo de agendamento,
   login/logout do admin, dashboard (home), menu e clientes.
   ========================================================================== */

:root{
  /* VS Multimarcas — preto + dourado champagne da marca */
  --bg:         #050505;
  --bg-soft:    #090909;
  --surface:    #101010;
  --surface-2:  #171717;
  --border:     #2A2821;

  --gold:       #FBDD61;
  --gold-light: #FFF0A6;
  --gold-dark:  #C99A22;
  --gold-glow:  #7E621C;

  /* aliases mantidos para não quebrar o restante do CSS */
  --blue:       var(--gold);
  --blue-light: var(--gold-light);
  --brown-glow: var(--gold-glow);
  --peach:      var(--gold);
  --peach-soft: var(--gold-light);

  --cream:      #FFF9EA;
  --text:       #F7F4EC;
  --text-muted: #A9A59A;
  --ink:        #050505;

  /* Verde de sucesso — usado em toasts, banners e badges de
     confirmação (venda finalizada, produto adicionado, etc.), no
     lugar do dourado da marca, pra ficar visualmente distinto de
     alertas neutros/informativos. */
  --success:        #8FD19E;
  --success-border: #3E7A4C;

  --font-tech:  'Plus Jakarta Sans', system-ui, sans-serif;
  --font-voice: 'Fraunces', Georgia, serif;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-full: 999px;

  --maxw: 1180px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 36px;
  --space-5: 56px;
  --space-6: 84px;
}

/* ---------- Reset / base ---------- */
*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
html, body{ height: 100%; }
/* Blindagem contra scroll lateral: se algum elemento (ex.: o
   controle nativo de data em certos navegadores/aparelhos) insistir
   em ficar mais largo que a viewport, isso impede que a página
   inteira ganhe uma barra de rolagem horizontal por causa dele. Não
   resolve a causa raiz do elemento específico, mas garante que o
   usuário nunca vai conseguir arrastar a tela pros lados. */
html{ overflow-x: hidden; }
body{ overflow-x: hidden; }

body{
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-tech);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
body::before{
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(48% 55% at 96% 8%, rgba(251,221,97,0.11), transparent 68%),
    radial-gradient(46% 50% at 2% 92%, rgba(201,154,34,0.08), transparent 68%);
}

img{ max-width: 100%; display: block; }
a{ color: inherit; }

h1{
  font-family: var(--font-voice);
  font-weight: 500;
  line-height: 1.18;
  margin: var(--space-2) 0 0;
  letter-spacing: -0.01em;
  font-size: clamp(24px, 6vw, 30px);
  color: var(--text);
}

.wrap{ max-width: var(--maxw); margin: 0 auto; padding: 0 var(--space-2); }

.eyebrow{
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-tech); font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--peach);
}

:focus-visible{ outline: 2px solid var(--peach); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Utilitário genérico de ocultar ---------- */
/* Usada em qualquer bloco que precise sumir/aparecer via JS (ex.: os
   campos de frete e desconto em pdv-checkout.php, controlados pelos
   switches "Tem frete?" / "Tem desconto?"). Antes só existia a regra
   composta ".checkout-parcelas.oculto", que só funcionava nesse
   elemento específico — esta aqui vale para qualquer elemento com a
   classe "oculto" sozinha. O !important é necessário porque elementos
   como .agenda-field (usado em checkoutFreteBox) têm sua própria regra
   de "display" definida mais abaixo no arquivo — com a mesma
   especificidade, sem !important a ordem no arquivo decidiria e
   .agenda-field venceria, deixando o campo visível mesmo com a classe
   "oculto" aplicada. */
.oculto{ display: none !important; }

/* ---------- Botões ---------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: var(--radius-full);
  font-family: var(--font-tech); font-size: 14.5px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: var(--gold); color: var(--ink); }
.btn-primary:hover{ background: var(--gold-light); }
.btn-primary:disabled{ opacity: .45; cursor: not-allowed; transform: none; }
.btn-ghost{ background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover{ border-color: var(--peach); }
.btn-block{ width: 100%; }

.btn-google{ background: var(--cream); color: var(--ink); width: 100%; }
.btn-google:hover{ background: #fff; }
.btn-danger{ background: #C1503F; color: var(--cream); width: 100%; }
.btn-danger:hover{ background: #D96654; }

/* ---------- Header + barra de progresso ---------- */
.agenda-header{
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 var(--space-2);
  background: rgba(5,5,5,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.agenda-back{
  width: 38px; height: 38px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: transparent; color: var(--text);
  display: grid; place-items: center; text-decoration: none; flex-shrink: 0;
  transition: border-color .15s ease;
}
.agenda-back:hover{ border-color: var(--peach); }
.agenda-step-label{
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  letter-spacing: .02em;
}
.agenda-header-spacer{ width: 38px; flex-shrink: 0; }

.agenda-progress{
  position: sticky; top: 60px; z-index: 49;
  height: 4px; width: 100%; background: var(--border); overflow: hidden;
}
.agenda-progress-fill{
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--peach), var(--blue-light));
  border-radius: var(--radius-full);
  transition: width .4s ease;
}

/* ---------- Layout geral do fluxo ---------- */
.agenda-main{ padding: var(--space-4) 0 calc(var(--space-6) + 40px); }
.agenda-wrap{ max-width: 560px; }

.agenda-step{ display: none; }
.agenda-step.is-active{ display: block; animation: agendaStepIn .45s ease; }
@keyframes agendaStepIn{
  from{ opacity: 0; transform: translateY(14px); }
  to{ opacity: 1; transform: translateY(0); }
}

.agenda-card{
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-3) var(--space-4);
  box-shadow: 0 24px 50px -30px rgba(0,0,0,.7);
}
.agenda-card--center{ text-align: center; }
.agenda-card--center h1{ margin-top: var(--space-3); }
.agenda-card--center .agenda-lead{ max-width: 42ch; margin-left: auto; margin-right: auto; }
.agenda-card--center .btn{ margin-top: var(--space-4); }

.agenda-confirm-icon{
  width: 72px; height: 72px; margin: 0 auto; border-radius: 50%;
  background: linear-gradient(155deg, var(--peach), var(--blue-light));
  color: var(--ink); display: grid; place-items: center; font-size: 30px;
  box-shadow: 0 20px 40px -16px rgba(251,221,97,.22);
}

.agenda-lead{ margin-top: var(--space-2); font-size: 15.5px; color: var(--text-muted); }

.agenda-chat{
  display: flex; align-items: flex-end; gap: 10px; margin-top: var(--space-4);
}
.agenda-chat-avatar{
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--peach); flex-shrink: 0; background: var(--surface-2);
}
.agenda-chat-avatar img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.agenda-chat-bubble{
  background: var(--gold); color: var(--ink);
  padding: 12px 15px; border-radius: var(--radius-md); border-bottom-left-radius: 6px;
  font-family: var(--font-tech); font-size: 14px; line-height: 1.5; max-width: 86%;
}

/* ---------- Campos de formulário ---------- */
.agenda-field{ display: flex; flex-direction: column; gap: 8px; margin-top: var(--space-3); }
.agenda-field label{
  font-family: var(--font-tech); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted);
}
.agenda-input{
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 16px; color: var(--text); font-family: var(--font-tech); font-size: 15.5px;
  width: 100%; transition: border-color .15s ease;
}
.agenda-input::placeholder{ color: var(--text-muted); }
.agenda-input:focus{ outline: none; border-color: var(--peach); }

/* Input nativo type="date": em alguns navegadores (mobile e
   desktop) o controle nativo de data não respeita width:100% —
   width:100% ainda deixa o navegador livre pra "esticar" o box até
   caber o conteúdo interno (dd/mm/aaaa + ícone do calendário) quando
   esse conteúdo é maior que o container, e a página ganha scroll
   lateral. O truque width:1px + min-width:100% resolve isso: o
   width:1px faz o navegador descartar o cálculo de largura baseado
   no próprio conteúdo do campo, e o min-width:100% garante que ele
   ocupe a largura toda do container — sem brecha pra estourar. Como
   .agenda-field só usa flex pra empilhar label+input, tiramos esse
   campo especificamente do fluxo flex (:has força bloco no pai
   quando o filho é o input de data), reforçando ainda mais.
   color-scheme:dark deixa o ícone do calendário nativo no tom claro
   do tema — por padrão ele vem preto e fica invisível sobre o fundo
   escuro do campo. */
.agenda-field:has(input[type="date"]){
  display: block;
}
input[type="date"].agenda-input{
  display: block;
  width: 1px;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  color-scheme: dark;
}

.agenda-textarea{ resize: vertical; min-height: 120px; line-height: 1.5; }

.agenda-skip{
  display: inline-block; margin-top: var(--space-2); background: none; border: none;
  color: var(--text-muted); font-family: var(--font-tech); font-size: 13.5px;
  text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px;
  cursor: pointer; padding: 4px 0;
}
.agenda-skip:hover{ color: var(--peach); }

.agenda-consent{
  display: flex; align-items: flex-start; gap: 12px; margin-top: var(--space-3);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px 16px; cursor: pointer; font-size: 14px; color: var(--text); line-height: 1.5;
}
.agenda-consent input{
  width: 20px; height: 20px; margin-top: 1px; accent-color: var(--peach);
  flex-shrink: 0; cursor: pointer;
}
.agenda-consent a{ color: var(--peach); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Opções (forma de conversa / período) ---------- */
.agenda-options{
  margin-top: var(--space-3); display: grid; grid-template-columns: 1fr; gap: 10px;
}
@media (min-width: 480px){
  .agenda-options{ grid-template-columns: 1fr 1fr; }
}
.agenda-option{
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 13px 15px; cursor: pointer; text-align: left; font-family: var(--font-tech);
  transition: border-color .15s ease, background .15s ease;
}
.agenda-option:hover{ border-color: var(--peach); }
.agenda-option-icon{
  width: 40px; height: 40px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--peach);
  display: grid; place-items: center; font-size: 17px; transition: border-color .15s ease, color .15s ease;
}
.agenda-option-label{ flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; color: var(--text); }
.agenda-option-check{
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--border); color: transparent;
  display: grid; place-items: center; font-size: 12px; transition: all .15s ease;
}
.agenda-option.is-selected{ border-color: var(--peach); background: var(--surface-2); }
.agenda-option.is-selected .agenda-option-icon{ border-color: var(--peach); color: var(--peach); }
.agenda-option.is-selected .agenda-option-check{
  border-color: var(--peach); color: var(--ink); background: var(--peach);
}

/* ---------- Calendário ---------- */
.agenda-calendar{
  margin-top: var(--space-3); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-2);
}
.agenda-calendar-head{
  display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-2);
}
.agenda-calendar-head strong{
  font-family: var(--font-voice); font-style: italic; font-weight: 500;
  font-size: 16.5px; color: var(--peach-soft); text-transform: capitalize;
}
.agenda-cal-nav{
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: transparent; color: var(--text); display: grid; place-items: center;
  cursor: pointer; transition: border-color .15s ease;
}
.agenda-cal-nav:hover{ border-color: var(--peach); }
.agenda-cal-nav:disabled{ opacity: .3; cursor: not-allowed; }

.agenda-calendar-weekdays{
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; padding-bottom: 6px;
}
.agenda-calendar-grid{ display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.agenda-cal-day{
  position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center;
  border-radius: 50%; font-size: 13.5px; font-weight: 500; color: var(--text);
  background: transparent; border: 1px solid transparent; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.agenda-cal-day:hover{ border-color: var(--peach); }
.agenda-cal-day.is-today{ color: var(--peach); font-weight: 700; }
.agenda-cal-day.is-selected{ background: var(--gold); border-color: var(--gold); color: var(--ink); }
.agenda-cal-day.is-disabled{ color: var(--text-muted); opacity: .3; cursor: not-allowed; pointer-events: none; }
.agenda-cal-day.is-empty{ visibility: hidden; pointer-events: none; }

/* ---------- Horários ---------- */
.agenda-chips{ margin-top: var(--space-3); display: flex; flex-wrap: wrap; gap: 10px; min-height: 44px; }
.agenda-chip{
  padding: 12px 18px; border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: var(--font-tech);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s ease;
}
.agenda-chip:hover{ border-color: var(--peach); }
.agenda-chip.is-selected{ background: var(--gold); border-color: var(--gold); color: var(--ink); }
.agenda-chip.is-disabled{
  opacity: .35; text-decoration: line-through; cursor: not-allowed; pointer-events: none;
  background: var(--surface-2);
}
.agenda-empty{ width: 100%; text-align: center; color: var(--text-muted); font-size: 14px; padding: var(--space-2) 0; }

.agenda-skeleton-row{ display: flex; gap: 10px; flex-wrap: wrap; width: 100%; }
.agenda-skeleton{
  width: 84px; height: 44px; border-radius: var(--radius-full);
  background: var(--surface-2); border: 1px solid var(--border);
  animation: agendaPulse 1.2s ease-in-out infinite;
}
@keyframes agendaPulse{ 0%, 100%{ opacity: .5; } 50%{ opacity: 1; } }

/* ---------- Revisão ---------- */
.agenda-review{ margin-top: var(--space-3); display: flex; flex-direction: column; gap: 10px; }
.agenda-review-row{
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 13px 16px; display: flex; flex-direction: column; gap: 4px;
}
.agenda-review-row .label{
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted);
}
.agenda-review-row .value{ font-size: 15px; font-weight: 600; color: var(--text); }

/* ---------- Barra de ação fixa ---------- */
.agenda-actionbar{
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; gap: 12px; align-items: center;
  padding: var(--space-2); padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
  background: rgba(5,5,5,0.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.agenda-actionbar.is-hidden{ display: none; }
#agendaVoltarBtn{ flex: 0 0 auto; }
.agenda-next-btn{ flex: 1; }
#agendaVoltarBtn.is-hidden{ display: none; }

/* ---------- Toasts ---------- */
.agenda-toast-container{
  position: fixed; left: 0; right: 0; bottom: 84px; z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0 var(--space-2); pointer-events: none;
}
.agenda-toast{
  pointer-events: auto; max-width: 480px; width: 100%;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 13px 16px; font-size: 14px; color: var(--text);
  box-shadow: 0 16px 34px -20px rgba(0,0,0,.7);
  animation: agendaToastIn .25s ease;
  display: flex; align-items: center; gap: 10px;
}
.agenda-toast i{ flex-shrink: 0; }
.agenda-toast--danger{ border-color: #C1503F; }
.agenda-toast--danger i{ color: #E38070; }
.agenda-toast--success{ border-color: var(--success-border); }
.agenda-toast--success i{ color: var(--success); }
@keyframes agendaToastIn{
  from{ opacity: 0; transform: translateY(8px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* Banner de sucesso reutilizável — mesmo componente do .agenda-card,
   só com a borda e o eyebrow em verde em vez do dourado padrão da
   marca. Usar em qualquer confirmação de sucesso do app (venda
   finalizada, cadastro salvo, movimentação registrada etc.):
   <div class="agenda-card agenda-card--sucesso">
     <span class="eyebrow"><i class="bi bi-check-circle"></i> Texto</span>
   </div> */
.agenda-card--sucesso{
  border-color: var(--success-border);
  margin-bottom: var(--space-3);
}
.agenda-card--sucesso .eyebrow{ color: var(--success); }

/* ---------- Banners de instalar PWA / pedir notificação ---------- */
.pwa-banner{
  display: flex; align-items: flex-start; gap: 12px;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; margin: 14px auto;
  animation: agendaStepIn .35s ease;
}
.pwa-banner-icon{
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--peach);
  display: grid; place-items: center; font-size: 19px;
}
.pwa-banner-text{ flex: 1; min-width: 0; }
.pwa-banner-text strong{ display: block; font-size: 14.5px; color: var(--text); margin-bottom: 3px; }
.pwa-banner-text span{ font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.pwa-banner-actions{ display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pwa-banner-actions .btn{ height: 36px; padding: 0 14px; font-size: 13px; }
.pwa-banner-dismiss{
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-size: 18px; line-height: 1; flex-shrink: 0; padding: 2px;
}
.pwa-banner-dismiss:hover{ color: var(--text); }

.pwa-ios-steps{ list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pwa-ios-steps li{ display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.pwa-ios-steps .numero{
  width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--peach); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0;
}
.pwa-ios-steps i{ color: var(--peach); }

/* ---------- Menu inferior (área do cliente / admin, PWA) ---------- */
.bottom-nav{
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: rgba(5,5,5,.94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item{
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 10px 4px 8px; text-decoration: none; color: var(--text-muted);
  transition: color .15s ease;
}
.bottom-nav-item.is-active{ color: var(--peach); }
.bottom-nav-icon{ font-size: 21px; line-height: 1; }
.bottom-nav-label{ font-size: 10.5px; font-weight: 600; font-family: var(--font-tech); }

.tem-bottom-nav{ padding-bottom: calc(70px + env(safe-area-inset-bottom)); }

/* ---------- Botão flutuante de novo agendamento ---------- */
.fab-novo{
  position: fixed; right: 18px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 55;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(155deg, var(--peach), var(--blue-light));
  color: var(--ink); display: grid; place-items: center; font-size: 24px;
  text-decoration: none; box-shadow: 0 16px 34px -12px rgba(251,221,97,.28);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fab-novo:hover{ transform: translateY(-2px) scale(1.04); box-shadow: 0 20px 40px -12px rgba(251,221,97,.38); }

/* ---------- Casca fixa (header + menu inferior sempre visíveis) ---------- */
.app-shell{ height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.app-shell > .agenda-header{ position: static; flex-shrink: 0; }
/* Respiro padrão entre o header e o conteúdo — vale pra toda tela que
   usa a casca fixa (app-shell-content), então nenhuma delas fica com
   o conteúdo colado no header. Cada `-main` cuida só do padding
   lateral/inferior; o espaçamento de topo é sempre este daqui. */
.app-shell-content{ flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: var(--space-5); }
.app-shell > .bottom-nav,
.app-shell > .detalhe-actionbar{ position: static; flex-shrink: 0; }

/* ==========================================================================
   LOGIN / LOGOUT (admin)
   ========================================================================== */
.login-header{ padding: var(--space-3) 0; }
.login-header .wrap{ max-width: 420px; margin: 0 auto; padding: 0 var(--space-2); }
.brand{ display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-tech); font-weight: 700; font-size: 16px; text-decoration: none; }
.brand-mark{
  width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--gold);
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--ink);
}

.login-main{ flex: 1 0 auto; display: flex; align-items: center; padding: var(--space-4) 0; }
.login-wrap{ max-width: 420px; margin: 0 auto; padding: 0 var(--space-2); width: 100%; }

.login-card{
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  box-shadow: 0 24px 50px -30px rgba(0,0,0,.7);
}

.login-icon{
  width: 64px; height: 64px; margin: 0 auto var(--space-3); border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--peach);
  display: grid; place-items: center; font-size: 26px;
}
.login-logo{
  width: 96px; height: 96px; margin: 0 auto var(--space-3);
  border-radius: 50%; overflow: hidden;
  background: #000;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(251,221,97,0.12);
  display: grid; place-items: center;
}
.login-logo img{
  width: 100%; height: 100%; object-fit: cover;
}

.login-card h1{
  font-family: var(--font-voice); font-weight: 500; line-height: 1.2;
  letter-spacing: -0.01em; margin: var(--space-1) 0 0;
  font-size: clamp(24px, 6vw, 28px); color: var(--text);
}

.login-lead{ margin-top: var(--space-2); color: var(--text-muted); font-size: 14.5px; }

.login-actions{ margin-top: var(--space-4); display: flex; flex-direction: column; gap: 12px; }
/* Nas telas de login/logout os botões da coluna de ações ocupam a largura toda */
.login-actions .btn{ width: 100%; }

.login-footer{ padding: var(--space-3) 0; flex-shrink: 0; text-align: center; }
.login-footer span{ color: var(--text-muted); font-size: 12px; }

@media (min-width: 480px){
  .login-card{ padding: var(--space-4); }
}

/* ==========================================================================
   DASHBOARD (home / index.php)
   ========================================================================== */
.home-main{ padding: var(--space-5) 0 var(--space-4); }

.insights-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: var(--space-3) 0; }
.insight-card{
  display: flex; flex-direction: column; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; text-align: center;
}
.insight-card-icone{
  width: 38px; height: 38px; border-radius: 12px; margin-bottom: 10px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--peach);
  display: grid; place-items: center; font-size: 17px;
}
.insight-card.positivo .insight-card-icone{ color: var(--success); border-color: var(--success-border); }
.insight-card .numero{ font-family: var(--font-voice); font-weight: 600; font-size: 26px; line-height: 1.1; color: var(--peach); }
.insight-card.pendente .numero{ color: var(--blue-light); }
.insight-card.positivo .numero{ color: var(--success); }
.insight-card .rotulo{ font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Selinho de tendência ("X% vs ontem") embaixo do número — dá
   contexto imediato sem precisar abrir o financeiro pra saber se o
   dia está indo melhor ou pior que o anterior. */
.insight-tendencia{
  display: inline-flex; align-items: center; gap: 3px; margin-top: 10px;
  padding: 3px 8px; border-radius: var(--radius-full);
  font-family: var(--font-tech); font-size: 10px; font-weight: 700;
  white-space: nowrap;
}
.insight-tendencia i{ font-size: 11px; }
.insight-tendencia.up{ background: rgba(143,209,158,0.12); color: var(--success); }
.insight-tendencia.down{ background: rgba(227,128,112,0.12); color: #E38070; }
.insight-tendencia.neutro{ background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); }

.secao-titulo{
  font-family: var(--font-voice); font-weight: 500; font-size: 17px;
  color: var(--peach-soft); margin: var(--space-4) 0 var(--space-2);
  display: flex; align-items: center; gap: 8px;
}

.hoje-linha{
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 13px 16px; margin-bottom: 10px; text-decoration: none; color: inherit;
  transition: border-color .15s ease;
}
.hoje-linha:hover{ border-color: var(--peach); }
.hoje-hora{
  flex-shrink: 0; font-family: var(--font-tech); font-weight: 700; font-size: 15px;
  color: var(--peach); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 8px 10px; text-align: center; min-width: 56px;
}
.hoje-info{ flex: 1; min-width: 0; }
.hoje-info strong{ display: block; font-size: 14.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hoje-info span{ font-size: 12.5px; color: var(--text-muted); }
.hoje-linha i.bi-chevron-right{ color: var(--text-muted); flex-shrink: 0; }

.home-empty{ text-align: center; padding: var(--space-4) var(--space-2); color: var(--text-muted); }
.home-empty i{ font-size: 28px; color: var(--peach); margin-bottom: 8px; display: block; }

/* ==========================================================================
   MENU (menu.php)
   ========================================================================== */
.menu-main{ padding: var(--space-5) 0 var(--space-4); }
.menu-grid{
  display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr;
  gap: 12px; margin-top: var(--space-3); align-items: stretch;
}
.menu-item{
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px 14px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px;
  height: 100%; box-sizing: border-box;
  transition: border-color .15s ease, transform .15s ease;
}
.menu-item:hover{ border-color: var(--peach); transform: translateY(-2px); }
.menu-item-icon{
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--peach);
  display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
}
.menu-item strong{ font-size: 14.5px; color: var(--text); }
.menu-item span{ font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.menu-item-badge{
  position: absolute; top: 14px; right: 14px;
  background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 800;
  min-width: 20px; height: 20px; border-radius: var(--radius-full); display: grid; place-items: center; padding: 0 5px;
}

/* ==========================================================================
   CLIENTES (clientes.php)
   ========================================================================== */
.clientes-main{ padding: 0 0 var(--space-4); }
.busca-wrap{ margin-bottom: var(--space-3); }
.busca-input{
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-full);
  padding: 12px 18px;
}
.busca-input i{ color: var(--text-muted); }
.busca-input input{
  flex: 1; background: none; border: none; outline: none; color: var(--text);
  font-family: var(--font-tech); font-size: 16px; /* >=16px evita o zoom automático do iOS ao focar */
}
.busca-input input::placeholder{ color: var(--text-muted); }

.cliente-card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; margin-bottom: 12px;
}
.cliente-top{ display: flex; align-items: center; gap: 12px; cursor: pointer; }
.cliente-avatar{
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--peach);
  display: grid; place-items: center; font-family: var(--font-tech); font-weight: 700; font-size: 15px;
}
.cliente-nome-wrap{ flex: 1; min-width: 0; }
.cliente-nome-wrap strong{ display: block; font-size: 15px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cliente-nome-wrap span{ font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cliente-stat{ flex-shrink: 0; text-align: right; }
.cliente-stat strong{ display: block; font-size: 13px; color: var(--peach-soft); }
.cliente-stat span{ font-size: 10.5px; color: var(--text-muted); }
.cliente-chevron{ flex-shrink: 0; color: var(--text-muted); }

.clientes-empty{ text-align: center; padding: var(--space-4) var(--space-2); color: var(--text-muted); }
.clientes-empty i{ font-size: 30px; color: var(--peach); margin-bottom: 10px; display: block; }

.detalhe-actionbar{
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: var(--space-2); padding-bottom: calc(var(--space-2) + env(safe-area-inset-bottom));
  background: rgba(5,5,5,0.94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.detalhe-actionbar .btn{ flex: 1 1 auto; height: 46px; padding: 0 12px; font-size: 13px; white-space: nowrap; }

/* ==========================================================================
   DASHBOARD DA LOJA (meta de faturamento, estoque baixo, movimentações)
   ========================================================================== */
.meta-card{ margin-top: var(--space-3); }
.meta-card-head{ display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.meta-card-head strong{ font-family: var(--font-voice); font-size: 22px; color: var(--peach); }
.meta-card-head span{ font-size: 12.5px; color: var(--text-muted); }
.meta-track{
  margin-top: 12px; height: 10px; border-radius: var(--radius-full);
  background: var(--surface-2); border: 1px solid var(--border); overflow: hidden;
}
.meta-fill{
  height: 100%; background: linear-gradient(90deg, var(--peach), var(--blue-light));
  border-radius: var(--radius-full); transition: width .5s ease;
}
.meta-legenda{ display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.meta-legenda strong{ color: var(--peach-soft); }

.lista-linha{
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 13px 16px; margin-bottom: 10px; text-decoration: none; color: inherit;
  transition: border-color .15s ease;
}
.lista-linha:hover{ border-color: var(--peach); }
.lista-icone{
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--peach);
  display: grid; place-items: center; font-size: 17px; overflow: hidden;
}
.lista-icone img{ width: 100%; height: 100%; object-fit: cover; }
.lista-icone.alerta{ color: #E38070; border-color: #C1503F; }
.lista-icone.entrada{ color: #8FD19E; border-color: #3E7A4C; }
.lista-icone.saida{ color: #E38070; border-color: #C1503F; }
.lista-info{ flex: 1; min-width: 0; }
.lista-info strong{ display: block; font-size: 14.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista-info span{ font-size: 12.5px; color: var(--text-muted); }
.lista-valor{ flex-shrink: 0; text-align: right; font-family: var(--font-tech); font-weight: 700; font-size: 13.5px; }
.lista-valor.baixo{ color: #E38070; }
.lista-valor.entrada{ color: #8FD19E; }
.lista-valor.saida{ color: #E38070; }
.lista-valor.quebra{ flex-shrink: 1; min-width: 0; white-space: normal; word-break: break-word; }

/* ==========================================================================
   PDV (pdv.php)
   ========================================================================== */
.pdv-main{ padding: var(--space-5) 0 calc(var(--space-4) + 92px); }

.pdv-busca-sticky{
  padding: var(--space-3) 0 var(--space-2) 0;
}

.pdv-carrinho-cabecalho{
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 var(--space-2);
}
.pdv-carrinho-badge{
  font-family: var(--font-tech); font-weight: 700; font-size: 12.5px; color: var(--ink);
  background: var(--gold); border-radius: var(--radius-full);
  padding: 2px 10px; min-width: 20px; text-align: center; line-height: 1.6;
}
.pdv-carrinho-badge:empty{ display: none; }

.pdv-busca-dica{
  margin: 0 4px 0; font-size: 12px; color: var(--text-muted); line-height: 1.5;
}

/* Cards de resultado da busca — reaproveita o visual do produto-card
   (produtos.php: imagem, nome, tags) trocando a quantidade pelo preço,
   já que aqui o contexto é venda, não estoque. */
.pdv-produto-card{
  width: 100%; box-sizing: border-box; text-align: left; font: inherit;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.pdv-produto-card:disabled{ opacity: .45; cursor: not-allowed; }
.pdv-produto-card:disabled:hover{ border-color: var(--border); transform: none; }

.produto-preco{
  flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  min-width: 66px;
}
.produto-preco strong{ font-family: var(--font-voice); font-size: 16.5px; color: var(--peach); line-height: 1.15; }
.produto-preco span{ font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.produto-preco.esgotado strong{ color: #E38070; font-size: 13px; font-family: var(--font-tech); font-weight: 700; }

.pdv-resultado-status{ padding: var(--space-2) 0; }

/* Card do carrinho segue o mesmo padrão visual do produto-card do
   estoque (foto + info + coluna à direita), pra manter o padrão do
   app. O botão de remover fica como um "x" no canto da foto — mesmo
   recurso já usado no upload de fotos do cadastro de produto — e a
   coluna da direita mostra o subtotal em cima e o stepper embaixo. */
.pdv-carrinho-item{
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px; margin-bottom: 12px;
  animation: pdvItemIn .35s ease;
}
/* Item recém adicionado ou com a quantidade alterada — mesmo tipo de
   confirmação visual clara que a movimentação dá ao selecionar um
   produto, só que aqui como um brilho rápido na borda do item. */
.pdv-carrinho-item.pdv-item-novo{ border-color: var(--peach); }
@keyframes pdvItemIn{
  from{ opacity: 0; transform: translateY(8px) scale(.98); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}

.pdv-carrinho-img{
  position: relative;
  flex-shrink: 0; width: 64px; height: 64px; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--peach);
  overflow: hidden; display: grid; place-items: center; font-size: 22px;
}
.pdv-carrinho-img img{ width: 100%; height: 100%; object-fit: cover; }

.pdv-carrinho-item .produto-info{ flex: 1; min-width: 0; }
.pdv-carrinho-item .produto-info span{ font-size: 12px; color: var(--text-muted); }

/* Mesmo componente do upload-slot-remover (upload de fotos), pra
   seguir o padrão do app: círculo dentro dos limites da foto (não
   estourando o overflow:hidden do container, que antes cortava o
   botão pela metade). */
.pdv-remover-btn{
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%; border: none;
  background: rgba(5,5,5,0.75); color: var(--text); backdrop-filter: blur(4px);
  display: grid; place-items: center; cursor: pointer; font-size: 11px;
  transition: background .15s ease, transform .1s ease;
}
.pdv-remover-btn:hover, .pdv-remover-btn:active{ background: #C1503F; }
.pdv-remover-btn:active{ transform: scale(0.9); }

.pdv-carrinho-direita{
  flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
/* Subtotal com legenda explícita — antes usava o mesmo estilo do
   número de "em estoque" (produto-qtd) usado no resto do app, o que
   fazia o preço parecer uma quantidade. Aqui fica claro que é valor. */
.pdv-carrinho-subtotal{ display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.pdv-carrinho-subtotal-valor{ font-family: var(--font-voice); font-size: 16.5px; color: var(--peach); line-height: 1.15; }
.pdv-carrinho-subtotal span{ font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }

/* Stepper: o "+" fica em destaque (dourado, ação mais usada durante
   a venda), o "-" fica discreto — mais fácil de diferenciar num
   toque rápido, sem precisar mirar com precisão. */
.pdv-stepper{
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-full);
  padding: 4px;
}
.pdv-stepper span{ min-width: 18px; text-align: center; font-weight: 700; font-size: 14px; }
.pdv-stepper-btn{
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  cursor: pointer; font-size: 15px; border: 1px solid var(--border);
  transition: border-color .15s ease, background .15s ease, transform .1s ease, color .15s ease;
}
.pdv-stepper-btn:active{ transform: scale(0.9); }

.pdv-stepper-btn[data-acao="menos"]{ background: var(--surface); color: var(--text-muted); }
.pdv-stepper-btn[data-acao="menos"]:hover{ border-color: #C1503F; color: #E38070; }

.pdv-stepper-btn[data-acao="mais"]{ background: var(--gold); color: var(--ink); border-color: var(--gold); }
.pdv-stepper-btn[data-acao="mais"]:hover{ background: var(--gold-light); }

/* ---------- Tela de checkout (pdv-checkout.php) ---------- */
.pdv-checkout-main{ padding: var(--space-5) 0 calc(var(--space-4) + 92px); }

.checkout-parcelas{ margin-top: var(--space-3); }
.checkout-parcelas.oculto{ display: none; }

/* Reaproveita o mesmo cartão do item do carrinho do PDV (ícone à
   esquerda, info no meio, valor em destaque + stepper de +/- na
   coluna direita) em vez do layout simples que existia antes — mesmo
   padrão visual usado pra aumentar a quantidade dos produtos. */
.checkout-parcelas-linha{
  margin: 10px 0 0;
}
.checkout-parcelas-linha .pdv-stepper span{ min-width: 30px; }

/* Checkbox "pagamento parcelado" — independe da forma escolhida.
   Reaproveita a paleta do app (surface/border/gold) num switch
   arredondado, no mesmo espírito visual dos outros componentes. */
.agenda-switch-row{
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px; margin-top: var(--space-3);
}
.agenda-switch-row-texto strong{ display: block; font-size: 14.5px; color: var(--text); }
.agenda-switch-row-texto span{ font-size: 12px; color: var(--text-muted); }

.agenda-switch{ position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.agenda-switch input{ position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.agenda-switch-slider{
  position: absolute; inset: 0; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-full); pointer-events: none; transition: background .15s ease, border-color .15s ease;
}
.agenda-switch-slider::before{
  content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 2px;
  background: var(--text); border-radius: 50%; transition: transform .15s ease, background .15s ease;
}
.agenda-switch input:checked + .agenda-switch-slider{ background: var(--gold); border-color: var(--gold); }
.agenda-switch input:checked + .agenda-switch-slider::before{ transform: translateX(20px); background: var(--ink); }

.pdv-actionbar{ justify-content: space-between; }
.pdv-actionbar.is-hidden{ display: none; }
.pdv-total{ display: flex; flex-direction: column; gap: 2px; }
.pdv-total span{ font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.pdv-total strong{ font-family: var(--font-voice); font-size: 20px; color: var(--peach); }
.pdv-actionbar #pdvFinalizarBtn{ flex: 0 0 auto; }

/* Alerta "produto adicionado ao carrinho" — mesmo visual do card de
   "Venda finalizada com sucesso" (agenda-card com borda dourada e
   eyebrow com ícone de check), só que aqui dentro do container de
   toasts (fixo, embaixo da tela) pra dar o mesmo tipo de confirmação
   sem precisar rolar até o topo da página. Reaproveita a animação de
   entrada já usada pelos toasts (agendaToastIn). */
.pdv-toast-card{
  width: 100%; max-width: 480px;
  padding: 14px 18px;
  border-color: var(--success-border);
  box-shadow: 0 16px 34px -20px rgba(0,0,0,.7);
  pointer-events: auto;
  animation: agendaToastIn .25s ease;
}
.pdv-toast-card .eyebrow{ margin: 0; color: var(--success); }

/* ---------- Modal de pagamento (bottom sheet) ---------- */
.pdv-modal-overlay{
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.65);
  display: flex; align-items: flex-end; justify-content: center;
}
.pdv-modal-overlay.is-hidden{ display: none; }

.pdv-modal-sheet{
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 12px var(--space-3) calc(var(--space-3) + env(safe-area-inset-bottom));
  animation: agendaStepIn .25s ease;
}
.pdv-modal-handle{
  width: 40px; height: 4px; border-radius: var(--radius-full);
  background: var(--border); margin: 0 auto var(--space-2);
}
.pdv-modal-sheet h2{
  font-family: var(--font-voice); font-weight: 500; font-size: 20px; color: var(--text); margin: 0 0 var(--space-2);
}
.pdv-modal-resumo{
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 14px; color: var(--text-muted);
}
.pdv-modal-resumo strong{ color: var(--peach-soft); font-family: var(--font-tech); font-size: 15px; }
.pdv-modal-label{
  display: block; margin-top: var(--space-2); font-family: var(--font-tech); font-size: 12px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted);
}
.pdv-modal-actions{ display: flex; gap: 10px; margin-top: var(--space-3); }
.pdv-modal-actions .btn{ flex: 1; }
/* ==========================================================================
   ESTOQUE (produtos.php) — adicionar ao final de css/estilo.css
   ========================================================================== */
/* Estoque (produtos.php) — agora só tem a detalhe-actionbar fixa embaixo
   (sem bottom-nav nem FAB, que viraram os botões "Voltar ao menu" /
   "Novo produto"), mesmo respiro do padrão de produto_detalhes.php */
.produtos-main{ padding: var(--space-5) 0 calc(var(--space-4) + 92px); }

.produto-card{
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px; margin-bottom: 12px; text-decoration: none; color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
.produto-card:hover{ border-color: var(--peach); transform: translateY(-1px); }
.produto-card:active{ transform: translateY(0) scale(.985); border-color: var(--peach); }

.produto-img{
  flex-shrink: 0; width: 64px; height: 64px; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--peach);
  overflow: hidden; display: grid; place-items: center; font-size: 22px;
}
.produto-img img{ width: 100%; height: 100%; object-fit: cover; }

.produto-info{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.produto-info strong{
  font-size: 14.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.produto-codigo{ font-size: 12px; color: var(--text-muted); }

.produto-tags{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.produto-tag{
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--peach-soft); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-full); padding: 3px 9px; white-space: nowrap;
}
.produto-tag.tag-ativo{ color: #8FD19E; border-color: #3E7A4C; }
.produto-tag.tag-inativo{ color: #E38070; border-color: #C1503F; }

.produto-qtd{
  flex-shrink: 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 58px;
}
.produto-qtd strong{ font-family: var(--font-voice); font-size: 18px; color: var(--peach); line-height: 1; }
.produto-qtd span{ font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.produto-qtd.baixo strong{ color: #E38070; }

.produto-chevron{ flex-shrink: 0; color: var(--text-muted); }

/* ==========================================================================
   DETALHES DO PRODUTO (produto_detalhes.php)
   ========================================================================== */
.produto-galeria{ margin-bottom: var(--space-3); }
.produto-galeria-principal{
  width: 100%; aspect-ratio: 1 / 1; border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface); border: 1px solid var(--border);
}
.produto-galeria-principal img{ width: 100%; height: 100%; object-fit: cover; }
.produto-galeria-thumbs{ display: flex; gap: 8px; margin-top: 8px; }
.produto-thumb{
  width: 56px; height: 56px; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface); padding: 0; cursor: pointer;
  transition: border-color .15s ease;
}
.produto-thumb:hover{ border-color: var(--peach); }
.produto-thumb img{ width: 100%; height: 100%; object-fit: cover; }

.produto-galeria-vazia{
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  aspect-ratio: 16 / 9; border-radius: var(--radius-lg); margin-bottom: var(--space-3);
  background: var(--surface); border: 1px dashed var(--border); color: var(--text-muted); font-size: 13px;
}
.produto-galeria-vazia i{ font-size: 26px; color: var(--peach); }

.info-grid{
  display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-top: var(--space-2);
}
.info-item{
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 12px; text-align: center;
}
.info-item span{ display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.info-item strong{ font-family: var(--font-voice); font-size: 18px; color: var(--peach); }
.info-item.alerta strong{ color: #E38070; }

/* ==========================================================================
   CADASTRO DE PRODUTO (produto_novo.php)
   ========================================================================== */

/* Campos que sempre salvam em maiúsculas (categoria, cor, tamanho) */
.campo-maiusculo{ text-transform: uppercase; }
.campo-maiusculo::placeholder{ text-transform: none; }

.upload-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: var(--space-2); }

.upload-slot{
  position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-md);
  background: var(--surface-2); overflow: hidden;
  transition: transform .15s ease;
}
.upload-slot input[type="file"]{
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
}
.upload-slot.tem-arquivo input[type="file"]{ pointer-events: none; }

.upload-slot-label{
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-radius: var(--radius-md); border: 1.5px dashed var(--border);
  color: var(--text-muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; text-align: center; transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.upload-slot-label i{ font-size: 22px; color: var(--peach); }
.upload-slot-label span{ font-size: 11.5px; font-weight: 700; color: var(--text); line-height: 1.3; }
.upload-slot-label small{ font-size: 9.5px; color: var(--text-muted); line-height: 1.3; }
.upload-slot:hover .upload-slot-label{ border-color: var(--peach); background: rgba(251,221,97,0.05); }
.upload-slot.tem-arquivo .upload-slot-label{ display: none; }

.upload-slot-preview{
  position: relative; width: 100%; height: 100%; border-radius: var(--radius-md);
  overflow: hidden; border: 1px solid var(--border);
}
.upload-slot-preview img{ width: 100%; height: 100%; object-fit: cover; }
.upload-slot-remover{
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: rgba(5,5,5,0.75); color: var(--text); backdrop-filter: blur(4px);
  display: grid; place-items: center; cursor: pointer; font-size: 12px;
  transition: background .15s ease;
}
.upload-slot-remover:hover{ background: #C1503F; }

/* Cadastro de produto (produto_novo.php) — agora tem a detalhe-actionbar fixa
   embaixo (botão "Voltar ao estoque"), então reserva espaço igual às outras
   telas que usam esse mesmo componente */
.produto-form-main{ padding: var(--space-5) 0 calc(var(--space-4) + 92px); }


/* Detalhes do produto (produto_detalhes.php) — só tem a detalhe-actionbar fixa
   embaixo (sem bottom-nav nem FAB), por isso usa o mesmo respiro do padrão
   de outras telas com actionbar (igual pdv-main) em vez do padding da listagem */
.produto-detalhes-main{ padding: var(--space-5) 0 calc(var(--space-4) + 92px); }

/* ==========================================================================
   MOVIMENTAÇÕES (movimentacoes.php / movimentacao_nova.php)
   ========================================================================== */
/* Histórico (movimentacoes.php) — só tem a detalhe-actionbar fixa embaixo
   (Voltar ao menu / Movimentar), mesmo respiro do padrão de
   produto_detalhes.php */
.movimentacoes-main{ padding: var(--space-5) 0 calc(var(--space-4) + 92px); }

/* Nova movimentação (movimentacao_nova.php) — formulário com
   detalhe-actionbar fixa embaixo (Cancelar / Salvar) */
.movimentacao-nova-main{ padding: var(--space-5) 0 calc(var(--space-4) + 92px); }

/* ==========================================================================
   FINANCEIRO (financeiro.php / financeiro_detalhes.php / financeiro_nova.php)
   (financeiro_detalhes.php reaproveita .produto-detalhes-main, que já
   existe no arquivo, então não precisa de nada extra pra ela.)
   ========================================================================== */

.financeiro-main{ padding: var(--space-5) 0 calc(var(--space-4) + 92px); }
.financeiro-nova-main{ padding: var(--space-5) 0 calc(var(--space-4) + 92px); }

/* Variante verde do info-item (já existe .info-item.alerta em vermelho) */
.info-item.sucesso strong{ color: #8FD19E; }

/* Filtro rápido Todos / Entradas / Saídas no topo de financeiro.php */
.fin-filtro{ display: flex; gap: 8px; margin-top: var(--space-3); }
.fin-filtro-btn{
  flex: 1; padding: 10px 8px; border-radius: var(--radius-md); text-align: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  font-family: var(--font-tech); font-weight: 600; font-size: 13px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.fin-filtro-btn:hover{ border-color: var(--peach); }
.fin-filtro-btn.ativo{ border-color: var(--peach); background: var(--surface-2); color: var(--peach); }
.fin-filtro-btn.ativo-entrada{ border-color: #3E7A4C; background: rgba(143,209,158,0.12); color: #8FD19E; }
.fin-filtro-btn.ativo-saida{ border-color: #C1503F; background: rgba(227,128,112,0.12); color: #E38070; }

/* Toggle Entrada / Saída em financeiro_nova.php — mesmo padrão do
   .mov-tipo-toggle usado em movimentacao_nova.php, só com prefixo
   próprio pra não colidir com o estilo local daquela página. */
.fin-tipo-toggle{ display: flex; gap: 10px; margin-top: 8px; }
.fin-tipo-btn{
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px; border-radius: var(--radius-md); text-align: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: var(--font-tech); font-weight: 600; font-size: 14.5px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.fin-tipo-btn i{ font-size: 20px; }
.fin-tipo-btn:hover{ border-color: var(--peach); }
.fin-tipo-btn.ativo-entrada{ border-color: #3E7A4C; background: rgba(143,209,158,0.12); color: #8FD19E; }
.fin-tipo-btn.ativo-saida{ border-color: #C1503F; background: rgba(227,128,112,0.12); color: #E38070; }

.fin-parcela-item{ margin-top: var(--space-3); }

/* Linha de parcela dentro do card "Parcelamento" em
   financeiro_detalhes.php — reaproveita .lista-linha, só sem virar
   link clicável quando é a parcela atual (fica só destacada). */
.fin-parcela-linha-atual{ border-color: var(--peach); background: var(--surface-2); }
