/* =====================================================================
   PADRÃO VISUAL DOS SISTEMAS (desde 09/10/2026) — mesmo visual do Rastreio de Entregas,
   em CSS puro (sem build) para projetos que rodam direto na HostGator.
   Preto e branco; cor só onde informa: verde = concluído, âmbar = atenção, vermelho = erro.
   Referência Tailwind: rastreio-entregas/resources/css/app.css
   ===================================================================== */

:root {
  --fundo: #f7f7f7;
  --campo: #f4f4f5;
  --texto: #0a0a0a;
  --suave: #6b6b6b;
  --borda: #e5e5e5;
  --preto: #0a0a0a;
  --preto-hover: #404040;
  --cinza-50: #f5f5f5;
  --cinza-100: #ebebeb;
  --cinza-200: #d4d4d4;
  --cinza-400: #a3a3a3;
  --verde: #059669;
  --verde-hover: #047857;
  --raio-lg: 8px;
  --raio-xl: 12px;
  --raio-2xl: 12px;
  --raio-3xl: 14px;
  --sombra-nuvem: 0 1px 2px rgb(0 0 0 / .04);
  --sombra-flutuante: 0 4px 16px rgb(0 0 0 / .08);
  --fonte: 'Manrope', 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--fonte);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg, canvas { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.suave { color: var(--suave); }
.titulo-pagina { font-size: 24px; font-weight: 800; line-height: 1.25; }
.icone { width: 20px; height: 20px; flex: none; }
.icone-sm { width: 16px; height: 16px; flex: none; }

/* ---------- Superfícies ---------- */
.card {
  background: #fff;
  border: 1px solid var(--borda);
  border-radius: var(--raio-3xl);
  padding: 20px;
}
@media (min-width: 640px) { .card { padding: 24px; } }

/* Cabeçalho branco com borda e marca */
.topo {
  position: sticky; top: 0; z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--borda);
  padding-top: env(safe-area-inset-top);
}
.topo-dentro { display: flex; align-items: center; gap: 12px; padding: 12px 16px; max-width: 1152px; margin: 0 auto; }
.marca { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.marca img { max-height: 44px; max-width: 80px; width: auto; object-fit: contain; flex: none; }
.marca-nome { display: block; font-size: 14px; font-weight: 800; line-height: 1.25; }
.marca-sub { display: block; font-size: 12px; font-weight: 500; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca-lg { flex-direction: column; gap: 12px; text-align: center; flex: none; }
.marca-lg img { max-height: 96px; max-width: 240px; }
.marca-lg .marca-nome { font-size: 24px; }

/* Passos numerados dentro do card */
.passo { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.passo-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--cinza-50); color: var(--preto); font-size: 12px; font-weight: 700;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--raio-lg);
  padding: 10px 20px; font-size: 14px; font-weight: 600; line-height: 1.25;
  white-space: nowrap; cursor: pointer; user-select: none; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:disabled { pointer-events: none; opacity: .6; }
.btn-primary { background: var(--preto); color: #fff; }
.btn-primary:hover { background: var(--preto-hover); }
.btn-success { background: var(--verde); color: #fff; }
.btn-success:hover { background: var(--verde-hover); }
.btn-soft { background: #fff; border-color: var(--borda); color: var(--texto); }
.btn-soft:hover { background: #fafafa; }
.btn-ghost { background: #f5f5f5; color: var(--texto); }
.btn-ghost:hover { background: #e5e5e5; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-icone { width: 44px; height: 44px; padding: 0; }
.btn-sair { color: var(--suave); background: none; border: 0; border-radius: var(--raio-lg); padding: 8px; cursor: pointer; }
.btn-sair:hover { color: #dc2626; background: #fef2f2; }

/* ---------- Formulários ---------- */
.label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--texto); }
.input {
  display: block; width: 100%;
  border: 1px solid var(--borda); border-radius: var(--raio-lg); background: #fff;
  padding: 10px 14px; font-size: 16px; color: var(--texto); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: rgb(107 107 107 / .7); }
.input:focus { border-color: var(--preto); box-shadow: 0 0 0 2px rgb(10 10 10 / .1); }
.input-error { border-color: #f87171; background: rgb(254 242 242 / .6); }
.dica { font-size: 12px; color: var(--suave); }
.faixa {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px;
  background: var(--cinza-100); outline: none;
}
.faixa::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--preto); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--preto); cursor: pointer; }
.faixa::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--preto); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--preto); cursor: pointer; }

/* Área para anexar arquivo (pontilhada) */
.anexo {
  display: block; cursor: pointer; text-align: center;
  border: 2px dashed var(--borda); border-radius: 16px; padding: 24px;
  transition: border-color .15s, background-color .15s;
}
.anexo:hover { border-color: var(--cinza-200); background: rgb(245 245 245 / .5); }
.anexo:focus-within { border-color: var(--preto); }
.anexo-vazio { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0; }
.anexo-cheio { display: flex; align-items: center; gap: 12px; text-align: left; }
.anexo-thumb { width: 56px; height: 56px; border-radius: var(--raio-xl); object-fit: cover; background: var(--campo); flex: none; }
.anexo-titulo { font-size: 16px; font-weight: 700; }
.anexo-trocar { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--preto); text-decoration: underline; }

/* ---------- Chips (filtros, abas, opções curtas) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--borda); border-radius: var(--raio-lg); background: #fff;
  padding: 8px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--suave);
  transition: color .15s, background-color .15s, border-color .15s;
}
.chip:hover { color: var(--texto); }
.chip-active, .chip-active:hover { border-color: var(--preto); background: var(--preto); color: #fff; }

/* Cartão-opção grande */
.opcoes { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice {
  position: relative; display: flex; align-items: center; gap: 12px; height: 100%;
  border: 1px solid var(--borda); border-radius: var(--raio-2xl); background: #fff;
  padding: 14px; cursor: pointer; text-align: left; font-size: 14px; font-weight: 600;
  transition: border-color .15s, box-shadow .15s;
}
.choice:hover { border-color: var(--cinza-400); }
.choice[aria-checked="true"] { border-color: var(--preto); box-shadow: 0 0 0 1px var(--preto); }
.choice:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--cinza-200); }
.choice-dot {
  margin-left: auto; display: flex; align-items: center; justify-content: center; flex: none;
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--borda); background: #fff; color: transparent;
  transition: all .15s;
}
.choice[aria-checked="true"] .choice-dot { border-color: var(--preto); background: var(--preto); color: #fff; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-ia { margin-left: 4px; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 700; background: var(--cinza-50); color: var(--preto); vertical-align: middle; }

/* ---------- Alertas e status ---------- */
.alert { display: flex; align-items: flex-start; gap: 12px; border: 1px solid; border-radius: 16px; padding: 16px; font-size: 14px; font-weight: 500; }
.alert-success { border-color: #a7f3d0; background: #ecfdf5; color: #065f46; }
.alert-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.alert-warn { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.alert-info { border-color: var(--borda); background: #fafafa; color: var(--texto); }
.status { display: flex; align-items: flex-start; gap: 12px; border-radius: 16px; padding: 12px; font-size: 14px; font-weight: 500; }
.status-carregando { background: var(--cinza-50); color: var(--texto); }
.status-ok { background: #ecfdf5; color: #065f46; }
.status-atencao { background: #fffbeb; color: #92400e; }
.status-erro { background: #fef2f2; color: #991b1b; }

/* Ícone em bloco */
.icon-tile { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: var(--raio-xl); background: var(--preto); color: #fff; }
.icon-tile-lg { width: 56px; height: 56px; border-radius: var(--raio-3xl); }

/* ---------- Espera ---------- */
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid #e5e5e5; border-top-color: var(--preto); animation: girar 1s linear infinite; flex: none; }
.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
@keyframes girar { to { transform: rotate(360deg); } }
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgb(255 255 255 / .7); backdrop-filter: blur(4px); }

/* Barra fixa no rodapé do celular (ação principal no alcance do polegar) */
.barra-rodape {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: #fff; border-top: 1px solid var(--borda);
  padding: 12px 16px calc(env(safe-area-inset-bottom) + 12px);
}

/* Aviso rápido */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60;
  max-width: calc(100vw - 32px); border-radius: var(--raio-lg); background: var(--preto); color: #fff;
  padding: 12px 16px; font-size: 14px; font-weight: 600; box-shadow: var(--sombra-flutuante);
}
