/* ESM Platform - Estilos Customizados */

/* Layout geral */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main.container-fluid {
    flex: 1;
    max-width: 1400px;
}

/* Kanban */
.esm-kanban {
    -webkit-overflow-scrolling: touch;
}

.esm-kanban-col {
    background: var(--bs-body-bg);
    border-radius: .5rem;
    padding: .5rem;
    border: 1px solid var(--bs-border-color);
}

.esm-kanban-card {
    user-select: none;
    border-left: 3px solid var(--bs-primary) !important;
    transition: transform .1s, box-shadow .1s;
}
.esm-kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.12) !important;
}

/* Timeline de interações */
.esm-timeline-item {
    border-left: 2px solid var(--bs-border-color);
    margin-left: 16px;
    padding-left: 1rem;
    padding-bottom: 1rem;
    position: relative;
}
.esm-timeline-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}
.esm-timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bs-primary);
}
.esm-timeline-privado {
    border-left-color: var(--bs-secondary);
    background: repeating-linear-gradient(
        135deg,
        transparent,
        transparent 6px,
        rgba(108,117,125,.04) 6px,
        rgba(108,117,125,.04) 12px
    );
    border-radius: 0 4px 4px 0;
    padding-right: .5rem;
}
.esm-timeline-privado::before {
    background: var(--bs-secondary);
}

/* Badges de prioridade aprimorados */
.badge.priority-urgente { animation: pulse 1.5s infinite; }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .6; }
}

/* Tabelas mais limpas */
.table > :not(caption) > * > * {
    padding: .5rem .75rem;
}

/* Drag handle */
.esm-drag-handle:hover { color: var(--bs-primary) !important; }

/* Responsividade do Kanban em mobile */
@media (max-width: 768px) {
    .esm-kanban { flex-direction: column; }
    .esm-kanban-col { min-width: 100%; max-width: 100%; }
}

/* Textarea de interação */
textarea.form-control:focus { box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .25); }

/* Scrollbar estilizada (Chrome/Edge) */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bs-secondary-bg); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--bs-secondary); }

/* Corrige dropdown/select encoberto dentro de cards */
.card {
    overflow: visible;
}
.card .card-body {
    overflow: visible;
}
/* Garante que a tabela ainda tenha scroll horizontal sem afetar dropdowns acima dela */
.table-responsive {
    overflow-x: auto;
}
