/* Estilos para el Sistema de Contadores de Análisis */

.counter-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    border-left: 5px solid var(--primary);
}

.counter-card.warning {
    border-left-color: #f59e0b;
}

.counter-card.danger {
    border-left-color: #ef4444;
}

.counter-card.success {
    border-left-color: #10b981;
}

.counter-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: #374151;
}

.counter-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.counter-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.counter-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.counter-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.counter-value {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
}

.counter-limit {
    font-size: 2rem;
    color: #6b7280;
    font-weight: 600;
}

.counter-plan {
    text-align: center;
    color: #6b7280;
    font-size: 1rem;
}

.counter-plan strong {
    color: var(--primary);
    font-weight: 700;
}

.counter-progress {
    margin-top: 10px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 6px;
}

.progress-fill.success {
    background: linear-gradient(90deg, #10b981, #059669);
}

.progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.progress-fill.danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

.counter-unlimited {
    text-align: center;
    color: #10b981;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-radius: 8px;
}

.counter-unlimited i {
    font-size: 1.5rem;
    margin-right: 8px;
}

/* Listas de Análisis */

.analisis-list-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    margin-top: 30px;
}

.analisis-list-header h4 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.analisis-list-items {
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.analisis-item {
    display: flex;
    align-items: start;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s;
}

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

.analisis-item:hover {
    background: #f9fafb;
}

.analisis-checkbox {
    position: relative;
    flex-shrink: 0;
}

.analisis-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.analisis-checkbox i {
    position: absolute;
    top: 2px;
    left: 2px;
    color: #10b981;
    font-size: 1.3rem;
    pointer-events: none;
}

.analisis-content {
    flex: 1;
}

.analisis-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.analisis-title i {
    color: var(--primary);
}

.analisis-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    color: #6b7280;
}

.analisis-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.analisis-meta i {
    font-size: 0.9rem;
}

.analisis-provider {
    background: #ede9fe;
    color: #7c3aed;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

/* Tabs con Contadores */
.tab-with-counter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-counter-badge {
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .counter-value {
        font-size: 2.5rem;
    }
    
    .counter-limit {
        font-size: 1.5rem;
    }
    
    .analisis-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .analisis-list-items {
        max-height: 300px;
    }
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.analisis-item {
    animation: slideIn 0.3s ease;
}

.analisis-item:nth-child(1) { animation-delay: 0s; }
.analisis-item:nth-child(2) { animation-delay: 0.05s; }
.analisis-item:nth-child(3) { animation-delay: 0.1s; }
.analisis-item:nth-child(4) { animation-delay: 0.15s; }
.analisis-item:nth-child(5) { animation-delay: 0.2s; }
