/* Migrado de keepedu-theme.css — theme/_imagens.css */

/* ==========================================================================
   HOME: Grid para Upload e Monitoramento
   ========================================================================== */
.upload-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

/* ==========================================================================
   HOME: Andamento do Processamento no Painel de Eventos
   ========================================================================== */
.event-log-panel .log-processamento {
    /* Remove a aparência de card aninhado */
    background: transparent !important;
    border: none !important;
    
    /* Adiciona espaçamento e um separador */
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eef2f7;
}

/* Painel / simetria: ver web/static/css/pages/_painel.css e _symmetry.css */

/* ==========================================================================
   Histórico de processos
   ========================================================================== */
.keepedu-app-page .historico-lotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.keepedu-app-page .historico-lote-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
    padding: 16px 16px 14px;
    background: #ffffff;
    border: 1px solid #d9e0e8;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.keepedu-app-page .historico-lote-card--alerta {
    border-color: #e8c87a;
    background: #fffdf6;
}

.keepedu-app-page .historico-lote-card-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.keepedu-app-page .historico-lote-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a2b3c;
    line-height: 1.35;
    word-break: break-word;
}

.keepedu-app-page .historico-lote-card-data {
    font-size: 12px;
    color: #64748b;
}

.keepedu-app-page .historico-lote-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0;
}

.keepedu-app-page .historico-lote-card-stats div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 68px;
    text-align: center;
    padding: 8px 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.keepedu-app-page .historico-lote-card-stats dt {
    margin: 0 0 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.25;
    color: #64748b;
}

.keepedu-app-page .historico-lote-card-stats dd {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: #2a8cdb;
}

.keepedu-app-page .historico-lote-stat-ok {
    color: #16a34a !important;
}

.keepedu-app-page .historico-lote-stat-erro {
    color: #dc2626 !important;
}

.keepedu-app-page .historico-lote-stat-manual {
    color: #d97706 !important;
}

.keepedu-app-page .historico-lote-card-meta {
    margin: 0;
    font-size: 13px;
    color: #475569;
}

.keepedu-app-page .historico-lote-pendente {
    color: #b45309;
}

.keepedu-app-page .historico-lote-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}

.keepedu-app-page .historico-lote-card-btn-principal {
    width: 100%;
    justify-content: center;
}

.keepedu-app-page .historico-lotes-empty {
    margin-top: 20px;
    padding: 28px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
}

.keepedu-app-page .historico-lotes-empty .ke-action-btn {
    margin-top: 16px;
}

.keepedu-app-page .historico-lote-card--arquivado {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.keepedu-app-page .historico-avaliacao-card {
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.keepedu-app-page .historico-avaliacao-card:hover,
.keepedu-app-page .historico-avaliacao-card:focus-visible {
    border-color: #2a8cdb;
    box-shadow: 0 6px 18px rgba(42, 140, 219, 0.12);
    outline: none;
}

.keepedu-app-page .historico-avaliacao-leituras-badge {
    display: inline-block;
    align-self: flex-start;
    margin-top: 2px;
    color: #2a8cdb;
    font-size: 12px;
    font-weight: 600;
}

.keepedu-app-page .app-modal-dialog--wide {
    width: min(920px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.keepedu-app-page .app-modal-dialog--historico-processamentos {
    width: min(1080px, calc(100vw - 32px));
}

.keepedu-app-page .app-modal-dialog--historico-processamentos .app-modal-text {
    margin-bottom: 4px;
}

.keepedu-app-page .historico-processamentos-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.keepedu-app-page .historico-processamentos-vazio {
    margin: 0;
    padding: 20px;
    text-align: center;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
}

.keepedu-app-page .historico-processamento-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #d9e0e8;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.keepedu-app-page .historico-processamento-item--arquivado {
    background: #f1f5f9;
}

.keepedu-app-page .historico-processamento-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.keepedu-app-page .historico-processamento-data {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a2b3c;
}

.keepedu-app-page .historico-processamento-rotulo {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
}

.keepedu-app-page .historico-processamento-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.keepedu-app-page .historico-processamento-stats div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 62px;
    text-align: center;
    padding: 8px 4px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.keepedu-app-page .historico-processamento-stats dt {
    margin: 0 0 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.25;
    color: #64748b;
}

.keepedu-app-page .historico-processamento-stats dd {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: #2a8cdb;
}

.keepedu-app-page .historico-processamento-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 2px;
}

.keepedu-app-page .historico-processamento-btn-principal {
    width: 100%;
    justify-content: center;
}

.keepedu-app-page .historico-processamento-actions-secundarias {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keepedu-app-page .historico-badge-arquivado {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    background: #e2e8f0;
    border-radius: 4px;
}

.keepedu-app-page .historico-badge-ativo {
    color: #15803d;
    font-weight: 600;
}

.keepedu-app-page .historico-voltar-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.keepedu-app-page .historico-stats-compact {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.keepedu-app-page .historico-stat-chip {
    padding: 10px 12px;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #d9e0e8;
    border-radius: 4px;
}

.keepedu-app-page .historico-stat-label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
}

.keepedu-app-page .historico-stat-chip strong {
    font-size: 20px;
    font-weight: 700;
    color: #2a8cdb;
    line-height: 1.2;
}

@media (max-width: 900px) {
    .keepedu-app-page .historico-stats-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.keepedu-app-page .historico-resumo-txt {
    margin: 0;
    padding: 16px;
    max-height: 280px;
    overflow: auto;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.keepedu-app-page .historico-tag-manual {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #b45309;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 4px;
}

.keepedu-app-page .historico-detalhes-expander {
    font-size: 13px;
}

.keepedu-app-page .historico-detalhes-expander summary {
    cursor: pointer;
    color: #2a8cdb;
    font-weight: 600;
}

.keepedu-app-page .historico-detalhes-expander p {
    margin: 8px 0 0;
    font-size: 12px;
    color: #475569;
}

.keepedu-app-page .historico-arquivos-lista {
    margin: 12px 0 0;
    padding-left: 20px;
    color: #475569;
}

.keepedu-app-page .historico-table-wrapper .data-table td {
    vertical-align: top;
}

.keepedu-app-page .historico-lista-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin: 16px 0 20px;
}

.keepedu-app-page .historico-lista-toolbar .table-toolbar-search {
    flex: 1 1 280px;
}

.keepedu-app-page .historico-lista-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keepedu-app-page .historico-registros-pagination {
    margin-top: 16px;
}

.keepedu-app-page .historico-lista-pagination {
    margin-top: 20px;
    justify-content: center;
}

.keepedu-app-page .historico-lista-pagination .btn-light[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
}
