/* Estilo base (mobile-first). Classes genéricas usadas também por vendedor.js e admin.js. */

:root {
  --azul: #086ABB;
  --campo-borda: #A7A7A7;
  --divisor: #E0E0E0;
  --m3: #FEF7FF;
  --m3-selecionado: #DFD9E0;
  --verde: #008F0E;
  --verde-escuro: #003F06;
  --creme: #FFFCD0;
  --pago: #005308;
  --aguardando: #FFB10A;
  --cancelado: #D81010;
  --texto: #1d1d1d;
  --borda: #E0E0E0;
  --fundo: #F2F2F2;
  --cinza: #6b6b6b;
  --branco: #ffffff;
  --sombra: none;
}

@font-face {
  font-family: Roboto;
  font-weight: 400 700;
  font-style: normal;
  src: url(fontes/Roboto.woff2) format('woff2');
}

@font-face {
  font-family: MaterialIcons;
  font-style: normal;
  font-weight: 400;
  src: url(fontes/MaterialIcons-Regular.otf) format('opentype');
}

@font-face {
  font-family: CupertinoIcons;
  font-style: normal;
  font-weight: 400;
  src: url(fontes/CupertinoIcons.ttf) format('truetype');
}

/* Ícone por codepoint: <span class="mi">&#xF107;</span> */
.mi {
  font-family: MaterialIcons;
  font-weight: 400;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}

.ci {
  font-family: CupertinoIcons;
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  display: inline-block;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  color: var(--texto);
  background: var(--fundo);
  min-height: 100vh;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ---------- Topo (espaçador de 40 px; sem app bar) ---------- */

#topo {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 3%;
}

#topo #botao-voltar {
  background: transparent;
  border: 0;
  color: var(--verde-escuro);
  font-size: 16px;
  font-weight: 500;
  height: 40px;
  padding: 0 4px;
  cursor: pointer;
}

/* ---------- Barra de navegação inferior (Material BottomNavigationBar fixed) ---------- */

#barra-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 58px;
  z-index: 20;
  display: flex;
  background: var(--branco);
  box-shadow: none;
}

#barra-nav a {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 8px;
  color: var(--verde-escuro);
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}

#barra-nav a .mi {
  font-size: 24px;
}

#barra-nav a .rotulo {
  display: block;
  margin-top: 4px;
  line-height: 1.2;
  white-space: nowrap;
}

#barra-nav a.ativo {
  font-size: 14px;
  padding-top: 7px;
}

#barra-nav a.ativo .rotulo {
  margin-top: 3px;
}

/* ---------- Diálogo (Material 3) ---------- */

.dialogo-fundo {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dialogo {
  width: 100%;
  max-width: 312px;
  background: var(--m3);
  border-radius: 28px;
  padding: 24px;
  color: #1D1B20;
}

.dialogo h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 400;
  color: #1D1B20;
}

.dialogo p {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.43;
  color: #49454F;
}

.dialogo .acoes {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dialogo .acoes button {
  height: 40px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #6750A4;
  font-size: 14px;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
}

.dialogo .acoes button.vermelho {
  color: #D81010;
}

/* ---------- Conteúdo ---------- */

#tela {
  min-height: 100vh;
}

/* Sem largura máxima (o original estica em 1366); lateral 3% (listas) */
.conteudo {
  padding: 16px 3%;
}

.conteudo.largo {
  max-width: none;
}

/* Com a barra inferior, o conteúdo não fica sob ela */
body.com-nav #tela {
  padding-bottom: 58px;
}

body.com-topo #tela {
  min-height: calc(100vh - 40px);
}


.cartao {
  background: var(--branco);
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
}

.titulo-secao {
  text-transform: uppercase;
  color: var(--verde-escuro);
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
}

h1,
h2 {
  color: var(--verde-escuro);
}

/* ---------- Formulário ---------- */

.campo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.campo label {
  font-size: 14px;
  font-weight: 600;
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  height: 54.4px;
  padding: 0 12px;
  border: 1px solid var(--campo-borda);
  border-radius: 8px;
  background: var(--branco);
  color: var(--texto);
}

.campo textarea {
  height: auto;
  min-height: 88px;
  padding: 10px 12px;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: 2px solid var(--verde);
  outline-offset: 1px;
}

.erro-campo {
  color: var(--cancelado);
  font-size: 13px;
}

/* ---------- Botões ---------- */

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 60px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: var(--azul);
  color: var(--branco);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.botao:disabled {
  background: var(--campo-borda);
  opacity: 1;
  cursor: not-allowed;
}

.botao.secundario {
  background: transparent;
  border: 1px solid var(--azul);
  color: var(--azul);
}

.botao.perigo {
  background: var(--cancelado);
  border: 0;
  color: var(--branco);
}

.botao.pequeno {
  width: auto;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
}

/* ---------- Layout auxiliar ---------- */

.linha {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.lista {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lista .item {
  padding: 12px;
  border-bottom: 1px solid var(--borda);
}

.lista .item:last-child {
  border-bottom: 0;
}

/* ---------- Etiquetas de status ---------- */

.etiqueta {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--branco);
  background: var(--cinza);
  white-space: nowrap;
}

.etiqueta.PAID {
  background: var(--pago);
}

.etiqueta.AWAITING {
  background: var(--aguardando);
  color: var(--texto);
}

.etiqueta.CANCELED {
  background: var(--cancelado);
}

/* ---------- Tabela ---------- */

.rolagem {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tabela {
  width: 100%;
  border-collapse: collapse;
  background: var(--branco);
  font-size: 14px;
}

.tabela th,
.tabela td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--borda);
  text-align: left;
  vertical-align: middle;
}

.tabela th {
  color: var(--verde-escuro);
  font-weight: 700;
  white-space: nowrap;
}

.tabela tbody tr:nth-child(even) {
  background: #fafaf6;
}

/* ---------- Abas ---------- */

.abas {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.abas button {
  flex: 1;
  height: 40px;
  border: 2px solid var(--verde);
  border-radius: 8px;
  background: var(--branco);
  color: var(--verde);
  font-weight: 700;
  cursor: pointer;
}

.abas button.ativa {
  background: var(--verde);
  color: var(--branco);
}

/* ---------- Números e estados ---------- */

.vazio {
  color: var(--cinza);
  text-align: center;
  padding: 24px 12px;
  margin: 0;
}

.carregando {
  color: var(--cinza);
  text-align: center;
  padding: 24px 12px;
}

/* ---------- Toast ---------- */

#aviso {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--texto);
  color: var(--branco);
  font-weight: 600;
  text-align: center;
  pointer-events: none;
}

#aviso:empty {
  display: none;
}

#aviso.aviso-erro {
  background: var(--cancelado);
}

#aviso.aviso-ok {
  background: var(--verde);
}

/* ---------- Tela de login (fiel ao original vZ: medidas em vw/vh) ---------- */

.tela-login {
  min-height: 100vh;
  background: var(--verde-escuro);
  padding: 10vh 4vw 4vh;
}

.tela-login .caixa-login {
  background: var(--branco);
  border-radius: 20px;
  padding: 20px 20px calc(20px + 1.5vh);
  text-align: center;
}

.tela-login .logo-login {
  display: block;
  width: 33vw;
  height: 16vh;
  object-fit: contain;
  margin: 0 auto 6.6vh;
}

.tela-login form {
  text-align: left;
}

.tela-login .campo-flutuante {
  margin-bottom: calc(1.18vh + 12.5px);
}

.tela-login .botao {
  margin-top: calc(2.62vh - 16.9px);
}

/* Campo outlined M3 com rótulo dentro (flutua ao focar ou preencher) */
.campo-flutuante {
  position: relative;
}

.campo-flutuante input {
  width: 100%;
  height: 54.4px;
  padding: 0 20px;
  border: 1px solid var(--campo-borda);
  border-radius: 10px;
  background: var(--branco);
  color: var(--texto);
  font-size: 16px;
}

.campo-flutuante input::placeholder {
  color: transparent;
}

.campo-flutuante input:focus {
  outline: 2px solid var(--verde-escuro);
  outline-offset: -2px;
  border-color: transparent;
}

.campo-flutuante label {
  position: absolute;
  left: 20px;
  top: 27px;
  transform: translateY(-50%);
  padding: 0 4px;
  margin-left: -4px;
  background: transparent;
  color: var(--campo-borda);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
  transition: top 0.12s, font-size 0.12s;
}

.campo-flutuante input:focus + label,
.campo-flutuante input:not(:placeholder-shown) + label {
  top: 0;
  font-size: 12px;
  background: var(--branco);
  color: var(--campo-borda);
}

.campo-flutuante input:focus + label {
  color: var(--verde-escuro);
}

.campo-flutuante .erro-campo {
  margin: 4px 0 0 20px;
  text-align: left;
}

/* ---------- Telas largas ---------- */

@media (min-width: 720px) {
  .conteudo {
    padding: 24px 3%;
  }

  .tabela {
    font-size: 15px;
  }
}


/* Formulários: lateral 4% */
.conteudo:has(form) {
  padding-left: 4%;
  padding-right: 4%;
}

/* Aparelho não liberado / bloqueado (diálogo M3 na tela de login) */
.cartao-aparelho {
  background: var(--m3);
  border-radius: 28px;
  padding: 24px;
  margin: 0 0 16px;
  color: #1D1B20;
  text-align: center;
}

.cartao-aparelho p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.cartao-aparelho .codigo-aparelho {
  margin-top: 12px;
  font-size: 12px;
  color: #49454F;
}

/* Erro do login: SnackBar M3 escuro, largura total, no rodapé */
body:has(.tela-login) #aviso.aviso-erro {
  left: 0;
  right: 0;
  bottom: 0;
  transform: none;
  max-width: none;
  border-radius: 0;
  padding: 14px 16px;
  background: #322F35;
  color: #F5EFF7;
  font-weight: 400;
  text-align: left;
}

/* 🤖 IA-Local · 2026-12-02 22:50 · módulo Front fiel ao original */
