/* ===== ESTILOS PERSONALIZADOS PARA MEJORAR LA UX ===== */

/* Variables CSS para consistencia */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 8px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ===== MEJORAS GENERALES ===== */
.container {
    max-width: 1200px;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    padding: 1rem 1.5rem;
}

/* ===== BREADCRUMBS ===== */
.breadcrumb-container {
    background: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "›";
    color: var(--secondary-color);
    font-weight: bold;
}

/* ===== SELECCIÓN DE ANALISTAS CON TAGS ===== */
.analysts-selector {
    background: white;
    border: 2px dashed #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.analysts-selector:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.analysts-selector.has-selection {
    border-color: var(--success-color);
    border-style: solid;
    background: #f8fff9;
}

.analysts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.analyst-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.analyst-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.analyst-card.selected {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: var(--dark-color);
}

.analyst-card.selected::before {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 8px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.analyst-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 0.5rem;
    font-size: 16px;
}

.analyst-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

/* ===== BOTONES MEJORADOS ===== */
.btn {
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #1e7e34);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #c82333);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #545b62);
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #138496);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* ===== NAVEGACIÓN Y ACCIONES RÁPIDAS ===== */
.action-bar {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.quick-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-nav .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ===== SECCIONES CON PESTAÑAS ===== */
.section-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.section-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--secondary-color);
    font-weight: 500;
    padding: 1rem 1.5rem;
    transition: var(--transition);
}

.section-tabs .nav-link:hover {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.section-tabs .nav-link.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    background: none;
}

/* ===== FORMULARIOS MEJORADOS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 0.75rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control option {
    color: var(--dark-color);
    background: white;
    padding: 0.5rem;
}

.form-control select {
    color: var(--dark-color) !important;
}

/* Mejorar legibilidad de selects */
select.form-control {
    color: #212529 !important;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5;
    background-color: #fff !important;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
}

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

select.form-control option {
    color: #212529 !important;
    background-color: #fff !important;
    padding: 8px 12px;
    font-weight: 400;
    font-size: 1rem;
}

/* Estilos específicos para diferentes estados */
select.form-control option:checked {
    background-color: #007bff !important;
    color: white !important;
}

select.form-control option:hover {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* ===== ALERTAS Y NOTIFICACIONES ===== */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-left-color: var(--success-color);
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-left-color: var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-left-color: var(--warning-color);
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-left-color: var(--info-color);
    color: #0c5460;
}

/* ===== DRAG & DROP MEJORADO ===== */
#drop-zone {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

#drop-zone:hover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.file-item {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.file-item:hover {
    background: #e9ecef !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .analysts-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
    }

    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .action-group {
        justify-content: center;
    }

    .quick-nav {
        justify-content: center;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ===== UTILIDADES ===== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.shadow-sm {
    box-shadow: var(--box-shadow) !important;
}

.border-radius {
    border-radius: var(--border-radius) !important;
}

/* ===== ESTILOS ADICIONALES PARA BADGES ===== */
.badge-outline-primary {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    background: rgba(0, 123, 255, 0.1);
}

.badge-outline-success {
    color: var(--success-color);
    border: 1px solid var(--success-color);
    background: rgba(40, 167, 69, 0.1);
}

.badge-outline-info {
    color: var(--info-color);
    border: 1px solid var(--info-color);
    background: rgba(23, 162, 184, 0.1);
}

.badge-outline-warning {
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
    background: rgba(255, 193, 7, 0.1);
}

.badge-outline-danger {
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
    background: rgba(220, 53, 69, 0.1);
}

/* ===== MEJORAS PARA TABLAS ===== */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: translateX(2px);
    transition: all 0.2s ease;
}

.modern-table {
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ===== ESTADOS DE CARGA ===== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* ===== ORDENAMIENTO DE TABLAS ===== */
.sortable {
    user-select: none;
    transition: background-color 0.2s ease;
}

.sortable:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
}

.sort-icon {
    font-size: 0.8em;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.sortable.sort-asc .sort-icon {
    opacity: 1;
    color: var(--primary-color) !important;
}

.sortable.sort-desc .sort-icon {
    opacity: 1;
    color: var(--primary-color) !important;
}

.sortable.sort-asc .sort-icon:before {
    content: "\f0de";
    /* fa-sort-up */
}

.sortable.sort-desc .sort-icon:before {
    content: "\f0dd";
    /* fa-sort-down */
}

/* ===== FILTROS DE COLUMNAS ===== */
.custom-dropdown {
    position: relative;
    display: inline-block;
}

.custom-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 1000;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.dropdown-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    margin: 0;
    padding: 0.5rem 1rem;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
}

.form-check {
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-toggle {
    border: 1px solid #dee2e6;
    background: white;
    transition: all 0.2s ease;
}

.filter-toggle:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
}

.filter-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.dropdown-toggle {
    border: 1px solid #dee2e6;
    background: white;
    transition: all 0.2s ease;
}

.dropdown-toggle:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
}

.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Indicador de filtro activo */
.filter-toggle.active {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.filter-toggle.active:hover {
    background-color: #0056b3 !important;
    border-color: #0056b3 !important;
}

/* ===== MEJORAS RESPONSIVE ADICIONALES ===== */
@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .card {
        margin-bottom: 1rem;
    }

    .btn-group-vertical .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .sort-icon {
        display: none;
        /* Ocultar iconos de ordenamiento en móviles */
    }
}

/* ===== SISTEMA DE ESTADOS MÚLTIPLES ===== */
.status-cell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-display {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.status-edit-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.status-cell:hover .status-edit-btn {
    opacity: 1;
}

.edit-status-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.edit-status-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Modal de edición de estados */
#statusEditModal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.status-checkboxes {
    max-height: 400px;
    overflow-y: auto;
    padding: 2rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.status-checkboxes .custom-control {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    position: relative;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.status-checkboxes .custom-control:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.status-checkboxes .custom-control-input {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.status-checkboxes .custom-control-label {
    padding-left: 2rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.status-checkboxes .custom-control-input:checked~.custom-control-label {
    background-color: rgba(0, 123, 255, 0.1);
    border-radius: 6px;
    padding: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.status-checkboxes .badge {
    font-size: 0.875rem;
}

/* Estilos para la gestión de estados en la vista edit */
.status-management-container {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.status-management-container:hover {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.1);
}

.current-statuses {
    min-height: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.5rem;
}

.current-statuses .badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.current-statuses .text-muted {
    font-style: italic;
    color: #6c757d !important;
}

#editStatusesBtn {
    transition: all 0.3s ease;
}

#editStatusesBtn:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* Mejoras para badges de estado */
.badge-pill {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
}

.badge-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Filtro múltiple de estados */
#filterStatus {
    min-height: 38px;
}

#filterStatus option {
    padding: 0.5rem;
}

/* Alertas flotantes */
.alert.position-fixed {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

/* Responsive para estados múltiples */
@media (max-width: 768px) {
    .status-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .status-edit-btn {
        opacity: 1;
        /* Siempre visible en móviles */
        align-self: flex-end;
    }

    .status-display {
        width: 100%;
    }

    .badge-pill {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 576px) {
    #statusEditModal .modal-dialog {
        margin: 0.5rem;
        max-width: none;
    }

    .status-checkboxes {
        max-height: 300px;
    }

    .status-checkboxes .badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
}

/* ===== ESTILOS PARA TARJETAS DE ESTADÍSTICAS ===== */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: var(--transition);
}

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

.stats-card:hover::before {
    opacity: 1;
}

.stats-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.stats-content h3 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
}

.stats-content p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 500;
}

/* Colores específicos para diferentes tipos de tarjetas */
.stats-card.bg-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.stats-card.bg-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
}

.stats-card.bg-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.stats-card.bg-danger {
    background: linear-gradient(135deg, #dc3545, #bd2130);
}

.stats-card.bg-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.stats-card.bg-info {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
}

.stats-card.bg-dark {
    background: linear-gradient(135deg, #343a40, #23272b);
}

/* Responsive para tarjetas de estadísticas */
@media (max-width: 1200px) {
    .stats-card {
        min-height: 110px;
        padding: 1.25rem;
    }

    .stats-icon {
        font-size: 2.2rem;
    }

    .stats-content h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 992px) {
    .stats-card {
        min-height: 100px;
        padding: 1rem;
    }

    .stats-icon {
        font-size: 2rem;
    }

    .stats-content h3 {
        font-size: 1.6rem;
    }

    .stats-content p {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .stats-card {
        min-height: 90px;
        padding: 0.875rem;
    }

    .stats-icon {
        font-size: 1.8rem;
        margin-bottom: 0.25rem;
    }

    .stats-content h3 {
        font-size: 1.4rem;
    }

    .stats-content p {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .stats-card {
        min-height: 80px;
        padding: 0.75rem;
    }

    .stats-icon {
        font-size: 1.5rem;
    }

    .stats-content h3 {
        font-size: 1.2rem;
    }

    .stats-content p {
        font-size: 0.75rem;
    }
}

/* ===== ESTILOS PARA FILTROS ACTIVOS ===== */
.filter-active {
    border-color: var(--warning-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25) !important;
}

.btn-warning.filter-indicator {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* ===== ESTILOS PARA SELECTOR DE ESTADOS ===== */
.status-selector {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.status-selector.has-selection {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #f8fff9, #f0fff4);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.status-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.status-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.status-card.selected {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: var(--dark-color);
}

.status-card.selected::before {
    content: "✓";
    position: absolute;
    top: 5px;
    right: 8px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.status-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
    .status-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.5rem;
    }

    .status-card {
        padding: 0.5rem;
    }

    .status-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .status-name {
        font-size: 0.75rem;
    }
}

#edit-activity-page .tab-content,
#edit-activity-page .tab-pane {
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

#edit-activity-page .card-body:empty {
    min-height: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}


#edit-activity-page .card-body.p-0 {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
    min-height: 0 !important;
}

/* Estilos para el sidebar */
.sidebar {
    width: 250px;
    background: #2d3748;
    color: #fff;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.contenedor-sidebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
}

.sidebar h2 {
    font-size: 2rem;
    margin: 0;
}

.cerrar-menu img {
    width: 24px;
    cursor: pointer;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
}

.sidebar-nav a {
    color: #fff;
    text-decoration: none;
    padding: 1rem 2rem;
    transition: background 0.2s;
}

.sidebar-nav a.activo,
.sidebar-nav a:hover {
    background: #4fd1c5;
    color: #2d3748;
    border-radius: 4px;
}

.cerrar-sesion-mobile {
    margin-top: auto;
    padding: 2rem;
}

.cerrar-sesion {
    color: #fff;
    text-decoration: none;
    background: #e53e3e;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.cerrar-sesion:hover {
    background: #c53030;
}

.contenido-principal {
    margin-left: 250px;
    padding: 2rem 0 2rem 0;
}

/* Estilos para el menú desplegable de requerimientos */
#requirementsDropdown {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-radius: 5px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

#requirementsDropdown:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 5px !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#requirementsDropdown:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    color: white !important;
    transform: translateX(5px);
}

.dropdown-item:hover i {
    color: white !important;
}

.navbar-nav .nav-item.dropdown.active>.nav-link {
    background-color: rgba(255, 255, 255, 0.25) !important;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* Asegurar que el botón de actividades también se vea consistente */
.navbar-nav .nav-item .nav-link {
    transition: all 0.3s ease;
}

.navbar-nav .nav-item.active>.nav-link {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-radius: 5px;
}



/* ===== SIDEBAR DROPDOWN ===== */
.sidebar-dropdown-menu {
    display: none;
    flex-direction: column;
    background: #24304a;
    border-radius: 0 0 4px 4px;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    min-width: 200px;
    box-sizing: border-box;
    position: static;
    z-index: 1;
}

.sidebar-dropdown-menu a {
    padding: 1rem 2rem 1rem 2.5rem;
    font-size: 0.95em;
    color: #fff;
    white-space: normal;
    width: 100%;
    box-sizing: border-box;
    display: block;
    text-overflow: ellipsis;
    overflow: hidden;
}

.sidebar-dropdown-menu a.activo,
.sidebar-dropdown-menu a:hover {
    background: #4fd1c5;
    color: #2d3748;
    border-radius: 4px;
}

.sidebar-dropdown-toggle {
    cursor: pointer;
    display: block;
    padding: 1rem 2rem;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-dropdown-toggle.activo,
.sidebar-dropdown-toggle:hover {
    background: #4fd1c5;
    color: #2d3748;
    border-radius: 4px;
}

/* Proyectos */

.no-proyectos {
    font-size: 1.1rem;
    margin-top: 2rem;
    color: #333;
}

.no-proyectos a {
    color: #4fd1c5;
    text-decoration: underline;
    font-weight: 500;
}

.listado-proyectos {
    list-style: none;
    padding: 0;
    margin-top: 3rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .listado-proyectos {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .listado-proyectos {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.proyecto {
    background-color: #3c4e8f;
    min-height: 12rem;
    display: flex;
    align-items: center;
    padding: 2rem;
    line-height: 2;
    border-radius: .5rem;
    transition: background 0.2s;
}

.proyecto:hover {
    background-color: #2d3748;
}

.proyecto a {
    color: #fff;
    font-size: 1.2rem;
    text-decoration: none;
    font-weight: 500;
}

/* Mostrar el botón de editar analistas solo al hacer hover sobre la fila */
.activity-row:hover .analysts-edit-btn-group,
.subactivity-row:hover .analysts-edit-btn-group {
    display: inline-block !important;
}

/* ===== ESTILOS PARA LOS BOTONES DE ACCIÓN EN LA TABLA DE ACTIVIDADES ===== */
.action-buttons .btn.btn-sm {
    margin: 0.1rem 0;
    border-radius: 6px;
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    transition: all 0.2s ease;
}

.action-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Oculta los botones de acción por defecto */
.action-buttons {
    display: none;
}

/* Muestra los botones de acción al hacer hover sobre la fila */
.activity-row:hover .action-buttons,
.subactivity-row:hover .action-buttons {
    display: flex !important;
}

/* Gradiente para el header de la card */
.card-header.bg-gradient-primary {
    background: linear-gradient(90deg, #007bff 0%, #17a2b8 100%);
    color: #fff;
    border-bottom: none;
}

/* Sombra y bordes redondeados para la card */
.card.shadow-lg {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-radius: 1rem;
}

/* Mejorar inputs */
.form-control:focus {
    border-color: #17a2b8;
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, .25);
}

/* Botón principal más grande y con sombra */
.btn-primary.btn-lg {
    font-size: 1.15rem;
    padding: 0.75rem 2.5rem;
    border-radius: 2rem;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.10);
}

/* Mejorar badges de estados */
.badge-pill {
    font-size: 0.95em;
    padding: 0.5em 1em;
    border-radius: 1em;
}

/* Espaciado entre form-groups */
.form-group {
    margin-bottom: 1.5rem;
}

select.form-control[multiple] {
    min-height: 90px;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border: 1.5px solid #dee2e6;
    padding: 0.5rem;
}

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

.badge-pill {
    font-size: 1em;
    padding: 0.6em 1.2em;
    border-radius: 1.5em;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.08);
    letter-spacing: 0.02em;
}

.analysts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.analyst-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 1rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
    text-align: center;
    min-width: 120px;
    min-height: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.analyst-card:hover,
.analyst-card.selected {
    border-color: #17a2b8;
    background: linear-gradient(135deg, #e0f7fa, #f8f9fa 80%);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 16px rgba(23, 162, 184, 0.10);
}

.analyst-avatar {
    background: #17a2b8;
    color: #fff;
    font-weight: bold;
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem auto;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.10);
}

.card-body>.row+.row {
    margin-top: 1.5rem;
}

.btn-primary.btn-lg {
    font-size: 1.2rem;
    padding: 0.9rem 3rem;
    border-radius: 2.5rem;
    box-shadow: 0 6px 24px rgba(0, 123, 255, 0.12);
    letter-spacing: 0.04em;
}

textarea.form-control::placeholder {
    color: #b0b8c1;
    opacity: 1;
    font-style: italic;
}