/* profile.css - أنماط صفحة الملف الشخصي */


    
    
    /* index.css - كامل مع الإضافات وتحسينات الأداء */

    
    
    /* index.css - كامل مع الإضافات وتحسينات الأداء */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    font-size: clamp(14px, 2vw, 16px);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #1c1e21;
    overflow-x: hidden;
    padding-top: 3.75rem;
    padding-bottom: 4.375rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* الوضع الليلي */
body.dark-mode {
    background-color: #1e1e2f;
    color: #eee;
}
body.dark-mode .top-header,
body.dark-mode .top-options-bar,
body.dark-mode .bottom-nav,
body.dark-mode .auth-modal-content,
body.dark-mode .account-modal-content,
body.dark-mode .admin-panel-content,
body.dark-mode .pending-properties-content,
body.dark-mode .contact-content,
body.dark-mode .saved-content,
body.dark-mode .add-property-content,
body.dark-mode .property-card,
body.dark-mode .estimate-content,
body.dark-mode .filters-panel,
body.dark-mode .sidebar,
body.dark-mode .request-buttons,
body.dark-mode .requests-action-bar,
body.dark-mode .map-action-bar {
    background-color: #2d2d3a;
    color: #eee;
    border-color: #444;
}
body.dark-mode .option-btn,
body.dark-mode .filter-select,
body.dark-mode .icon-btn,
body.dark-mode .auth-btn,
body.dark-mode .account-btn,
body.dark-mode .close-btn,
body.dark-mode .action-btn,
body.dark-mode .btn-outline {
    background-color: #3a3a4a;
    color: #eee;
    border-color: #555;
}
body.dark-mode .nav-item {
    color: #aaa;
}
body.dark-mode .nav-item.active {
    color: #1877f2;
}




/* تحسين مظهر نافذة تفاصيل العقار */
   .property-details-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.625rem;
            margin-bottom: 0.9375rem;
        }
        
        .detail-item {
            background: #f0f2f5;
            padding: 0.625rem;
            border-radius: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .detail-label {
            font-size: 0.8125rem;
            color: #65676b;
        }
        
        .detail-value {
            font-weight: 600;
            color: #1c1e21;
        }
        
        .property-actions {
            display: flex;
            gap: 0.3125rem;
            padding: 0.625rem 0.9375rem;
            border-top: 1px solid #dddfe2;
        }
        

.rating-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
    padding: 12px;
    background: #f0f2f5;
    border-radius: 8px;
    font-size: 16px;
}

.rating-section i {
    font-size: 1.25rem;
}

.rating-number {
    color: #65676b;
    font-size: 1.25rem;
    margin-right: 5px;
}

.property-description {
    background: #f0f2f5;
    padding: 16px;
    border-radius: 8px;
    margin: 15px 0;
    line-height: 1.6;
    font-size: 14px;
    color: #1c1e21;
    white-space: pre-wrap;
}

.property-media {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #000;
}

.property-media img,
.property-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.property-media-swiper {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.property-media-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* الوضع الليلي */
body.dark-mode .property-details-grid {
    background: #3a3a4a;
}
body.dark-mode .detail-item {
    background: #2d2d3a;
}
body.dark-mode .detail-label {
    color: #aaa;
}
body.dark-mode .detail-value {
    color: #eee;
}
body.dark-mode .rating-section,
body.dark-mode .property-description {
    background: #3a3a4a;
    color: #eee;
}
body.dark-mode .rating-number {
    color: #aaa;
}

/* تحسين أزرار الإجراءات في النافذة */

/* الشريط العلوي */
.top-header {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 3.75rem;
    background: #fff;
    border-bottom: 1px solid #dddfe2;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    z-index: 1000;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo-container:hover {
    opacity: 0.8;
}

.logo {
    color: #1877f2;
    font-size: clamp(1.5rem, 5vw, 1.75rem);
}

.app-name {
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: bold;
    color: #1877f2;
}

.header-search {
    flex: 1;
    max-width: 31.25rem;
    margin: 0 1.25rem;
}

.search-box {
    width: 100%;
    padding: 0.625rem 0.9375rem;
    border: none;
    background: #f0f2f5;
    border-radius: 50px;
    font-size: 0.875rem;
    outline: none;
}

.header-icons {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #65676b;
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.icon-btn:hover {
    background-color: #f0f2f5;
    color: #1877f2;
}

/* زر القائمة */
#toggleSidebarBtn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #65676b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s;
}

#toggleSidebarBtn:hover {
    background-color: #f0f2f5;
    color: #1877f2;
}

/* القائمة الجانبية */
.sidebar {
    
    position: fixed;
    top: 3.75rem;
    right: 0;
    width: 280px;
    height: calc(70vh - 3.75rem);
    background: #fff;
    border-left: 1px solid #dddfe2;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #dddfe2;
}

.sidebar-header h3 {
    font-size: 1.125rem;
    color: #1877f2;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #65676b;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 0;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #1c1e21;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.9375rem;
}

.sidebar-menu a i {
    width: 20px;
    color: #1877f2;
    font-size: 1.125rem;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #f0f2f5;
}

.sidebar-actions {
    padding: 16px 20px;
    border-top: 1px solid #dddfe2;
}

.sidebar-actions h4 {
    margin-bottom: 10px;
    color: #1877f2;
    font-size: 0.95rem;
}

.sidebar-action-btn {
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 8px;
    border: none;
    border-radius: 5px;
    background: #f0f2f5;
    color: #1c1e21;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.sidebar-action-btn:hover {
    background: #e4e6eb;
}

.auth-sidebar-buttons {
    padding: 16px 20px;
    border-top: 1px solid #dddfe2;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-sidebar-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    width: 100%;
}

.auth-sidebar-btn.login {
    background: #1877f2;
    color: white;
}

.auth-sidebar-btn.register {
    background: #42b72a;
    color: white;
}

.auth-sidebar-btn.logout {
    background: #e74c3c;
    color: white;
}

.auth-sidebar-btn.admin {
    background: #9b59b6;
    color: white;
}

/* ========== أشرطة الإجراءات الجديدة ========== */
.requests-action-bar,
.map-action-bar {
    position: fixed;
    right: 0;
    left: 0;
    background: white;
    border-bottom: 1px solid #dddfe2;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    z-index: 999;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    
        
}







.requests-action-bar {
    top: 3.75rem; /* أسفل الهيدر مباشرة */
}

.map-action-bar {
    top: calc(3.75rem + 50px); /* أسفل شريط الطلبات */
}

/* تنسيق الأزرار في الأشرطة */
.requests-action-bar .action-btn,
.map-action-bar .action-btn {
    background: #f0f2f5;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: #65676b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
    
        
}


#addRequestBtn {
    
    background-color:#2196F3;
        
}


#viewRequestsBtn {
    
    background-color:#4CAF50;
        
}



.requests-action-bar .action-btn:hover,
.map-action-bar .action-btn:hover {
    background: #e4e6eb;
}

.requests-action-bar .action-btn:active,
.map-action-bar .action-btn:active {
    transform: scale(0.95);
}

/* الخريطة - تعديل الموضع ليتناسب مع الأشرطة */
#map {
    position: fixed;
    top: calc(3.75rem + 100px); /* ارتفاع الهيدر + شريطين */
    right: 0;
    left: 0;
    bottom: 4.375rem; /* ارتفاع الشريط السفلي */
    width: auto;
    height: auto;
    margin: 0 1.25rem 1.25rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #dddfe2;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-interactive {
    will-change: transform;
}

/* تحسين أداء الخريطة في حالة ضعف الاتصال (اختياري) */
.leaflet-tile {
    filter: blur(0);
    image-rendering: optimizeQuality;
}

.slow-network .leaflet-tile {
    filter: blur(2px);
    transition: filter 0.3s;
}

/* ماركر السعر */
.price-marker {
    background: white !important;
    border: 2px solid #4CAF50;
    border-radius: 90px 90px 1px 90px;
    padding: 0.375rem 0;
    font-weight: bold;
    font-size: 0.75rem;
    color: #333;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    cursor: pointer;
    min-width: 100%;
    position: relative;
    transition: all 0.3s ease;
    opacity: 1 !important;
}

.price-marker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-radius: 90px 90px 1px 90px;
    z-index: -1;
}

.price-marker:hover {
    background: #f8f9fa !important;
    border-color: #2196F3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.price-marker:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.price-marker.for-sale {
    border-color: #2ecc71;
    color: #2ecc71;
}

.price-marker.for-rent-below {
    border-color: #e74c3c;
    color: #e74c3c;
}

.price-marker.ready {
    border-width: 3px;
    font-weight: 800;
}

.price-marker .price-tag {
    font-size: 0.875rem;
    font-weight: bold;
}

.price-marker .currency {
    font-size: 0.625rem;
    margin-right: 2px;
}

/* الشريط السفلي */
.bottom-nav {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 4.375rem;
    background: white;
    border-top: 1px solid #dddfe2;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

   .bottom-nav {
        height: 3.75rem;
    }

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #65676b;
    padding: 0.625rem 0.9375rem;
    border-radius: 10px;
    transition: all 0.3s;
    position: relative;
}

.nav-item.active {
    color: #1877f2;
    background: rgba(24, 119, 242, 0.1);
}

.nav-icon {
    font-size: 1.25rem;
    margin-bottom: 0.3125rem;
}

.nav-text {
    font-size: 0.75rem;
    font-weight: 500;
}

/* عناصر التحميل */
.loader {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1002;
}

.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1877f2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.9375rem 1.25rem;
    border-radius: 10px;
    z-index: 1002;
    display: none;
    text-align: center;
}

/* نافذة البوب أب للعقار */
  .leaflet-popup-content-wrapper {
            border-radius: 10px !important;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
            border: 1px solid #dddfe2;
            pointer-events: auto;
        }
        
.leaflet-popup-content {
    max-height: 300px;
    overflow-y: auto;
    pointer-events: auto;
    margin: 10px;
    padding-left: 5px;
}

.leaflet-popup-content::-webkit-scrollbar {
    width: 6px;
}
.leaflet-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.leaflet-popup-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}
.leaflet-popup-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.property-popup {
    min-width: 250px;
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.popup-avatar {
    width: 1.875rem;
    height: 1.875rem;
    background: linear-gradient(45deg, #1877f2, #00a400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
}

.popup-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1c1e21;
}

.popup-price {
    color: #1877f2;
    font-weight: bold;
    font-size: 1rem;
    margin: 5px 0;
}

.popup-description {
    white-space: pre-wrap;
    font-size: 0.75rem;
    color: #65676b;
    margin-bottom: 10px;
    line-height: 1.4;
}

.popup-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.popup-btn {
    flex: 1;
    padding: 0.5rem 0.625rem;
    border: none;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s;
}

.popup-btn.details {
    background: #f0f2f5;
    color: #65676b;
}

.popup-btn.whatsapp {
    background: #25D366;
    color: white;
}

.popup-btn.save {
    background: #f0f2f5;
    color: #e74c3c;
}

.popup-btn.save.saved {
    background: #e74c3c;
    color: white;
}

.popup-btn.delete {
    background: #e74c3c;
    color: white;
}

.popup-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ========== لوحة الفلاتر الجانبية ========== */
.filters-panel {
    position: fixed;
    top: 3.75rem; /* أسفل الهيدر مباشرة */
    right: 0;
    width: 320px;
    max-width: calc(100% - 20px);
    max-height: calc(100vh - 4rem); /* ارتفاع الشاشة ناقص الهيدر ومسافة صغيرة */
    background: #fff;
    border: 1px solid #dddfe2;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto; /* تمكين التمرير العمودي */
    display: flex;
    flex-direction: column;
}

/* رأس الفلاتر (ثابت عند التمرير) */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #dddfe2;
    background: inherit;
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(5px);
}

/* محتوى الفلاتر */
.filters-content {
    padding: 16px;
    flex: 1;
}

/* إظهار اللوحة */
.filters-panel.open {
    transform: translateX(0);
}

/* زر الإغلاق */
.close-filters {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #65676b;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 50%;
    transition: background 0.2s;
}
.close-filters:hover {
    background: rgba(0,0,0,0.05);
}

/* تخصيص شريط التمرير */
.filters-panel::-webkit-scrollbar {
    width: 6px;
}
.filters-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.filters-panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}
.filters-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== باقي الأنماط للمودالات والإدخالات (من الكود السابق) ===== */

/* مودال تسجيل الدخول */
.auth-modal-content {
    background: white;
    padding: 1.875rem;
    border-radius: 10px;
    width: 90%;
    max-width: 28.125rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.4s ease-out;
    position: relative;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #f0f2f5;
}

.auth-tab {
    flex: 1;
    padding: 0.625rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #65676b;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: #1877f2;
    border-bottom-color: #1877f2;
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.auth-panel h3 {
    margin-bottom: 1.25rem;
    color: #1877f2;
    text-align: center;
}

.form-group {
    margin-bottom: 0.9375rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3125rem;
    font-weight: 600;
    color: #1c1e21;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #dddfe2;
    border-radius: 5px;
    font-size: 0.875rem;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1877f2;
}

.error-message {
    color: #e41e3f;
    margin-bottom: 0.9375rem;
    display: none;
    text-align: center;
    font-size: 0.875rem;
}

.auth-btn {
    width: 100%;
    padding: 0.75rem;
    background: #1877f2;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.625rem;
    transition: background 0.3s;
}

.auth-btn:hover {
    background: #166fe5;
}

.admin-login-link {
    text-align: center;
    margin-top: 0.625rem;
}

.admin-login-link a {
    color: #1877f2;
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
}

.admin-login-link a:hover {
    text-decoration: underline;
}

.close-btn {
    position: absolute;
    top: 0.9375rem;
    left: 0.9375rem;
    background: rgba(0,0,0,0.1);
    color: #65676b;
    border: none;
    width: 2.1875rem;
    height: 2.1875rem;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(231, 76, 60, 0.9);
    color: white;
    transform: rotate(90deg);
}

/* مودال الحساب */
.account-modal-content {
    background: white;
    padding: 1.875rem;
    border-radius: 10px;
    width: 90%;
    max-width: 25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
    text-align: center;
}

.account-modal-content h3 {
    color: #1877f2;
    margin-bottom: 1.25rem;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
}

.account-info {
    margin-bottom: 1.25rem;
    text-align: right;
}

.account-info p {
    margin: 0.625rem 0;
    font-size: 1rem;
}

.account-info strong {
    color: #1877f2;
}

.account-edit-input {
    width: 100%;
    padding: 0.5rem;
    margin: 0.3125rem 0 0.9375rem;
    border: 1px solid #dddfe2;
    border-radius: 5px;
    font-size: 0.875rem;
    display: none;
}

.account-edit-input.show {
    display: block;
}

.account-buttons {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
}

.account-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s;
}

.account-btn.edit {
    background: #f0f2f5;
    color: #65676b;
}

.account-btn.save {
    background: #00a400;
    color: white;
}

.account-btn.cancel {
    background: #e74c3c;
    color: white;
}

.account-btn.logout {
    background: #1877f2;
    color: white;
}

.account-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* مودال الطلبات */
#addRequestModal .modal-content,
#viewRequestsModal .modal-content {
    max-width: 500px;
}

#requestsList {
    max-height: 400px;
    overflow-y: auto;
}

#requestsList div {
    border-bottom: 1px solid #ddd;
    padding: 10px;
}

#requestsList a {
    color: #25D366;
    text-decoration: none;
    font-weight: bold;
}

#requestsList a:hover {
    text-decoration: underline;
}

/* تنسيق حقل الهاتف في الطلبات (من اليسار لليمين) */
#requestPhone {
    direction: ltr;
    text-align: left;
}

/* مودال إضافة عقار */
.add-property-content {
    background: white;
    padding: 1.875rem;
    border-radius: 10px;
    width: 90%;
    max-width: 31.25rem;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.4s ease-out;
    position: relative;
}

.media-options {
    display: flex;
    gap: 0.625rem;
    margin-bottom: 0.625rem;
}

.media-option {
    flex: 1;
    padding: 0.625rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: #f5f5f5;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.875rem;
}

.media-option:hover {
    background: #e9e9e9;
}

.media-option.active {
    border-color: #1877f2;
    background: #e7f3ff;
}

.media-input-group {
    display: none;
}

.media-input-group.active {
    display: block;
}

.multiple-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 0.625rem;
}

.image-preview-item {
    width: 5rem;
    height: 5rem;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid #ddd;
    position: relative;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-image {
    position: absolute;
    top: 0.125rem;
    right: 0.125rem;
    background: rgba(255,0,0,0.7);
    color: white;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
}

.file-preview {
    margin-top: 0.625rem;
    display: none;
}

.file-preview video {
    width: 100%;
    max-height: 200px;
}

.form-buttons {
    display: flex;
    gap: 0.625rem;
    margin-top: 1.25rem;
}

.form-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
}

.form-btn.save {
    background: #00a400;
    color: white;
}

.form-btn.cancel {
    background: #f0f2f5;
    color: #65676b;
}

/* مودال تفاصيل العقار */
   .property-card {
            display: flex;
            flex-direction: column;
            max-height: 90vh;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
            width: 90%;
            margin: auto;
            animation: cardSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }
        
        .property-header {
            padding: 0.9375rem;
            border-bottom: 1px solid #dddfe2;
            display: flex;
            align-items: center;
            gap: 0.625rem;
            position: relative;
        }
        
        .property-avatar {
            width: 2.5rem;
            height: 2.5rem;
            background: linear-gradient(45deg, #1877f2, #00a400);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 0.875rem;
        }
        
        .property-info {
            flex: 1;
        }
        
        .property-title {
            font-weight: 600;
            font-size: 1rem;
            margin-bottom: 0.125rem;
        }
        
        .property-meta {
            color: #65676b;
            font-size: 0.8125rem;
        }
        
        .property-content {
            flex: 1;
            overflow-y: auto;
            padding: 0.9375rem;
        }
        
        .property-description {
            white-space: pre-wrap;
            line-height: 1.5;
            margin-bottom: 0.9375rem;
            color: #1c1e21;
            font-size: 0.9375rem;
        }
        
        .property-media {
            width: 100%;
            margin-bottom: 0.9375rem;
            border-radius: 8px;
            overflow: hidden;
        }
        
        .property-video-container {
            position: relative;
            width: 100%;
            margin-bottom: 0.9375rem;
            border-radius: 8px;
            overflow: hidden;
            background: #000;
        }
        
        .property-video {
            width: 100%;
            height: 18.75rem;
            object-fit: contain;
            display: block;
        }
        
        .property-image {
            width: 100%;
            max-height: 18.75rem;
            object-fit: cover;
            border-radius: 8px;
            cursor: pointer;
        }
        

.swiper {
    width: 100%;
    height: 18.75rem;
    border-radius: 8px;
    margin-bottom: 0.9375rem;
    cursor: pointer;
}

.swiper-slide img,
.swiper-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-button-prev,
.swiper-button-next {
    color: white;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
}

.swiper-pagination-bullet-active {
    background: #1877f2;
}

/* مودال الصور المكبرة */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.875rem;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 3.125rem;
    cursor: pointer;
    padding: 1.25rem;
    user-select: none;
    z-index: 2001;
}

.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.lightbox-prev:hover,
.lightbox-next:hover {
    color: #1877f2;
}

/* مودال تقدير السعر */
.estimate-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.estimate-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
}

.estimate-content h3 {
    color: #1877f2;
    margin-bottom: 1rem;
    text-align: center;
}

.estimate-result {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #e7f3ff;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #1877f2;
}

.estimate-range {
    color: #65676b;
    font-size: 0.9rem;
}

/* مودال تأكيد الحذف */
.confirm-delete-content {
    background: white;
    padding: 1.875rem;
    border-radius: 10px;
    width: 90%;
    max-width: 25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    text-align: center;
}

.confirm-delete-content h3 {
    margin-bottom: 0.9375rem;
    color: #e74c3c;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
}

.confirm-delete-content p {
    margin-bottom: 1.25rem;
    color: #666;
}

.confirm-delete-buttons {
    display: flex;
    gap: 0.625rem;
}

.confirm-btn {
    flex: 1;
    padding: 0.625rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
}

.confirm-btn.delete { background: #e74c3c; color: white; }
.confirm-btn.cancel { background: #f0f2f5; color: #65676b; }

/* شارة الإشعار */
.notification-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

/* الإشعارات المنبثقة */
.notification {
    
    position: fixed;
    top: 6.25rem;
    right: 0.25rem;
    padding: 0.9375rem 1.25rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1003;
    box-shadow: 10px 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease, slideOut 0.3s ease 2.7s;
    max-width: 18.75rem;
    font-size: 1.2375rem;
}

.notification.success { background: #10b981; }
.notification.error { background: #ef4444; }
.notification.info { background: #1877f2; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(50px) rotateX(10deg); }
    to { opacity: 1; transform: translateY(0) rotateX(0); }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* تحسينات للأجهزة اللوحية والصغيرة */
@media (max-width: 768px) {
    .header-search { display: none; }
    #map {
        top: calc(3.125rem + 90px);
        bottom: 3.75rem;
        margin: 0 0.625rem 0.625rem;
    }
    .top-header {
        padding: 0 0.625rem;
        height: 3.125rem;
    }
    .logo-container {
        gap: 0.3125rem;
    }
    .logo {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
    }
    .app-name {
        font-size: clamp(0.875rem, 4vw, 1rem);
    }
    .icon-btn {
        font-size: 1.125rem;
        padding: 0.375rem;
    }
    #toggleSidebarBtn {
        font-size: 1.125rem;
        padding: 0.375rem;
    }
    .requests-action-bar {
        top: 3.125rem;
    }
    .map-action-bar {
        top: calc(3.125rem + 45px);
    }
    .filters-panel {
        top: 3.125rem;
        max-height: calc(100vh - 3.125rem);
    }
    .bottom-nav {
        height: 3.75rem;
    }
    .nav-icon {
        font-size: 1.125rem;
    }
    .nav-text {
        font-size: 0.6875rem;
    }
    .property-card {
        width: 95%;
    }
    .property-video {
        height: 12.5rem;
    }
    .swiper {
        height: 12.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 3.125rem;
        padding-bottom: 3.75rem;
    }
    .requests-action-bar .action-btn,
    .map-action-bar .action-btn {
        padding: 0.375rem 0.75rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 360px) {
    .requests-action-bar .action-btn,
    .map-action-bar .action-btn {
        padding: 0.3125rem 0.5rem;
        font-size: 0.6875rem;
    }
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    font-size: clamp(14px, 2vw, 16px);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #1c1e21;
    overflow-x: hidden;
    padding-top: 3.75rem;
    padding-bottom: 4.375rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* الوضع الليلي */
body.dark-mode {
    background-color: #1e1e2f;
    color: #eee;
}
body.dark-mode .top-header,
body.dark-mode .top-options-bar,
body.dark-mode .bottom-nav,
body.dark-mode .auth-modal-content,
body.dark-mode .account-modal-content,
body.dark-mode .admin-panel-content,
body.dark-mode .pending-properties-content,
body.dark-mode .contact-content,
body.dark-mode .saved-content,
body.dark-mode .add-property-content,
body.dark-mode .property-card,
body.dark-mode .estimate-content,
body.dark-mode .filters-panel,
body.dark-mode .sidebar,
body.dark-mode .request-buttons,
body.dark-mode .requests-action-bar,
body.dark-mode .map-action-bar {
    background-color: #2d2d3a;
    color: #eee;
    border-color: #444;
}
body.dark-mode .option-btn,
body.dark-mode .filter-select,
body.dark-mode .icon-btn,
body.dark-mode .auth-btn,
body.dark-mode .account-btn,
body.dark-mode .close-btn,
body.dark-mode .action-btn,
body.dark-mode .btn-outline {
    background-color: #3a3a4a;
    color: #eee;
    border-color: #555;
}
body.dark-mode .nav-item {
    color: #aaa;
}
body.dark-mode .nav-item.active {
    color: #1877f2;
}




/* تحسين مظهر نافذة تفاصيل العقار */
   .property-details-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.625rem;
            margin-bottom: 0.9375rem;
        }
        
        .detail-item {
            background: #f0f2f5;
            padding: 0.625rem;
            border-radius: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .detail-label {
            font-size: 0.8125rem;
            color: #65676b;
        }
        
        .detail-value {
            font-weight: 600;
            color: #1c1e21;
        }
        
        .property-actions {
            display: flex;
            gap: 0.3125rem;
            padding: 0.625rem 0.9375rem;
            border-top: 1px solid #dddfe2;
        }
        

.rating-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
    padding: 12px;
    background: #f0f2f5;
    border-radius: 8px;
    font-size: 16px;
}

.rating-section i {
    font-size: 1.25rem;
}

.rating-number {
    color: #65676b;
    font-size: 1.25rem;
    margin-right: 5px;
}

.property-description {
    background: #f0f2f5;
    padding: 16px;
    border-radius: 8px;
    margin: 15px 0;
    line-height: 1.6;
    font-size: 14px;
    color: #1c1e21;
    white-space: pre-wrap;
}

.property-media {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #000;
}

.property-media img,
.property-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.property-media-swiper {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.property-media-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* الوضع الليلي */
body.dark-mode .property-details-grid {
    background: #3a3a4a;
}
body.dark-mode .detail-item {
    background: #2d2d3a;
}
body.dark-mode .detail-label {
    color: #aaa;
}
body.dark-mode .detail-value {
    color: #eee;
}
body.dark-mode .rating-section,
body.dark-mode .property-description {
    background: #3a3a4a;
    color: #eee;
}
body.dark-mode .rating-number {
    color: #aaa;
}

/* تحسين أزرار الإجراءات في النافذة */

/* الشريط العلوي */
.top-header {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 3.75rem;
    background: #fff;
    border-bottom: 1px solid #dddfe2;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    z-index: 1000;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo-container:hover {
    opacity: 0.8;
}

.logo {
    color: #1877f2;
    font-size: clamp(1.5rem, 5vw, 1.75rem);
}

.app-name {
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: bold;
    color: #1877f2;
}

.header-search {
    flex: 1;
    max-width: 31.25rem;
    margin: 0 1.25rem;
}

.search-box {
    width: 100%;
    padding: 0.625rem 0.9375rem;
    border: none;
    background: #f0f2f5;
    border-radius: 50px;
    font-size: 0.875rem;
    outline: none;
}

.header-icons {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #65676b;
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.icon-btn:hover {
    background-color: #f0f2f5;
    color: #1877f2;
}

/* زر القائمة */
#toggleSidebarBtn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #65676b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s;
}

#toggleSidebarBtn:hover {
    background-color: #f0f2f5;
    color: #1877f2;
}

/* القائمة الجانبية */
.sidebar {
    
    position: fixed;
    top: 3.75rem;
    right: 0;
    width: 280px;
    height: calc(70vh - 3.75rem);
    background: #fff;
    border-left: 1px solid #dddfe2;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #dddfe2;
}

.sidebar-header h3 {
    font-size: 1.125rem;
    color: #1877f2;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #65676b;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 0;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #1c1e21;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.9375rem;
}

.sidebar-menu a i {
    width: 20px;
    color: #1877f2;
    font-size: 1.125rem;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #f0f2f5;
}

.sidebar-actions {
    padding: 16px 20px;
    border-top: 1px solid #dddfe2;
}

.sidebar-actions h4 {
    margin-bottom: 10px;
    color: #1877f2;
    font-size: 0.95rem;
}

.sidebar-action-btn {
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 8px;
    border: none;
    border-radius: 5px;
    background: #f0f2f5;
    color: #1c1e21;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.sidebar-action-btn:hover {
    background: #e4e6eb;
}

.auth-sidebar-buttons {
    padding: 16px 20px;
    border-top: 1px solid #dddfe2;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-sidebar-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    width: 100%;
}

.auth-sidebar-btn.login {
    background: #1877f2;
    color: white;
}

.auth-sidebar-btn.register {
    background: #42b72a;
    color: white;
}

.auth-sidebar-btn.logout {
    background: #e74c3c;
    color: white;
}

.auth-sidebar-btn.admin {
    background: #9b59b6;
    color: white;
}

/* ========== أشرطة الإجراءات الجديدة ========== */
.requests-action-bar,
.map-action-bar {
    position: fixed;
    right: 0;
    left: 0;
    background: white;
    border-bottom: 1px solid #dddfe2;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    z-index: 999;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    
        
}







.requests-action-bar {
    top: 3.75rem; /* أسفل الهيدر مباشرة */
}

.map-action-bar {
    top: calc(3.75rem + 50px); /* أسفل شريط الطلبات */
}

/* تنسيق الأزرار في الأشرطة */
.requests-action-bar .action-btn,
.map-action-bar .action-btn {
    background: #f0f2f5;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: #65676b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
    
        
}


#addRequestBtn {
    
    background-color:#2196F3;
        
}


#viewRequestsBtn {
    
    background-color:#4CAF50;
        
}



.requests-action-bar .action-btn:hover,
.map-action-bar .action-btn:hover {
    background: #e4e6eb;
}

.requests-action-bar .action-btn:active,
.map-action-bar .action-btn:active {
    transform: scale(0.95);
}

/* الخريطة - تعديل الموضع ليتناسب مع الأشرطة */
#map {
    position: fixed;
    top: calc(3.75rem + 100px); /* ارتفاع الهيدر + شريطين */
    right: 0;
    left: 0;
    bottom: 4.375rem; /* ارتفاع الشريط السفلي */
    width: auto;
    height: auto;
    margin: 0 1.25rem 1.25rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #dddfe2;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-interactive {
    will-change: transform;
}

/* تحسين أداء الخريطة في حالة ضعف الاتصال (اختياري) */
.leaflet-tile {
    filter: blur(0);
    image-rendering: optimizeQuality;
}

.slow-network .leaflet-tile {
    filter: blur(2px);
    transition: filter 0.3s;
}

/* ماركر السعر */
.price-marker {
    background: white !important;
    border: 2px solid #4CAF50;
    border-radius: 90px 90px 1px 90px;
    padding: 0.375rem 0;
    font-weight: bold;
    font-size: 0.75rem;
    color: #333;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    cursor: pointer;
    min-width: 100%;
    position: relative;
    transition: all 0.3s ease;
    opacity: 1 !important;
}

.price-marker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-radius: 90px 90px 1px 90px;
    z-index: -1;
}

.price-marker:hover {
    background: #f8f9fa !important;
    border-color: #2196F3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.price-marker:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.price-marker.for-sale {
    border-color: #2ecc71;
    color: #2ecc71;
}

.price-marker.for-rent-below {
    border-color: #e74c3c;
    color: #e74c3c;
}

.price-marker.ready {
    border-width: 3px;
    font-weight: 800;
}

.price-marker .price-tag {
    font-size: 0.875rem;
    font-weight: bold;
}

.price-marker .currency {
    font-size: 0.625rem;
    margin-right: 2px;
}

/* الشريط السفلي */
.bottom-nav {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 4.375rem;
    background: white;
    border-top: 1px solid #dddfe2;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #65676b;
    padding: 0.625rem 0.9375rem;
    border-radius: 10px;
    transition: all 0.3s;
    position: relative;
}

.nav-item.active {
    color: #1877f2;
    background: rgba(24, 119, 242, 0.1);
}

.nav-icon {
    font-size: 1.25rem;
    margin-bottom: 0.3125rem;
}

.nav-text {
    font-size: 0.75rem;
    font-weight: 500;
}

/* عناصر التحميل */
.loader {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1002;
}

.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1877f2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.9375rem 1.25rem;
    border-radius: 10px;
    z-index: 1002;
    display: none;
    text-align: center;
}

/* نافذة البوب أب للعقار */
  .leaflet-popup-content-wrapper {
            border-radius: 10px !important;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
            border: 1px solid #dddfe2;
            pointer-events: auto;
        }
        
.leaflet-popup-content {
    max-height: 300px;
    overflow-y: auto;
    pointer-events: auto;
    margin: 10px;
    padding-left: 5px;
}

.leaflet-popup-content::-webkit-scrollbar {
    width: 6px;
}
.leaflet-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}
.leaflet-popup-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}
.leaflet-popup-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.property-popup {
    min-width: 250px;
}

.popup-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.popup-avatar {
    width: 1.875rem;
    height: 1.875rem;
    background: linear-gradient(45deg, #1877f2, #00a400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.75rem;
}

.popup-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1c1e21;
}

.popup-price {
    color: #1877f2;
    font-weight: bold;
    font-size: 1rem;
    margin: 5px 0;
}

.popup-description {
    white-space: pre-wrap;
    font-size: 0.75rem;
    color: #65676b;
    margin-bottom: 10px;
    line-height: 1.4;
}

.popup-actions {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.popup-btn {
    flex: 1;
    padding: 0.5rem 0.625rem;
    border: none;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s;
}

.popup-btn.details {
    background: #f0f2f5;
    color: #65676b;
}

.popup-btn.whatsapp {
    background: #25D366;
    color: white;
}

.popup-btn.save {
    background: #f0f2f5;
    color: #e74c3c;
}

.popup-btn.save.saved {
    background: #e74c3c;
    color: white;
}

.popup-btn.delete {
    background: #e74c3c;
    color: white;
}

.popup-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ========== لوحة الفلاتر الجانبية ========== */
.filters-panel {
    position: fixed;
    top: 3.75rem; /* أسفل الهيدر مباشرة */
    right: 0;
    width: 320px;
    max-width: calc(100% - 20px);
    max-height: calc(100vh - 4rem); /* ارتفاع الشاشة ناقص الهيدر ومسافة صغيرة */
    background: #fff;
    border: 1px solid #dddfe2;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto; /* تمكين التمرير العمودي */
    display: flex;
    flex-direction: column;
}

/* رأس الفلاتر (ثابت عند التمرير) */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #dddfe2;
    background: inherit;
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(5px);
}

/* محتوى الفلاتر */
.filters-content {
    padding: 16px;
    flex: 1;
}

/* إظهار اللوحة */
.filters-panel.open {
    transform: translateX(0);
}

/* زر الإغلاق */
.close-filters {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #65676b;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 50%;
    transition: background 0.2s;
}
.close-filters:hover {
    background: rgba(0,0,0,0.05);
}

/* تخصيص شريط التمرير */
.filters-panel::-webkit-scrollbar {
    width: 6px;
}
.filters-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.filters-panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}
.filters-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== باقي الأنماط للمودالات والإدخالات (من الكود السابق) ===== */

/* مودال تسجيل الدخول */
.auth-modal-content {
    background: white;
    padding: 1.875rem;
    border-radius: 10px;
    width: 90%;
    max-width: 28.125rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.4s ease-out;
    position: relative;
}

.auth-tabs {
    display: flex;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #f0f2f5;
}

.auth-tab {
    flex: 1;
    padding: 0.625rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #65676b;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: #1877f2;
    border-bottom-color: #1877f2;
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.auth-panel h3 {
    margin-bottom: 1.25rem;
    color: #1877f2;
    text-align: center;
}

.form-group {
    margin-bottom: 0.9375rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3125rem;
    font-weight: 600;
    color: #1c1e21;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #dddfe2;
    border-radius: 5px;
    font-size: 0.875rem;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1877f2;
}

.error-message {
    color: #e41e3f;
    margin-bottom: 0.9375rem;
    display: none;
    text-align: center;
    font-size: 0.875rem;
}

.auth-btn {
    width: 100%;
    padding: 0.75rem;
    background: #1877f2;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.625rem;
    transition: background 0.3s;
}

.auth-btn:hover {
    background: #166fe5;
}

.admin-login-link {
    text-align: center;
    margin-top: 0.625rem;
}

.admin-login-link a {
    color: #1877f2;
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
}

.admin-login-link a:hover {
    text-decoration: underline;
}

.close-btn {
    position: absolute;
    top: 0.9375rem;
    left: 0.9375rem;
    background: rgba(0,0,0,0.1);
    color: #65676b;
    border: none;
    width: 2.1875rem;
    height: 2.1875rem;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(231, 76, 60, 0.9);
    color: white;
    transform: rotate(90deg);
}

/* مودال الحساب */
.account-modal-content {
    background: white;
    padding: 1.875rem;
    border-radius: 10px;
    width: 90%;
    max-width: 25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
    text-align: center;
}

.account-modal-content h3 {
    color: #1877f2;
    margin-bottom: 1.25rem;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
}

.account-info {
    margin-bottom: 1.25rem;
    text-align: right;
}

.account-info p {
    margin: 0.625rem 0;
    font-size: 1rem;
}

.account-info strong {
    color: #1877f2;
}

.account-edit-input {
    width: 100%;
    padding: 0.5rem;
    margin: 0.3125rem 0 0.9375rem;
    border: 1px solid #dddfe2;
    border-radius: 5px;
    font-size: 0.875rem;
    display: none;
}

.account-edit-input.show {
    display: block;
}

.account-buttons {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
}

.account-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s;
}

.account-btn.edit {
    background: #f0f2f5;
    color: #65676b;
}

.account-btn.save {
    background: #00a400;
    color: white;
}

.account-btn.cancel {
    background: #e74c3c;
    color: white;
}

.account-btn.logout {
    background: #1877f2;
    color: white;
}

.account-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* مودال الطلبات */
#addRequestModal .modal-content,
#viewRequestsModal .modal-content {
    max-width: 500px;
}

#requestsList {
    max-height: 400px;
    overflow-y: auto;
}

#requestsList div {
    border-bottom: 1px solid #ddd;
    padding: 10px;
}

#requestsList a {
    color: #25D366;
    text-decoration: none;
    font-weight: bold;
}

#requestsList a:hover {
    text-decoration: underline;
}

/* تنسيق حقل الهاتف في الطلبات (من اليسار لليمين) */
#requestPhone {
    direction: ltr;
    text-align: left;
}

/* مودال إضافة عقار */
.add-property-content {
    background: white;
    padding: 1.875rem;
    border-radius: 10px;
    width: 90%;
    max-width: 31.25rem;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.4s ease-out;
    position: relative;
}

.media-options {
    display: flex;
    gap: 0.625rem;
    margin-bottom: 0.625rem;
}

.media-option {
    flex: 1;
    padding: 0.625rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: #f5f5f5;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.875rem;
}

.media-option:hover {
    background: #e9e9e9;
}

.media-option.active {
    border-color: #1877f2;
    background: #e7f3ff;
}

.media-input-group {
    display: none;
}

.media-input-group.active {
    display: block;
}

.multiple-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 0.625rem;
}

.image-preview-item {
    width: 5rem;
    height: 5rem;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid #ddd;
    position: relative;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-item .remove-image {
    position: absolute;
    top: 0.125rem;
    right: 0.125rem;
    background: rgba(255,0,0,0.7);
    color: white;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
}

.file-preview {
    margin-top: 0.625rem;
    display: none;
}

.file-preview video {
    width: 100%;
    max-height: 200px;
}

.form-buttons {
    display: flex;
    gap: 0.625rem;
    margin-top: 1.25rem;
}

.form-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
}

.form-btn.save {
    background: #00a400;
    color: white;
}

.form-btn.cancel {
    background: #f0f2f5;
    color: #65676b;
}

/* مودال تفاصيل العقار */
   .property-card {
            display: flex;
            flex-direction: column;
            max-height: 90vh;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
            width: 90%;
            margin: auto;
            animation: cardSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            border: 1px solid rgba(0, 0, 0, 0.1);
        }
        
        .property-header {
            padding: 0.9375rem;
            border-bottom: 1px solid #dddfe2;
            display: flex;
            align-items: center;
            gap: 0.625rem;
            position: relative;
        }
        
        .property-avatar {
            width: 2.5rem;
            height: 2.5rem;
            background: linear-gradient(45deg, #1877f2, #00a400);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 0.875rem;
        }
        
        .property-info {
            flex: 1;
        }
        
        .property-title {
            font-weight: 600;
            font-size: 1rem;
            margin-bottom: 0.125rem;
        }
        
        .property-meta {
            color: #65676b;
            font-size: 0.8125rem;
        }
        
        .property-content {
            flex: 1;
            overflow-y: auto;
            padding: 0.9375rem;
        }
        
        .property-description {
            white-space: pre-wrap;
            line-height: 1.5;
            margin-bottom: 0.9375rem;
            color: #1c1e21;
            font-size: 0.9375rem;
        }
        
        .property-media {
            width: 100%;
            margin-bottom: 0.9375rem;
            border-radius: 8px;
            overflow: hidden;
        }
        
        .property-video-container {
            position: relative;
            width: 100%;
            margin-bottom: 0.9375rem;
            border-radius: 8px;
            overflow: hidden;
            background: #000;
        }
        
        .property-video {
            width: 100%;
            height: 18.75rem;
            object-fit: contain;
            display: block;
        }
        
        .property-image {
            width: 100%;
            max-height: 18.75rem;
            object-fit: cover;
            border-radius: 8px;
            cursor: pointer;
        }
        

.swiper {
    width: 100%;
    height: 18.75rem;
    border-radius: 8px;
    margin-bottom: 0.9375rem;
    cursor: pointer;
}

.swiper-slide img,
.swiper-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-button-prev,
.swiper-button-next {
    color: white;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
}

.swiper-pagination-bullet-active {
    background: #1877f2;
}

/* مودال الصور المكبرة */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.875rem;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 3.125rem;
    cursor: pointer;
    padding: 1.25rem;
    user-select: none;
    z-index: 2001;
}

.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.lightbox-prev:hover,
.lightbox-next:hover {
    color: #1877f2;
}

/* مودال تقدير السعر */
.estimate-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.estimate-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
}

.estimate-content h3 {
    color: #1877f2;
    margin-bottom: 1rem;
    text-align: center;
}

.estimate-result {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #e7f3ff;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #1877f2;
}

.estimate-range {
    color: #65676b;
    font-size: 0.9rem;
}

/* مودال تأكيد الحذف */
.confirm-delete-content {
    background: white;
    padding: 1.875rem;
    border-radius: 10px;
    width: 90%;
    max-width: 25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    text-align: center;
}

.confirm-delete-content h3 {
    margin-bottom: 0.9375rem;
    color: #e74c3c;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
}

.confirm-delete-content p {
    margin-bottom: 1.25rem;
    color: #666;
}

.confirm-delete-buttons {
    display: flex;
    gap: 0.625rem;
}

.confirm-btn {
    flex: 1;
    padding: 0.625rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
}

.confirm-btn.delete { background: #e74c3c; color: white; }
.confirm-btn.cancel { background: #f0f2f5; color: #65676b; }

/* شارة الإشعار */
.notification-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

/* الإشعارات المنبثقة */
.notification {
    position: fixed;
    top: 6.25rem;
    right: 1.25rem;
    padding: 0.9375rem 1.25rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1003;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease, slideOut 0.3s ease 2.7s;
    max-width: 18.75rem;
    font-size: 0.9375rem;
}

.notification.success { background: #10b981; }
.notification.error { background: #ef4444; }
.notification.info { background: #1877f2; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(50px) rotateX(10deg); }
    to { opacity: 1; transform: translateY(0) rotateX(0); }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* تحسينات للأجهزة اللوحية والصغيرة */
@media (max-width: 768px) {
    .header-search { display: none; }
    #map {
        top: calc(3.125rem + 90px);
        bottom: 3.75rem;
        margin: 0 0.625rem 0.625rem;
    }
    .top-header {
        padding: 0 0.625rem;
        height: 3.125rem;
    }
    .logo-container {
        gap: 0.3125rem;
    }
    .logo {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
    }
    .app-name {
        font-size: clamp(0.875rem, 4vw, 1rem);
    }
    .icon-btn {
        font-size: 1.125rem;
        padding: 0.375rem;
    }
    #toggleSidebarBtn {
        font-size: 1.125rem;
        padding: 0.375rem;
    }
    .requests-action-bar {
        top: 3.125rem;
    }
    .map-action-bar {
        top: calc(3.125rem + 45px);
    }
    .filters-panel {
        top: 3.125rem;
        max-height: calc(100vh - 3.125rem);
    }
    .bottom-nav {
        height: 3.75rem;
    }
    .nav-icon {
        font-size: 1.125rem;
    }
    .nav-text {
        font-size: 0.6875rem;
    }
    .property-card {
        width: 95%;
    }
    .property-video {
        height: 12.5rem;
    }
    .swiper {
        height: 12.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 3.125rem;
        padding-bottom: 3.75rem;
    }
    .requests-action-bar .action-btn,
    .map-action-bar .action-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 360px) {
    .requests-action-bar .action-btn,
    .map-action-bar .action-btn {
        padding: 0.3125rem 0.5rem;
        font-size: 0.6875rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #1c1e21;
    line-height: 1.34;
    min-height: 100vh;
    padding-bottom: 70px;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: #1e1e2f;
    color: #eee;
}
body.dark-mode .top-header,
body.dark-mode .profile-container,
body.dark-mode .bottom-nav,
body.dark-mode .auth-modal-content,
body.dark-mode .account-modal-content,
body.dark-mode .modal-content,
body.dark-mode .sidebar,
body.dark-mode .post-card,
body.dark-mode .request-item,
body.dark-mode #agencyInfo {
    background-color: #2d2d3a;
    color: #eee;
    border-color: #444;
}
body.dark-mode .btn-outline,
body.dark-mode .auth-btn,
body.dark-mode .close-btn,
body.dark-mode .sidebar-action-btn,
body.dark-mode .auth-sidebar-btn {
    background-color: #3a3a4a;
    color: #eee;
    border-color: #555;
}
body.dark-mode .nav-item {
    color: #aaa;
}
body.dark-mode .nav-item.active {
    color: #1877f2;
}

/* الشريط العلوي */
.top-header {
    position: sticky;
    top: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background-color: #ffffff;
    border-bottom: 1px solid #dddfe2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo-container:hover {
    opacity: 0.8;
}

.logo {
    font-size: clamp(24px, 6vw, 28px);
    color: #1877f2;
}

.site-title {
    font-size: clamp(16px, 4vw, 20px);
    font-weight: 700;
    color: #1877f2;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #1877f2;
    color: white;
}

.btn-primary:hover {
    background-color: #166fe5;
}

.btn-secondary {
    background-color: #42b72a;
    color: white;
}

.btn-secondary:hover {
    background-color: #36a420;
}

.btn-outline {
    background-color: #f0f2f5;
    color: #65676b;
}

.btn-outline:hover {
    background-color: #e4e6eb;
}

#toggleSidebarBtn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #65676b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s;
}

#toggleSidebarBtn:hover {
    background-color: #f0f2f5;
    color: #1877f2;
}

/* القائمة الجانبية */
.sidebar {
    position: fixed;
    top: 60px;
    right: 0;
    width: 280px;
    height: calc(100vh - 60px);
    background: #fff;
    border-left: 1px solid #dddfe2;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #dddfe2;
}

.sidebar-header h3 {
    font-size: 1.125rem;
    color: #1877f2;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #65676b;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 0;
}

.sidebar-menu li {
    margin-bottom: 4px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #1c1e21;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.9375rem;
}

.sidebar-menu a i {
    width: 20px;
    color: #1877f2;
    font-size: 1.125rem;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #f0f2f5;
}

.sidebar-actions {
    padding: 16px 20px;
    border-top: 1px solid #dddfe2;
}

.sidebar-actions h4 {
    margin-bottom: 10px;
    color: #1877f2;
    font-size: 0.95rem;
}

.sidebar-action-btn {
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 8px;
    border: none;
    border-radius: 5px;
    background: #f0f2f5;
    color: #1c1e21;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.sidebar-action-btn:hover {
    background: #e4e6eb;
}

.auth-sidebar-buttons {
    padding: 16px 20px;
    border-top: 1px solid #dddfe2;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-sidebar-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 5px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    width: 100%;
}

.auth-sidebar-btn.login {
    background: #1877f2;
    color: white;
}

.auth-sidebar-btn.register {
    background: #42b72a;
    color: white;
}

.auth-sidebar-btn.logout {
    background: #e74c3c;
    color: white;
}

.auth-sidebar-btn.admin {
    background: #9b59b6;
    color: white;
}

/* المحتوى الرئيسي */
.profile-container {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* صورة الغلاف */
.profile-cover {
    height: 150px;
    background: linear-gradient(135deg, #1877f2, #42b72a);
    position: relative;
}

.profile-avatar-wrapper {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1877f2;
    color: white;
    border: 2px solid white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.2s;
}

.edit-avatar-btn:hover {
    transform: scale(1.1);
}

/* معلومات المستخدم */
.profile-info {
    text-align: center;
    padding: 70px 20px 20px;
}

.profile-info h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-info p {
    color: #65676b;
    font-size: 14px;
    margin-bottom: 8px;
}

.profile-coins {
    background: #e7f3ff;
    color: #1877f2;
    padding: 6px 16px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
}

/* التبويبات */
.profile-tabs {
    display: flex;
    border-bottom: 1px solid #dddfe2;
    padding: 0 10px;
    overflow-x: auto;
    white-space: nowrap;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: #65676b;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #1877f2;
}

.tab-btn.active {
    color: #1877f2;
    border-bottom-color: #1877f2;
}

/* محتوى التبويبات */
.tab-content {
    padding: 20px;
}

/* منشوراتي */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.post-card {
    background: #f0f2f5;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dddfe2;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.post-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.post-info {
    padding: 10px;
}

.post-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.post-info .price {
    color: #1877f2;
    font-weight: 600;
    font-size: 13px;
}

/* طلباتي */
.requests-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.request-item {
    background: #f0f2f5;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #dddfe2;
    transition: background 0.2s;
}

.request-item:hover {
    background: #e4e6eb;
}

.request-item a {
    color: #25D366;
    text-decoration: none;
    font-weight: 500;
}

.request-item a:hover {
    text-decoration: underline;
}

/* معلومات الوكالة */
#agencyInfo {
    background: #f0f2f5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dddfe2;
}

#createAgencyBtn {
    width: 100%;
}

/* الإعدادات */
.settings-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #1c1e21;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #dddfe2;
    border-radius: 5px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #1877f2;
}

/* الشريط السفلي */
.bottom-nav {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 70px;
    background: white;
    border-top: 1px solid #dddfe2;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #65676b;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
    flex: 1;
    max-width: 70px;
}

.nav-item.active {
    color: #1877f2;
    background: rgba(24, 119, 242, 0.1);
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.nav-text {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.notification-badge {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    background: #e74c3c;
    color: white;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.admin-only {
    display: none;
}

.admin-only.visible {
    display: flex;
}

/* المودالات */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-title {
    text-align: center;
    margin-bottom: 20px;
    color: #1877f2;
}

.close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.1);
    color: #65676b;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(231, 76, 60, 0.9);
    color: white;
    transform: rotate(90deg);
}

/* عنصر التحميل */
.loader {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1002;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1877f2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    z-index: 1002;
    display: none;
    text-align: center;
}

/* الإشعارات المنبثقة */
.notification {
    position: fixed;
    top: 100px;
    right: 50%;
    transform: translateX(50%);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideDown 0.3s ease;
}

.notification.success { background-color: #e7f6ea; color: #0a7c2f; border: 1px solid #a8e6b9; }
.notification.error { background-color: #fde8e8; color: #c53030; border: 1px solid #fecaca; }
.notification.info { background-color: #e7f3ff; color: #1877f2; border: 1px solid #bbdfff; }

@keyframes slideDown {
    from { transform: translateX(50%) translateY(-20px); opacity: 0; }
    to { transform: translateX(50%) translateY(0); opacity: 1; }
}

/* استجابة */
@media (max-width: 768px) {
    .profile-container {
        margin: 10px;
    }
    .profile-tabs {
        justify-content: flex-start;
    }
    .posts-grid {
        grid-template-columns: 1fr;
    }
    .header-actions .btn span {
        display: none;
    }
    .header-actions .btn i {
        margin: 0;
    }
}