/* ============================================================
   main.css — Complice Manager v3.0
   Área principal: top-bar, tabela de documentos, stats, upload
   ============================================================ */

/* ── Layout principal ─────────────────────────────────────── */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* ── Top Bar ──────────────────────────────────────────────── */
.top-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 16px;
}

.breadcrumb-area {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.module-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-faint);
    white-space: nowrap;
}

.module-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.control-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-bar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Separador breadcrumb */
.breadcrumb-sep {
    color: var(--text-faint);
    font-size: 10px;
    flex-shrink: 0;
}

/* ── Botão Upload / Nova Ação ─────────────────────────────── */
.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 7px 15px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}
.btn-upload:hover { background: var(--accent-hover); }

/* ── Content Area ─────────────────────────────────────────── */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px 32px;
}
.content-area::-webkit-scrollbar       { width: 4px; }
.content-area::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px;
}
.content-scroll::-webkit-scrollbar       { width: 4px; }
.content-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ── Stats Bar ────────────────────────────────────────────── */
.stats-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.stat-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    white-space: nowrap;
}
.stat-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-top: 1px;
}

/* ── Tabela de documentos ─────────────────────────────────── */
.doc-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.doc-table-wrap table {
    width: 100%;
    border-collapse: collapse;
}

.doc-table-wrap thead th {
    background: #f8fafc;
    padding: 10px 16px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .9px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.doc-table-wrap tbody td {
    padding: 13px 16px;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--text-secondary);
}

.doc-table-wrap tbody tr:last-child td { border-bottom: none; }
.doc-table-wrap tbody tr:hover td      { background: #fafbfd; }

/* ── Version Badge ────────────────────────────────────────── */
.version-badge {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: .3px;
}
.version-badge.latest { background: var(--success-soft); color: var(--success-text); }
.version-badge.old    { background: #f1f5f9; color: var(--text-faint); }

/* ── Nome do arquivo ──────────────────────────────────────── */
.file-name { font-weight: 500; color: var(--text-primary); }
.file-ext  {
    font-size: 10px;
    color: var(--text-faint);
    font-weight: 400;
    margin-left: 3px;
    font-family: var(--font-mono);
}

/* ── Rodapé de controle ───────────────────────────────────── */
#control-info-footer .card-body { padding: 1.25rem; }