/* ============================================
   DASHBOARD.CSS - Estilos para dashboard de usuarios
   Prefijo: dashboard- para todas las clases
   ============================================ */

/* Importar fuente Inter desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   ESTILOS GLOBALES DASHBOARD
   ============================================ */

.dashboard-main {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f8f9fa;
}

.dashboard-content {
    min-height: 60vh;
}

/* ============================================
   BANNER PREMIUM
   ============================================ */

/* Banner para usuarios FREE */
.dashboard-premium-banner {
    animation: dashboard-slideDown 0.5s ease-out;
}

.dashboard-premium-card {
    background: linear-gradient(135deg, #fff3cd 0%, #fff9e6 100%);
    border-left: 4px solid #ffc107 !important;
    transition: all 0.3s ease;
}

.dashboard-premium-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(255, 193, 7, 0.2) !important;
}

.dashboard-premium-icon {
    color: #ffc107;
    animation: dashboard-pulse 2s infinite;
}

.dashboard-premium-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #856404;
}

.dashboard-premium-text {
    font-family: 'Inter', sans-serif;
    color: #856404;
    font-weight: 500;
}

.dashboard-premium-btn {
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
}

.dashboard-premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.4);
}

/* Banner para usuarios PREMIUM */
.dashboard-premium-active-card {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    border: none !important;
}

.dashboard-premium-active-icon {
    color: #ffc107;
    filter: drop-shadow(0 2px 4px rgba(255, 193, 7, 0.3));
}

.dashboard-premium-active-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #ffffff;
}

/* ============================================
   WIDGETS DE ACCIÓN RÁPIDA
   ============================================ */

.dashboard-widgets {
    animation: dashboard-fadeIn 0.6s ease-out;
}

.dashboard-widget-card {
    transition: all 0.3s ease;
    cursor: default;
}

.dashboard-widget-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
}

.dashboard-widget-icon {
    transition: transform 0.3s ease;
}

.dashboard-widget-card:hover .dashboard-widget-icon {
    transform: scale(1.1);
}

.dashboard-widget-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.dashboard-widget-value {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: #212529;
}

.dashboard-widget-level-name {
    font-size: 1rem;
    font-weight: 700;
}

.dashboard-widget-test-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
}

.dashboard-widget-progress-bar {
    border-radius: 10px;
    overflow: hidden;
}

.dashboard-widget-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.dashboard-widget-link:hover {
    transform: translateX(3px);
}

.dashboard-widget-btn {
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
}

.dashboard-widget-btn:hover {
    transform: scale(1.05);
}

/* ============================================
   ACCESOS RÁPIDOS
   ============================================ */

.dashboard-quick-actions {
    animation: dashboard-fadeIn 0.7s ease-out;
}

.dashboard-action-card {
    transition: all 0.3s ease;
}

.dashboard-action-card:hover {
    transform: translateX(5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.dashboard-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.dashboard-action-card:hover .dashboard-action-icon {
    transform: rotate(5deg) scale(1.1);
}

.dashboard-action-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #212529;
}

.dashboard-feature-banners {
    animation: dashboard-fadeIn 0.7s ease-out;
}

.dashboard-feature-banner {
    min-height: 132px;
    height: 100%;
    border-radius: 10px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    overflow: hidden;
    padding: 1.35rem 1.5rem;
    position: relative;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-feature-banner:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.dashboard-feature-banner::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    right: -70px;
    top: -80px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.dashboard-feature-random-free {
    background: linear-gradient(135deg, #111c33 0%, #223455 100%);
}

.dashboard-feature-random-premium {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.dashboard-feature-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0b5fcc 100%);
}

.dashboard-feature-daily {
    background: #d0bd21;
    color: #14213d;
}

.dashboard-feature-daily:hover {
    color: #14213d;
}

.dashboard-feature-daily .dashboard-feature-badge {
    background: #14213d;
    color: #ffffff;
}

.dashboard-feature-daily h5,
.dashboard-feature-daily p {
    color: #14213d;
}

.dashboard-feature-daily .dashboard-feature-btn {
    background: #14213d;
    color: #ffffff;
}

.dashboard-feature-content {
    max-width: 70%;
    position: relative;
    z-index: 1;
}

.dashboard-feature-badge {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    color: #111827;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 0.7rem;
    padding: 0.35rem 0.6rem;
}

.dashboard-feature-banner h5 {
    color: #ffffff;
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.35rem;
}

.dashboard-feature-banner p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0;
}

.dashboard-feature-btn {
    align-items: center;
    background: #ffffff;
    border-radius: 999px;
    color: #0f172a;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 800;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 1rem;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

/* ============================================
   SECCIÓN DE TEMAS
   ============================================ */

.dashboard-section-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dashboard-section-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes dashboard-slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dashboard-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dashboard-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .dashboard-content {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .dashboard-premium-card .card-body {
        padding: 1rem !important;
    }
    
    .dashboard-premium-title {
        font-size: 1rem;
    }
    
    .dashboard-premium-text {
        font-size: 0.75rem;
    }
    
    .dashboard-premium-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem !important;
        width: 100%;
    }
    
    .dashboard-widget-card .card-body {
        padding: 1rem !important;
    }
    
    .dashboard-widget-icon {
        font-size: 1.5rem;
    }
    
    .dashboard-widget-label {
        font-size: 0.65rem;
    }
    
    .dashboard-widget-value {
        font-size: 1.25rem;
    }
    
    .dashboard-widget-test-name {
        font-size: 0.75rem;
    }
    
    .dashboard-action-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .dashboard-action-title {
        font-size: 0.875rem;
    }

    .dashboard-feature-banner {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
        min-height: auto;
        padding: 1.1rem;
    }

    .dashboard-feature-content {
        max-width: 100%;
    }

    .dashboard-feature-btn {
        width: 100%;
    }
    
    /* Espaciado optimizado */
    .dashboard-widgets {
        row-gap: 0.75rem !important;
    }
}

/* Mobile pequeño */
@media (max-width: 576px) {
    .dashboard-section-title {
        font-size: 1.25rem;
		text-align: center;
    }
    
    .dashboard-section-subtitle {
        font-size: 0.875rem;
		text-align: center;
    }
    
    .dashboard-premium-icon i {
        font-size: 1.5rem;
    }
    
    /* Banner premium más compacto */
    .dashboard-premium-banner .card-body {
        padding: 0.75rem !important;
    }
    
    /* Ocultar texto largo en móvil */
    .dashboard-premium-text {
        display: none;
    }
}

/* ============================================
   MEJORAS DE ACCESIBILIDAD
   ============================================ */

/* Focus visible para teclado */
.dashboard-widget-btn:focus-visible,
.dashboard-widget-link:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Mejora de legibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    .dashboard-widget-card,
    .dashboard-action-card {
        border: 2px solid #dee2e6 !important;
    }
    
    .dashboard-premium-card {
        border: 2px solid #ffc107 !important;
    }
}

/* ============================================
   UTILIDADES
   ============================================ */

/* Smooth scroll para ancla #temas-section */
html {
    scroll-behavior: smooth;
}

/* Selección de texto */
::selection {
    background-color: rgba(13, 110, 253, 0.2);
    color: inherit;
} 

@media (min-width: 1200px) {
    .dashboard-temas-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }

    .dashboard-temas-grid > div[class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}
.dashboard-widget-card, 
.dashboard-widget-card .card-header,
.dashboard-premium-card {
    border-radius: 0 !important;
}

/* También para las barras de progreso si quieres que todo sea recto */
.dashboard-widget-progress-bar,
.dashboard-widget-progress-bar .progress-bar {
    border-radius: 0 !important;
}
/* --- Dashboard Suscripción Premium --- */

/* CARD FREE - Estilo Llamativo pero Técnico */
.dashboardSuscripcion-card {
    background: #1a2537; /* Azul oscuro corporativo */
    background-image: radial-gradient(circle at top right, rgba(13, 110, 253, 0.2), transparent);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.dashboardSuscripcion-icon-box {
    width: 60px;
    height: 60px;
    background: rgba(251, 191, 36, 0.1); /* Dorado suave */
    color: #fbbf24;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.dashboardSuscripcion-tag {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
}

.dashboardSuscripcion-tag i {
    color: #0d6efd;
}

.dashboardSuscripcion-btn-premium {
    background-color: #fbbf24;
    border: none;
    color: #1a2537 !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.dashboardSuscripcion-btn-premium:hover {
    background-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

/* CARD ACTIVE - Estilo Consolidado */
.dashboardSuscripcion-active-card {
    background: #10b981; /* Azul primario para indicar estado activo */
    background-image: linear-gradient(135deg, #10b981 0%, #08c586 100%);
    border-radius: 12px;
}

.dashboardSuscripcion-active-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.dashboardSuscripcion-btn-manage {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    color: #10b981 !important;
    border-radius: 6px;
}

.dashboardSuscripcion-btn-manage:hover {
    background-color: white;
    transform: translateY(-2px);
}

.dashboardSuscripcion-btn-manage-mobile {
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.45rem 0.8rem;
    width: fit-content;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboardSuscripcion-benefits {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .dashboardSuscripcion-icon-box {
        display: none; /* Ahorrar espacio en móvil */
    }

    .dashboardSuscripcion-active-card .card-body {
        padding: 1rem !important;
    }

    .dashboardSuscripcion-active-icon {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
    }
}
.novedad-banner-container {
    display: none;
    animation: profile-fadeInUp 0.6s ease-out;
}
.novedad-banner-card {
    background: linear-gradient(135deg, #0d6efd 0%, #003d99 100%);
    border: none;
    border-radius: 0.2rem;
    position: relative;
    overflow: hidden;
}
.novedad-banner-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}
.novedad-icon-box {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-novedad-action {
    background: #ffffff;
    color: #0d6efd;
    border: none;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.5rem 1.2rem;
    border-radius: 0.5px;
    transition: all 0.3s ease;
}

.btn-novedad-action:hover {
    background: #f1f5f9;
    color: #004dc0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.novedad-banner-card .form-check-input {
    width: 0.8rem;
    height: 0.8rem;
    margin-top: 0.35rem;
    cursor: pointer;
}

.no-mostrar-label {
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0.85;
}
#close-novedad {
    cursor: pointer;
    background: transparent !important;
    border: none !important;
    outline: none !important;
}

#close-novedad:hover {
    opacity: 0.8;
}

#close-novedad:focus {
    box-shadow: none !important;
}
