/* Arien Mix · gestão
   Base neutra (cinzas frios) com o vinho da marca só em ações e destaques. */

:root {
  /* Marca Arien Mix: vinho (folha e letras), rosa, verde-sálvia, terracota e fundo creme. */
  --marca: #6e1427;
  --marca-escura: #55101e;
  --marca-suave: #f9eeec;
  --marca-borda: #ecd3cf;
  --rosa: #d6958a;
  --salvia: #678061;
  --terracota: #b9724f;
  --creme: #fefbee;

  --fundo: #faf7f1;
  --superficie: #ffffff;
  --superficie-2: #fbf9f4;
  --texto: #241a1c;
  --texto-2: #54484a;
  --suave: #7b6e70;
  --borda: #e9e2d8;
  --borda-forte: #d7cec1;

  --ok: #466142;
  --ok-fundo: #eaf1e6;
  --aviso: #8a4a26;
  --aviso-fundo: #fbeee2;
  --alerta: #b42318;
  --alerta-fundo: #fdecea;
  --info-fundo: #f5efe7;

  --raio: 10px;
  --raio-g: 14px;
  --sombra: 0 1px 2px rgba(60, 30, 25, .06);
  --sombra-m: 0 4px 16px rgba(60, 30, 25, .1);
  --lateral: 248px;
  --barra: 56px;
  --abas: 64px;
  --fonte-marca: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;

  /* nomes antigos usados nas telas */
  --cor: var(--marca);
  --cor-escura: var(--marca-escura);
  --cartao: var(--superficie);
  --destaque: var(--marca-suave);
  color-scheme: light;
}

@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fontes/cormorant-garamond-latin-600-normal.bf1e09fb81d7.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fontes/cormorant-garamond-latin-700-normal.7b927d350248.woff2") format("woff2");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fundo); color: var(--texto);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--marca); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .25rem; letter-spacing: -.01em; font-weight: 700; }
h1 small { display: block; font-size: .95rem; font-weight: 400; color: var(--suave); margin-top: .15rem; letter-spacing: 0; }
h2 { font-size: 1rem; margin: 0 0 .75rem; font-weight: 650; }
h2 small { font-weight: 400; color: var(--suave); }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
p { margin: 0 0 .75rem; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icone {
  width: 20px; height: 20px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* --- Estrutura ------------------------------------------------------------ */
.com-app .conteudo { margin-left: var(--lateral); }
.conteudo { max-width: 1320px; padding: 1.75rem 2rem 3rem; }
.com-app .conteudo { max-width: calc(1320px + var(--lateral)); }

.lateral {
  position: fixed; inset: 0 auto 0 0; width: var(--lateral); z-index: 50;
  display: flex; flex-direction: column; background: var(--superficie); border-right: 1px solid var(--borda);
}
.lateral-topo { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1rem .75rem 1.1rem; }
.marca { display: flex; align-items: center; gap: .65rem; color: var(--texto); }
.marca:hover { text-decoration: none; }
.marca-logo { height: 34px; width: auto; display: block; flex: 0 0 auto; }
.marca-texto b { font: 700 1.35rem/1 var(--fonte-marca); letter-spacing: .1em; color: var(--marca); }
.marca-simbolo {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #8b2236, var(--marca-escura)); color: #fff;
  font: 700 1.05rem/1 Georgia, "Times New Roman", serif; box-shadow: 0 2px 6px rgba(110, 20, 39, .3);
}
.marca-texto { display: flex; flex-direction: column; gap: .2rem; line-height: 1; }
.marca-texto small { font-weight: 600; color: var(--suave); font-size: .6rem; letter-spacing: .32em; text-transform: uppercase; }
.lateral-fechar { display: none; }
.lateral-nav { flex: 1; overflow-y: auto; padding: .25rem .75rem 1rem; }
.lateral-nav a {
  display: flex; align-items: center; gap: .7rem; padding: .5rem .65rem; margin: 1px 0; border-radius: 8px;
  color: var(--texto-2); font-weight: 500; font-size: .92rem;
}
.lateral-nav a .icone { color: #8b93a1; }
.lateral-nav a:hover { background: var(--superficie-2); color: var(--texto); text-decoration: none; }
.lateral-nav a[aria-current="page"] { background: var(--marca-suave); color: var(--marca); font-weight: 650; }
.lateral-nav a[aria-current="page"] .icone { color: var(--marca); }
.lateral-grupo {
  margin: 1.1rem .65rem .35rem; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: #9aa1ad;
}
.lateral-usuario { display: flex; align-items: center; gap: .65rem; padding: .85rem 1rem; border-top: 1px solid var(--borda); }
.lateral-usuario form { margin: 0 0 0 auto; }
.lateral-usuario-nome { display: flex; flex-direction: column; font-weight: 600; font-size: .9rem; line-height: 1.25; min-width: 0; }
.lateral-usuario-nome a { font-weight: 400; font-size: .8rem; color: var(--suave); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--marca-suave); color: var(--marca); font-weight: 700;
}
.botao-icone {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; border: 0;
  background: transparent; color: var(--texto-2); cursor: pointer;
}
.botao-icone:hover { background: var(--superficie-2); color: var(--texto); }
.fundo-menu { position: fixed; inset: 0; z-index: 45; background: rgba(40, 20, 20, .4); }
.barra-movel, .abas { display: none; }

/* --- Cabeçalho da página -------------------------------------------------- */
.cabecalho { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.cabecalho h1 { margin: 0; }
.botoes { display: flex; gap: .5rem; flex-wrap: wrap; }

/* --- Cartões e grades ----------------------------------------------------- */
.cartao {
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-g);
  padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--sombra);
}
.cartao > h1:first-child { margin-bottom: 1rem; }
.cartao.estreito, .cartao.login { max-width: 440px; margin: 2rem auto; }
.cartao.estreito-largo { max-width: 680px; }
.duas-colunas { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.duas-colunas > .cartao { margin-bottom: 0; }

.indicadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.indicador {
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-g);
  padding: 1rem 1.1rem; box-shadow: var(--sombra); position: relative; overflow: hidden;
}
.indicador::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--marca-borda); }
.indicador:first-child::before { background: var(--marca); }
.indicador span { display: block; color: var(--suave); font-size: .8rem; font-weight: 500; margin-bottom: .2rem; }
.indicador strong { font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.indicador strong a { color: inherit; }
.etiqueta {
  display: inline-block; vertical-align: middle; background: var(--marca-suave); color: var(--marca);
  border-radius: 999px; padding: .05rem .5rem; font-size: .75rem; font-weight: 700; margin-left: .25rem;
}
.linha-lista { margin: 0; padding: .55rem 0; border-bottom: 1px solid var(--borda); }
.linha-lista:last-of-type { border-bottom: 0; }

/* --- Botões ----------------------------------------------------------------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  background: var(--marca); color: #fff; border: 1px solid var(--marca); border-radius: 9px;
  padding: .55rem 1rem; min-height: 40px; font: inherit; font-weight: 600; font-size: .92rem;
  text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 2px rgba(110, 20, 39, .2);
  transition: background .15s ease, border-color .15s ease;
}
.botao:hover { background: var(--marca-escura); border-color: var(--marca-escura); text-decoration: none; }
.botao:focus-visible, .chip:focus-visible, .forma:focus-visible { outline: 3px solid rgba(110, 20, 39, .3); outline-offset: 2px; }
.botao.secundario { background: var(--superficie); color: var(--texto); border-color: var(--borda-forte); box-shadow: var(--sombra); }
.botao.secundario:hover { background: var(--superficie-2); border-color: #b9c0cb; }
.botao.perigo { background: var(--superficie); color: var(--alerta); border-color: #f1c4bf; box-shadow: none; }
.botao.perigo:hover { background: var(--alerta-fundo); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--marca); cursor: pointer; }
.excluir { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--borda); display: flex; justify-content: flex-end; }

/* --- Formulários ------------------------------------------------------------ */
input, select, textarea {
  font: inherit; font-size: .95rem; color: var(--texto); background: var(--superficie);
  border: 1px solid var(--borda-forte); border-radius: 9px; padding: .55rem .7rem; width: 100%; min-height: 42px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 84px; resize: vertical; }
select {
  appearance: none; padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center;
}
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--marca); padding: 0; }
input:hover, select:hover, textarea:hover { border-color: #b9c0cb; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--marca); box-shadow: 0 0 0 3px rgba(110, 20, 39, .14); }
input::placeholder { color: #9aa1ad; }
label { font-weight: 600; font-size: .85rem; color: var(--texto-2); }
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem 1.1rem; }
.campo { display: flex; flex-direction: column; gap: .35rem; }
.campo-check { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: .55rem; align-self: end; min-height: 42px; }
.ajuda { color: var(--suave); font-size: .83rem; font-weight: 400; }
.erro { color: var(--alerta); font-size: .83rem; }
.com-erro input, .com-erro select, .com-erro textarea { border-color: var(--alerta); }
.acoes { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.25rem; }
.formulario ul { list-style: none; padding: 0; margin: .15rem 0; display: grid; gap: .4rem; }
.formulario ul label { font-weight: 400; display: flex; gap: .5rem; align-items: center; color: var(--texto); font-size: .92rem; }
fieldset.item { border: 1px solid var(--borda); border-radius: var(--raio); margin: 0 0 1rem; padding: 1rem; background: var(--superficie-2); }
legend { font-weight: 650; padding: 0 .35rem; font-size: .9rem; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.link-resumo { cursor: pointer; color: var(--marca); font-weight: 600; padding: .35rem 0; display: inline-block; }

.filtros {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-g); padding: .75rem; box-shadow: var(--sombra);
}
.filtros input[type="search"] {
  flex: 1 1 260px; width: auto; padding-left: 2.3rem;
  background: var(--superficie) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239aa1ad' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5.5'/%3E%3Cpath d='m15 15-3.8-3.8'/%3E%3C/svg%3E") no-repeat .8rem center;
}
.filtros select { width: auto; flex: 0 1 auto; }
.filtros label { display: flex; align-items: center; gap: .45rem; }
.filtros label input[type="date"] { width: auto; }
.check { display: flex; gap: .45rem; align-items: center; font-weight: 400; color: var(--texto-2); }

/* --- Mensagens ---------------------------------------------------------------- */
.mensagens { margin-bottom: 1rem; }
.msg { padding: .7rem .9rem; border-radius: var(--raio); margin: 0 0 .6rem; background: var(--info-fundo); border: 1px solid #e6dccf; font-size: .92rem; }
.msg-success { background: var(--ok-fundo); border-color: #cddcc7; color: var(--ok); }
.msg-warning { background: var(--aviso-fundo); border-color: #f0d5bd; color: var(--aviso); }
.msg-error { background: var(--alerta-fundo); border-color: #f6c9c4; color: var(--alerta); }
.msg ul { margin: 0; padding-left: 1rem; }

/* --- Tabelas ------------------------------------------------------------------ */
.tabela-caixa {
  overflow-x: auto; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-g);
  box-shadow: var(--sombra); margin-bottom: 1.25rem;
}
.cartao .tabela-caixa { box-shadow: none; margin-bottom: 0; }
.tabela { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabela th, .tabela td { padding: .7rem .9rem; border-bottom: 1px solid var(--borda); text-align: left; vertical-align: top; }
.tabela th {
  background: var(--superficie-2); color: var(--suave); font-size: .72rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.tabela tbody tr:last-child td { border-bottom: 0; }
.tabela tbody tr:hover td { background: #fbfbfc; }
.tabela td a { font-weight: 600; }
.tabela .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabela tr.destaque td { background: var(--marca-suave); }
.tabela tr.inativa td { color: #9aa1ad; }
.tabela small.ajuda { font-size: .78rem; }
.alerta { color: var(--alerta); font-weight: 650; }
.pendente {
  display: inline-block; color: var(--aviso); background: var(--aviso-fundo); border-radius: 999px;
  padding: .05rem .5rem; font-size: .78rem; font-weight: 600; font-style: normal;
}
.nowrap { white-space: nowrap; }
.com-espaco { margin-top: 1rem; }

dl.calculo { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1rem; margin: 0; font-size: .92rem; }
dl.calculo dt { color: var(--suave); }
dl.calculo dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
dl.calculo .total { font-weight: 700; color: var(--texto); border-top: 1px dashed var(--borda-forte); padding-top: .55rem; }
dl.calculo dd small { display: block; }

pre.saida { white-space: pre-wrap; word-break: break-word; background: var(--superficie-2); border: 1px solid var(--borda); border-radius: var(--raio); padding: .9rem; font-size: .83rem; max-height: 60vh; overflow: auto; margin: 0; }
ul.ajuda { padding-left: 1.1rem; }
.acoes-linha { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }
.acoes-linha form { margin: 0; }
.tabela .link { color: var(--marca); font-weight: 600; }

/* --- Login ---------------------------------------------------------------------- */
body:not(.com-app) {
  min-height: 100vh; display: grid; place-items: center;
  background: radial-gradient(1200px 600px at 10% -10%, #f7e4e0 0, transparent 60%), radial-gradient(900px 500px at 110% 110%, #e6eddf 0, transparent 60%), var(--creme);
}
body:not(.com-app) .conteudo { padding: 1.5rem; width: 100%; max-width: 460px; }
.cartao.login { margin: 0 auto; padding: 2rem; box-shadow: var(--sombra-m); }
.login h1 { display: flex; align-items: center; gap: .75rem; font-size: 1.35rem; margin-bottom: 1.25rem; }
.login h1 small { display: block; margin: 0; font-size: .85rem; }
.login label { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.login .botao { width: 100%; min-height: 46px; margin-top: .25rem; }

/* --- Celular e tablet ------------------------------------------------------------ */
@media (max-width: 1023px) {
  .com-app .conteudo { margin-left: 0; padding: calc(var(--barra) + 1rem) 1rem calc(var(--abas) + 1.5rem + env(safe-area-inset-bottom)); }
  .lateral { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--sombra-m); width: min(300px, 86vw); }
  .menu-aberto .lateral { transform: none; }
  .menu-aberto { overflow: hidden; }
  .lateral-fechar { display: inline-grid; }
  .lateral-nav a { padding: .65rem .7rem; font-size: .95rem; }

  .barra-movel {
    display: flex; align-items: center; gap: .75rem; position: fixed; inset: 0 0 auto 0; z-index: 40;
    height: var(--barra); padding: 0 .5rem 0 1rem; background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--borda);
  }
  .barra-movel .marca-logo { height: 28px; }
  .barra-movel .marca { gap: .5rem; }
  .barra-movel-titulo { flex: 1; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .abas {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 40;
    height: calc(var(--abas) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--borda);
  }
  .abas a, .abas button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
    color: var(--suave); font: inherit; font-size: .7rem; font-weight: 600; background: none; border: 0; cursor: pointer;
  }
  .abas a:hover { text-decoration: none; }
  .abas a[aria-current="page"] { color: var(--marca); }
  .abas .icone { width: 22px; height: 22px; }
  .abas-pdv span {
    width: 48px; height: 48px; margin-top: -22px; border-radius: 16px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(135deg, #8b2236, var(--marca-escura)); box-shadow: 0 6px 14px rgba(110, 20, 39, .35);
  }
  .abas a.abas-pdv { color: var(--marca); }

  .indicadores { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .indicador { padding: .85rem .9rem; }
  .indicador strong { font-size: 1.2rem; }
  h1 { font-size: 1.3rem; }
  .cartao { padding: 1rem; }
}

@media (max-width: 760px) {
  .cabecalho { flex-direction: column; align-items: stretch; }
  .cabecalho .botao, .botoes .botao { flex: 1; }
  .filtros { padding: .6rem; }
  .filtros select, .filtros .botao, .filtros label { flex: 1 1 140px; }

  /* tabelas viram cartões */
  .tabela-caixa { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .tabela, .tabela tbody, .tabela tr, .tabela td { display: block; width: 100%; }
  .tabela thead { display: none; }
  .tabela tr { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-g); margin-bottom: .65rem; padding: .55rem .9rem; box-shadow: var(--sombra); }
  .tabela tbody tr:hover td { background: transparent; }
  .tabela td { border: 0; padding: .3rem 0; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; text-align: right; }
  .tabela td::before { content: attr(data-rotulo); color: var(--suave); font-size: .8rem; font-weight: 500; text-align: left; flex: 0 0 auto; }
  .tabela td[data-rotulo=""]::before { content: none; }
  .tabela td:first-child { border-bottom: 1px solid var(--borda); padding-bottom: .5rem; margin-bottom: .2rem; }
  .tabela .num { white-space: normal; }
  .cartao .tabela tr { box-shadow: none; background: var(--superficie-2); }
  .excluir { justify-content: stretch; }
  .excluir .botao { width: 100%; }
}

/* --- PDV ------------------------------------------------------------------------ */
.modo-pdv .conteudo { padding-bottom: 6rem; }
.pdv-busca { position: sticky; top: 0; z-index: 5; background: var(--fundo); padding: .25rem 0 .6rem; }
.pdv-busca input {
  font-size: 1.05rem; min-height: 52px; border-radius: 14px; padding-left: 2.8rem; box-shadow: var(--sombra);
  background: var(--superficie) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%239aa1ad' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m17 17-4.5-4.5'/%3E%3C/svg%3E") no-repeat 1rem center;
}
.pdv-chips { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .6rem; margin-bottom: .4rem; scrollbar-width: none; }
.pdv-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--borda-forte); background: var(--superficie); color: var(--texto-2);
  border-radius: 999px; padding: .4rem .95rem; font: inherit; font-size: .88rem; font-weight: 600; min-height: 38px; cursor: pointer;
}
.chip.ativo { background: var(--texto); border-color: var(--texto); color: #fff; }
.pdv-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .7rem; }
.pdv-card {
  position: relative; display: flex; flex-direction: column; gap: .15rem; text-align: left; font: inherit; color: var(--texto);
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-g); padding: .8rem; min-height: 132px;
  cursor: pointer; box-shadow: var(--sombra); transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.pdv-card:hover { border-color: var(--marca-borda); box-shadow: var(--sombra-m); }
.pdv-card:active { transform: scale(.97); }
.pdv-card:disabled { opacity: .5; cursor: not-allowed; }
.pdv-card.sem-estoque { background: var(--superficie-2); }
.pdv-card.adicionado { animation: pdv-pulso .35s ease; }
@keyframes pdv-pulso { 50% { box-shadow: 0 0 0 4px rgba(110, 20, 39, .22); } }
.pdv-card-codigo { font-size: .7rem; color: var(--suave); letter-spacing: .03em; font-weight: 600; }
.pdv-card-nome { font-weight: 650; font-size: .9rem; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pdv-card-detalhe { font-size: .76rem; color: var(--suave); }
.pdv-card-rodape { margin-top: auto; padding-top: .35rem; display: flex; justify-content: space-between; align-items: baseline; gap: .3rem; flex-wrap: wrap; }
.pdv-card-preco { color: var(--texto); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pdv-card-estoque { font-size: .72rem; color: var(--suave); }
.sem-estoque .pdv-card-estoque { color: var(--alerta); font-weight: 600; }
.pdv-card-qtd {
  position: absolute; top: -.45rem; right: -.45rem; background: var(--marca); color: #fff; border-radius: 999px;
  min-width: 1.6rem; height: 1.6rem; display: grid; place-items: center; font-size: .82rem; font-weight: 700; padding: 0 .35rem;
  box-shadow: 0 2px 6px rgba(110, 20, 39, .35);
}
.pdv-barra {
  position: fixed; left: calc(50% + var(--lateral) / 2); transform: translateX(-50%); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 20;
  width: min(560px, calc(100% - var(--lateral) - 2rem)); display: flex; align-items: center; gap: .75rem; justify-content: space-between;
  background: var(--texto); color: #fff; border: 0; border-radius: 16px; padding: .95rem 1.15rem; font: inherit; cursor: pointer;
  box-shadow: 0 10px 30px rgba(40, 20, 20, .3);
}
.pdv-barra strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.pdv-barra-acao { font-weight: 650; color: #f3d9e6; }
.pdv-painel {
  position: fixed; inset: 0 0 0 auto; width: min(480px, 100%); z-index: 60; background: var(--fundo); overflow-y: auto;
  display: flex; flex-direction: column; padding: 0 1.25rem; box-shadow: -10px 0 40px rgba(40, 20, 20, .15);
}
.pdv-travado { overflow: hidden; }
.pdv-painel-topo { position: sticky; top: 0; background: var(--fundo); display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; border-bottom: 1px solid var(--borda); z-index: 1; }
.pdv-painel-topo h2 { margin: 0; }
.pdv-painel-topo .link { min-height: 44px; font-weight: 600; }
.perigo-texto { color: var(--alerta) !important; }
.pdv-itens { list-style: none; margin: 0; padding: 0; }
.pdv-item { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem .75rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--borda); }
.pdv-item-nome { display: block; font-weight: 600; line-height: 1.28; font-size: .92rem; }
.pdv-item-total { min-width: 5.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.pdv-qtd { display: flex; align-items: center; border: 1px solid var(--borda-forte); border-radius: 10px; background: var(--superficie); }
.pdv-qtd button { width: 40px; height: 40px; border: 0; background: none; font-size: 1.25rem; color: var(--marca); cursor: pointer; }
.pdv-qtd span { min-width: 1.6rem; text-align: center; font-weight: 700; }
.pdv-pagamento h3 { margin: 1.1rem 0 .6rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); }
.pdv-formas { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.forma {
  min-height: 52px; border: 1.5px solid var(--borda-forte); border-radius: 12px; background: var(--superficie);
  font: inherit; font-weight: 650; color: var(--texto); cursor: pointer;
}
.forma.ativo { border-color: var(--marca); background: var(--marca-suave); color: var(--marca); box-shadow: inset 0 0 0 1px var(--marca); }
.pdv-campos { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.pdv-cliente { margin-top: .9rem; }
.pdv-cliente summary { cursor: pointer; color: var(--marca); font-weight: 600; padding: .5rem 0; }
.pdv-rodape { position: sticky; bottom: 0; margin-top: auto; background: var(--fundo); padding: .9rem 0 max(1rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--borda); }
.pdv-totais { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; margin: 0 0 .75rem; font-size: .92rem; }
.pdv-totais dt { color: var(--suave); }
.pdv-totais dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.pdv-totais .total { font-size: 1.35rem; font-weight: 750; color: var(--texto); }
.pdv-finalizar { width: 100%; min-height: 56px; font-size: 1.08rem; border-radius: 14px; }
.pdv-finalizar:disabled { opacity: .7; }
.pdv-sucesso { inset: 0 0 0 var(--lateral); width: auto; justify-content: center; align-items: center; text-align: center; gap: .25rem; box-shadow: none; }
.pdv-sucesso-icone {
  width: 80px; height: 80px; border-radius: 50%; background: var(--ok-fundo); color: var(--ok); font-size: 2.6rem;
  display: grid; place-items: center; margin-bottom: .75rem; animation: pdv-pop .35s ease both;
}
@keyframes pdv-pop { from { transform: scale(.5); } }
.pdv-sucesso h2 { font-size: 1.1rem; }
.pdv-sucesso-total { font-size: 2.2rem; font-weight: 750; margin: 0; letter-spacing: -.02em; }
.pdv-sucesso-troco { font-size: 1.1rem; color: var(--marca); font-weight: 650; margin: 0; }
.pdv-sucesso-acoes { flex-direction: column; width: min(360px, 100%); margin-top: 1.25rem; }
.pdv-escolha-fundo { position: fixed; inset: 0; z-index: 70; background: rgba(40, 20, 20, .45); display: flex; align-items: flex-end; justify-content: center; }
.pdv-escolha {
  background: var(--fundo); width: min(560px, 100%); max-height: 80vh; overflow-y: auto; border-radius: 18px 18px 0 0;
  padding: 0 1rem max(1rem, env(safe-area-inset-bottom)); animation: pdv-sobe .2s ease;
}
@keyframes pdv-sobe { from { transform: translateY(40px); opacity: 0; } }
.pdv-opcoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .55rem; padding-bottom: .5rem; }
.pdv-opcao {
  position: relative; text-align: left; font: inherit; color: var(--texto); background: var(--superficie);
  border: 1.5px solid var(--borda); border-radius: 12px; padding: .75rem; min-height: 64px; cursor: pointer;
  display: flex; flex-direction: column; gap: .2rem;
}
.pdv-opcao:active { transform: scale(.97); }
.pdv-opcao:disabled { opacity: .5; }
.pdv-opcao.sem-estoque { background: var(--superficie-2); }
.pdv-opcao-nome { font-weight: 700; }
.pdv-opcao-info { font-size: .8rem; color: var(--suave); }

@media (max-width: 1023px) {
  .modo-pdv .abas { display: none; }
  .modo-pdv .conteudo { padding-bottom: 6.5rem; }
  .pdv-busca { top: var(--barra); margin: 0 -1rem; padding: .6rem 1rem; }
  .pdv-barra { left: 50%; width: min(560px, calc(100% - 1.5rem)); }
  .pdv-painel { width: 100%; box-shadow: none; padding: 0 1rem; }
  .pdv-sucesso { inset: 0; }
  .pdv-grade { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
}
@media (max-width: 380px) {
  .pdv-grade { grid-template-columns: 1fr 1fr; }
}

/* --- Peças de lista e selos ------------------------------------------------- */
.lateral .lateral-fechar { display: none; }
.cartao-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .5rem; }
.cartao-topo h2 { margin: 0; }
.cartao-topo a { font-size: .85rem; font-weight: 600; }
.linha-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .5rem; margin: 0 -.5rem;
  border-bottom: 1px solid var(--borda); color: var(--texto); border-radius: 8px;
}
.linha-item:last-child { border-bottom: 0; }
.linha-item:hover { background: var(--superficie-2); text-decoration: none; }
.linha-item-principal { display: flex; flex-direction: column; min-width: 0; font-weight: 600; font-size: .92rem; }
.linha-item-principal small { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linha-item-valor { font-variant-numeric: tabular-nums; white-space: nowrap; }
.selo { display: inline-block; border-radius: 999px; padding: .1rem .55rem; font-size: .75rem; font-weight: 700; white-space: nowrap; background: var(--superficie-2); color: var(--texto-2); }
.selo-alerta { background: var(--alerta-fundo); color: var(--alerta); }
.selo-aviso { background: var(--aviso-fundo); color: var(--aviso); }
.selo-ok { background: var(--ok-fundo); color: var(--ok); }
.vazio { color: var(--suave); padding: 1rem 0 .25rem; margin: 0; }
.indicador-link { color: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.indicador-link:hover { text-decoration: none; border-color: var(--marca-borda); box-shadow: var(--sombra-m); }
.indicador small { display: block; margin-top: .15rem; }
.col-nome { min-width: 240px; }
@media (max-width: 1023px) {
  .barra-movel-titulo { font-weight: 700; }
}
@media (max-width: 760px) { .col-nome { min-width: 0; } }
@media (max-width: 760px) {
  .tabela td .td-valor { min-width: 0; }
  .tabela td.col-nome { flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left; }
  .tabela td.col-nome .td-valor { font-weight: 600; }
}
@media (max-width: 1023px) { .lateral .lateral-fechar { display: inline-grid; } }

/* --- Anúncio Shopee ------------------------------------------------------------- */
.campo-largo { grid-column: 1 / -1; }
.fotos { display: flex; gap: .5rem; overflow-x: auto; margin-bottom: 1rem; }
.fotos img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid var(--borda); flex: 0 0 auto; background: var(--superficie-2); }
.fotos img:first-child { outline: 2px solid var(--marca); outline-offset: 1px; }
.miniatura { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: .5rem; border: 1px solid var(--borda); }
.pendencias { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .4rem; }
.pendencia { display: block; font-size: .85rem; padding: .35rem .6rem; border-radius: 8px; background: var(--superficie-2); color: var(--texto-2); }
.pendencia + .pendencia { margin-top: .3rem; }
.pendencias .pendencia + .pendencia { margin-top: 0; }
.pendencia.erro { background: var(--alerta-fundo); color: var(--alerta); }
.pendencia.aviso { background: var(--aviso-fundo); color: var(--aviso); }
.pendencia.info { background: var(--info-fundo); color: var(--texto-2); }
.descricao { white-space: normal; font-size: .9rem; color: var(--texto-2); margin-top: .5rem; }
@media (max-width: 760px) { .tabela td .pendencia { text-align: left; } }

/* --- Galeria de fotos --------------------------------------------------------- */
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; margin-bottom: .75rem; }
.galeria-foto { position: relative; margin: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--borda); background: var(--superficie-2); }
.galeria-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galeria-foto.capa { outline: 2px solid var(--marca); outline-offset: 1px; }
.galeria-capa { position: absolute; top: .35rem; left: .35rem; background: var(--marca); color: #fff; font-size: .68rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; }
.galeria-acoes { position: absolute; inset: auto 0 0 0; display: flex; justify-content: center; gap: .25rem; padding: .3rem; background: linear-gradient(transparent, rgba(40, 20, 20, .55)); margin: 0; }
.galeria-acoes button { width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .92); color: var(--texto); font-size: .95rem; font-weight: 700; cursor: pointer; display: grid; place-items: center; }
.galeria-acoes button:hover { background: #fff; }
.galeria-enviar { margin: 0; }
.galeria-botao { position: relative;
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  border: 1.5px dashed var(--borda-forte); border-radius: 12px; color: var(--marca); font-weight: 650; font-size: .85rem;
  cursor: pointer; background: var(--superficie); text-align: center; padding: .5rem;
}
.galeria-botao:hover { border-color: var(--marca); background: var(--marca-suave); }
.galeria-botao input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.galeria-botao.enviando { opacity: .6; pointer-events: none; }
.galeria-botao-largo { aspect-ratio: auto; flex-direction: row; min-height: 44px; padding: .5rem 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.foto-variacao form { margin: 0; }
.foto-variacao-botao {
  position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--borda); background: var(--superficie-2); cursor: pointer; color: var(--marca);
}
.foto-variacao-botao.vazia { border: 1.5px dashed var(--borda-forte); background: var(--superficie); }
.foto-variacao-botao:hover { border-color: var(--marca); }
.foto-variacao-botao img { width: 100%; height: 100%; object-fit: cover; }
.foto-variacao-botao input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.foto-variacao-botao.enviando { opacity: .5; pointer-events: none; }
@media (max-width: 760px) { .foto-variacao .td-valor, .foto-variacao form { display: flex; justify-content: flex-end; } }
.rotulo { font-weight: 600; font-size: .85rem; color: var(--texto-2); }
.seletor-fotos { margin: .1rem 0 0; }
.seletor-fotos input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.seletor-fotos .galeria-foto img { pointer-events: none; }
@media (min-width: 761px) { .seletor-fotos { grid-template-columns: repeat(auto-fill, minmax(120px, 140px)); } }
.galeria-uma { grid-template-columns: minmax(0, 220px); }
.galeria-acao-arquivo {
  position: relative; width: 30px; height: 30px; border-radius: 8px; background: rgba(255, 255, 255, .92); color: var(--texto);
  font-size: 1rem; font-weight: 700; cursor: pointer; display: grid; place-items: center;
}
.galeria-acao-arquivo input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.galeria-acao-arquivo.enviando { opacity: .5; pointer-events: none; }
.seletor-arquivos { grid-template-columns: 1fr; }
.seletor-arquivos .galeria-botao { min-height: 64px; word-break: break-all; }
.opcoes-importacao { display: grid; gap: .5rem; margin: .5rem 0; }
.opcoes-importacao .check { align-items: flex-start; }
.opcoes-importacao input { margin-top: .15rem; }
.check span { flex: 1; }
.relatorio { list-style: none; margin: 0; padding: .5rem; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--superficie-2); max-height: 70vh; overflow: auto; font-size: .85rem; }
.relatorio li { padding: .35rem .5rem; border-radius: 6px; word-break: break-word; }
.relatorio-ok { font-weight: 600; margin-top: .35rem; }
.relatorio-info { color: var(--suave); }
.relatorio-aviso { background: var(--aviso-fundo); color: var(--aviso); margin: .15rem 0; }
.resultado-topo { margin-top: 1rem; padding: .8rem 1rem; border-radius: var(--raio); display: grid; gap: .6rem; }
.resultado-topo.simulacao { background: var(--aviso-fundo); color: var(--aviso); border: 1px solid #f0d5bd; }
.resultado-topo.gravado { background: var(--ok-fundo); color: var(--ok); border: 1px solid #cddcc7; }
.resultado-gravar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin: 0; }
.resultado-gravar .ajuda { color: inherit; flex: 1 1 220px; }

/* --- Construtor de kit (kit → opções → componentes) --------------------------- */
.opcao-kit { border: 1px solid var(--borda); border-left: 4px solid var(--marca); border-radius: var(--raio-g); margin: 0 0 1.25rem; padding: 1rem; background: var(--superficie); }
.opcao-kit legend { font-weight: 700; padding: 0 .4rem; color: var(--marca); }
.opcao-componentes { margin-top: 1rem; padding: .85rem; background: var(--superficie-2); border-radius: var(--raio); }
.opcao-componentes h3 { margin: 0 0 .25rem; }
.componente-linha { display: grid; grid-template-columns: minmax(0, 1fr) 90px 80px; gap: .6rem; align-items: end; padding: .5rem 0; border-bottom: 1px dashed var(--borda); }
.componente-linha .campo-check { align-self: end; }
.componente-linha .campo label { font-size: .75rem; }
@media (max-width: 760px) { .componente-linha { grid-template-columns: 1fr 80px; } .componente-linha .campo:first-of-type { grid-column: 1 / -1; } }
.miniatura-opcao { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--borda); margin-bottom: .75rem; display: block; }
td .miniatura-opcao { margin: 0; width: 48px; height: 48px; }
.componente-resumo { padding: .15rem 0; font-size: .88rem; }
.nota-preco { display: inline-block; max-width: 190px; white-space: normal; text-align: right; }
.componente-linha .campo-check { padding-bottom: .55rem; }
.opcao-kit .campos { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }


/* --- Logo e marca ---------------------------------------------------------------- */
.login-marca { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; margin-bottom: 1.5rem; }
.login-marca img { width: 150px; height: auto; }
.login-marca b { font: 700 2.6rem/1 var(--fonte-marca); letter-spacing: .1em; color: var(--marca); margin-top: .25rem; }
.login-marca span { font-size: .8rem; letter-spacing: .5em; text-transform: uppercase; color: var(--marca); font-weight: 600; padding-left: .5em; }
.login-marca small { color: var(--suave); margin-top: .6rem; font-size: .85rem; }
h1, .cabecalho h1 { font-family: var(--fonte-marca); font-weight: 700; font-size: 1.85rem; letter-spacing: .01em; color: var(--marca); }
h1 small { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; letter-spacing: 0; }
.cartao > h1:first-child { font-size: 1.6rem; }
@media (max-width: 1023px) { h1, .cabecalho h1 { font-size: 1.6rem; } }

/* --- Importador da Shopee (passos) --------------------------------------------- */
.importador .como-baixar { margin: .25rem 0 .5rem; }
.importador .como-baixar ol { margin: .4rem 0 0; padding-left: 1.2rem; display: grid; gap: .25rem; }
.passo { display: flex; gap: .9rem; margin-top: 1.25rem; }
.passo-num {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--marca-suave); color: var(--marca); font-weight: 700; font-size: .85rem; margin-top: .1rem;
}
.passo-corpo { flex: 1; min-width: 0; }
.passo-corpo h3 { margin: 0 0 .5rem; font-size: .95rem; }
.botao-grande { min-height: 48px; padding: .7rem 1.4rem; font-size: 1rem; }
.interruptor {
  display: flex; gap: .8rem; align-items: flex-start; padding: .75rem .9rem; margin-bottom: .5rem; cursor: pointer;
  border: 1px solid var(--borda); border-radius: var(--raio); background: var(--superficie-2); font-weight: 400; color: var(--texto);
}
.interruptor:hover { border-color: var(--marca-borda); }
.interruptor small { display: block; color: var(--suave); font-size: .8rem; margin-top: .1rem; }
.interruptor input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 42px; height: 24px; min-height: 0; padding: 0; margin-top: .1rem;
  border-radius: 999px; background: var(--borda-forte); border: 0; position: relative; cursor: pointer; transition: background .15s ease;
}
.interruptor input[type="checkbox"]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s ease;
}
.interruptor input[type="checkbox"]:checked { background: var(--marca); }
.interruptor input[type="checkbox"]:checked::after { transform: translateX(18px); }
.interruptor input[type="checkbox"]:focus-visible { outline: 3px solid rgba(110, 20, 39, .3); outline-offset: 2px; }
.resultado-linha { display: flex; gap: .6rem; align-items: center; }
.resultado-resumo { margin: 0; font-size: .9rem; }
.resultado-botoes { display: flex; gap: .6rem; flex-wrap: wrap; }
.resultado-gravar { flex-direction: column; align-items: stretch; gap: .75rem; }
.resultado-gravar .ajuda { flex: none; }
@media (max-width: 760px) { .resultado-botoes .botao { flex: 1; } }
