/* =============================================
   نمط العائلة الدافئ - Family Warm Theme
   ============================================= */

:root {
    /* الألوان الأساسية */
    --primary-color: #8b4513;      /* بني داكن طبيعي */
    --secondary-color: #d2b48c;    /* بيج فاتح */
    --accent-color: #4a4a4a;       /* أخضر للشريط الجانبي */
    
    /* ألوان الخلفية */
    --bg-main: #faf7f2;            /* كريمي فاتح */
    --bg-card: #ffffff;            /* أبيض نقي */
    --bg-white: #ffffff;           /* أبيض نقي */
    --bg-light: #f8f9fa;           /* خلفية فاتحة */
    --bg-sidebar: #4a4a4a;         /* رمادي داكن دافئ */
    --bg-header: #6d4c41;          /* بني متوسط */
    
    /* ألوان النص */
    --text-primary: #2d2d2d;       /* نص رئيسي */
    --text-secondary: #666666;     /* نص ثانوي */
    --text-light: #f5f5f5;         /* نص فاتح للشريط الجانبي */
    --text-muted: #999999;         /* نص باهت */
    
    /* ألوان الحالة */
    --success-color: #27ae60;      /* أخضر للنجاح */
    --warning-color: #f39c12;      /* برتقالي للتحذير */
    --danger-color: #e74c3c;       /* أحمر للخطر */
    --info-color: #3498db;         /* أزرق للمعلومات */
    --purple-color: #9b59b6;       /* بنفسجي */
    
    /* ألوان الحالة الفاتحة */
    --success-light: #d4edda;      /* أخضر فاتح */
    --warning-light: #fff3e0;      /* برتقالي فاتح */
    --danger-light: #fff5f5;       /* أحمر فاتح */
    --info-light: #e3f2fd;         /* أزرق فاتح */
    --purple-light: #f3e5f5;       /* بنفسجي فاتح */
    
    /* ألوان الحدود للحالات */
    --danger-border: #fed7d7;      /* حدود حمراء فاتحة */
    
    /* ألوان الحدود والظلال */
    --border-color: #e6ddd4;       /* حدود ناعمة */
    --border-light: #f0f0f0;       /* حدود فاتحة */
    --shadow-light: 0 2px 4px rgba(139, 69, 19, 0.1);
    --shadow-medium: 0 4px 8px rgba(139, 69, 19, 0.15);
    --shadow-heavy: 0 8px 16px rgba(139, 69, 19, 0.2);
    --shadow-lg: 0 10px 25px rgba(139, 69, 19, 0.15);
    --shadow-md: 0 4px 12px rgba(139, 69, 19, 0.1);
    
    /* أحجام التقويس */
    --border-radius-sm: 6px;       /* تقويس صغير */
    --border-radius-md: 10px;      /* تقويس متوسط */
    --border-radius-lg: 15px;      /* تقويس كبير */
    --border-radius-xl: 20px;      /* تقويس كبير جداً */
    
    /* تدرجات جميلة */
    --gradient-warm: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, #4a4a4a 100%);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, #a0522d 100%);
    --gradient-danger: linear-gradient(135deg, var(--danger-color) 0%, #c0392b 100%);
    
    /* متغيرات RGB للألوان */
    --primary-rgb: 139, 69, 19;
}

/* =============================================
   الإعدادات العامة
   ============================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Dubai', 'Tahoma', Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

.container-fluid {
    padding: 0;
}

/* =============================================
   الشريط الجانبي
   ============================================= */

#sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-sidebar);
    box-shadow: var(--shadow-heavy);
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

#sidebar.collapsed {
    width: 70px;
}

/* رأس الشريط الجانبي */
.sidebar-header {
    padding: 25px 20px;
    background: var(--gradient-warm);
    color: var(--text-light);
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.sidebar-header small {
    opacity: 0.8;
    font-size: 0.85rem;
}

/* قائمة التنقل */
.sidebar-nav {
    padding: 0;
    list-style: none;
}

.nav-item {
    margin: 2px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    border-right: 4px solid transparent;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-right-color: var(--accent-color);
    color: #ffffff;
}

.nav-link.active {
    background-color: var(--accent-color);
    border-right-color: var(--secondary-color);
    color: #ffffff;
}

.nav-link i {
    width: 20px;
    margin-left: 15px;
    font-size: 1.1rem;
    text-align: center;
}

.nav-link span {
    flex: 1;
    font-weight: 500;
}

/* أسهم القوائم الفرعية */
.submenu-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.nav-item.active .submenu-arrow {
    transform: rotate(180deg);
}

/* القوائم الفرعية */
.submenu {
    background-color: rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.submenu.show {
    max-height: 300px;
}

.submenu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.submenu-item {
    margin: 0;
}

.submenu-link {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 55px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.submenu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.submenu-link.active {
    background-color: var(--accent-color);
    color: #ffffff;
}

.submenu-dot {
    font-size: 0.5rem;
    margin-left: 10px;
    opacity: 0.6;
}

/* ملف المستخدم */
.user-profile {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 15px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.user-info {
    color: var(--text-light);
}

.user-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-role {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* تذييل الشريط الجانبي */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.sidebar-footer .btn {
    margin: 0.25rem 0;
    border-width: 1px;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.sidebar-footer .btn-outline-primary {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    background-color: transparent;
}

.sidebar-footer .btn-outline-primary:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.sidebar-footer .btn-outline-danger {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
    background-color: transparent;
}

.sidebar-footer .btn-outline-danger:hover {
    color: #ffffff;
    background-color: #ff6b6b;
    border-color: #ff6b6b;
    transform: translateY(-1px);
}

.sidebar-brand {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    text-align: center;
    margin-top: 15px;
}

.sidebar-brand small {
    display: block;
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 2px;
    color: #ffffff !important;
}

/* طبقة الشريط الجانبي للهواتف */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* =============================================
   المحتوى الرئيسي
   ============================================= */

#main-content,
.main-content {
    margin-right: 280px;
    min-height: 100vh;
    transition: margin-right 0.3s ease;
}

#main-content.sidebar-collapsed,
.main-content.sidebar-collapsed {
    margin-right: 0;
}

/* رأس الصفحة */
.main-header {
    background: #ffffff;
    padding: 20px 30px;
    box-shadow: var(--shadow-light);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.header-breadcrumb {
    background: transparent;
    margin: 5px 0 0 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--primary-color);
}

/* أدوات الرأس */
.header-tools {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-toggle-sidebar {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-toggle-sidebar:hover {
    background-color: var(--bg-main);
    transform: rotate(90deg);
}

/* =============================================
   الكروت والمحتوى
   ============================================= */

.content-wrapper {
    padding: 30px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.card-header {
    background: var(--gradient-warm);
    color: var(--text-light);
    padding: 18px 25px;
    border-bottom: none;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.2rem;
}

.card-body {
    padding: 25px;
}

/* =============================================
   الأزرار
   ============================================= */

.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-warm);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.btn-success {
    background: var(--gradient-accent);
    color: white;
}

.btn-success:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* =============================================
   النماذج
   ============================================= */

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
    outline: none;
}

.form-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

/* =============================================
   الجداول
   ============================================= */

.table {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 15px;
    font-weight: 600;
}

.table tbody td {
    padding: 15px;
    border-color: var(--border-color);
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: rgba(139, 69, 19, 0.05);
}

/* =============================================
   الإشعارات
   ============================================= */

.alert {
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border-right: 4px solid var(--success-color);
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
    border-right: 4px solid var(--warning-color);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
    border-right: 4px solid var(--danger-color);
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
    border-right: 4px solid var(--info-color);
}

/* =============================================
   الإحصائيات والأرقام
   ============================================= */

.stat-card {
    text-align: center;
    padding: 25px;
    border-radius: 12px;
    background: var(--bg-card);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* =============================================
   التجاوب مع الشاشات المختلفة
   ============================================= */

@media (max-width: 768px) {
    #sidebar {
        transform: translateX(100%);
    }
    
    #sidebar.show {
        transform: translateX(0);
    }
    
    #main-content {
        margin-right: 0;
    }
    
    .content-wrapper {
        padding: 15px;
    }
    
    .main-header {
        padding: 15px 20px;
    }
    
    .card-body {
        padding: 20px;
    }
}

/* =============================================
   تحسينات إضافية
   ============================================= */

/* شريط التمرير المخصص */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* تأثيرات الحركة */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* رموز الحالة */
.status-online {
    color: var(--success-color);
}

.status-offline {
    color: var(--text-muted);
}

.status-deceased {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* أيقونات خاصة للعائلة */
.family-icon {
    background: var(--gradient-warm);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

/* =============================================
   أنماط صفحة سجل الأنشطة
   ============================================= */

.activity-container {
    background: var(--bg-main);
    min-height: 100vh;
}

.page-header {
    background: var(--gradient-warm);
    color: var(--text-light);
    padding: 25px 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.page-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.page-header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.stats-card.primary {
    border-right: 4px solid var(--primary-color);
}

.stats-card.success {
    border-right: 4px solid var(--success-color);
}

.stats-card.info {
    border-right: 4px solid var(--info-color);
}

.stats-card.warning {
    border-right: 4px solid var(--warning-color);
}

.stats-card h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.stats-card p {
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.filter-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-light);
}

.filter-card .card-header {
    background: var(--gradient-accent);
    color: var(--text-light);
    padding: 15px 20px;
    margin: -25px -25px 20px -25px;
    border-radius: 12px 12px 0 0;
}

.logs-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.log-entry {
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
    transition: all 0.3s ease;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry:hover {
    background-color: rgba(139, 69, 19, 0.03);
}

.log-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.log-body {
    padding-right: 60px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-left: 15px;
    border: 2px solid var(--border-color);
}

.user-placeholder {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gradient-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    margin-left: 15px;
}

.action-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 10px;
}

.action-badge.login {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.action-badge.logout {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

.action-badge.create {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--info-color);
}

.action-badge.update {
    background-color: rgba(243, 156, 18, 0.1);
    color: var(--warning-color);
}

.action-badge.delete {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

.action-badge.view {
    background-color: rgba(139, 69, 19, 0.1);
    color: var(--primary-color);
}

.top-actions-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-light);
}

.top-actions-card .card-header {
    background: var(--gradient-accent);
    color: var(--text-light);
    padding: 15px 20px;
    margin: -20px -20px 15px -20px;
    border-radius: 12px 12px 0 0;
}

.management-tools {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-light);
}

.management-tools .card-header {
    background: var(--gradient-warm);
    color: var(--text-light);
    padding: 15px 20px;
    margin: -20px -20px 15px -20px;
    border-radius: 12px 12px 0 0;
}

.pagination {
    justify-content: center;
    margin-top: 25px;
}

.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    margin: 0 2px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* تصميم متجاوب لصفحة سجل الأنشطة */
@media (max-width: 768px) {
    .page-header {
        padding: 20px;
        text-align: center;
    }
    
    .page-header h1 {
        font-size: 1.6rem;
    }
    
    .stats-card {
        margin-bottom: 15px;
    }
    
    .filter-card {
        padding: 20px;
    }
    
    .log-entry {
        padding: 15px;
    }
    
    .log-body {
        padding-right: 0;
        margin-top: 10px;
    }
    
    .user-avatar,
    .user-placeholder {
        width: 35px;
        height: 35px;
        margin-left: 10px;
    }
    
    .action-badge {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
}

/* =============================================
   أنماط صفحة تحرير الملف الشخصي - التخطيط المرن
   ============================================= */

/* بطاقات المحتوى المرنة */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-warm);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.content-card:hover::before {
    opacity: 1;
}

.content-card .card-header {
    background: var(--gradient-warm);
    color: var(--text-light);
    padding: 18px 25px;
    margin: -25px -25px 25px -25px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    border-bottom: none;
}

.content-card .card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.content-card .card-header i {
    margin-left: 12px;
    font-size: 1.2rem;
    opacity: 0.9;
}

/* تخطيط الشبكة المرن */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .profile-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* بطاقة الصورة الشخصية */
.profile-image-card {
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.profile-image-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-warm);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.profile-image-card:hover::before {
    transform: scaleX(1);
}

.profile-image-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.profile-image-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid var(--border-color);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.profile-image-preview:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.profile-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-image-preview:hover img {
    transform: scale(1.1);
}

/* أنماط النماذج المحسنة */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group .form-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.form-group .form-label i {
    margin-left: 8px;
    color: var(--primary-color);
    font-size: 1rem;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--bg-white);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
    outline: none;
    background-color: #ffffff;
}

.form-control:hover {
    border-color: var(--secondary-color);
}

/* أزرار محسنة */
.btn-group-custom {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-primary {
    background: var(--gradient-warm);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 23px;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* مؤشر قوة كلمة المرور */
.password-strength {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background-color: var(--danger-light);
    color: var(--danger-color);
    border: 1px solid var(--danger-border);
}

.password-strength.medium {
    background-color: var(--warning-light);
    color: var(--warning-color);
    border: 1px solid #ffd54f;
}

.password-strength.strong {
    background-color: var(--success-light);
    color: var(--success-color);
    border: 1px solid #c8e6c9;
}

/* رسائل التنبيه المحسنة */
.alert {
    border: none;
    border-radius: var(--border-radius-md);
    padding: 15px 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
}

.alert-success::before {
    background: var(--success-color);
}

.alert-danger::before {
    background: var(--danger-color);
}

.alert-warning::before {
    background: var(--warning-color);
}

.alert-info::before {
    background: var(--info-color);
}

/* تأثيرات الحركة والانتقالات المحسنة */
.card-animate {
    opacity: 0;
    transform: translateY(30px);
    animation: cardSlideUp 0.6s ease forwards;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-animate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-animate:nth-child(1) { animation-delay: 0.1s; }
.card-animate:nth-child(2) { animation-delay: 0.2s; }
.card-animate:nth-child(3) { animation-delay: 0.3s; }
.card-animate:nth-child(4) { animation-delay: 0.4s; }

@keyframes cardSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تأثيرات الانتقال للعناصر التفاعلية */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--bg-white);
    position: relative;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
    outline: none;
    background-color: #ffffff;
    transform: translateY(-1px);
}

.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    transition: transform 0.1s;
}

/* تأثيرات الصورة الشخصية */
.profile-image-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid var(--border-color);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.profile-image-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.profile-image-preview:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.profile-image-preview:hover::before {
    opacity: 1;
}

.profile-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-image-preview:hover img {
    transform: scale(1.1);
}

/* تأثيرات مؤشر قوة كلمة المرور */
.password-strength {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background-color: var(--danger-light);
    color: var(--danger-color);
    border: 1px solid var(--danger-border);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* تأثيرات التنبيهات */
.alert {
    border: none;
    border-radius: var(--border-radius-md);
    padding: 15px 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    animation: slideInDown 0.4s ease-out;
    transition: all 0.3s ease;
}

.alert.alert-success {
    animation: bounceIn 0.6s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* تأثيرات التحميل */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* تحسينات إضافية للتفاعل */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.form-group .form-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.form-control:focus + .form-label,
.form-control:focus ~ .form-label {
    color: var(--primary-color);
}

/* تأثيرات الظهور التدريجي */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-delay-1 {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.fade-in-delay-3 {
    animation: fadeIn 0.8s ease-out 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* أنماط متجاوبة محسنة لصفحة تحرير الملف الشخصي */
@media (max-width: 1200px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .profile-image-card {
        max-width: 450px;
        margin: 0 auto;
    }
    
    .content-card {
        padding: 1.5rem;
    }
}

@media (max-width: 992px) {
    .main-content {
        padding: 1rem;
    }
    
    .page-header {
        padding: 1rem 0;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .profile-grid {
        gap: 1.25rem;
    }
    
    .content-card {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 0.75rem;
    }
    
    .page-header {
        text-align: center;
        padding: 0.75rem 0;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .page-header p {
        font-size: 0.9rem;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .content-card {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }
    
    .content-card .card-header {
        padding: 15px 18px;
        margin: -18px -18px 20px -18px;
    }
    
    .content-card .card-header h5 {
        font-size: 1.1rem;
    }
    
    .profile-image-card {
        padding: 1rem;
        max-width: 320px;
        text-align: center;
    }
    
    .profile-image-preview {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .card-header h5 {
        font-size: 1.1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .form-control {
        padding: 0.6rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .btn-group-custom {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    .btn-group-custom .btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .privacy-info {
        padding: 0.75rem;
        margin-top: 1rem;
        border-radius: 8px;
        background: var(--bg-light);
    }
    
    .privacy-info small {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .page-header {
        padding: 0.5rem 0;
    }
    
    .page-header h1 {
        font-size: 1.25rem;
    }
    
    .content-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border-radius: 10px;
    }
    
    .profile-image-card {
        padding: 0.75rem;
        max-width: 280px;
    }
    
    .profile-image-preview {
        width: 100px;
        height: 100px;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    
    .form-control {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
        border-radius: 6px;
    }
    
    .btn-group-custom {
        gap: 0.5rem;
    }
    
    .privacy-info {
        padding: 0.6rem;
        margin-top: 0.75rem;
    }
    
    .privacy-info small {
        font-size: 0.75rem;
    }
    
    /* تحسين عرض النماذج على الشاشات الصغيرة */
    textarea.form-control {
        min-height: 80px;
    }
    
    .form-check {
        margin-top: 0.5rem;
    }
    
    .form-check-label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .activity-container {
        padding: 10px;
    }
    
    .page-header {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .page-header h1 {
        font-size: 1.4rem;
    }
    
    .content-card {
        padding: 0.6rem;
        margin-bottom: 0.6rem;
    }
    
    .content-card .card-header {
        padding: 12px 15px;
        margin: -15px -15px 15px -15px;
    }
    
    .profile-image-card {
        padding: 0.6rem;
        max-width: 250px;
    }
    
    .profile-image-preview {
        width: 80px;
        height: 80px;
    }
    
    .card-header h5 {
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 0.45rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
    
    .privacy-info small {
        font-size: 0.7rem;
    }
}

@media (max-width: 400px) {
    .content-card {
        padding: 0.6rem;
        margin-bottom: 0.6rem;
    }
    
    .profile-image-card {
        padding: 0.6rem;
        max-width: 250px;
    }
    
    .profile-image-preview {
        width: 80px;
        height: 80px;
    }
    
    .card-header h5 {
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 0.45rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
    
    .privacy-info small {
        font-size: 0.7rem;
    }
}
