/* =====================================================
   DASHBOARD - Page Specific Styles
   ===================================================== */

/* =====================================================
   WELCOME SECTION
   ===================================================== */
.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--spacing-lg, 1.5rem);
    margin-bottom: var(--spacing-xl, 2rem);
}

.welcome-content {
    flex: 1;
    min-width: 250px;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    margin: 0 0 0.5rem 0;
}

.welcome-subtitle {
    color: var(--text-secondary, #64748b);
    margin: 0;
}

/* Stats Quick Display */
.stats-quick {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.streak-counter,
.points-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-primary, #fff);
    border-radius: 50px;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
}

.streak-flame {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #F97316 0%, #EF4444 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.points-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #F59E0B 0%, #EAB308 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.streak-info,
.points-info {
    display: flex;
    flex-direction: column;
}

.streak-number,
.points-number {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    line-height: 1;
}

.streak-label,
.points-label {
    font-size: 0.75rem;
    color: var(--text-secondary, #64748b);
}

/* =====================================================
   SECTIONS
   ===================================================== */
.section {
    background: var(--bg-primary, #fff);
    border-radius: var(--radius-xl, 16px);
    padding: var(--spacing-lg, 1.5rem);
    margin-bottom: var(--spacing-lg, 1.5rem);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
    border: 1px solid var(--border-color, #e2e8f0);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md, 1rem);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary-blue, #3B82F6);
}

/* =====================================================
   GOALS
   ===================================================== */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.goal-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: var(--radius-lg, 12px);
    transition: all 0.2s;
}

.goal-item:hover {
    background: var(--bg-tertiary, #f1f5f9);
}

.goal-checkbox {
    position: relative;
}

.goal-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-green, #10B981);
}

.goal-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.goal-text {
    color: var(--text-primary, #1e293b);
    font-weight: 500;
}

.goal-points {
    font-size: 0.813rem;
    color: var(--primary-green, #10B981);
    font-weight: 600;
    white-space: nowrap;
}

.goal-item.completed .goal-text {
    text-decoration: line-through;
    color: var(--text-muted, #94a3b8);
}

/* =====================================================
   DOCTOR ASSIGNMENTS
   ===================================================== */
.assignment-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-primary, #fff);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.assignment-item:last-child {
    border-bottom: none;
}

.assignment-content {
    flex: 1;
}

.assignment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.assignment-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
}

.assignment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin-bottom: 0.5rem;
}

.assigned-by {
    font-size: 0.875rem;
    color: var(--text-secondary, #64748b);
    margin: 0;
}

.due-date {
    font-size: 0.875rem;
    color: var(--text-muted, #94a3b8);
    margin: 0;
}

.due-date.overdue {
    color: var(--primary-red, #EF4444);
    font-weight: 500;
}

.assignment-instructions {
    font-size: 0.813rem;
    font-style: italic;
    color: var(--text-secondary, #64748b);
    line-height: 1.4;
    margin: 0.5rem 0 0 0;
    padding: 0.5rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: var(--radius-md, 8px);
}

@media (max-width: 768px) {
    .assignment-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        padding: 1.25rem 1rem;
    }

    .assignment-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .assignment-action {
        width: 100%;
    }

    .assignment-action .btn {
        width: 100%;
        justify-content: center;
    }
}

/* =====================================================
   MODULE CARDS
   ===================================================== */
.module-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.module-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-xl, 16px);
    text-decoration: none;
    transition: all 0.2s;
}

.module-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
    border-color: transparent;
}

.module-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg, 12px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Module Colors */
.module-dyslexia .module-icon {
    background: var(--dyslexia-bg, #EFF6FF);
    color: var(--dyslexia-color, #3B82F6);
}

.module-dyscalculia .module-icon {
    background: var(--dyscalculia-bg, #ECFDF5);
    color: var(--dyscalculia-color, #10B981);
}

.module-dysgraphia .module-icon {
    background: var(--dysgraphia-bg, #FFFBEB);
    color: var(--dysgraphia-color, #F59E0B);
}

.module-dyspraxia .module-icon {
    background: var(--dyspraxia-bg, #FEF2F2);
    color: var(--dyspraxia-color, #EF4444);
}

.module-content {
    flex: 1;
    width: 100%;
}

.module-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0 0 0.25rem 0;
}

.module-description {
    font-size: 0.813rem;
    color: var(--text-secondary, #64748b);
    margin: 0 0 1rem 0;
}

.module-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.module-progress .progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary, #f1f5f9);
    border-radius: 3px;
    overflow: hidden;
}

.module-progress .progress-fill {
    height: 100%;
    background: var(--primary-blue, #3B82F6);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.module-progress .progress-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
}

.module-arrow {
    color: var(--text-muted, #94a3b8);
    margin-top: 0.75rem;
    transition: transform 0.2s;
}

.module-card:hover .module-arrow {
    transform: translateX(4px);
    color: var(--primary-blue, #3B82F6);
}

/* =====================================================
   ACHIEVEMENTS GRID
   ===================================================== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: var(--radius-lg, 12px);
}

.achievement-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

.achievement-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary, #1e293b);
}

.achievement-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted, #94a3b8);
    text-align: center;
    grid-column: 1 / -1;
}

.achievement-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* =====================================================
   CHART CONTAINER
   ===================================================== */
.chart-container {
    height: 250px;
    position: relative;
    width: 100%;
}

/* =====================================================
   ALL ACTIVITY FEED
   ===================================================== */
.all-activity-section .section-header {
    flex-direction: row;
    align-items: flex-start;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
}

.activity-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.highlight-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.highlight-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
}

.activity-item:hover {
    border-color: var(--primary-blue);
    transform: translateX(4px);
}

.feed-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.btn-block {
    width: 100%;
}

/* =====================================================
   RESPONSIVE IMPROVEMENTS
   ===================================================== */
@media (max-width: 1024px) {
    .module-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .all-activity-section .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        display: flex;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .header-actions .btn {
        flex: 1;
    }

    .activity-highlights {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .highlight-item {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .highlight-item:last-child {
        border-bottom: none;
    }

    .stats-row {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .section-chart,
    .section-achievements {
        width: 100%;
    }

    .main-content {
        padding: 1rem;
    }

    .content-area {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .module-cards {
        grid-template-columns: 1fr;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .streak-counter,
    .points-display {
        padding: 0.5rem 1rem;
    }

    .navbar {
        padding: 0 1rem;
    }

    .user-name {
        display: none;
    }
}

.flex-center-mobile {
    display: flex;
}

@media (max-width: 768px) {
    .flex-center-mobile {
        justify-content: center;
        width: 100%;
    }
}