/* Canal de Ética — telas públicas (acesso via QR Code) */
:root {
    --accent: #1E3A8A;
    --accent-soft: rgba(30, 58, 138, 0.07);
    --ink: #0F172A;
    --ink-2: #334155;
    --muted: #475569;
    --line: #E2E8F0;
    --line-2: #CBD5E1;
    --ground: #F8FAFC;
    --soft: #F1F5F9;
    --ok: #047857;
    --white: #FFFFFF;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

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

.app {
    max-width: 480px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    background: var(--ground);
    display: flex;
    flex-direction: column;
}

#form_relato { display: contents; }
.tela { display: none; flex: 1; flex-direction: column; }
.tela.ativa { display: flex; }

.icon { width: 20px; height: 20px; flex: 0 0 auto; }

/* ---------- Cabeçalhos ---------- */
.topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5;
}
.marca { display: flex; align-items: center; gap: 10px; }
.marca-icone {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--accent); color: var(--white);
    display: flex; align-items: center; justify-content: center;
}
.marca-nome { font-size: 15px; font-weight: 700; }
.marca-empresa { font-size: 12px; color: var(--muted); }
.seguro { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ok); }
.seguro .icon { width: 14px; height: 14px; }

.topo-simples {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    font-size: 16px; font-weight: 700;
    position: sticky; top: 0; z-index: 5;
}
.btn-icone {
    width: 44px; height: 44px; border-radius: 10px;
    border: 0; background: transparent;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--ink);
}

/* ---------- Início ---------- */
.hero {
    padding: 28px 24px 32px;
    background: var(--accent);
    color: var(--white);
    display: flex; flex-direction: column; gap: 18px;
}
.hero-linha { display: flex; align-items: center; justify-content: space-between; }
.logo-placeholder {
    height: 32px; padding: 0 12px;
    border: 1px dashed rgba(255,255,255,.7); border-radius: 8px;
    display: flex; align-items: center;
    font-size: 12px; font-weight: 600;
}
.logo-placeholder img { max-height: 28px; }
/* Com logo: fundo branco no lugar da moldura tracejada, para logos com fundo claro */
.logo-placeholder.com-logo { height: 44px; padding: 6px 12px; border: 0; background: var(--white); }
.logo-placeholder.com-logo img { max-height: 32px; display: block; }
.hero .seguro { color: var(--white); }
.hero-icone {
    width: 52px; height: 52px; border-radius: 14px;
    background: rgba(255,255,255,.16);
    display: flex; align-items: center; justify-content: center;
}
.hero h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.15; font-weight: 800; }
.hero p { margin: 0; font-size: 15px; line-height: 1.5; }

.conteudo { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 16px; }

.opcao {
    display: flex; align-items: center; gap: 14px;
    width: 100%; padding: 18px;
    border-radius: 16px; background: var(--white);
    border: 1px solid var(--line);
    text-align: left; cursor: pointer;
}
.opcao:hover { border-color: var(--line-2); }
.opcao-icone {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent); color: var(--white); flex: 0 0 auto;
}
.opcao-icone.neutro { background: var(--line); color: var(--ink); }
.opcao-texto { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.opcao-texto strong { font-size: 16px; }
.opcao-texto span { font-size: 13px; color: var(--muted); line-height: 1.4; }

.garantias {
    margin-top: 8px; padding: 18px; border-radius: 16px; background: var(--soft);
    display: flex; flex-direction: column; gap: 12px;
}
.garantias div { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.garantias .icon { width: 18px; height: 18px; color: var(--ok); margin-top: 1px; }

/* ---------- Etapas ---------- */
.progresso { padding: 18px 20px 0; }
.progresso-info { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); }
.progresso-barras { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.progresso-barras span { height: 4px; border-radius: 2px; background: var(--line); }
.progresso-barras span.on { background: var(--accent); }
.progresso h1 { margin: 18px 0 4px; font-size: 22px; font-weight: 800; }
.progresso p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > label, .rotulo { font-size: 13px; font-weight: 600; }
.campo small { font-size: 12px; color: var(--muted); }
.entrada {
    width: 100%; height: 44px;
    border: 1px solid var(--line-2); border-radius: 10px;
    padding: 0 12px; font-size: 15px; background: var(--white);
}
textarea.entrada { height: auto; padding: 10px 12px; line-height: 1.45; resize: vertical; min-height: 110px; }
.entrada:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.entrada:disabled { background: var(--soft); color: #94A3B8; }
.entrada.invalido { border-color: #B91C1C; background: #FEF2F2; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-right: 40px; }
.select-wrap .icon { position: absolute; right: 12px; top: 12px; pointer-events: none; color: var(--muted); }

.grade-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.escolha {
    display: flex; align-items: center; gap: 14px;
    width: 100%; min-height: 56px; padding: 12px 16px;
    border-radius: 14px; border: 2px solid var(--line); background: var(--white);
    cursor: pointer; text-align: left;
}
.escolha .bolinha {
    flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid #94A3B8; background: var(--white);
}
.escolha[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.escolha[aria-pressed="true"] .bolinha { border: 6px solid var(--accent); }
.escolha-texto { display: flex; flex-direction: column; gap: 2px; }
.escolha-texto strong { font-size: 15px; }
.escolha-texto span { font-size: 13px; color: var(--muted); }
.lista-escolhas { display: flex; flex-direction: column; gap: 10px; }
.lista-escolhas.invalido .escolha { border-color: #FCA5A5; }

.cartao-escolha {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    min-height: 96px; padding: 14px;
    border-radius: 14px; border: 2px solid var(--line); background: var(--white);
    color: var(--muted); cursor: pointer; text-align: left;
}
.cartao-escolha strong { font-size: 14px; color: var(--ink); }
.cartao-escolha[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.aviso { padding: 14px 16px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.aviso-neutro { background: var(--soft); color: var(--ink-2); }
.aviso-ok { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; }
.aviso-atencao { background: #FFFBEB; border: 1px solid #FDE68A; color: #78350F; }
.aviso-erro { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }

.interruptor {
    display: flex; align-items: center; gap: 12px; min-height: 44px;
    padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; font-size: 14px;
}
.interruptor .trilho {
    flex: 0 0 auto; width: 44px; height: 26px; border-radius: 13px;
    background: var(--line-2); position: relative; transition: background .15s;
}
.interruptor .trilho::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px; border-radius: 50%; background: var(--white);
    box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s;
}
.interruptor[aria-checked="true"] .trilho { background: var(--accent); }
.interruptor[aria-checked="true"] .trilho::after { left: 21px; }

.bloco {
    padding: 16px; border-radius: 14px; background: var(--white);
    border: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 12px;
}
.bloco-titulo { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 700; }
.bloco-titulo span { font-size: 12px; font-weight: 400; color: var(--muted); }
.bloco-remover { border: 0; background: transparent; color: #B91C1C; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 0; }

.btn-tracejado {
    height: 48px; border: 1.5px dashed #94A3B8; border-radius: 12px; background: transparent;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer;
}

.upload {
    position: relative;
    padding: 18px; border: 1.5px dashed #94A3B8; border-radius: 14px; background: var(--white);
    display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; text-align: center;
}
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload .icon { width: 26px; height: 26px; color: var(--accent); }
.upload strong { font-size: 15px; }
.upload span { font-size: 12px; color: var(--muted); }
.arquivo {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--white); border: 1px solid var(--line);
}
.arquivo .icon { width: 18px; height: 18px; color: var(--muted); }
.arquivo-info { flex: 1; min-width: 0; }
.arquivo-nome { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arquivo-tam { font-size: 12px; color: var(--muted); }

.rodape {
    display: flex; gap: 12px;
    padding: 14px 20px 22px;
    background: var(--white); border-top: 1px solid var(--line);
    position: sticky; bottom: 0;
}
.rodape.coluna { flex-direction: column; gap: 10px; }

.btn {
    height: 48px; padding: 0 16px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none;
}
.btn-primario { flex: 1; border: 0; background: var(--accent); color: var(--white); }
.btn-primario:disabled { opacity: .6; cursor: wait; }
.btn-secundario { border: 1px solid var(--line-2); background: var(--white); color: var(--ink); font-weight: 600; }
.btn-link { border: 0; background: transparent; color: var(--accent); font-weight: 600; font-size: 14px; padding: 12px; cursor: pointer; align-self: center; }
.btn .icon { width: 18px; height: 18px; }

/* ---------- Protocolo ---------- */
.sucesso { flex: 1; padding: 40px 20px 20px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.sucesso-icone {
    width: 72px; height: 72px; border-radius: 50%; background: #D1FAE5; color: var(--ok);
    display: flex; align-items: center; justify-content: center;
}
.sucesso-icone .icon { width: 36px; height: 36px; }
.sucesso-titulo { text-align: center; }
.sucesso-titulo h1 { margin: 0 0 6px; font-size: 24px; font-weight: 800; }
.sucesso-titulo p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.codigo-box {
    width: 100%; padding: 20px; border-radius: 16px; background: var(--white);
    border: 2px solid var(--accent);
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.codigo-rotulo { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.codigo {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 28px; font-weight: 700; letter-spacing: .06em; color: var(--accent);
}
.btn-copiar {
    height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white);
    display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-copiar .icon { width: 16px; height: 16px; }

.resumo {
    width: 100%; padding: 16px; border-radius: 14px; background: var(--white); border: 1px solid var(--line);
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.resumo dt { font-size: 12px; color: var(--muted); }
.resumo dd { margin: 0; font-size: 14px; font-weight: 600; }

/* ---------- Consulta ---------- */
.consulta { flex: 1; padding: 32px 20px; display: flex; flex-direction: column; gap: 22px; }
.consulta-icone {
    width: 56px; height: 56px; border-radius: 14px; background: var(--line);
    display: flex; align-items: center; justify-content: center;
}
.consulta h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.consulta p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.entrada-codigo {
    height: 56px; border-width: 2px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 20px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}

/* ---------- Acompanhamento ---------- */
.status-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.status-topo .codigo { font-size: 18px; }
.selo { padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.selo-andamento { background: #FEF3C7; color: #78350F; }
.selo-concluido { background: #D1FAE5; color: #065F46; }
.resumo.embutido { padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }

.linha-tempo { list-style: none; margin: 0; padding: 0; }
.linha-tempo li { display: flex; gap: 12px; }
.lt-marcador { display: flex; flex-direction: column; align-items: center; }
.lt-ponto {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid var(--line-2); background: var(--white);
    display: flex; align-items: center; justify-content: center; color: var(--white);
}
.lt-ponto .icon { width: 12px; height: 12px; }
.lt-traco { width: 2px; flex: 1; min-height: 20px; background: var(--line); }
.lt-texto { padding-bottom: 14px; }
.lt-texto strong { display: block; font-size: 14px; font-weight: 600; }
.lt-texto span { font-size: 12px; color: var(--muted); }
.linha-tempo li.feito .lt-ponto { background: var(--ok); border-color: var(--ok); }
.linha-tempo li.feito .lt-traco { background: var(--ok); }
.linha-tempo li.atual .lt-ponto { border: 6px solid var(--accent); }
.linha-tempo li.atual strong { color: var(--accent); font-weight: 700; }
.linha-tempo li.pendente strong { color: var(--muted); }

.mensagem { padding: 12px 14px; border-radius: 4px 14px 14px 14px; background: var(--soft); }
.mensagem.minha { border-radius: 14px 4px 14px 14px; background: var(--accent-soft); align-self: flex-end; max-width: 90%; }
.mensagem-autor { font-size: 12px; font-weight: 700; color: var(--muted); }
.mensagem-texto { font-size: 14px; line-height: 1.5; white-space: pre-line; }
.envio-msg { display: flex; gap: 8px; align-items: center; }
.envio-msg .entrada { flex: 1; min-width: 0; font-size: 14px; }
.btn-quadrado {
    width: 44px; height: 44px; border-radius: 10px; flex: 0 0 auto;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn-quadrado.primario { border: 0; background: var(--accent); color: var(--white); }

.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;
}
.oculto { display: none !important; }
