/* Custom CSS para o Sistema de Planejamento */

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

.card {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 20px;
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #e9ecef;
    border-radius: 10px 10px 0 0 !important;
}

.card-title {
    color: #495057;
    font-weight: 600;
}

.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 12px 20px;
    margin-right: 5px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    background-color: #e9ecef;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
    font-weight: 600;
}

.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Gráfico de Gantt - Updated 27/09/2025 12:22 */

/* Forçar estilos com alta especificidade */
#ganttChart.gantt-chart .gantt-header,
body #ganttChart .gantt-header,
html body #ganttChart .gantt-header {
    display: grid !important;
    grid-template-columns: 200px 1fr !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-bottom: 3px solid #5a67d8 !important;
    font-weight: 600 !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
}

#ganttChart.gantt-chart .gantt-row,
body #ganttChart .gantt-row,
html body #ganttChart .gantt-row {
    display: grid !important;
    grid-template-columns: 200px 1fr !important;
    border-bottom: 1px solid #dee2e6 !important;
    min-height: 50px !important;
    align-items: stretch !important;
    background-color: #ffffff !important;
}

#ganttChart.gantt-chart .gantt-row:nth-child(even),
body #ganttChart .gantt-row:nth-child(even),
html body #ganttChart .gantt-row:nth-child(even) {
    background-color: #f8f9fa !important;
}

.gantt-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    min-height: 400px;
    position: relative;
}

.gantt-chart {
    position: relative;
    min-width: 800px;
}

.gantt-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #6c757d;
}

.gantt-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-bottom: 3px solid #5a67d8 !important;
    font-weight: 600 !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    position: sticky;
    top: 0;
    z-index: 100;
}

.gantt-header-label {
    padding: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 700;
}

.gantt-timeline {
    display: grid;
    grid-auto-columns: 60px;
    grid-auto-flow: column;
}

.gantt-timeline-item {
    padding: 15px 5px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.gantt-timeline-item.weekend {
    background-color: #ffcccc !important;
    color: #333 !important;
}

.gantt-timeline-item.weekend:hover {
    background-color: #ffb3b3 !important;
}

.gantt-timeline-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.gantt-row-grid-line {
    position: absolute;
    top: 0;
    height: 100%;
    width: 1px;
    background-color: #e2e8f0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
}

.gantt-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    border-bottom: 1px solid #dee2e6;
    min-height: 50px;
    align-items: stretch;
    background-color: #ffffff;
}

.gantt-row:nth-child(even) {
    background-color: #f8f9fa;
}

.gantt-row:hover {
    background-color: #e3f2fd;
}

.gantt-colaborador {
    padding: 15px;
    border-right: 2px solid #dee2e6;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.gantt-colaborador-cor {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.gantt-tasks {
    position: relative;
    padding: 5px 0;
    min-height: 40px;
    overflow: visible;
}

.gantt-task {
    position: absolute;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    margin: 1px 0;
    z-index: 10;
}

.gantt-task:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: #fff;
    z-index: 10;
}

.gantt-task.dragging {
    opacity: 0.8;
    z-index: 1000;
    cursor: grabbing;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.gantt-task.drag-ready {
    cursor: grab;
}

.gantt-task:active {
    transform: translateY(-1px) scale(0.98);
}

.gantt-task-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

/* Linha temporal atual */
.gantt-current-time,
.current-time-line {
    position: absolute;
    top: 0;
    height: 100%;
    width: 3px;
    background-color: #dc3545;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(220, 53, 69, 0.7);
}

.gantt-current-time::before,
.current-time-line::before {
    content: 'AGORA';
    position: absolute;
    top: -25px;
    left: -15px;
    background-color: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gantt-current-time::after,
.current-time-line::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -3px;
    width: 8px;
    height: 8px;
    background-color: #dc3545;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #dc3545;
}

.gantt-no-tasks {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6c757d;
    text-align: center;
}

.gantt-tooltip {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: none;
    max-width: 250px;
}

.gantt-tooltip::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

/* Lista de Colaboradores */
.colaborador-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.colaborador-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.colaborador-info {
    display: flex;
    align-items: center;
}

.colaborador-cor {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 15px;
    border: 3px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.colaborador-nome {
    font-weight: 600;
    color: #495057;
    margin: 0;
}

/* Lista de Sprints */
.sprint-item {
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.sprint-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sprint-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 10px;
}

.sprint-titulo {
    font-weight: 600;
    color: #495057;
    margin: 0;
}

.sprint-numero {
    background-color: #0d6efd;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.sprint-dates {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.sprint-duracao {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Botões de ação */
.btn-group-sm .btn {
    font-size: 0.8rem;
    padding: 4px 8px;
}

/* Responsividade */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0 10px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .colaborador-item, .sprint-item {
        padding: 10px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Cores personalizadas para status */
.status-planejada {
    background-color: #ffc107;
    color: #000;
}

.status-em-andamento {
    background-color: #0d6efd;
    color: #fff;
}

.status-concluida {
    background-color: #198754;
    color: #fff;
}

/* Gantt Legend */
#ganttLegend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
}

/* Modal Styles */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.modal-title {
    color: #495057;
    font-weight: 600;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 1rem 2rem;
}

/* === ESTILOS PARA IMPORTAÇÃO DE ISSUES === */

.issues-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #fff;
}

.issue-item {
    border-bottom: 1px solid #e9ecef;
    padding: 15px;
    transition: background-color 0.2s ease;
}

.issue-item:hover {
    background-color: #f8f9fa;
}

.issue-item:last-child {
    border-bottom: none;
}

.issue-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.issue-checkbox {
    margin-right: 12px;
}

.issue-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.issue-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 8px;
}

.issue-meta-item {
    display: flex;
    align-items: center;
}

.issue-meta-item i {
    margin-right: 5px;
    width: 14px;
}

.issue-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.issue-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.issue-status.todo {
    background-color: #e3f2fd;
    color: #1976d2;
}

.issue-status.in_progress {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.issue-status.done {
    background-color: #e8f5e8;
    color: #388e3c;
}

.issue-priority {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.issue-priority.low {
    background-color: #e8f5e8;
    color: #2e7d32;
}

.issue-priority.medium {
    background-color: #fff3e0;
    color: #ef6c00;
}

.issue-priority.high {
    background-color: #ffebee;
    color: #c62828;
}

.issue-project {
    background-color: #f8f9fa;
    color: #495057;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.issue-assignee {
    background-color: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.issue-dates {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #6c757d;
}

.issue-date {
    display: flex;
    align-items: center;
}

.issue-date i {
    margin-right: 4px;
    width: 12px;
}

.no-issues {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.no-issues i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.issue-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.check-issue-btn {
    transition: all 0.2s ease;
}

.check-issue-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.import-summary {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.import-summary h6 {
    margin-bottom: 10px;
    color: #495057;
}

.import-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.import-stat {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.import-stat i {
    margin-right: 8px;
    width: 16px;
}

.import-stat.selected {
    color: #198754;
}

.import-stat.available {
    color: #6c757d;
}