/* ============================================================
   Canal de Denúncia Argos Industrial
   Paleta: aço escuro + acento amarelo industrial
   ============================================================ */
:root {
    --bg: #f3f5f8;
    --bg-card: #ffffff;
    --bg-dark: #1a2230;
    --bg-dark-2: #232c3d;
    --text: #1c2330;
    --text-soft: #56607a;
    --text-invert: #e9ecf3;
    --border: #d8dde6;
    --primary: #1a2230;
    --primary-hover: #2a3548;
    --accent: #f5a623;
    --accent-hover: #e09414;
    --danger: #c13a3a;
    --success: #2e8a4e;
    --warning: #b27600;
    --shadow: 0 4px 16px rgba(20, 30, 50, 0.08);
    --shadow-lg: 0 12px 32px rgba(20, 30, 50, 0.12);
    --radius: 6px;
    --radius-sm: 4px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
                 Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----- Header ----- */
.header {
    background: var(--bg-dark);
    color: var(--text-invert);
    border-bottom: 3px solid var(--accent);
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}
.header-logo img {
    height: 44px;
    width: auto;
}
.header-logo .titulo {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.header-logo .subtitulo {
    font-size: 12px;
    color: #b7c0d4;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.header-nav a {
    color: var(--text-invert);
    font-size: 14px;
    margin-left: 24px;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}
.header-nav a:hover {
    border-color: var(--accent);
    text-decoration: none;
}

/* ----- Layout ----- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}
.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
    color: var(--text-invert);
    padding: 56px 24px;
    text-align: center;
}
.hero h1 {
    margin: 0 0 12px;
    font-size: 30px;
    font-weight: 700;
}
.hero p {
    margin: 0 auto;
    max-width: 640px;
    color: #c1c9db;
    font-size: 16px;
}
.hero-actions {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ----- Cards ----- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.card > div, .card > p { overflow-wrap: anywhere; word-break: break-word; }
.card h2 {
    margin: 0 0 8px;
    font-size: 20px;
}
.card h3 {
    margin: 0 0 6px;
    font-size: 16px;
}
.card-muted { color: var(--text-soft); font-size: 14px; }

/* ----- Grid de "como funciona" ----- */
.passos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 28px;
}
.passo {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    border-top: 3px solid var(--accent);
}
.passo .numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-dark);
    color: var(--accent);
    border-radius: 50%;
    font-weight: 700;
    margin-bottom: 12px;
}
.passo h3 { margin: 0 0 6px; font-size: 16px; }
.passo p { margin: 0; color: var(--text-soft); font-size: 14px; }

/* ----- Form ----- */
form { margin: 0; }
.form-grupo { margin-bottom: 20px; }
label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}
.label-aux {
    display: block;
    color: var(--text-soft);
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 400;
}
input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--bg-dark);
    box-shadow: 0 0 0 3px rgba(26, 34, 48, 0.12);
}
textarea { resize: vertical; min-height: 160px; }
textarea.textarea-sm { min-height: 90px; }
input[type="file"] {
    border: 1px dashed var(--border);
    padding: 10px;
    background: #fafbfc;
    border-radius: var(--radius-sm);
    width: 100%;
    font-size: 13px;
}

.contador {
    display: block;
    text-align: right;
    color: var(--text-soft);
    font-size: 12px;
    margin-top: 4px;
}

/* ----- Botões ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.05s;
    text-decoration: none;
}
.btn { white-space: nowrap; flex-shrink: 0; }
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--accent);
    color: var(--bg-dark);
}
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-dark {
    background: var(--bg-dark);
    color: var(--text-invert);
}
.btn-dark:hover { background: var(--primary-hover); text-decoration: none; }
.btn-secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg); text-decoration: none; }
.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ----- Alertas ----- */
.alerta {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid;
}
.alerta-info { background: #eef4fb; border-color: #c8dcef; color: #1b3a5b; }
.alerta-erro { background: #fbeded; border-color: #f0caca; color: #7d1f1f; }
.alerta-ok   { background: #ecf6ee; border-color: #c5e0cd; color: #1f5a30; }
.alerta-warn { background: #fdf6e2; border-color: #f0dca8; color: #6b4a00; }

/* ----- Caixa protocolo ----- */
.caixa-protocolo {
    background: var(--bg-dark);
    color: var(--text-invert);
    padding: 24px;
    border-radius: var(--radius);
    border-left: 4px solid var(--accent);
    margin: 20px 0;
}
.caixa-protocolo .rotulo {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 11px;
    color: #a9b3c8;
    margin-bottom: 6px;
}
.caixa-protocolo .valor {
    font-family: "JetBrains Mono", "Courier New", monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    word-break: break-all;
    margin-bottom: 16px;
}
.caixa-protocolo .botoes {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ----- Tabela ----- */
table.lista {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
table.lista th {
    text-align: left;
    background: var(--bg-dark);
    color: var(--text-invert);
    padding: 12px 14px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}
table.lista td {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}
table.lista tr:hover td { background: #fafbfd; cursor: pointer; }

/* ----- Badges de status ----- */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    border: 1px solid;
}
.badge-aberta              { background: #eaf1fb; color: #1f4b89; border-color: #c6d8f0; }
.badge-em_analise          { background: #fff4d9; color: #7a5a00; border-color: #ecd281; }
.badge-aguardando_denunciante { background: #f1e7fb; color: #5a307e; border-color: #d6bff0; }
.badge-procedente          { background: #e5f3eb; color: #1f5a30; border-color: #b0d6bd; }
.badge-improcedente        { background: #f7e0e0; color: #7d1f1f; border-color: #e9b6b6; }
.badge-arquivada           { background: #e7e9ee; color: #4a5366; border-color: #cdd1da; }
.badge-concluida           { background: #e5f3eb; color: #1f5a30; border-color: #b0d6bd; }

/* ----- Mensagens / chat ----- */
.timeline { margin-top: 20px; }
.msg {
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    max-width: 70%;
    background: var(--bg-card);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 14px;
}
.msg.msg-denunciante {
    margin-right: auto;
    border-left: 3px solid var(--accent);
}
.msg.msg-admin {
    margin-left: auto;
    background: var(--bg-dark);
    color: var(--text-invert);
    border-color: var(--bg-dark);
    border-right: 3px solid var(--accent);
}
.msg .meta {
    font-size: 11px;
    color: var(--text-soft);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.msg.msg-admin .meta { color: #b7c0d4; }

/* ----- Modais ----- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 22, 0.6);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 900;
    padding: 60px 20px 20px;
    overflow-y: auto;
}
.modal-overlay.aberto { display: flex; }
.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 80px);
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--accent);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.modal > * { flex-shrink: 0; }
.modal > *:not(.modal-cabecalho) { overflow-y: auto; }
.modal form, .modal > div:not(.modal-cabecalho) {
    overflow-y: auto;
    overflow-x: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.modal-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.modal-fechar {
    background: transparent;
    border: 0;
    color: var(--text-soft);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0 6px;
}
.modal-fechar:hover { color: var(--danger); }
.mb-0 { margin-bottom: 0; }

/* ----- Anexos grid ----- */
.anexos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 12px;
}
.anexo-card {
    background: #fafbfd;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.anexo-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #e9ecf3;
    cursor: zoom-in;
    display: block;
    transition: opacity 0.15s;
}
.anexo-thumb:hover { opacity: 0.9; }
.anexo-icone {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    color: var(--accent);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 1px;
}
.anexo-info {
    padding: 10px 12px;
    flex: 1;
    min-width: 0;
}
.anexo-nome {
    font-size: 13px;
    font-weight: 600;
    word-break: break-all;
    overflow-wrap: anywhere;
    line-height: 1.3;
    margin-bottom: 2px;
}
.anexo-meta {
    font-size: 11px;
    color: var(--text-soft);
    word-break: break-all;
}
.anexo-acoes {
    display: flex;
    gap: 6px;
    padding: 0 12px 12px;
}
.btn-xs {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    flex: 1;
}

/* ----- Lightbox ----- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 22, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 40px 20px;
}
.lightbox.aberto { display: flex; flex-direction: column; }
.lightbox img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-titulo {
    color: #e9ecf3;
    margin-top: 14px;
    font-size: 13px;
    text-align: center;
    max-width: 80%;
    word-break: break-all;
}
.lightbox-fechar {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 4px;
}
.lightbox-fechar:hover { background: rgba(255,255,255,0.1); }

/* ----- Footer ----- */
.footer {
    background: var(--bg-dark);
    color: #8e98ad;
    padding: 24px;
    text-align: center;
    font-size: 13px;
    margin-top: 64px;
}
.footer strong { color: var(--text-invert); }
.footer-admin-link {
    color: #6b7589;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid #2e3850;
    padding: 5px 12px;
    border-radius: 3px;
    display: inline-block;
}
.footer-admin-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    text-decoration: none;
}

/* ----- Utilitários ----- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap { gap: 12px; }
.hidden { display: none !important; }
.list-clean { list-style: none; padding: 0; margin: 0; }

/* ----- Responsivo ----- */
@media (max-width: 640px) {
    .header-inner { flex-direction: column; gap: 8px; }
    .hero h1 { font-size: 24px; }
    .card { padding: 20px; }
    table.lista { font-size: 13px; }
    table.lista th, table.lista td { padding: 8px 10px; }
}

/* ============================================================
   Abas (denúncia detalhe admin)
   ============================================================ */
.tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}
.tab {
    background: transparent;
    border: 0;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-soft);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.tab-ativo {
    color: var(--bg-dark);
    border-color: var(--accent);
}
.tab-badge {
    background: var(--bg);
    color: var(--text-soft);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}
.tab.tab-ativo .tab-badge { background: var(--accent); color: var(--bg-dark); }
.tab-painel { display: none; }
.tab-painel.ativo { display: block; }

/* ============================================================
   Badges de etapa, papel, partes
   ============================================================ */
.badge-etapa, .badge-papel, .badge-parte {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 700;
    border: 1px solid;
}
.badge-etapa-rh             { background: #eaf1fb; color: #1f4b89; border-color: #c6d8f0; }
.badge-etapa-juridico       { background: #f1e7fb; color: #5a307e; border-color: #d6bff0; }
.badge-etapa-revisao_final  { background: #fff4d9; color: #7a5a00; border-color: #ecd281; }
.badge-etapa-concluida      { background: #e5f3eb; color: #1f5a30; border-color: #b0d6bd; }

.badge-papel-rh         { background: #eaf1fb; color: #1f4b89; border-color: #c6d8f0; }
.badge-papel-juridico   { background: #f1e7fb; color: #5a307e; border-color: #d6bff0; }
.badge-papel-diretoria  { background: #fdf6e2; color: #6b4a00; border-color: #f0dca8; }
.badge-papel-suporte    { background: #e7e9ee; color: #4a5366; border-color: #cdd1da; }

.badge-parte-pendente    { background: #fff4d9; color: #7a5a00; border-color: #ecd281; }
.badge-parte-link_aberto { background: #eaf1fb; color: #1f4b89; border-color: #c6d8f0; }
.badge-parte-respondida  { background: #e5f3eb; color: #1f5a30; border-color: #b0d6bd; }
.badge-parte-expirada    { background: #f7e0e0; color: #7d1f1f; border-color: #e9b6b6; }

/* ============================================================
   Cards de partes, pareceres
   ============================================================ */
.parte-card, .parecer-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #fff;
    border-left: 4px solid var(--accent);
}
.parte-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.parte-cabecalho .badge-parte { margin-left: 8px; }
.parte-resumo {
    background: #fafbfd;
    border-left: 3px solid var(--border);
    padding: 8px 12px;
    margin: 8px 0;
    color: var(--text-soft);
    font-size: 13px;
    white-space: pre-wrap;
    border-radius: 2px;
}
.parte-acoes { margin-top: 10px; }

.parecer-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 13px;
}
.parecer-conteudo {
    white-space: pre-wrap;
    font-size: 14px;
    color: var(--text);
    background: #fafbfd;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* ============================================================
   Timeline de eventos (admin: histórico / público: andamento)
   ============================================================ */
.timeline-eventos {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}
.timeline-eventos::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border);
}
.timeline-eventos li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 18px;
}
.timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--border);
}
.timeline-conteudo .timeline-data {
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 2px;
}

/* ============================================================
   Visibilidade por papel / capacidade
   ============================================================ */
body:not([data-papel="rh"]):not([data-papel="suporte"]) .so-rh { display: none !important; }
body[data-pode-editar="0"] .so-edita { display: none !important; }

/* ============================================================
   Checklist do andamento (consultar.html — DocuSign-like)
   ============================================================ */
.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}
.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
}
.checklist li:last-child { border-bottom: 0; }
.checklist-icone {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e7e9ee;
    color: #8e98ad;
    font-weight: 700;
    font-size: 14px;
}
.checklist-feito  .checklist-icone { background: #2e8a4e; color: #fff; }
.checklist-andamento .checklist-icone { background: var(--accent); color: var(--bg-dark); }
.checklist-titulo { font-weight: 600; }
.checklist-sub { font-size: 12px; color: var(--text-soft); }

/* ============================================================
   Disclaimer / aceites (denunciar.html)
   ============================================================ */
.aviso-responsabilidade {
    background: #fff4d9;
    border: 2px solid #ecd281;
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 18px;
    color: #6b4a00;
    line-height: 1.55;
}
.aviso-responsabilidade strong { color: #573b00; }
.aceites { margin: 16px 0 8px; }
.aceite-item {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background: #fafbfd;
    cursor: pointer;
    align-items: flex-start;
}
.aceite-item input { margin-top: 3px; flex-shrink: 0; }
.aceite-item:hover { border-color: var(--accent); }
.aceite-item.marcado { border-color: var(--success); background: #f0f8f3; }
.aceite-item .titulo { font-weight: 600; }
.aceite-item .sub { font-size: 13px; color: var(--text-soft); margin-top: 2px; }

