/* Estilos para programa institucional - Basados en categorias */

/* Estilos generales de la tabla */
.table-index {
    font-size: 10pt;
}

.table {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.table thead th {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
    color: white !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 11pt !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    padding: 15px 12px !important;
    vertical-align: middle !important;
    position: relative !important;
}

.table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
}

.table tbody tr {
    transition: all 0.2s ease;
    border-left: none;
    border-right: none;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-color: #e9ecef;
    font-size: 10pt;
}

/* Estilos para botones de acción */
.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: none;
    border-radius: 4px;
    padding: 8px 20px;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 11pt;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(39, 174, 96, 0.25);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
    transition: all 0.3s ease;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
    color: white !important;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
    color: white !important;
}

.btn-warning i {
    color: white !important;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

/* Estilos para el campo de búsqueda */
#buscarInput {
    padding: 12px 15px;
    border-radius: 8px 0 0 8px;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    font-size: 11pt;
    background-color: white;
}

#buscarInput:focus {
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    border-color: #3498db;
    outline: none;
}

#buscarInput:hover {
    border-color: #bdc3c7;
}

/* Estilos para el botón de limpiar búsqueda */
.btn-outline-secondary {
    border: 1px solid #6c757d;
    color: #6c757d;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Estilos para la información de resultados */
#resultadosInfo {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Estilos para el card */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.card-header {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%) !important;
    color: white !important;
    border: none !important;
    padding: 18px 20px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    position: relative !important;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
}

.card-body {
    padding: 1.5rem;
}

/* Estilos para el título principal */
h1 {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Estilos para los filtros */
.search-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-section .form-control {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 12px 15px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background-color: #fff;
    color: #495057;
    font-weight: 400;
    line-height: 1.5;
    height: auto;
    min-height: 38px;
    vertical-align: middle;
    box-sizing: border-box;
    width: 100%;
}

.search-section .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.search-section .form-control:hover {
    border-color: #adb5bd;
}

.search-section select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.search-section select.form-control option {
    padding: 8px 12px;
    font-size: 14px;
    color: #495057;
    font-weight: 400;
    line-height: 1.5;
    background-color: white;
}

.search-section label {
    color: #495057;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 14px;
    display: block;
    line-height: 1.5;
}

.search-section label i {
    color: #6c757d;
    font-size: 1rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.search-section .btn {
    border-radius: 4px;
    font-weight: 400;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
    padding: 8px 16px;
    font-size: 14px;
    line-height: 1.5;
}

.search-section .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

.search-section .btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.search-section .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.search-section .btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* Estilos para notificaciones */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border: 1px solid #bee5eb;
    color: #0c5460;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
}

.alert-info i {
    color: #17a2b8;
}

/* Responsive */
@media (max-width: 768px) {
    .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    #buscarInput {
        font-size: 10pt !important;
        padding: 10px 10px 10px 35px !important;
    }
}

/* Estilos para los iconos en los labels */
label i {
    color: #6c757d;
}

/* Hover effects sutiles para elementos interactivos */
.table tbody tr:hover td {
    background-color: #f8f9fa;
}

.form-control:hover {
    border-color: #bdc3c7;
}

/* Estilos específicos para botones de acción en tabla */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sm i {
    font-size: 0.8rem;
}

/* Espaciado entre botones */
.me-1 {
    margin-right: 0.25rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

/* Estilos para badges */
.badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: none;
    line-height: 1.2;
    display: inline-block;
    white-space: nowrap;
    vertical-align: middle;
}

.badge-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
    border: none;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

/* Anchos específicos para las columnas */
.table th:nth-child(1), /* Nombre */
.table td:nth-child(1) {
    width: 30%;
    min-width: 200px;
}

.table th:nth-child(2), /* Categoría */
.table td:nth-child(2) {
    width: 15%;
    min-width: 120px;
}

.table th:nth-child(3), /* Año */
.table td:nth-child(3) {
    width: 8%;
    min-width: 60px;
    text-align: center;
}

.table th:nth-child(4), /* Período */
.table td:nth-child(4) {
    width: 15%;
    min-width: 120px;
}

.table th:nth-child(5), /* Acciones */
.table td:nth-child(5) {
    width: 12%;
    min-width: 100px;
    text-align: center;
}

.table th:nth-child(6), /* Fecha Cumplimiento */
.table td:nth-child(6) {
    width: 20%;
    min-width: 150px;
    text-align: center;
}

/* Estilos para el contenedor de tabla con scroll */
.table-container {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Mejorar el scroll horizontal del contenedor principal */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #6c757d;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #495057;
}
