/* ==========================================
    recursero EDUCATIVO - ESTILOS PRINCIPALES
   ========================================== */

/* Variables CSS */
:root {
    /* Colores principales */
    --primary: #6fb1e7;
    --primary-dark: #3a9dd9;
    --primary-light: #9CC3E5;
    --secondary: #ffd24a;
    --secondary-dark: #E6C200;
    --secondary-light: #FFEB66;
    
    /* Colores de estado */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Colores neutros */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Premium */
    --premium-gold: #fbbf24;
    --premium-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    
    /* ADICRA brand colors */
    --adicra-blue: #6fb1e7;
    --adicra-blue-dark: #3a9dd9;
    --adicra-yellow: #ffd24a;

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Bordes */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Tipografía */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Espaciado */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 70px;
}

/* Reset y Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================
   BOTONES
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-google {
    background: var(--white);
    border: 2px solid var(--gray-200);
    color: var(--gray-700);
}

.btn-google:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

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

.btn-block {
    width: 100%;
}

/* ==========================================
   HEADER Y NAVEGACIÓN
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(111,177,231,0.04) 0%, rgba(255,255,255,0.95) 100%);
    border-bottom: 1px solid rgba(58,157,217,0.06);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo adapted to ADICRA visual identity */

/* Brand badge */
.brand-badge {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--adicra-blue), var(--adicra-blue-dark));
    color: var(--white);
}

.brand-badge svg {
    width: 20px;
    height: 20px;
}

/* Nav hover uses ADICRA blue */
.nav a:hover {
    color: var(--adicra-blue-dark);
}

/* CTA button using ADICRA colors */
.btn-cta {
    background: linear-gradient(90deg, var(--adicra-blue), var(--primary));
    color: var(--white);
    border: none;
}

.btn-cta:hover {
    filter: brightness(0.95);
}
.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    font-weight: 700;
}

.brand-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 1.25rem;
    color: var(--gray-900);
    text-decoration: none;
}

.brand-link img.brand-logo {
    height: 2rem;
    width: auto;
}

.brand-name {
    font-weight: 700;
    color: var(--gray-900);
}

.by-adicra {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.by-adicra a {
    color: var(--adicra-blue-dark);
    text-decoration: underline;
}

.by-adicra a:hover {
    color: var(--adicra-blue);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    color: var(--gray-600);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    padding: 10rem 0 6rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, #e0e7ff 100%);
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
}

.hero-content .highlight {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.hero-image {
    position: relative;
    height: 400px;
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

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

.floating-card span {
    font-weight: 600;
    color: var(--gray-700);
}

.card-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 30%;
    right: 10%;
    animation-delay: 0.5s;
}

.card-3 {
    bottom: 30%;
    left: 20%;
    animation-delay: 1s;
}

.card-4 {
    bottom: 10%;
    right: 20%;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* ==========================================
   FEATURES SECTION
   ========================================== */
.features {
    padding: 6rem 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-500);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition);
}

.feature-card:hover {
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
}

.feature-icon i {
    font-size: 1.75rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.25rem;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

/* ==========================================
   RESOURCES PREVIEW SECTION
   ========================================== */
.resources-preview {
    padding: 6rem 0;
    background: var(--gray-50);
}

.categories-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.resource-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    position: relative;
}

.resource-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.resource-image {
    height: 160px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.resource-image i {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
}

.resource-type {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
}

.resource-type.premium-badge {
    background: var(--premium-gradient);
    color: var(--gray-900);
}

.resource-content {
    padding: 1.5rem;
}

.resource-content h3 {
    font-size: 1.125rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-content p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--gray-400);
}

.resource-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Locked state */
.resource-card.locked {
    pointer-events: none;
}

.locked-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--white);
    opacity: 0;
    transition: opacity var(--transition);
}

.resource-card.locked:hover .locked-overlay {
    opacity: 1;
}

.locked-overlay i {
    font-size: 2rem;
}

.locked-overlay span {
    font-size: 0.875rem;
    font-weight: 500;
}

.resource-card.premium .locked-overlay i {
    color: var(--premium-gold);
}

.cta-register {
    text-align: center;
    margin-top: 3rem;
}

/* ==========================================
   PRICING SECTION
   ========================================== */
.pricing {
    padding: 6rem 0;
    background: var(--white);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    position: relative;
    transition: all var(--transition);
}

.pricing-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--adicra-blue-dark);
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, rgba(111,177,231,0.06), rgba(255,210,74,0.03));
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.375rem 1.25rem;
    background: linear-gradient(90deg, var(--adicra-yellow), var(--adicra-blue));
    color: var(--gray-900);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius);
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pricing-header h3 {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.price {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
}

.price .currency {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

.price .amount {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.price .period {
    font-size: 1rem;
    color: var(--gray-500);
    align-self: flex-end;
    margin-bottom: 0.5rem;
}

.pricing-features {
    margin-bottom: 2rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features i.fa-check {
    color: var(--success);
}

.pricing-features i.fa-times {
    color: var(--gray-300);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand .logo i {
    color: var(--primary-light);
}

.footer-brand p {
    color: var(--gray-400);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-800);
    border-radius: var(--radius);
    color: var(--gray-400);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary);
    color: var(--white);
}

.footer-links h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ==========================================
   AUTH PAGE
   ========================================== */
.auth-page {
    min-height: 100vh;
    background: var(--gray-50);
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-sidebar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    color: var(--white);
}

.auth-sidebar .logo {
    color: var(--white);
}

.auth-sidebar .logo i {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
}

.sidebar-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.sidebar-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.sidebar-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-feature i {
    color: rgba(255, 255, 255, 0.9);
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-form-container {
    width: 100%;
    max-width: 450px;
}

.auth-form-container.hidden {
    display: none;
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray-500);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.password-input {
    position: relative;
}

.password-input input {
    width: 100%;
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
}

.toggle-password:hover {
    color: var(--gray-600);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--primary);
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--gray-500);
}

/* ==========================================
   DASHBOARD PAGE
   ========================================== */
.dashboard-page {
    display: flex;
    min-height: 100vh;
    background: var(--gray-100);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-100);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-500);
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.5rem;
    color: var(--gray-600);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.sidebar-nav ul li a:hover {
    color: var(--primary);
    background: var(--gray-50);
}

.sidebar-nav ul li.active a {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    border-right: 3px solid var(--primary);
}

.sidebar-nav ul li a i {
    width: 20px;
    text-align: center;
}

.sidebar-nav .badge {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    background: var(--premium-gradient);
    color: var(--gray-900);
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius);
}

.sidebar-divider {
    height: 1px;
    background: var(--gray-100);
    margin: 1rem 0;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-100);
}

.user-plan {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.user-plan.premium {
    color: var(--premium-gold);
}

.user-plan.premium i {
    color: var(--premium-gold);
}

.upgrade-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--premium-gradient);
    color: var(--gray-900);
    font-weight: 600;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--gray-900);
}

.upgrade-btn[disabled],
.inline-link[disabled] {
    background: var(--gray-100);
    color: var(--gray-400);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.inline-link {
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.inline-link[disabled] {
    color: var(--gray-400);
    cursor: not-allowed;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-600);
    cursor: pointer;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.notification-btn:hover {
    background: var(--gray-200);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-menu-btn:hover {
    background: var(--gray-200);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.user-name {
    font-weight: 500;
    color: var(--gray-700);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    width: 280px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    z-index: 100;
}

.user-dropdown.hidden {
    display: none;
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
}

.dropdown-header .user-info {
    display: flex;
    flex-direction: column;
}

.dropdown-header .name {
    font-weight: 600;
    color: var(--gray-800);
}

.dropdown-header .email {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-100);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--gray-600);
    transition: all var(--transition-fast);
}

.user-dropdown a:hover {
    background: var(--gray-50);
    color: var(--primary);
}

.user-dropdown a.logout {
    color: var(--danger);
}

.user-dropdown a.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 2rem;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.dashboard-section .section-header {
    text-align: left;
    margin-bottom: 2rem;
}

.dashboard-section .section-header h1 {
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-section .section-header h1 i {
    color: var(--primary);
}

.dashboard-section .section-header p {
    font-size: 1rem;
    color: var(--gray-700);
    margin: 0.5rem 0 1.25rem 0;
    line-height: 1.6;
    max-width: 820px;
    opacity: 0.98;
    font-weight: 500;
    letter-spacing: 0.1px;

    /* Card-like visual */
    background: var(--white);
    padding: 1rem 1.25rem;
    border-radius: calc(var(--radius) + 0.25rem);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    display: inline-block;
}

/* Aplicar card-style también a páginas fuera del dashboard (p.ej. premium.html) */
main .section-header p {
    font-size: 1rem;
    color: var(--gray-700);
    margin: 0.5rem 0 1.25rem 0;
    line-height: 1.6;
    max-width: 920px;
    opacity: 0.98;
    font-weight: 500;
    letter-spacing: 0.1px;

    background: var(--white);
    padding: 1rem 1.25rem;
    border-radius: calc(var(--radius) + 0.25rem);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    display: block;
}

/* Borde y card para bloques informativos en páginas (p.ej. premium) */
.info-card {
    border: 1px solid var(--gray-200);
    padding: 1rem 1.25rem;
    border-radius: calc(var(--radius) - 0.1rem);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.info-card h4 {
    margin: 0 0 0.5rem 0;
}

.info-card ul {
    margin: 0;
    padding-left: 1.1rem;
}

@media (max-width: 480px) {
    .dashboard-section .section-header p,
    main .section-header p {
        max-width: 100%;
        font-size: 0.975rem;
        padding: 0.85rem 1rem;
    }
}

@media (max-width: 480px) {
    .dashboard-section .section-header p {
        max-width: 100%;
        font-size: 0.98rem;
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
}

/* Home stats small cards (3 per row) */
.home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0 2rem 0;
}
.home-stats .stat-card {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}
.home-stats .stat-card h3 {
    font-size: 0.95rem;
    margin: 0;
    color: var(--gray-700);
}
.home-stats .stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
}

@media (max-width: 900px) {
    .home-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .home-stats {
        grid-template-columns: 1fr;
    }
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--white);
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-info .stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Content Section */
.content-section {
    margin-bottom: 2rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.content-header h2 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-800);
}

.content-header h2 i {
    color: var(--primary);
}

.view-all {
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Filters */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
}

.filter-group select {
    padding: 0.625rem 2rem 0.625rem 0.875rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--white);
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Resource Actions */
.resource-card .resource-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.resource-card .action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.resource-card .action-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.resource-card .action-btn.favorite.active {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.resource-card .action-btn.favorite.active:hover {
    background: var(--danger);
    color: var(--white);
}

.resource-card .action-btn .fav-count {
    font-weight: 700;
    margin-left: 0.35rem;
    font-size: 0.95rem;
    color: inherit;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

/* Downloads Info */
.downloads-info {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.downloads-counter {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

.downloads-progress {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.downloads-progress .progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width var(--transition);
}

.downloads-note {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Premium Banner */
.premium-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
    color: var(--white);
    margin-bottom: 2rem;
}

/* Sponsor Banner (card style similar to filters) */
.sponsor-banner {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.sponsors-title {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--gray-700);
    font-weight: 700;
}

.sponsor-banner-inner {
    display: block;
}

.sponsor-banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) / 1.2);
}

.sponsor-banner-image {
    display: flex;
    gap: 0.5rem;
    transition: transform 0.5s ease;
    width: 100%;
}

.sponsor-banner-image img {
    flex: 0 0 100%;
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.sponsor-prev, .sponsor-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.sponsor-prev { left: 0.75rem; }
.sponsor-next { right: 0.75rem; }

.sponsor-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.sponsor-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.15);
    cursor: pointer;
}

.sponsor-dots button.active {
    background: var(--primary);
}

@media (max-width: 768px) {
    .sponsor-banner-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .sponsor-banner-image {
        max-width: 100%;
    }
    .sponsor-banner-image img {
        height: 200px;
    }
    .sponsor-banner-content {
        padding: 0.75rem 0;
    }
}

.premium-banner-content i {
    font-size: 3rem;
    color: var(--premium-gold);
    margin-bottom: 1rem;
}

.premium-banner-content h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.premium-quick {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--gray-700);
}
.premium-quick strong {
    color: var(--white);
    display: block;
    margin-bottom: 0.5rem;
}
.premium-quick ul {
    margin: 0.5rem 0 0 1rem;
    padding: 0;
}
.premium-quick li {
    margin-bottom: 0.25rem;
}

.pricing-extra {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--gray-700);
}
.pricing-extra h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}
.pricing-extra ul {
    margin: 0;
    padding-left: 1rem;
}
.pricing-extra li {
    margin-bottom: 0.25rem;
}

.premium-banner-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

/* Profile */
.profile-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-100);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 600px;
}

/* Settings */
.settings-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.settings-card h3 {
    font-size: 1.125rem;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.setting-info {
    display: flex;
    flex-direction: column;
}

.setting-label {
    font-weight: 500;
    color: var(--gray-700);
}

.setting-desc {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.setting-item.danger .setting-label {
    color: var(--danger);
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 48px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: 24px;
    transition: all var(--transition-fast);
}

.toggle-slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* Subscription Info */
.subscription-info {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.current-plan {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.plan-status {
    padding: 0.25rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius);
}

#plan-description {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    color: var(--gray-500);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.modal-body {
    padding: 2rem;
}

/* Premium Modal */
.modal-premium {
    max-width: 450px;
}

.premium-modal-body {
    padding: 3rem 2rem;
    text-align: center;
}

.premium-modal-header {
    margin-bottom: 2rem;
}

.premium-modal-header i {
    font-size: 3rem;
    color: var(--premium-gold);
    margin-bottom: 1rem;
}

.premium-modal-header h2 {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.premium-modal-header p {
    color: var(--gray-500);
}

.premium-benefits {
    margin-bottom: 2rem;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    text-align: left;
}

.benefit i {
    color: var(--success);
}

.benefit span {
    color: var(--gray-600);
}

.premium-price {
    margin-bottom: 1.5rem;
}

.premium-price .price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gray-900);
}

.premium-price .period {
    font-size: 1.125rem;
    color: var(--gray-500);
}

.premium-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Forzar texto blanco en secciones relacionadas a Premium dentro del dashboard */
.premium-banner-content,
.premium-banner-content .premium-quick,
.premium-banner-content .premium-quick ul,
.premium-banner-content .premium-quick li,
.premium-modal-body .premium-options,
.premium-modal-body .premium-options ul,
.premium-modal-body .premium-options li {
    color: #ffffff !important;
}


/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--gray-400);
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

.toast i {
    font-size: 1.25rem;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

.toast.warning i {
    color: var(--warning);
}

.toast.info i {
    color: var(--info);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==========================================
   ADMIN PAGE
   ========================================== */
.admin-page .sidebar {
    background: var(--gray-900);
}

.admin-page .sidebar-header {
    border-color: var(--gray-800);
}

.admin-page .sidebar .logo {
    color: var(--white);
}

.admin-page .sidebar .logo i {
    color: var(--primary-light);
}

.admin-page .sidebar-nav ul li a {
    color: var(--gray-400);
}

.admin-page .sidebar-nav ul li a:hover {
    color: var(--white);
    background: var(--gray-800);
}

.admin-page .sidebar-nav ul li.active a {
    color: var(--white);
    background: var(--primary);
    border-right-color: var(--primary-light);
}

.admin-page .sidebar-divider {
    background: var(--gray-800);
}

.admin-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Admin Toolbar */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9375rem;
}

/* Admin Table */
.admin-table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    padding: 1rem;
    background: var(--gray-50);
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    border-bottom: 2px solid var(--gray-200);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.admin-table tr:hover td {
    background: var(--gray-50);
}

.admin-table .badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.admin-table .badge.free {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.admin-table .badge.premium {
    background: var(--premium-gradient);
    color: var(--gray-900);
}

.admin-table .actions {
    display: flex;
    gap: 0.5rem;
}

.admin-table .actions button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius);
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.admin-table .actions button:hover {
    background: var(--primary);
    color: var(--white);
}

.admin-table .actions button.delete:hover {
    background: var(--danger);
}

/* Admin Grid */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.admin-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.admin-card h3 {
    font-size: 1rem;
    color: var(--gray-700);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-card h3 i {
    color: var(--primary);
}

.admin-list {
    display: flex;
    flex-direction: column;
}

.admin-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

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

/* Upload Form */
.upload-form-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.upload-form .form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-100);
}

.upload-form .form-section:last-of-type {
    border-bottom: none;
}

.upload-form .form-section h3 {
    font-size: 1.125rem;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
}

.upload-type-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.upload-option {
    cursor: pointer;
}

.upload-option input {
    display: none;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2.5rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.option-card i {
    font-size: 1.5rem;
    color: var(--gray-400);
}

.option-card span {
    font-weight: 500;
    color: var(--gray-600);
}

.upload-option input:checked + .option-card {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-option input:checked + .option-card i {
    color: var(--primary);
}

.file-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 3rem;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-fast);
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.file-drop-zone i {
    font-size: 3rem;
    color: var(--gray-400);
}

.file-drop-zone p {
    color: var(--gray-600);
    font-weight: 500;
}

.file-drop-zone span {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.file-info {
    font-size: 0.8125rem !important;
    color: var(--gray-400) !important;
    margin-top: 0.5rem;
}

.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.file-preview-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-preview-info i {
    font-size: 1.5rem;
    color: var(--primary);
}

.file-preview-info .file-name {
    font-weight: 500;
    color: var(--gray-700);
}

.file-preview-info .file-size {
    display: block;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.thumbnail-upload {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.thumbnail-preview {
    width: 200px;
    height: 150px;
    background: var(--gray-100);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--gray-400);
    overflow: hidden;
}

.thumbnail-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-actions p {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.upload-progress {
    margin-top: 1.5rem;
}

.progress-bar-container {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.upload-progress .progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Categories Manager */
.categories-manager {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.add-category-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.add-category-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.category-item .category-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-item i {
    color: var(--primary);
}

/* Reports */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.report-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.report-card h3 {
    font-size: 1rem;
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.chart-placeholder {
    height: 200px;
    background: var(--gray-50);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--gray-400);
}

.chart-placeholder i {
    font-size: 2rem;
}

/* Delete Modal */
.modal-small {
    max-width: 400px;
}

.modal-small .modal-body {
    padding: 2.5rem;
}

.warning-icon {
    font-size: 4rem;
    color: var(--warning);
    margin-bottom: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Nota para usuarios no premium debajo de los filtros */
.nonpremium-note {
    background: linear-gradient(90deg, rgba(255,250,240,0.9), rgba(255,255,255,0.9));
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin: 1rem 0;
    font-size: 0.95rem;
}
.nonpremium-note button {
    white-space: nowrap;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
    }
    
    .hero-image {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-grid,
    .reports-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-container {
        grid-template-columns: 1fr;
    }
    
    .auth-sidebar {
        display: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Dashboard mobile */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .search-bar {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .filters-bar {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        width: 100%;
    }
    
    .admin-toolbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        width: 100%;
    }
    
    .upload-type-selector {
        flex-direction: column;
    }
    
    .thumbnail-upload {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 8rem 0 4rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn-lg {
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

    /* Mejora visual del input de búsqueda por nombre en filtros */
    #filter-name {
        padding: 0.55rem 0.9rem;
        border: 1px solid var(--gray-300);
        border-radius: 0.6rem;
        background: var(--white);
        color: var(--gray-800);
        font-size: 0.95rem;
        transition: box-shadow var(--transition), border-color var(--transition);
        width: 100%;
        max-width: 420px;
    }

    #filter-name::placeholder {
        color: var(--gray-400);
    }

    #filter-name:focus {
        border-color: var(--primary);
        box-shadow: 0 6px 18px rgba(99,102,241,0.08);
        outline: none;
    }

    .filters-bar .filter-group label {
        display: block;
        font-size: 0.85rem;
        color: var(--gray-600);
        margin-bottom: 0.35rem;
    }

/* ==========================================
    ESTILOS PARA CURSOS
   ========================================== */

/* Grid de cursos */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.course-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.course-card .resource-content {
    padding: 1.5rem;
}

.course-card h3 {
    margin: 0 0 0.5rem 0;
    color: var(--gray-900);
    font-size: 1.25rem;
    font-weight: 600;
}

.course-card p {
    color: var(--gray-600);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.course-card .resource-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.course-card .resource-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-card .resource-actions {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

/* Vista de curso */
#section-course-view .section-header {
    position: relative;
}

.back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

#course-view-title {
    margin: 0;
    color: var(--gray-900);
    font-size: 2rem;
    font-weight: 700;
}

#course-view-description {
    margin: 1rem 0 2rem 0;
    color: var(--gray-600);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Grid de videos del curso */
.course-videos-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.video-item-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

.video-item-card h4 {
    margin: 0 0 1.5rem 0;
    color: var(--gray-900);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-item-card h4:before {
    content: "🎥";
    font-size: 1.2rem;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.mark-complete {
    background: var(--success);
    border: 1px solid var(--success);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.mark-complete:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.mark-complete.completed {
    background: var(--gray-400);
    border-color: var(--gray-400);
    cursor: not-allowed;
    opacity: 0.7;
}

.mark-complete.completed:hover {
    background: var(--gray-400);
    transform: none;
    box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .course-videos-grid {
        gap: 1.5rem;
    }
    
    .video-item-card {
        padding: 1.5rem;
    }
    
    #course-view-title {
        font-size: 1.5rem;
    }
    
    .back-btn {
        position: static;
        transform: none;
        margin-bottom: 1rem;
    }
}

/* ==========================================
    BULK UPLOAD STYLES
   ========================================== */

.bulk-upload-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--primary);
    background-color: var(--gray-50);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background-color: var(--primary-light);
}

.bulk-upload-content {
    display: none;
}

.bulk-upload-content.active {
    display: block;
}

.bulk-info {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.bulk-info h3 {
    color: var(--gray-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bulk-info ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.bulk-info li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.bulk-info li strong {
    color: var(--gray-900);
}

.link {
    color: var(--primary);
    text-decoration: underline;
}

.link:hover {
    color: var(--primary-dark);
}

.bulk-preview {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}

.bulk-preview h3 {
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-table-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
}

.preview-table th,
.preview-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.preview-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-900);
    position: sticky;
    top: 0;
}

.preview-table tr:hover {
    background: var(--gray-50);
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.manual-upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.manual-upload-header h3 {
    color: var(--gray-900);
    margin: 0;
}

.resource-row {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.resource-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.resource-row-title {
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.remove-resource-row {
    background: var(--danger);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.remove-resource-row:hover {
    background: #dc2626;
}

.resource-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.resource-form-group {
    display: flex;
    flex-direction: column;
}

.resource-form-group label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.resource-form-group input,
.resource-form-group select,
.resource-form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
}

.resource-form-group input:focus,
.resource-form-group select:focus,
.resource-form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(117, 170, 219, 0.1);
}

.resource-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.valid {
    background: var(--success);
    color: var(--white);
}

.status-badge.invalid {
    background: var(--danger);
    color: var(--white);
}

.status-badge.warning {
    background: var(--warning);
    color: #92400e;
}

/* Responsive for bulk upload */
@media (max-width: 768px) {
    .bulk-upload-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        justify-content: center;
    }
    
    .manual-upload-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .resource-form-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-actions {
        flex-direction: column;
    }
    
    .preview-table-container {
        max-height: 300px;
    }
}

/* ==========================================
    BADGES STYLES
   ========================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge.free {
    background: var(--success);
    color: var(--white);
}

.badge.premium {
    background: var(--premium-gradient);
    color: var(--white);
}

.badge.socio-adicra {
    background: var(--adicra-blue);
    color: var(--white);
}
