/* Paleta e tipografia vêm da identidade real da Ponto do Cell
   (extraída de 06_OUTPUTS/2026-07-25_ponto-do-cell/rebranding-logo-bio.html) —
   não é uma paleta genérica, é a marca oficial do cliente. */
:root {
  --ink: #0E0F13;
  --ink-soft: #3A3D45;
  --muted: #6E7178;
  --line: #E3E3E8;
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --accent: #0A84FF;
  --accent-ink: #0060DF;
  --accent-soft: #EAF3FF;

  --verde: #16a34a;
  --verde-claro: #e8f8ee;
  --amarelo: #b45309;
  --amarelo-claro: #fdf1e0;
  --vermelho: #dc2626;
  --vermelho-claro: #fdecec;
  --roxo: #7c3aed;
  --roxo-claro: #f1eafe;

  --raio: 14px;
  --raio-grande: 18px;
  --sombra: 0 1px 2px rgba(14,15,19,.04), 0 8px 24px rgba(14,15,19,.06);
  --sombra-forte: 0 20px 60px rgba(14,15,19,.35);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
button, input, select, textarea { font-family: inherit; font-size: 15px; }
a { color: inherit; }
h1, h2, h3 { letter-spacing: -0.015em; }

/* ---------- layout geral ---------- */

#app { min-height: 100vh; display: flex; flex-direction: column; }

.topo {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.topo .marca { display: flex; align-items: center; gap: 10px; }
.topo .marca img { height: 34px; display: block; }
.topo .usuario { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-soft); }
.topo .usuario .avatar {
  width: 30px; height: 30px; border-radius: 999px; background: var(--ink);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.topo .usuario .papel {
  background: var(--accent-soft); color: var(--accent-ink);
  padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em;
}
.topo button.sair {
  background: none; border: 1px solid var(--line); border-radius: 9px;
  padding: 7px 12px; cursor: pointer; color: var(--ink-soft); font-weight: 600; font-size: 13px;
}
.topo button.sair:hover { background: var(--bg); border-color: var(--muted); }

.corpo { flex: 1; display: flex; }

.nav {
  background: var(--surface); border-right: 1px solid var(--line);
  width: 232px; padding: 16px 12px; display: flex; flex-direction: column; gap: 1px;
  flex-shrink: 0;
}
.nav button {
  text-align: left; background: none; border: none; padding: 10px 12px;
  border-radius: 10px; cursor: pointer; font-size: 14.5px; color: var(--ink-soft); font-weight: 600;
  display: flex; align-items: center; gap: 11px; transition: background .12s;
}
.nav button .ic { width: 18px; text-align: center; opacity: .85; }
.nav button.ativo { background: var(--ink); color: #fff; }
.nav button.ativo .ic { opacity: 1; }
.nav button:not(.ativo):hover { background: var(--bg); }

main.conteudo { flex: 1; padding: 28px 32px; max-width: 1180px; margin: 0 auto; width: 100%; }

@media (max-width: 780px) {
  .topo .marca span.nome-completo { display: none; }
  .corpo { flex-direction: column; padding-bottom: 66px; }
  .nav {
    width: 100%; border-right: none; border-top: 1px solid var(--line);
    flex-direction: row; overflow-x: auto; position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 20; padding: 6px; gap: 0; box-shadow: 0 -4px 16px rgba(14,15,19,.06);
  }
  .nav button { flex-direction: column; gap: 3px; font-size: 10.5px; flex: 1; white-space: nowrap; padding: 7px 3px; border-radius: 10px; }
  .nav button .ic { font-size: 17px; }
  main.conteudo { padding: 16px; padding-bottom: 20px; }
}

/* ---------- tela de login ---------- */

.tela-login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(700px 500px at 15% 12%, rgba(10,132,255,.25), transparent 60%),
    linear-gradient(160deg, #0E0F13 0%, #16171d 55%, #0E0F13 100%);
  padding: 20px;
}
.tela-login .logo-topo { display: flex; justify-content: center; margin-bottom: 26px; }
.tela-login .logo-topo img { height: 46px; }
.card-login {
  background: var(--surface); border-radius: var(--raio-grande); padding: 34px 30px;
  width: 100%; max-width: 380px; box-shadow: var(--sombra-forte);
}
.card-login h1 { margin: 0 0 4px; font-size: 21px; color: var(--ink); font-weight: 800; }
.card-login p.sub { margin: 0 0 24px; color: var(--muted); font-size: 14px; }

/* ---------- componentes ---------- */

.campo { margin-bottom: 14px; }
.campo label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .03em; }
.campo input, .campo select, .campo textarea {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
}
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.campo small { color: var(--muted); font-size: 12px; }
.linha { display: flex; gap: 12px; flex-wrap: wrap; }
.linha > .campo { flex: 1; min-width: 140px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: #fff; border: none; border-radius: 10px;
  padding: 11px 18px; font-weight: 700; cursor: pointer; font-size: 14.5px;
  transition: transform .05s, background .12s;
}
.btn:hover { background: #23252d; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.bloco { width: 100%; }
.btn.principal { background: var(--accent); }
.btn.principal:hover { background: var(--accent-ink); }
.btn.secundario { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn.secundario:hover { border-color: var(--ink); background: var(--bg); }
.btn.perigo { background: var(--vermelho); }
.btn.perigo:hover { background: #b91c1c; }
.btn.fantasma { background: none; color: var(--ink-soft); border: 1.5px solid var(--line); }
.btn.fantasma:hover { background: var(--bg); }
.btn.pequeno { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }

.cartao {
  background: var(--surface); border-radius: var(--raio-grande); padding: 20px;
  box-shadow: var(--sombra); margin-bottom: 16px; border: 1px solid var(--line);
}
.cartao h2 { margin: 0 0 14px; font-size: 15.5px; color: var(--ink); font-weight: 800; }
.cartao h3 { margin: 0 0 4px; font-size: 15px; }

.cabecalho-pagina { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.cabecalho-pagina h1 { margin: 0; font-size: 22px; font-weight: 800; }
.cabecalho-pagina p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }

.grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

.stat {
  background: var(--surface); border-radius: var(--raio-grande); padding: 18px 20px;
  box-shadow: var(--sombra); border: 1px solid var(--line); position: relative; overflow: hidden;
}
.stat .ic-fundo { position: absolute; right: 14px; top: 14px; font-size: 26px; opacity: .12; }
.stat .valor { font-size: 27px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.stat .rotulo { color: var(--muted); font-size: 12.5px; margin-top: 3px; font-weight: 600; }
.stat.destaque { background: var(--ink); }
.stat.destaque .valor, .stat.destaque .rotulo { color: #fff; }
.stat.destaque .rotulo { color: rgba(255,255,255,.65); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.tag.disponivel { background: var(--verde-claro); color: var(--verde); }
.tag.reservado { background: var(--amarelo-claro); color: var(--amarelo); }
.tag.vendido { background: var(--line); color: var(--ink-soft); }
.tag.removido { background: var(--vermelho-claro); color: var(--vermelho); }
.tag.aberta, .tag.em_andamento { background: var(--amarelo-claro); color: var(--amarelo); }
.tag.pronto { background: var(--roxo-claro); color: var(--roxo); }
.tag.entregue { background: var(--verde-claro); color: var(--verde); }
.tag.cancelada { background: var(--vermelho-claro); color: var(--vermelho); }
.tag.aguardando_assinatura { background: var(--amarelo-claro); color: var(--amarelo); }
.tag.assinado { background: var(--verde-claro); color: var(--verde); }

.lista-produtos { display: flex; flex-direction: column; gap: 8px; }
.item-produto {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: var(--surface); border-radius: var(--raio); padding: 12px 16px; box-shadow: var(--sombra);
  cursor: pointer; border: 1px solid var(--line); transition: border-color .12s, transform .05s;
}
.item-produto:hover { border-color: var(--accent); }
.item-produto:active { transform: scale(.997); }
.item-produto .miniatura {
  width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--bg); flex-shrink: 0;
  border: 1px solid var(--line);
}
.item-produto .miniatura.vazia { display: flex; align-items: center; justify-content: center; font-size: 18px; opacity: .3; }
.item-produto .linha-principal { display: flex; align-items: center; gap: 12px; min-width: 0; }
.item-produto .textos { min-width: 0; }
.item-produto .info-principal { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-produto .info-secundaria { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.item-produto .preco { font-weight: 800; color: var(--ink); text-align: right; white-space: nowrap; font-size: 14.5px; }
.item-produto .preco small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }

.foto-preview { width: 100%; max-width: 220px; border-radius: var(--raio); border: 1px solid var(--line); display: block; margin-bottom: 10px; }
.upload-foto { border: 1.5px dashed var(--line); border-radius: var(--raio); padding: 14px; text-align: center; cursor: pointer; color: var(--muted); font-size: 13px; background: var(--bg); }
.upload-foto:hover { border-color: var(--accent); color: var(--accent-ink); }

table.tabela { width: 100%; border-collapse: collapse; }
table.tabela th, table.tabela td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
table.tabela th { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
table.tabela tbody tr:hover { background: var(--bg); }
.tabela-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--raio-grande); border: 1px solid var(--line); box-shadow: var(--sombra); }
.tabela-wrap table.tabela { margin: 0; }
.tabela-wrap th:first-child, .tabela-wrap td:first-child { padding-left: 18px; }

.alerta { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; }
.alerta.erro { background: var(--vermelho-claro); color: var(--vermelho); }
.alerta.sucesso { background: var(--verde-claro); color: var(--verde); }
.alerta.info { background: var(--accent-soft); color: var(--accent-ink); }

.vazio { text-align: center; color: var(--muted); padding: 50px 20px; font-size: 14px; }
.vazio .ic { font-size: 30px; display: block; margin-bottom: 8px; opacity: .4; }

.modal-fundo {
  position: fixed; inset: 0; background: rgba(14, 15, 19, .55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.modal {
  background: var(--surface); border-radius: var(--raio-grande); padding: 26px;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: var(--sombra-forte);
}
.modal h2 { margin-top: 0; font-size: 18px; font-weight: 800; }
.modal .rodape { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.busca-topo { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.busca-topo input, .busca-topo select { padding: 10px 13px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); }
.busca-topo input { flex: 1; min-width: 200px; }

.acoes-rapidas { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

.filtros-chip { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chip {
  padding: 7px 15px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; font-size: 13px; color: var(--ink-soft); font-weight: 600;
}
.chip.ativo { background: var(--ink); color: #fff; border-color: var(--ink); }

.carregando { text-align: center; padding: 70px 20px; color: var(--muted); }

.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.abas button {
  background: none; border: none; padding: 11px 4px; margin-right: 22px; cursor: pointer;
  font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.abas button.ativo { color: var(--ink); border-color: var(--ink); }

.assinatura-canvas { border: 1.5px dashed var(--line); border-radius: var(--raio); background: #fcfcfd; touch-action: none; cursor: crosshair; width: 100%; }

/* ---------- documento imprimível (contratos, comprovantes, relatórios) ---------- */

.doc-timbrado { background: #fff; border-radius: var(--raio-grande); box-shadow: var(--sombra); border: 1px solid var(--line); padding: 40px 44px; max-width: 780px; margin: 0 auto; }
.doc-cabecalho { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: 18px; margin-bottom: 24px; }
.doc-cabecalho img { height: 36px; }
.doc-cabecalho .meta { text-align: right; font-size: 12px; color: var(--muted); }
.doc-titulo { font-size: 19px; font-weight: 800; margin: 0 0 4px; text-transform: uppercase; letter-spacing: .02em; }
.doc-sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.doc-secao { margin-bottom: 20px; }
.doc-secao h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; font-weight: 700; }
.doc-secao p { margin: 0 0 6px; font-size: 14px; line-height: 1.55; }
.doc-grade-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; font-size: 13.5px; }
.doc-grade-campos dt { color: var(--muted); font-weight: 600; }
.doc-grade-campos dd { margin: 0 0 6px; font-weight: 700; }
.doc-clausulas { font-size: 12.5px; line-height: 1.7; color: var(--ink-soft); white-space: pre-line; }
.doc-assinaturas { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 36px; }
.doc-assinaturas .caixa-assinatura { border-top: 1.5px solid var(--ink); padding-top: 8px; text-align: center; font-size: 12.5px; }
.doc-assinaturas img { max-height: 70px; margin-bottom: -6px; }

@media print {
  body { background: #fff !important; }
  .topo, .nav, .acoes-rapidas, .nao-imprimir, .busca-topo { display: none !important; }
  main.conteudo { max-width: 100%; padding: 0; }
  .doc-timbrado { box-shadow: none; border: none; padding: 0; }
}
