/* LMS Dashboard Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
    min-height: 100vh;
}

/* Auth Hidden */
.auth-hidden {
    display: none !important;
}

body.authenticated .auth-hidden {
    display: block !important;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1.5rem;
    z-index: 100;
}

.sidebar.auth-hidden {
    display: none !important;
}

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

.brand img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.brand-text h1 {
    font-size: 1.25rem;
    color: #10b981;
    font-weight: 700;
}

.brand-text p {
    font-size: 0.75rem;
    color: #6b7280;
}

.user-info {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 1rem;
    border-radius: 12px;
    color: white;
    margin-bottom: 2rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 0.5rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.9;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.nav-link:hover,
.nav-link.active {
    background: #10b981;
    color: white;
}

.logout-btn {
    width: 100%;
    padding: 0.75rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 2rem;
    transition: all 0.2s;
}

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

/* Main Content */
.main-wrapper {
    margin-left: 260px;
    min-height: 100vh;
}

.main-wrapper.auth-hidden {
    display: none !important;
}

body:not(.authenticated) ~ .main-wrapper {
    display: none;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.system-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.page-title {
    font-size: 1.5rem;
    color: #10b981;
    font-weight: 700;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-user img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #10b981;
}

.main-content {
    padding: 2rem;
}

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

.section-header h2 {
    font-size: 1.75rem;
    color: #047857;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.card-header h3 {
    font-size: 1rem;
    color: #047857;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header h3 i {
    color: #10b981;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-ghost {
    background: transparent;
    color: #10b981;
}

.btn-ghost:hover {
    background: rgba(16, 185, 129, 0.1);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.875rem;
}

/* Welcome Section */
.welcome-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.welcome-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.welcome-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    border-radius: 16px;
}

.welcome-card h1 {
    font-size: 1.75rem;
    color: #047857;
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    color: #6b7280;
    margin-bottom: 2rem;
}

.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary {
    background: #10b981;
    color: white;
    padding: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary:hover {
    background: #059669;
}

.btn-secondary {
    background: white;
    color: #10b981;
    border: 2px solid #10b981;
    padding: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(16, 185, 129, 0.1);
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 2rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
}

/* Content Sections */
.content-section {
    display: none;
}

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

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    body.authenticated .sidebar {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
