body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f6fa;
    color: #333;
}

.sidebar {
    min-height: 100vh;
    background-color: #1e3a5f;
    padding-top: 1rem;
    flex-shrink: 0;
    width: 250px;
}

/* Permite que a coluna de conteudo encolha e que o overflow-x dos blocos de
   codigo funcione, em vez de esticar a linha flex e comprimir a sidebar. */
.flex-grow-1 {
    min-width: 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.82);
    padding: 0.7rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.12);
}
.sidebar .nav-link i { width: 20px; text-align: center; }

.sidebar-brand {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0.25rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.top-bar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
}

.stat-card { border: none; border-radius: 10px; }
.stat-card .stat-value { font-size: 2rem; font-weight: bold; }
.stat-card .stat-label { font-size: 0.85rem; opacity: 0.85; }

.btn-vs { background-color: #2563eb; border-color: #2563eb; color: #fff; }
.btn-vs:hover { background-color: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.btn-outline-vs { border-color: #2563eb; color: #2563eb; }
.btn-outline-vs:hover { background-color: #2563eb; color: #fff; }
.text-vs { color: #2563eb !important; }
.bg-vs { background-color: #2563eb !important; }
.bg-navy { background-color: #1e3a5f !important; }

/* Situacao do documento e do signatario */
.badge-draft { background-color: #6c757d; }
.badge-pending { background-color: #f59e0b; color: #1f2937; }
.badge-partially_signed { background-color: #3b82f6; }
.badge-completed { background-color: #16a34a; }
.badge-refused { background-color: #dc2626; }
.badge-cancelled { background-color: #6b7280; }
.badge-expired { background-color: #b45309; }
.badge-viewed { background-color: #0ea5e9; }
.badge-signed { background-color: #16a34a; }

.api-key-text {
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 4px;
}

.hash-text {
    font-family: monospace;
    font-size: 0.72rem;
    word-break: break-all;
    color: #475569;
}

.table-sm td, .table-sm th { vertical-align: middle; }

/* Trilha de auditoria */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 8px; top: 4px; bottom: 4px;
    width: 2px;
    background: #e2e8f0;
}
.timeline-item { position: relative; padding-bottom: 1rem; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -22px; top: 5px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 3px #fff;
}
.timeline-item.is-signed::before { background: #16a34a; }
.timeline-item.is-refused::before { background: #dc2626; }
.timeline-item.is-system::before { background: #94a3b8; }
.timeline-time { font-size: 0.75rem; color: #64748b; }
.timeline-title { font-size: 0.88rem; font-weight: 600; }
.timeline-detail { font-size: 0.78rem; color: #64748b; }

/* Blocos de evidencia */
.evidence-group { border: 1px solid #e2e8f0; border-radius: 8px; padding: 0.9rem 1rem; margin-bottom: 0.75rem; }
.evidence-group h6 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.4px; color: #1e3a5f; margin-bottom: 0.6rem; }
.evidence-row { display: flex; gap: 0.75rem; font-size: 0.82rem; padding: 0.15rem 0; }
.evidence-row .label { color: #64748b; min-width: 165px; flex-shrink: 0; }
.evidence-row .value { color: #1f2937; word-break: break-word; }

.signature-preview {
    max-height: 70px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    padding: 4px;
}
