/* Teaching Dashboard — لوحة التدريس */
.td-dashboard { padding: 0 0 32px; }

.td-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.td-stat-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.td-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.td-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.td-stat-icon--blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.td-stat-icon--green { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.td-stat-icon--purple { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.td-stat-icon--amber { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.td-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted, #94a3b8);
    margin: 0 0 6px;
}

.td-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.td-courses-panel {
    border-radius: 16px;
    overflow: hidden;
}

.td-courses-panel .section-header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.td-courses-panel .section-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 1.05rem;
}

.td-courses-table { width: 100%; }

.td-progress-cell {
    min-width: 200px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
}

.td-progress-wrap {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.td-progress-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.td-prog--high { background: linear-gradient(90deg, #10b981, #34d399); color: #10b981; }
.td-prog--mid { background: linear-gradient(90deg, #f59e0b, #fbbf24); color: #f59e0b; }
.td-prog--low { background: linear-gradient(90deg, #ef4444, #f87171); color: #ef4444; }

.td-progress-pct {
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.td-nature {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.td-nature--theoretical { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.td-nature--practical { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.td-nature--mixed { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }

.td-num { font-variant-numeric: tabular-nums; font-weight: 600; text-align: center; }
.td-date { font-size: 0.88rem; white-space: nowrap; }

.td-exam-cell { min-width: 130px; }
.td-exam {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}
.td-exam i, .td-exam svg { width: 15px; height: 15px; flex-shrink: 0; }
.td-exam--done { color: #34d399; }
.td-exam--scheduled { color: #93c5fd; }
.td-exam--none { color: var(--text-muted, #94a3b8); font-weight: 500; }
.td-muted { color: var(--text-muted, #94a3b8); font-size: 0.8rem; }

.td-msg-card {
    margin: 0 20px 18px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.td-msg-card__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.td-msg-card__head i,
.td-msg-card__head svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.td-msg-card__head strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.td-msg-card__head small {
    color: var(--text-muted, #94a3b8);
    font-size: 0.78rem;
}

.td-msg-card__text {
    margin: 0 0 12px;
    line-height: 1.65;
    font-size: 0.92rem;
}

.td-msg-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.td-msg-copy-btn:hover { background: rgba(255, 255, 255, 0.14); }
.td-msg-copy-btn i, .td-msg-copy-btn svg { width: 15px; height: 15px; }

.td-msg-card--low { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.08); }
.td-msg-card--mid { border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.08); }
.td-msg-card--good { border-color: rgba(59, 130, 246, 0.35); background: rgba(59, 130, 246, 0.08); }
.td-msg-card--excellent { border-color: rgba(16, 185, 129, 0.35); background: rgba(16, 185, 129, 0.08); }

.td-course-msg {
    display: block;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.55;
    font-weight: 600;
}

.td-course-msg--low { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }
.td-course-msg--mid { background: rgba(245, 158, 11, 0.12); color: #fcd34d; }
.td-course-msg--good { background: rgba(59, 130, 246, 0.12); color: #93c5fd; }
.td-course-msg--excellent { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; }
.td-course-msg--complete { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.35); }

.td-empty, .td-loading, .td-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted, #94a3b8);
}

.td-empty i, .td-loading i { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.5; }
.td-empty-hint { font-size: 0.85rem; margin-top: 8px; opacity: 0.8; }

.td-home-teaching-preview {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.td-home-teaching-preview h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.td-role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .td-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .td-stat-value { font-size: 1.4rem; }
    .td-courses-table { font-size: 0.85rem; }
    .td-progress-cell { min-width: 100px; }
    .td-msg-card { margin: 0 12px 14px; }
    .td-progress-cell { min-width: 160px; }
}
