/* متغیرهای طراحی برای داشبورد */
:root {
    --sidebar-width: 260px;
    --header-height: 70px;
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* استایل‌های عمومی */
body {
    font-family: 'Vazirmatn', sans-serif;
    background: #f5f7fa;
    color: var(--dark);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* هدر داشبورد */
.dashboard-header {
    background: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-nav {
    padding: 15px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
}

.logo-icon {
    font-size: 2.2rem;
    color: var(--primary);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.logo-sub {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 500;
}

/* نوار جستجو و عملیات */
.dashboard-top-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--light);
    border-radius: 8px;
    padding: 10px 15px;
    gap: 10px;
    width: 300px;
}

.search-bar i {
    color: var(--gray);
}

.search-bar input {
    border: none;
    background: none;
    width: 100%;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem;
    color: var(--dark);
}

.search-bar input:focus {
    outline: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* اعلان‌ها */
.notifications-dropdown {
    position: relative;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--gray);
    cursor: pointer;
    padding: 8px;
}

.notification-count {
    position: absolute;
    top: 2px;
    left: 2px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifications-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 350px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 20px;
    display: none;
    z-index: 1000;
}

.notifications-dropdown-content.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

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

.notifications-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--dark);
}

.mark-all-read {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
}

.mark-all-read:hover {
    text-decoration: underline;
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    transition: background 0.3s ease;
    margin-bottom: 10px;
}

.notification-item:hover {
    background: var(--light);
}

.notification-item.unread {
    background: rgba(79, 70, 229, 0.05);
}

.notification-icon {
    width: 40px;
    height: 40px;
    background: var(--light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon i {
    color: var(--primary);
}

.notification-content {
    flex: 1;
}

.notification-text {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.8rem;
    color: var(--gray);
}

.notifications-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--light-gray);
    text-align: center;
}

.view-all-notifications {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.view-all-notifications:hover {
    text-decoration: underline;
}

/* پروفایل کاربر */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.profile-btn:hover {
    background: var(--light);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-name {
    font-weight: 600;
    color: var(--dark);
}

.profile-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    padding: 25px;
    display: none;
    z-index: 1000;
}

.profile-dropdown-content.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.profile-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.profile-details h4 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: var(--dark);
}

.profile-level {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.profile-email {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0;
}

.profile-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3px;
}

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

.profile-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s ease;
}

.profile-link:hover {
    background: var(--light);
    color: var(--primary);
    transform: translateX(5px);
}

.profile-link.logout {
    color: var(--danger);
}

.profile-link.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.divider {
    height: 1px;
    background: var(--light-gray);
    margin: 10px 0;
}

/* دکمه منوی موبایل */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
    padding: 8px;
}

/* سایدبار */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

.dashboard-sidebar {
    width: var(--sidebar-width);
    background: white;
    border-left: 1px solid var(--light-gray);
    padding: 25px;
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-header {
    display: none;
}

.close-sidebar {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
}

/* اطلاعات کاربر در سایدبار */
.user-info-sidebar {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.user-info-sidebar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.user-details h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--dark);
}

.user-level {
    display: inline-block;
    background: var(--light);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.user-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-progress .progress-bar {
    flex: 1;
    height: 6px;
    background: var(--light-gray);
    border-radius: 3px;
    overflow: hidden;
}

.user-progress .progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
}

.user-progress span {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 600;
}

/* منوی ناوبری */
.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--gray);
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: var(--light);
    color: var(--primary);
}

.nav-link.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.badge {
    margin-right: auto;
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}

/* بخش‌های سایدبار */
.sidebar-divider {
    height: 1px;
    background: var(--light-gray);
    margin: 25px 0;
}

.sidebar-sections {
    margin-bottom: 25px;
}

.sidebar-sections h5 {
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    color: var(--gray);
    font-weight: 600;
}

.active-courses-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.active-courses-list li {
    margin-bottom: 8px;
}

.active-courses-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s ease;
}

.active-courses-list a:hover {
    background: var(--light);
    transform: translateX(-5px);
}

.active-courses-list .progress-text {
    margin-right: auto;
    font-size: 0.85rem;
    color: var(--gray);
}

.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--light);
    border-radius: 10px;
}

.quick-stat i {
    font-size: 1.2rem;
    color: var(--primary);
}

.quick-stat .number {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

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

/* فوتر سایدبار */
.sidebar-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--gray);
    transition: all 0.3s ease;
}

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

/* محتوای اصلی */
.dashboard-main {
    flex: 1;
    padding: 30px;
    margin-right: var(--sidebar-width);
}

/* هدر محتوا */
.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.welcome-section .greeting {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
    display: block;
    margin-bottom: 5px;
}

.welcome-section .motivation {
    display: block;
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 15px;
}

.welcome-text {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.6;
}

.welcome-text strong {
    color: var(--primary);
}

#daily-streak {
    display: inline-block;
    background: linear-gradient(45deg, #FF6B6B, #FFD93D);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    margin-right: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.header-actions-main {
    display: flex;
    gap: 15px;
}

.btn-daily-challenge {
    background: linear-gradient(45deg, #4f46e5, #7c3aed);
    border: none;
    color: white;
    font-weight: 600;
}

.btn-daily-challenge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* آمار کلی */
.dashboard-overview {
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.8rem;
}

.stat-content {
    flex: 1;
}

.stat-title {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: var(--gray);
    font-weight: 600;
}

.stat-number {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    margin: 0;
}

.stat-change.positive {
    color: var(--secondary);
}

.stat-change.negative {
    color: var(--danger);
}

/* بخش‌های داشبورد */
.dashboard-sections {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.dashboard-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.3rem;
    color: var(--dark);
}

.section-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.section-link:hover {
    gap: 8px;
    color: var(--primary-dark);
}

/* درس‌های امروز */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.lesson-card {
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: all 0.3s ease;
}

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

.lesson-card.priority {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.02);
}

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

.lesson-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.lesson-badge.priority {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.lesson-badge.review {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.lesson-badge.new {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.lesson-time {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray);
    font-size: 0.85rem;
}

.lesson-content {
    margin-bottom: 20px;
}

.lesson-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.lesson-title a {
    color: var(--dark);
    text-decoration: none;
}

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

.lesson-description {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.lesson-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lesson-progress .progress-bar {
    flex: 1;
    height: