/* ============================================================
   auditorias.css — Complice Manager v2.0
   Cards de auditoria, layout responder, sidebar, anexos
   ============================================================ */

/* ── Cards de Auditoria ── */
.audit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.audit-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.audit-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 14px 14px 0 0;
}
.audit-card.rascunho::before    { background: #94a3b8; }
.audit-card.em_andamento::before { background: var(--accent); }
.audit-card.concluida::before   { background: var(--success); }
.audit-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.audit-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}
.audit-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    flex: 1;
    margin-right: 12px;
}
.audit-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.audit-card-meta span { display: flex; align-items: center; gap: 6px; }

.progress-wrap {
    height: 6px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 6px;
}
.progress-fill {
    height: 100%;
    border-radius: 99px;
    background: var(--accent);
    transition: width 0.6s ease;
}
.progress-label {
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'DM Mono', monospace;
}

/* ── Layout Responder ── */
.responder-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    height: calc(100vh - 56px);
}

/* ── Sidebar de perguntas ── */
.responder-sidebar {
    background: #fff;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 20px 0;
}
.responder-sidebar::-webkit-scrollbar       { width: 4px; }
.responder-sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.sidebar-group-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 10px 16px 4px;
}

.sidebar-pergunta-item {
    padding: 10px 16px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-pergunta-item:hover  { background: #f8fafc; }
.sidebar-pergunta-item.active { background: var(--accent-soft); border-left-color: var(--accent); }

.sidebar-pergunta-item .pq-num {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: var(--accent);
    background: #dbeafe;
    padding: 2px 5px;
    border-radius: 4px;
    flex-shrink: 0;
}
.sidebar-pergunta-item .pq-text {
    font-size: 12px;
    line-height: 1.3;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-pergunta-item .pq-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: auto;
}
.pq-status.respondida   { background: var(--success); }
.pq-status.nao_aplicavel { background: var(--warning); }
.pq-status.pendente     { background: #e2e8f0; }

/* ── Conteúdo de respostas ── */
.responder-content {
    overflow-y: auto;
    padding: 28px 32px;
    background: #f8fafc;
}
.responder-content::-webkit-scrollbar       { width: 4px; }
.responder-content::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ── Card de pergunta ── */
.pergunta-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}

.pergunta-numero {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--accent);
    background: #dbeafe;
    padding: 3px 8px;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 8px;
}
.pergunta-grupo-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}
.pergunta-texto {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.proposta-evidencia {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 12.5px;
    color: #0369a1;
    display: flex;
    gap: 8px;
}
.proposta-evidencia i { flex-shrink: 0; margin-top: 1px; }

.resposta-section  { margin-bottom: 20px; }
.resposta-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

/* ── Políticas vinculadas ── */
.politicas-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.politica-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.politica-item .pi-icon {
    width: 28px; height: 28px;
    border-radius: 7px;
    background: #dbeafe;
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0;
}
.politica-item .pi-name {
    font-size: 13px; font-weight: 500;
    flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.politica-item .pi-code {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: var(--accent);
    background: #dbeafe;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ── Anexos ── */
.anexos-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.anexo-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.anexo-item .ax-icon {
    width: 28px; height: 28px;
    border-radius: 7px;
    background: #fef3c7;
    color: var(--warning);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0;
}
.anexo-item .ax-info  { flex: 1; min-width: 0; }
.anexo-item .ax-name  { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anexo-item .ax-meta  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ── Status selector ── */
.status-selector { display: flex; gap: 8px; }
.status-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    transition: all 0.15s;
    font-family: 'DM Sans', sans-serif;
}
.status-btn:hover { border-color: var(--accent); color: var(--accent); }
.status-btn.active.respondida    { background: #d1fae5; border-color: #10b981; color: #065f46; }
.status-btn.active.nao_aplicavel { background: #fef3c7; border-color: #f59e0b; color: #d97706; }

/* ── Progress bar de auditoria ── */
.audit-progress-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 10px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.audit-progress-info  { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.audit-progress-track { flex: 1; height: 6px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.audit-progress-fill  { height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.4s ease; }

/* ── Tabs ── */
.tabs-bar { display: flex; gap: 4px; margin-bottom: 20px; }
.tab-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.15s;
    font-family: 'DM Sans', sans-serif;
}
.tab-btn:hover  { background: #f1f5f9; color: var(--text-primary); }
.tab-btn.active { background: var(--accent); color: #fff; }

/* ── Selecionar política no modal ── */
.politica-select-item {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 6px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.politica-select-item:hover    { border-color: var(--accent); background: var(--accent-soft); }
.politica-select-item.selected { border-color: var(--accent); background: var(--accent-soft); }

.politica-select-item .check {
    width: 18px; height: 18px;
    border-radius: 4px;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.politica-select-item.selected .check {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-size: 10px;
}

input[type="month"].form-control-custom {
    cursor: pointer;
}