/* Styles for view toggles */
.view-toggle.active {
    background-color: #0d6efd;
    color: white;
}

/* Sortable table headers */
th.sortable {
    cursor: pointer;
}

th.sortable:hover {
    background-color: #f8f9fa;
}

th.sort-asc:after {
    content: " ↑";
}

th.sort-desc:after {
    content: " ↓";
}

/* Gantt chart styles */
.gantt-container {
    width: 100%;
    overflow-x: auto;
}

/* Calendar styles */
.fc-event {
    cursor: pointer;
}

.fc-event-title {
    font-weight: 500;
}

/* Card view additional styles */
.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Activity statuses */
.status-badge.completed {
    background-color: #28a745;
}

.status-badge.in-progress {
    background-color: #007bff;
}

.status-badge.pending {
    background-color: #6c757d;
}

/* Custom CSS for Seguimiento Mecanizado */

/* Card styling */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Estilos para formularios de edición */
.formulario-edicion {
    background-color: #fff;
    border-radius: 0.25rem;
}

.formulario-edicion label {
    font-weight: 500;
    color: #495057;
}

.formulario-edicion .form-control {
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
}

.formulario-edicion .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.formulario-edicion .text-right {
    text-align: right !important;
}

.formulario-edicion .mr-2 {
    margin-right: 0.5rem !important;
}

.formulario-edicion .mt-4 {
    margin-top: 1.5rem !important;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem 1rem;
}

/* Dashboard cards */
.dashboard-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dashboard-card .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .col-md-4 {
        margin-bottom: 1rem;
    }
}

/* Vista de tarjetas */
#vista-tarjetas .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#vista-tarjetas .card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

#vista-tarjetas .card-footer {
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0.75rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

/* Tab styling */
.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
    background-color: transparent;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #007bff;
}

/* Table styling */
.table th {
    font-weight: 600;
    border-top: none;
}

.table td, .table th {
    padding: 0.75rem;
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Badge styling */
.badge {
    font-weight: 500;
    padding: 0.4em 0.6em;
}

/* Button styling */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-group {
    box-shadow: none;
}

/* Progress bar styling */
.progress {
    background-color: #e9ecef;
    border-radius: 0.25rem;
}


/* Light theme styles (default) */
:root {
    --bs-body-bg: #ffffff;
    --bs-body-color: #212529;
}

/* Modal styling */
.modal-content {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
}

.modal-body {
    padding: 1.5rem;
}

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

/* Estilos para la página principal */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card .bi {
    opacity: 0.8;
}

.card-header .h5 {
    font-weight: 600;
}

.lead {
    font-size: 1.15rem;
    font-weight: 300;
}

.display-4 {
    font-weight: 500;
    color: #333;
}

hr.my-4 {
    opacity: 0.1;
    margin: 2rem auto;
    width: 50%;
}

/* Form styling */
.form-control, .form-select {
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Additional utility classes */
.text-muted {
    color: #6c757d !important;
}

.display-4 {
    font-size: 2.5rem;
    font-weight: 300;
}

/* Gantt chart task status colors */
.gantt-task-success {
    background-color: #28a745 !important;
    border-color: #218838 !important;
}

.gantt-task-primary {
    background-color: #0d6efd !important;
    border-color: #0a58ca !important;
}

.gantt-task-secondary {
    background-color: #6c757d !important;
    border-color: #5a6268 !important;
}

/* Styling for the status filters */
#filter-status {
    border-left: 4px solid #6c757d;
}

#filter-status option[value="Completada"] {
    background-color: rgba(40, 167, 69, 0.1);
}

#filter-status option[value="En Proceso"] {
    background-color: rgba(13, 110, 253, 0.1);
}

#filter-status option[value="Pendiente"] {
    background-color: rgba(108, 117, 125, 0.1);
}

/* Estilos para la visualización de las actividades */
.card-view-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Estilos para los botones de cambio de vista */
.view-toggle {
    min-width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-group .view-toggle:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.btn-group .view-toggle:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Multi-view styles for actividades_seguimiento.html */
.view-container {
    transition: opacity 0.3s ease;
}

/* Gantt chart customization */
#gantt-view .gantt-container {
    overflow-x: auto;
}

/* Calendar view customization */
#calendar-container {
    margin-top: 1rem;
}

.fc-event {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.fc-event:hover {
    transform: scale(1.02);
}

/* Button group styling */
.btn-group .btn-outline-primary.active {
    background-color: #0d6efd;
    color: white;
}

/* Table sorting styles */
th.sortable {
    cursor: pointer;
    position: relative;
}

th.sortable:hover {
    background-color: rgba(0,0,0,0.05);
}

th.sortable i {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-left: 5px;
}

th.sort-asc i,
th.sort-desc i {
    opacity: 1;
}

th.sortable.sort-asc i:before {
    content: "\F12F"; /* bootstrap icon for up arrow */
}

th.sortable.sort-desc i:before {
    content: "\F143"; /* bootstrap icon for down arrow */
}

/* Make each view responsive */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.9rem;
    }

    #gantt-chart, #calendar-container {
        height: 400px !important;
    }

    .fc .fc-toolbar {
        flex-direction: column;
    }

    .fc .fc-toolbar-title {
        font-size: 1.2rem;
        margin: 0.5rem 0;
    }
}