/* Estilos específicos para los dashboards de certificados */

/* Gradientes para headers de tarjetas */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-dark {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* Estilos para las tarjetas de métricas */
.card-count {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

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

.card-count h3 {
    margin: 0;
    font-size: 2.5rem;
    color: #6c757d;
}

.card-count h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.card-count .text-right {
    text-align: right;
}

.card-count .text-right p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Iconos con colores de fondo */
.bg-light-aqua {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-light-green {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-light-orange {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-light-blue {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Estilos para las tarjetas principales */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border: none;
    padding: 1rem 1.5rem;
}

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

.card-body {
    padding: 1.5rem;
}

/* Estilos para los gráficos */
canvas {
    border-radius: 10px;
}

/* Estilos para las tablas */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    padding: 1rem 0.75rem;
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Estilos para los badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Estilos para los botones de navegación */
.btn {
    border-radius: 25px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

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

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

/* Estilos para los filtros */
.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Estilos para los breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: ">";
    color: #6c757d;
    font-weight: 600;
}

.breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
    font-weight: 600;
}

/* Estilos para la navegación entre dashboards */
.card-header .d-flex {
    align-items: center;
}

.card-header .btn {
    margin-left: 0.5rem;
}

/* Estilos para los gráficos responsivos */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Mejoras para gráficos de barras */
canvas[id*="companyChart"] {
    max-height: 350px !important;
}

/* Tooltip personalizado para gráficos */
.chartjs-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Estilos para las métricas adicionales */
.text-center h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.text-center p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

/* Estilos para los reportes predefinidos */
.card.border {
    border: 2px solid #e9ecef !important;
    transition: all 0.3s ease;
}

.card.border:hover {
    border-color: #667eea !important;
    transform: translateY(-2px);
}

.card.border .card-body {
    text-align: center;
}

.card.border .fa-2x {
    margin-bottom: 1rem;
}

.card.border h6 {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.card.border p {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Estilos para la paginación */
.pagination {
    margin-bottom: 0;
}

.page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: 2px solid #e9ecef;
    color: #667eea;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background-color: #667eea;
    border-color: #667eea;
    color: white;
}

/* Estilos para los mensajes de estado */
.text-center.py-5 {
    padding: 3rem 1rem !important;
}

.text-center .fa-3x {
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.text-center h4 {
    margin-bottom: 1rem;
}

.text-center p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Estilos para los filtros adicionales */
#additionalFilters {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

/* Estilos para los botones de acción */
.dashboard-actions .btn {
    margin-left: 0.5rem;
}

/* Estilos para las tarjetas de métricas en móvil */
@media (max-width: 768px) {
    .users-count .col-6 {
        margin-bottom: 1rem;
    }

    .card-count h3 {
        font-size: 2rem;
    }

    .card-count h2 {
        font-size: 1.5rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Estilos para los gráficos en móvil */
@media (max-width: 576px) {
    .chart-container {
        height: 250px;
    }

    .card-header h5 {
        font-size: 1rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.card {
    animation: fadeInUp 0.6s ease-out;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.2s;
}

.card:nth-child(4) {
    animation-delay: 0.3s;
}

/* Estilos para los tooltips de los gráficos */
.chartjs-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Estilos para los controles de fecha */
input[type="date"] {
    font-family: inherit;
}

/* Estilos para los selectores */
select option {
    padding: 0.5rem;
}

/* Estilos para los mensajes de error */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Estilos para los modales si se implementan */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 2px solid #e9ecef;
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 2px solid #e9ecef;
    border-radius: 0 0 15px 15px;
}