/* Dashboard Modern Design - Estilo Profesional */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    box-shadow: 1px 0 3px rgba(0,0,0,0.05);
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid #dee2e6;
    background: #ffffff;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    color: #0f6cbf;
}

.logo i {
    font-size: 1.8rem;
    color: #0f6cbf;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 24px;
    margin-bottom: 12px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #495057;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: #f8f9fa;
    color: #0f6cbf;
}

.nav-item.active .nav-link {
    background: #e3f2fd;
    color: #0f6cbf;
    border-left-color: #0f6cbf;
    font-weight: 500;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* Main Wrapper */
.main-wrapper {
    margin-left: 260px;
    min-height: 100vh;
    background: #f8f9fa;
}

/* Top Header */
.top-header {
    background: #ffffff;
    padding: 15px 30px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header-left {
    flex: 1;
    max-width: 500px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 16px;
    color: #9ca3af;
    font-size: 1rem;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #ffffff;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #0f6cbf;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 108, 191, 0.1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-upload {
    background: #0f6cbf;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-upload:hover {
    background: #0d5aa7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(15, 108, 191, 0.2);
}

.btn-icon {
    position: relative;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #f9fafb;
    color: #333;
}

.badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-profile:hover {
    background: #f9fafb;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0f6cbf;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

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

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.user-role {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px;
    background: #f8f9fa;
}

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

.stat-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    border-left: 4px solid;
    border: 1px solid #dee2e6;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-card.stat-primary {
    border-left-color: #0f6cbf;
}

.stat-card.stat-success {
    border-left-color: #28a745;
}

.stat-card.stat-info {
    border-left-color: #17a2b8;
}

.stat-card.stat-warning {
    border-left-color: #ffc107;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-primary .stat-icon {
    background: #0f6cbf;
}

.stat-success .stat-icon {
    background: #28a745;
}

.stat-info .stat-icon {
    background: #17a2b8;
}

.stat-warning .stat-icon {
    background: #ffc107;
}

.stat-info h3 {
    font-size: 0.85rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
}

/* Sections */
.section {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.section-actions {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #0f6cbf;
    box-shadow: 0 0 0 3px rgba(15, 108, 191, 0.1);
}

/* Trending Grid */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Classes Grid */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.class-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid #dee2e6;
}

.class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #0f6cbf;
}

.class-thumbnail {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.class-thumbnail::before {
    content: '▶';
    position: absolute;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

.class-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.class-card:hover .class-thumbnail::after {
    opacity: 1;
}

.class-info {
    padding: 16px;
}

.class-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.class-description {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.class-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 12px;
}

.class-meta i {
    margin-right: 4px;
}

.class-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.btn-action {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-play {
    background: #0f6cbf;
    color: white;
}

.btn-play:hover {
    background: #0d5aa7;
}

.btn-edit {
    background: #f59e0b;
    color: white;
}

.btn-edit:hover {
    background: #d97706;
}

.btn-delete {
    background: #ef4444;
    color: white;
}

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

/* Loading & Empty States */
.loading,
.no-classes {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    grid-column: 1 / -1;
}

.loading i,
.no-classes i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #d1d5db;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #111827;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f9fafb;
    color: #111827;
}

.modal-body {
    flex: 1;
    overflow: auto;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    min-height: 600px;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    
    .header-left {
        max-width: 100%;
        margin-bottom: 12px;
    }
    
    .header-right {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .btn-upload span {
        display: none;
    }
    
    .user-info {
        display: none;
    }
    
    .dashboard-content {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .classes-grid,
    .trending-grid {
        grid-template-columns: 1fr;
    }
}

