/* Teacher Dashboard Frontend Styles */

.teacher-dashboard-wrapper {
    max-width: 1260px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Tajawal', 'Noto Naskh Arabic', sans-serif;
    direction: rtl;
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.welcome-section h1 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.welcome-section p {
    font-size: 18px;
    margin: 0;
    opacity: 0.9;
}

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

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stat-icon i {
    font-size: 24px;
    color: white;
}

.stat-content h3 {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #1a1a1a;
}

.stat-content p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.stat-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    margin-top: 15px;
    transition: color 0.3s ease;
}

.stat-link:hover {
    color: #764ba2;
}

.stat-link i {
    font-size: 12px;
}

/* Dashboard Actions */
.dashboard-actions {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.dashboard-actions h2 {
    font-size: 24px;
    margin: 0 0 20px 0;
    color: #1a1a1a;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.action-btn i {
    font-size: 18px;
}

/* Dashboard Overview */
.dashboard-overview {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 968px) {
    .dashboard-overview {
        grid-template-columns: 1fr;
    }
}

.overview-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.overview-section h2 {
    font-size: 20px;
    margin: 0 0 20px 0;
    color: #1a1a1a;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Recent Activity */
.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.activity-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 15px;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.activity-item:hover {
    background: #f9f9f9;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-icon i {
    font-size: 20px;
    color: white;
}

.activity-content h4 {
    font-size: 16px;
    margin: 0 0 5px 0;
    color: #1a1a1a;
}

.activity-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
    margin: 0;
}

.status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-publish {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-draft {
    background: #d1ecf1;
    color: #0c5460;
}

.activity-actions {
    display: flex;
    gap: 10px;
}

.edit-link, .view-link {
    padding: 6px 12px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-size: 13px;
    transition: background 0.3s ease;
}

.edit-link:hover {
    background: #667eea;
    color: white;
}

.view-link:hover {
    background: #764ba2;
    color: white;
}

.no-activity {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* Performance Stats */
.performance-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.perf-stat {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.perf-stat i {
    font-size: 32px;
    color: #667eea;
}

.perf-stat h4 {
    font-size: 28px;
    margin: 0 0 5px 0;
    color: #1a1a1a;
}

.perf-stat p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Dashboard Profile */
.dashboard-profile {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.dashboard-profile h2 {
    font-size: 20px;
    margin: 0 0 20px 0;
    color: #1a1a1a;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.profile-btn:hover {
    background: #667eea;
    color: white;
}

.profile-btn.logout {
    background: #dc3545;
    color: white;
}

.profile-btn.logout:hover {
    background: #c82333;
}

/* Login Form */
.teacher-dashboard-login {
    max-width: 500px;
    margin: 60px auto;
    padding: 0 20px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    text-align: center;
}

.login-container h2 {
    font-size: 28px;
    margin: 0 0 10px 0;
    color: #1a1a1a;
}

.login-container p {
    color: #666;
    margin: 0 0 30px 0;
}

.login-container form {
    text-align: right;
}

.login-container label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.login-container input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.login-container input[type="submit"]:hover {
    transform: translateY(-2px);
}

/* Error Message */
.teacher-dashboard-error {
    max-width: 600px;
    margin: 60px auto;
    padding: 30px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    text-align: center;
    color: #721c24;
}

/* RTL Support */
[dir="rtl"] .teacher-dashboard-wrapper {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .stat-link i {
    transform: rotate(180deg);
}
