/* ============================================================
   dashboard.css — Complice Manager v2.0
   KPIs, conformidade, estágios, domínios, recentes
   ============================================================ */

/* ── View base ── */
.dashboard-view {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px;
    flex-direction: column;
    gap: 24px;
}
.dashboard-view.active { display: flex; }

/* ── Saudação ── */
.dash-greeting h2 { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.dash-greeting p  { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ── KPI Grid ── */
.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.kpi-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 12px 12px 0 0;
}

.kpi-card.blue::before   { background: #3b82f6; }
.kpi-card.green::before  { background: #10b981; }
.kpi-card.amber::before  { background: #f59e0b; }
.kpi-card.red::before    { background: #ef4444; }
.kpi-card.orange::before { background: #f59e0b; }

.kpi-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 6px;
}
.kpi-value.blue   { color: #3b82f6; }
.kpi-value.green  { color: #10b981; }
.kpi-value.amber  { color: #f59e0b; }
.kpi-value.red    { color: #ef4444; }
.kpi-value.orange { color: #f59e0b; }

.kpi-sub { font-size: 12px; color: var(--text-muted); }

/* ── Rows e Cards ── */
.dash-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dash-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.dash-card-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ── Progresso por domínio ── */
.domain-progress-item  { margin-bottom: 14px; }
.domain-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.domain-progress-name { font-size: 13px; font-weight: 500; }
.domain-progress-pct  { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--text-muted); }

/* ── Conformidade ── */
.conformity-wrap {
    display: flex;
    align-items: center;
    gap: 24px;
}

.conformity-circle {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}
.conformity-circle svg { transform: rotate(-90deg); }
.conformity-circle .pct-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.conformity-legend { flex: 1; }
.conformity-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Documentos recentes ── */
.recent-doc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.recent-doc-item:last-child { border-bottom: none; }

.recent-doc-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.recent-doc-info { flex: 1; min-width: 0; }
.recent-doc-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recent-doc-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.recent-doc-badge {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    background: #d1fae5;
    color: #065f46;
    padding: 2px 7px;
    border-radius: 5px;
    flex-shrink: 0;
}

/* ── Seção header (auditorias) ── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.section-count {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
}