/* ============================================================
   👤 Profile Page Styles
   با پشتیبانی از تم (روشن/تاریک)
   ============================================================ */

/* ============================================================
   📑 MAIN LAYOUT
   ============================================================ */
.profile-main {
    padding: 100px 0 60px;
    min-height: calc(100vh - 200px);
}

.profile-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    margin-top: 20px;
}

@media (max-width: 992px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   📋 SIDEBAR
   ============================================================ */
.profile-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

@media (max-width: 992px) {
    .profile-sidebar {
        position: static;
    }
}

/* ============================================================
   🃏 PROFILE CARD
   ============================================================ */
.profile-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--border-color);
    text-align: center;
    margin-bottom: 25px;
    transition: all var(--transition-speed) ease;
}

.profile-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow);
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 3px solid var(--primary-color);
    transition: all var(--transition-speed) ease;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.profile-role {
    color: var(--primary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 15px 0 0;
    border-top: 1px solid var(--border-light);
}

.profile-stats .stat-item {
    text-align: center;
}

.profile-stats .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: block;
}

.profile-stats .stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 3px;
}

/* ============================================================
   📋 PROFILE MENU
   ============================================================ */
.profile-menu {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.profile-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 5px;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
}

.profile-menu .menu-item:last-child {
    margin-bottom: 0;
}

.profile-menu .menu-item:hover {
    background: rgba(106, 17, 203, 0.08);
    color: var(--text-primary);
}

.profile-menu .menu-item.active {
    background: rgba(106, 17, 203, 0.12);
    color: var(--primary-color);
}

.profile-menu .menu-item i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

.profile-menu .menu-item span {
    font-size: 0.95rem;
}

/* ============================================================
   📄 MAIN CONTENT
   ============================================================ */
.profile-content {
    flex: 1;
}

/* ============================================================
   📊 PROFILE SECTIONS
   ============================================================ */
.profile-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    display: none;
    transition: all var(--transition-speed) ease;
}

.profile-section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.profile-section:last-child {
    margin-bottom: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.section-header h2 i {
    color: var(--primary-color);
}

.profile-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================================
   📊 DASHBOARD STATS
   ============================================================ */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-stat {
    background: var(--bg-input);
    border-radius: 14px;
    padding: 22px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.dashboard-stat:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.dashboard-stat i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
}

.dashboard-stat h3 {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.dashboard-stat p {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

/* ============================================================
   📋 RECENT ACTIVITIES
   ============================================================ */
.recent-activities {
    background: var(--bg-input);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.recent-activities h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-activities h3 i {
    color: var(--primary-color);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(106, 17, 203, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content h4 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin: 0 0 3px 0;
}

.activity-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.activity-time {
    color: var(--text-dark);
    font-size: 0.75rem;
    white-space: nowrap;
}

/* ============================================================
   📚 COURSES LIST
   ============================================================ */
.courses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.profile-course-card {
    background: var(--bg-input);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.profile-course-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.course-card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
}

.course-card-header h3 {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin: 0 0 5px 0;
}

.course-category {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
}

.course-card-body {
    padding: 18px 20px;
}

.course-progress {
    margin-bottom: 12px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.progress-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.progress-percentage {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.8rem;
}

.progress-bar {
    height: 6px;
    background: var(--bg-body);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-btn);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.course-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.course-meta i {
    color: var(--primary-color);
}

.course-card-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 10px;
}

/* ============================================================
   🎓 CERTIFICATES
   ============================================================ */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.certificate-card {
    background: var(--bg-input);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.certificate-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-3px);
}

.certificate-preview {
    height: 150px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}

.certificate-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.certificate-content {
    padding: 18px 20px;
}

.certificate-content h3 {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin: 0 0 8px 0;
}

.certificate-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.certificate-id {
    color: var(--secondary-color);
    font-family: monospace;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 15px;
}

/* ============================================================
   🗺️ TOURS
   ============================================================ */
.tours-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.profile-tour-card {
    background: var(--bg-input);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.profile-tour-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.tour-card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
}

.tour-card-header h3 {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin: 0 0 5px 0;
}

.tour-location {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tour-card-body {
    padding: 18px 20px;
}

.tour-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tour-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.tour-detail i {
    color: var(--primary-color);
}

.tour-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-upcoming {
    background: rgba(0, 200, 83, 0.12);
    color: #00c853;
}

.status-completed {
    background: rgba(106, 17, 203, 0.12);
    color: var(--primary-color);
}

.status-cancelled {
    background: rgba(255, 107, 107, 0.12);
    color: #ff6b6b;
}

.tour-card-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 10px;
}

/* ============================================================
   ⚙️ SETTINGS FORM
   ============================================================ */
.settings-form .form-group {
    margin-bottom: 20px;
}

.settings-form label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.settings-form input,
.settings-form select,
.settings-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: all var(--transition-speed) ease;
}

.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.08);
}

.settings-form input::placeholder,
.settings-form textarea::placeholder {
    color: var(--text-dark);
}

.settings-form textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.settings-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.settings-message {
    padding: 12px 16px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
    font-size: 0.95rem;
}

.settings-message-success {
    background: rgba(0, 200, 83, 0.08);
    color: #00c853;
    border: 1px solid rgba(0, 200, 83, 0.2);
}

.settings-message-error {
    background: rgba(255, 107, 107, 0.08);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

/* ============================================================
   🎯 EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3.5rem;
    color: var(--primary-color);
    opacity: 0.3;
    display: block;
    margin-bottom: 15px;
}

.empty-state h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   📱 RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .profile-main {
        padding: 80px 0 40px;
    }
    
    .profile-card {
        padding: 20px;
    }
    
    .profile-avatar {
        width: 120px;
        height: 120px;
    }
    
    .profile-name {
        font-size: 1.3rem;
    }
    
    .profile-section {
        padding: 20px;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .courses-list,
    .certificates-grid,
    .tours-list {
        grid-template-columns: 1fr;
    }
    
    .activity-item {
        flex-wrap: wrap;
    }
    
    .activity-time {
        width: 100%;
        padding-right: 55px;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .profile-card {
        padding: 15px;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-stats .stat-number {
        font-size: 1.2rem;
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .settings-actions .btn {
        width: 100%;
        text-align: center;
    }
}