#auditoria-ia {
    --bg: #F3F4F6;
    --card: #ffffff;
    --card-border: #e3e6ec;
    --text: #1f2530;
    --text-dim: #6b7280;
    --red: #D62129;
    /* vermelho oficial da marca (Figma), antes era #C13B2E */
    --red-dim: #fbeae8;
    --blue: #056EA7;
    /* "primary-blue" oficial do componente de botão no Figma, antes era #0085C3 */
    --green: #24847C;
    /* teal oficial do componente Steps/sucesso, antes era um verde genérico */
    --green-bg: #E3F6F2;
    --radius: 10px;
}

#auditoria-ia * {
    box-sizing: border-box;
}

#auditoria-ia {
    font-family: 'Roboto', -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    margin: 0;
    padding: 0 0 100px;
}

#auditoria-ia .wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

#auditoria-ia .topbar {
    background: var(--red);
    color: #fff;
    text-align: center;
    padding: 14px 20px;
    font-family: 'Montserrat', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.02em;
    margin-bottom: 40px;
}

#auditoria-ia header {
    margin-bottom: 32px;
}

#auditoria-ia .eyebrow {
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 6px;
}

#auditoria-ia h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 25px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    color: #111827;
}

#auditoria-ia .trilha {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 26px 0 8px;
}

#auditoria-ia .passo-marca {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    background: #e5e7eb;
    color: #9ca3af;
    flex-shrink: 0;
    transition: background .2s, color .2s;
}

#auditoria-ia .passo-marca.ativo {
    background: var(--green);
    color: #fff;
}

#auditoria-ia .passo-marca.feito {
    background: var(--green);
    color: #fff;
}

#auditoria-ia .trilha-linha {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
}

#auditoria-ia section.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    opacity: 0.45;
    pointer-events: none;
    transition: opacity .2s;
}

#auditoria-ia section.card.ativo {
    opacity: 1;
    pointer-events: all;
}

#auditoria-ia .card-titulo {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 14px;
}

#auditoria-ia input[type="text"] {
    width: 100%;
    padding: 11px 13px;
    border-radius: 8px;
    border: 1px solid #d7dbe3;
    background: #fbfbfc;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

#auditoria-ia input[type="text"]:focus {
    border-color: var(--blue);
    background: #fff;
}

#auditoria-ia input[type="text"]::placeholder {
    color: #9aa1af;
}

/* Campo travado (ex: incentivador pré-selecionado pela sessão) — precisa
   parecer claramente não-editável, não só um input branco comum com
   "disabled" que passa despercebido. */
#auditoria-ia input[type="text"]:disabled,
#auditoria-ia input[type="text"].campo-travado {
    background: #eef0f3;
    border-style: dashed;
    color: #6b7280;
    cursor: not-allowed;
    padding-left: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 11px center;
}

#auditoria-ia select {
    width: 100%;
    padding: 10px 36px 10px 13px;
    border-radius: 4px;
    border: 1px solid #d7dbe3;
    background: #fbfbfc url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6" viewBox="0 0 10 6" fill="none"><path d="M1 1L5 5L9 1" stroke="%236b7280" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat right 13px center;
    background-size: 10px 6px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

#auditoria-ia select:focus {
    border-color: var(--blue);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(5, 110, 167, 0.15);
}

#auditoria-ia .dropdown-custom {
    position: relative;
}

#auditoria-ia .dropdown-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 13px;
    border-radius: 4px;
    border: 1px solid #d7dbe3;
    background: #fbfbfc;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, border-radius .1s;
}

#auditoria-ia .dropdown-trigger .chevron {
    transition: transform .15s;
    color: #6b7280;
}

#auditoria-ia .dropdown-trigger.aberto {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5, 110, 167, 0.15);
}

#auditoria-ia .dropdown-trigger.aberto .chevron {
    transform: rotate(180deg);
}

#auditoria-ia .dropdown-lista {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(16, 24, 40, .1);
    max-height: 220px;
    overflow-y: auto;
    z-index: 30;
}

#auditoria-ia .dropdown-lista.aberta {
    display: block;
}

#auditoria-ia .dropdown-item {
    padding: 9px 13px;
    font-size: 13.5px;
    color: var(--text);
    cursor: pointer;
    border-bottom: 1px solid var(--card-border);
}

#auditoria-ia .dropdown-item:last-child {
    border-bottom: none;
}

#auditoria-ia .dropdown-item:hover {
    background: #F2F2F2;
}

#auditoria-ia .dropdown-item.selecionado {
    font-weight: 700;
    color: var(--blue);
}

#auditoria-ia .lista {
    margin-top: 10px;
    max-height: 260px;
    overflow-y: auto;
    border-radius: 8px;
}

#auditoria-ia .lista:not(:empty) {
    border: 1px solid var(--card-border);
}

#auditoria-ia .item {
    padding: 11px 13px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--card-border);
    cursor: pointer;
    color: #374151;
}

#auditoria-ia .item:last-child {
    border-bottom: none;
}

#auditoria-ia .item:hover {
    background: #f9fafb;
}

#auditoria-ia .item.pergunta {
    cursor: default;
}

#auditoria-ia .item.pergunta:hover {
    background: transparent;
}

#auditoria-ia .item.pergunta label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

#auditoria-ia .item.pergunta input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--blue);
    cursor: pointer;
}

#auditoria-ia .tabela-wrap {
    margin-top: 10px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
}

#auditoria-ia .tabela-wrap .tabela-cabecalho {
    border-radius: 0;
    position: sticky;
    top: 0;
    z-index: 2;
}

#auditoria-ia .tabela-scroll {
    max-height: 280px;
    overflow-y: auto;
}

#auditoria-ia .tabela-wrap .lista {
    margin-top: 0;
    border: none;
    border-radius: 0;
    max-height: none;
    overflow-y: visible;
}

#auditoria-ia .tabela-cabecalho {
    display: grid;
    gap: 28px;
    align-items: center;
    padding: 8px 13px;
    background: #F2F2F2;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    border-bottom: 1px solid var(--card-border);
}

#auditoria-ia .tabela-linha {
    display: grid;
    gap: 28px;
    align-items: start;
    padding: 12px 13px;
    border-bottom: 1px solid var(--card-border);
    font-size: 13px;
}

#auditoria-ia .tabela-linha:last-child {
    border-bottom: none;
}

#auditoria-ia .tabela-linha:hover {
    background: #f9fafb;
}

#auditoria-ia .tabela-linha label {
    display: contents;
    cursor: pointer;
}

#auditoria-ia .tabela-linha input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--blue);
    cursor: pointer;
    margin-top: 2px;
}

#auditoria-ia .tabela-titulo {
    font-weight: 400;
    color: #111827;
}

#auditoria-ia .tabela-secundario {
    color: #4b5563;
    font-size: 12.5px;
}

@media (max-width: 480px) {
    #auditoria-ia .tabela-cabecalho {
        display: none;
    }

    #auditoria-ia .tabela-linha {
        grid-template-columns: 20px 1fr !important;
        row-gap: 3px;
    }

    #auditoria-ia .tabela-linha input[type="checkbox"] {
        grid-row: 1 / -1;
    }

    #auditoria-ia .tabela-linha .tabela-titulo {
        grid-column: 2;
        grid-row: 1;
    }

    #auditoria-ia .tabela-linha .tabela-secundario {
        grid-column: 2;
        grid-row: 2;
        font-size: 11.5px;
    }

    #auditoria-ia .tabela-linha .tabela-etapa {
        grid-column: 2;
        grid-row: 3;
        margin-top: 2px;
    }


}

#auditoria-ia .marcar-todas {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 14px;
    margin-bottom: 10px;
    cursor: pointer;
}

#auditoria-ia .marcar-todas input {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--blue);
    cursor: pointer;
}

#auditoria-ia .badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: #EAF3FA;
    color: var(--blue);
    margin-left: 6px;
}

#auditoria-ia .confirmacao {
    margin-top: 14px;
    font-size: 13px;
    color: var(--green);
    font-weight: 600;
    background: var(--green-bg);
    padding: 8px 12px;
    border-radius: 8px;
    display: none;
}

#auditoria-ia .confirmacao:not(:empty) {
    display: block;
}

#auditoria-ia .vazio {
    color: var(--text-dim);
    font-size: 13px;
    padding: 8px 2px;
}