/* list.css - أنماط خاصة بصفحة قائمة العقارات */

/* list.css - أنماط خاصة بصفحة قائمة العقارات */


/* list.css - أنماط خاصة بصفحة قائمة العقارات */

* {
    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 .filters-container,
body.dark-mode .listing-card,
body.dark-mode .featured-section,
body.dark-mode .bottom-nav-bar,
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 .chart-container,
body.dark-mode .property-details-modal .property-card,
body.dark-mode .estimate-content,
body.dark-mode .request-buttons,
body.dark-mode .sidebar,
body.dark-mode .agents-section {
    background-color: #2d2d3a;
    color: #eee;
    border-color: #444;
}
body.dark-mode .option-btn,
body.dark-mode .filter-select,
body.dark-mode .add-property-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,
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;
}

/* الشريط العلوي (مطابق لـ index) */
.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;
}

.add-property-btn {
    background-color: #1877f2;
    color: white;
    border: none;
    padding: 8px clamp(8px, 2vw, 16px);
    border-radius: 6px;
    font-size: clamp(12px, 3vw, 14px);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

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

.theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #65676b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: #f0f2f5;
}

/* زر القائمة */
#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;
}

/* القائمة الجانبية (مطابقة لـ index) */
.sidebar {
    position: fixed;
    top: 60px;
    right: 0;
    width: 280px;
    height: calc(50vh - 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;
}

/* المحتوى الرئيسي */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* شريط أزرار الطلبات */
.request-buttons {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    border: 1px solid #dddfe2;
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
}

.request-btn {
    flex: 1;
    max-width: 200px;
}

/* قسم الوكلاء */
.agents-section {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 16px;
    border: 1px solid #dddfe2;
}

.agents-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1877f2;
}

.agents-list {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.agents-list::-webkit-scrollbar {
    height: 6px;
}

.agents-list::-webkit-scrollbar-track {
    background: #e4e6eb;
    border-radius: 10px;
}

.agents-list::-webkit-scrollbar-thumb {
    background: #1877f2;
    border-radius: 10px;
}

.agent-card {
    flex: 0 0 auto;
    width: 120px;
    background: #f0f2f5;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.agent-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 3px solid #1877f2;
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-stats {
    font-size: 12px;
    color: #65676b;
    display: flex;
    justify-content: center;
    gap: 8px;
}

body.dark-mode .agent-card {
    background: #3a3a4a;
    color: #eee;
}

body.dark-mode .agent-stats {
    color: #aaa;
}

/* قسم العقارات المميزة */
.featured-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.featured-title {
    font-size: clamp(16px, 4vw, 20px);
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.featured-list::-webkit-scrollbar {
    height: 6px;
}
.featured-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}
.featured-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
}

.featured-item {
    background: rgba(255,255,255,0.15);
    padding: 10px 15px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.featured-item:hover {
    background: rgba(255,255,255,0.25);
}

.featured-item-price {
    font-weight: bold;
    color: #ffd700;
}

/* فلاتر البحث */
.filters-container {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid #dddfe2;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.filters-container::-webkit-scrollbar {
    height: 6px;
}
.filters-container::-webkit-scrollbar-track {
    background: #e4e6eb;
    border-radius: 10px;
}
.filters-container::-webkit-scrollbar-thumb {
    background: #1877f2;
    border-radius: 10px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: auto;
}

.filter-label {
    font-size: 14px;
    color: #65676b;
    font-weight: 500;
    white-space: nowrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    background-color: #f0f2f5;
    font-size: 14px;
    color: #1c1e21;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-select:focus {
    outline: none;
    border-color: #1877f2;
    background-color: #ffffff;
}

/* الرسم البياني */
.chart-container {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* قائمة العقارات */
.listings-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.listing-card {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #dddfe2;
    overflow: hidden;
    position: relative;
}

.listing-card.sold {
    opacity: 0.8;
    position: relative;
}

.listing-card.sold::after {
    content: "تم البيع";
    position: absolute;
    top: 20px;
    right: -30px;
    background: #e74c3c;
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.listing-card.featured {
    border: 3px solid gold;
    box-shadow: 0 0 20px gold;
}

.listing-card.low-price {
    border-right: 5px solid #4CAF50;
}
.listing-card.medium-price {
    border-right: 5px solid #FF9800;
}
.listing-card.high-price {
    border-right: 5px solid #f44336;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: gold;
    color: #000;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.media-container, .youtube-container, .swiper {
    height: 320px;
}

.swiper {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

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

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

.swiper-button-prev:after, .swiper-button-next:after {
    font-size: 18px;
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.7;
}

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

.youtube-container {
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.media-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.play-video-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 12px;
    transition: transform 0.2s, background-color 0.2s;
}

.play-video-btn:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.3);
}

.video-placeholder-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.youtube-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    background: #000;
}

.listing-content {
    padding: 16px;
}

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.listing-title {
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 600;
    color: #1c1e21;
    line-height: 1.4;
    flex: 1;
    white-space: pre-wrap;
}

.price-tag {
    background-color: #e7f3ff;
    color: #1877f2;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 600;
    white-space: nowrap;
}

.virtual-tour-badge {
    background-color: #9b59b6;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 10px;
}

.rating-stars {
    color: #f1c40f;
    font-size: 14px;
    margin: 5px 0;
}

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

.listing-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #65676b;
}

.detail-icon {
    color: #1877f2;
    font-size: 14px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-ready {
    background-color: #e7f6ea;
    color: #0a7c2f;
}

.status-not-ready {
    background-color: #fef2e8;
    color: #c55400;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dddfe2;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1 1 auto;
    min-width: 90px;
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    font-size: clamp(11px, 3vw, 13px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #f0f2f5;
    color: #65676b;
}

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

.like-btn.liked {
    background-color: #e7f3ff;
    color: #1877f2;
}

.save-btn.saved {
    background-color: #fff9e6;
    color: #f39c12;
}

.delete-btn.visible {
    display: flex;
    background-color: #fef2f2;
    color: #dc2626;
}

.featured-btn.featured {
    background-color: gold;
    color: #000;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.whatsapp-btn:hover {
    background-color: #1da851;
}

.comments-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 12px;
}

.comments-section.expanded {
    max-height: 300px;
}

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

.comments-title {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.comment-item {
    background-color: #f0f2f5;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: #1c1e21;
}

.comment-form {
    margin-top: 12px;
}

.comment-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    background-color: #f0f2f5;
    font-size: 14px;
    color: #1c1e21;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 8px;
}

.comment-textarea:focus {
    outline: none;
    border-color: #1877f2;
    background-color: #ffffff;
}

.submit-comment-btn {
    background-color: #1877f2;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.rating-input {
    display: flex;
    gap: 5px;
    margin: 10px 0;
    direction: ltr;
    flex-wrap: wrap;
}

.rating-input i {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-input i.active {
    color: #f1c40f;
}

.similar-properties {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dddfe2;
}

.similar-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1877f2;
}

.similar-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.similar-item {
    min-width: 150px;
    background: #f0f2f5;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

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

.similar-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.similar-item-price {
    font-weight: bold;
    color: #1877f2;
    margin-top: 5px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #dddfe2;
}

.no-results i {
    font-size: 48px;
    color: #bec3c9;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 18px;
    color: #1c1e21;
    margin-bottom: 8px;
}

.no-results p {
    font-size: 14px;
    color: #65676b;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #65676b;
    font-size: 14px;
}

.error-display {
    background-color: #fde8e8;
    color: #c53030;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 16px;
}

/* الشريط السفلي (مطابق لـ index) */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 70px;
    background-color: #ffffff;
    backdrop-filter: blur(20px);
    border-top: 1px solid #dddfe2;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 5px;
}

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

.nav-item:hover {
    color: #1877f2;
    background-color: #f0f2f5;
}

.nav-item.active {
    color: #1877f2;
}

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

.nav-text {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.notification-badge {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e41e3f;
    color: white;
    font-size: 10px;
    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;
}

/* ==================== المودالات (كما هي من قبل) ==================== */
/* (لن أكررها هنا للاختصار، لكنها موجودة في ملف list.css الأصلي) */

/* عنصر التحميل */
.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) {
    .top-header { padding: 0 8px; }
    .header-actions { gap: 5px; }
    .add-property-btn { padding: 6px 10px; font-size: 12px; }
    .theme-toggle { width: 36px; height: 36px; font-size: 18px; }
    .request-btn { max-width: none; }
    .action-buttons { flex-direction: column; }
    .action-btn { width: 100%; }
    .rating-input i { font-size: 20px; }
    .agents-list { gap: 10px; }
    .agent-card { width: 100px; }
    .agent-avatar { width: 60px; height: 60px; }
}



* {
    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 .filters-container,
body.dark-mode .listing-card,
body.dark-mode .stat-card,
body.dark-mode .featured-section,
body.dark-mode .bottom-nav-bar,
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 .chart-container,
body.dark-mode .property-details-modal .property-card,
body.dark-mode .estimate-content,
body.dark-mode .request-buttons {
    background-color: #2d2d3a;
    color: #eee;
    border-color: #444;
}
body.dark-mode .option-btn,
body.dark-mode .filter-select,
body.dark-mode .add-property-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;
}

.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;
}

.add-property-btn {
    background-color: #1877f2;
    color: white;
    border: none;
    padding: 8px clamp(8px, 2vw, 16px);
    border-radius: 6px;
    font-size: clamp(12px, 3vw, 14px);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

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

.theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #65676b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: #f0f2f5;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* شريط أزرار الطلبات (مثل index) */
.request-buttons {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    border: 1px solid #dddfe2;
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
}

.request-btn {
    flex: 1;
    max-width: 200px;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 15px 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #1877f2;
}

.stat-label {
    color: #65676b;
    font-size: 14px;
}

.featured-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.featured-title {
    font-size: clamp(16px, 4vw, 20px);
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.featured-list::-webkit-scrollbar {
    height: 6px;
}
.featured-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}
.featured-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
}

.featured-item {
    background: rgba(255,255,255,0.15);
    padding: 10px 15px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.featured-item:hover {
    background: rgba(255,255,255,0.25);
}

.featured-item-price {
    font-weight: bold;
    color: #ffd700;
}

.filters-container {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid #dddfe2;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.filters-container::-webkit-scrollbar {
    height: 6px;
}
.filters-container::-webkit-scrollbar-track {
    background: #e4e6eb;
    border-radius: 10px;
}
.filters-container::-webkit-scrollbar-thumb {
    background: #1877f2;
    border-radius: 10px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: auto;
}

.filter-label {
    font-size: 14px;
    color: #65676b;
    font-weight: 500;
    white-space: nowrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    background-color: #f0f2f5;
    font-size: 14px;
    color: #1c1e21;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-select:focus {
    outline: none;
    border-color: #1877f2;
    background-color: #ffffff;
}

.chart-container {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.listings-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.listing-card {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #dddfe2;
    overflow: hidden;
    position: relative;
}

.listing-card.sold {
    opacity: 0.8;
    position: relative;
}

.listing-card.sold::after {
    content: "تم البيع";
    position: absolute;
    top: 20px;
    right: -30px;
    background: #e74c3c;
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.listing-card.featured {
    border: 3px solid gold;
    box-shadow: 0 0 20px gold;
}

.listing-card.low-price {
    border-right: 5px solid #4CAF50;
}
.listing-card.medium-price {
    border-right: 5px solid #FF9800;
}
.listing-card.high-price {
    border-right: 5px solid #f44336;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: gold;
    color: #000;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.media-container, .youtube-container, .swiper {
    height: 320px;
}

.swiper {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

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

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

.swiper-button-prev:after, .swiper-button-next:after {
    font-size: 18px;
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.7;
}

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

.youtube-container {
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.media-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.play-video-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 12px;
    transition: transform 0.2s, background-color 0.2s;
}

.play-video-btn:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.3);
}

.video-placeholder-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.youtube-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    background: #000;
}

.listing-content {
    padding: 16px;
}

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.listing-title {
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 600;
    color: #1c1e21;
    line-height: 1.4;
    flex: 1;
    white-space: pre-wrap;
}

.price-tag {
    background-color: #e7f3ff;
    color: #1877f2;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 600;
    white-space: nowrap;
}

.virtual-tour-badge {
    background-color: #9b59b6;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 10px;
}

.rating-stars {
    color: #f1c40f;
    font-size: 14px;
    margin: 5px 0;
}

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

.listing-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #65676b;
}

.detail-icon {
    color: #1877f2;
    font-size: 14px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-ready {
    background-color: #e7f6ea;
    color: #0a7c2f;
}

.status-not-ready {
    background-color: #fef2e8;
    color: #c55400;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dddfe2;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1 1 auto;
    min-width: 90px;
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    font-size: clamp(11px, 3vw, 13px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #f0f2f5;
    color: #65676b;
}

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

.like-btn.liked {
    background-color: #e7f3ff;
    color: #1877f2;
}

.save-btn.saved {
    background-color: #fff9e6;
    color: #f39c12;
}

.delete-btn.visible {
    display: flex;
    background-color: #fef2f2;
    color: #dc2626;
}

.featured-btn.featured {
    background-color: gold;
    color: #000;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.whatsapp-btn:hover {
    background-color: #1da851;
}

.comments-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 12px;
}

.comments-section.expanded {
    max-height: 300px;
}

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

.comments-title {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.comment-item {
    background-color: #f0f2f5;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: #1c1e21;
}

.comment-form {
    margin-top: 12px;
}

.comment-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    background-color: #f0f2f5;
    font-size: 14px;
    color: #1c1e21;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 8px;
}

.comment-textarea:focus {
    outline: none;
    border-color: #1877f2;
    background-color: #ffffff;
}

.submit-comment-btn {
    background-color: #1877f2;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.rating-input {
    display: flex;
    gap: 5px;
    margin: 10px 0;
    direction: ltr;
    flex-wrap: wrap;
}

.rating-input i {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-input i.active {
    color: #f1c40f;
}

.similar-properties {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dddfe2;
}

.similar-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1877f2;
}

.similar-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.similar-item {
    min-width: 150px;
    background: #f0f2f5;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

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

.similar-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.similar-item-price {
    font-weight: bold;
    color: #1877f2;
    margin-top: 5px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #dddfe2;
}

.no-results i {
    font-size: 48px;
    color: #bec3c9;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 18px;
    color: #1c1e21;
    margin-bottom: 8px;
}

.no-results p {
    font-size: 14px;
    color: #65676b;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #65676b;
    font-size: 14px;
}

.error-display {
    background-color: #fde8e8;
    color: #c53030;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 16px;
}

.property-details-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);
}

.property-card {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.property-header {
    padding: 15px;
    border-bottom: 1px solid #dddfe2;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.property-info {
    flex: 1;
}

.property-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
}

.property-meta {
    color: #65676b;
    font-size: 13px;
}

.property-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

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

.property-media video,
.property-media img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.property-description {
    white-space: pre-wrap;
    line-height: 1.5;
    margin-bottom: 15px;
}

.property-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.detail-item {
    background: #f0f2f5;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 13px;
    color: #65676b;
}

.detail-value {
    font-weight: 600;
    color: #1c1e21;
}

.property-actions {
    display: flex;
    gap: 5px;
    padding: 15px;
    border-top: 1px solid #dddfe2;
}

.property-actions .action-btn {
    flex: 1;
}

.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2001;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

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

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

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 2002;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    cursor: pointer;
    padding: 20px;
    z-index: 2002;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 70px;
    background-color: #ffffff;
    backdrop-filter: blur(20px);
    border-top: 1px solid #dddfe2;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 5px;
}

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

.nav-item:hover {
    color: #1877f2;
    background-color: #f0f2f5;
}

.nav-item.active {
    color: #1877f2;
}

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

.nav-text {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.notification-badge {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e41e3f;
    color: white;
    font-size: 10px;
    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;
}

/* ==================== المودالات ==================== */
.auth-modal, .account-modal, .admin-panel-modal, .pending-properties-modal, .contact-modal, .saved-modal, .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);
}

.auth-modal-content, .account-modal-content, .admin-panel-content, .pending-properties-content, .contact-content, .saved-content, .estimate-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
}

.estimate-content {
    max-width: 400px;
}

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

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

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

.auth-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #65676b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

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

.auth-panel {
    display: none;
}

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

.error-message {
    color: #e41e3f;
    margin-bottom: 15px;
    display: none;
    text-align: center;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: #1877f2;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
}

.admin-login-link {
    text-align: center;
    margin-top: 10px;
}

.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);
}

.users-table, .pending-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.users-table th, .users-table td, .pending-table th, .pending-table td {
    border: 1px solid #dddfe2;
    padding: 8px;
    text-align: center;
}

.add-coins-btn {
    background: #00a400;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.admin-panel-close, .pending-close {
    background: #f0f2f5;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: block;
    margin: 20px auto 0;
}

.approve-btn { background: #00a400; color: white; }
.reject-btn { background: #e74c3c; color: white; }
.view-btn { background: #1877f2; color: white; }

.account-info {
    margin-bottom: 20px;
    text-align: right;
}

.account-edit-input {
    width: 100%;
    padding: 8px;
    margin: 5px 0 15px;
    border: 1px solid #dddfe2;
    border-radius: 5px;
    display: none;
}

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

.account-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.account-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.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; }

.contact-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
}

.notification {
    position: fixed;
    top: 80px;
    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; }
}

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

@media (max-width: 600px) {
    .top-header { padding: 0 8px; }
    .request-btn { max-width: none; }
    .action-buttons { flex-direction: column; }
    .action-btn { width: 100%; }
    .rating-input i { font-size: 20px; }
}
/* list.css - أنماط خاصة بصفحة قائمة العقارات */

* {
    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 .filters-container,
body.dark-mode .listing-card,
body.dark-mode .featured-section,
body.dark-mode .bottom-nav-bar,
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 .chart-container,
body.dark-mode .property-details-modal .property-card,
body.dark-mode .estimate-content,
body.dark-mode .request-buttons,
body.dark-mode .sidebar,
body.dark-mode .agents-section {
    background-color: #2d2d3a;
    color: #eee;
    border-color: #444;
}
body.dark-mode .option-btn,
body.dark-mode .filter-select,
body.dark-mode .add-property-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,
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;
}

/* الشريط العلوي (مطابق لـ index) */
.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;
}

.add-property-btn {
    background-color: #1877f2;
    color: white;
    border: none;
    padding: 8px clamp(8px, 2vw, 16px);
    border-radius: 6px;
    font-size: clamp(12px, 3vw, 14px);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

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

.theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #65676b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: #f0f2f5;
}

/* زر القائمة */
#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;
}

/* القائمة الجانبية (مطابقة لـ index) */
.sidebar {
    position: fixed;
    top: 60px;
    right: 0;
    width: 280px;
    height: calc(50vh - 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;
}

/* المحتوى الرئيسي */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* شريط أزرار الطلبات */
.request-buttons {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    border: 1px solid #dddfe2;
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
}

.request-btn {
    flex: 1;
    max-width: 200px;
}

/* قسم الوكلاء */
.agents-section {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 16px;
    border: 1px solid #dddfe2;
}

.agents-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1877f2;
}

.agents-list {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.agents-list::-webkit-scrollbar {
    height: 6px;
}

.agents-list::-webkit-scrollbar-track {
    background: #e4e6eb;
    border-radius: 10px;
}

.agents-list::-webkit-scrollbar-thumb {
    background: #1877f2;
    border-radius: 10px;
}

.agent-card {
    flex: 0 0 auto;
    width: 120px;
    background: #f0f2f5;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.agent-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 10px;
    border: 3px solid #1877f2;
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-stats {
    font-size: 12px;
    color: #65676b;
    display: flex;
    justify-content: center;
    gap: 8px;
}

body.dark-mode .agent-card {
    background: #3a3a4a;
    color: #eee;
}

body.dark-mode .agent-stats {
    color: #aaa;
}

/* قسم العقارات المميزة */
.featured-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.featured-title {
    font-size: clamp(16px, 4vw, 20px);
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.featured-list::-webkit-scrollbar {
    height: 6px;
}
.featured-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}
.featured-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
}

.featured-item {
    background: rgba(255,255,255,0.15);
    padding: 10px 15px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.featured-item:hover {
    background: rgba(255,255,255,0.25);
}

.featured-item-price {
    font-weight: bold;
    color: #ffd700;
}

/* فلاتر البحث */
.filters-container {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid #dddfe2;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.filters-container::-webkit-scrollbar {
    height: 6px;
}
.filters-container::-webkit-scrollbar-track {
    background: #e4e6eb;
    border-radius: 10px;
}
.filters-container::-webkit-scrollbar-thumb {
    background: #1877f2;
    border-radius: 10px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: auto;
}

.filter-label {
    font-size: 14px;
    color: #65676b;
    font-weight: 500;
    white-space: nowrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    background-color: #f0f2f5;
    font-size: 14px;
    color: #1c1e21;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-select:focus {
    outline: none;
    border-color: #1877f2;
    background-color: #ffffff;
}

/* الرسم البياني */
.chart-container {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* قائمة العقارات */
.listings-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.listing-card {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #dddfe2;
    overflow: hidden;
    position: relative;
}

.listing-card.sold {
    opacity: 0.8;
    position: relative;
}

.listing-card.sold::after {
    content: "تم البيع";
    position: absolute;
    top: 20px;
    right: -30px;
    background: #e74c3c;
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.listing-card.featured {
    border: 3px solid gold;
    box-shadow: 0 0 20px gold;
}

.listing-card.low-price {
    border-right: 5px solid #4CAF50;
}
.listing-card.medium-price {
    border-right: 5px solid #FF9800;
}
.listing-card.high-price {
    border-right: 5px solid #f44336;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: gold;
    color: #000;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.media-container, .youtube-container, .swiper {
    height: 320px;
}

.swiper {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

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

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

.swiper-button-prev:after, .swiper-button-next:after {
    font-size: 18px;
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.7;
}

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

.youtube-container {
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.media-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.play-video-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 12px;
    transition: transform 0.2s, background-color 0.2s;
}

.play-video-btn:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.3);
}

.video-placeholder-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.youtube-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    background: #000;
}

.listing-content {
    padding: 16px;
}

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.listing-title {
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 600;
    color: #1c1e21;
    line-height: 1.4;
    flex: 1;
    white-space: pre-wrap;
}

.price-tag {
    background-color: #e7f3ff;
    color: #1877f2;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 600;
    white-space: nowrap;
}

.virtual-tour-badge {
    background-color: #9b59b6;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 10px;
}

.rating-stars {
    color: #f1c40f;
    font-size: 14px;
    margin: 5px 0;
}

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

.listing-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #65676b;
}

.detail-icon {
    color: #1877f2;
    font-size: 14px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-ready {
    background-color: #e7f6ea;
    color: #0a7c2f;
}

.status-not-ready {
    background-color: #fef2e8;
    color: #c55400;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dddfe2;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1 1 auto;
    min-width: 90px;
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    font-size: clamp(11px, 3vw, 13px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #f0f2f5;
    color: #65676b;
}

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

.like-btn.liked {
    background-color: #e7f3ff;
    color: #1877f2;
}

.save-btn.saved {
    background-color: #fff9e6;
    color: #f39c12;
}

.delete-btn.visible {
    display: flex;
    background-color: #fef2f2;
    color: #dc2626;
}

.featured-btn.featured {
    background-color: gold;
    color: #000;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.whatsapp-btn:hover {
    background-color: #1da851;
}

.comments-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 12px;
}

.comments-section.expanded {
    max-height: 300px;
}

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

.comments-title {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.comment-item {
    background-color: #f0f2f5;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: #1c1e21;
}

.comment-form {
    margin-top: 12px;
}

.comment-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    background-color: #f0f2f5;
    font-size: 14px;
    color: #1c1e21;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 8px;
}

.comment-textarea:focus {
    outline: none;
    border-color: #1877f2;
    background-color: #ffffff;
}

.submit-comment-btn {
    background-color: #1877f2;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.rating-input {
    display: flex;
    gap: 5px;
    margin: 10px 0;
    direction: ltr;
    flex-wrap: wrap;
}

.rating-input i {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-input i.active {
    color: #f1c40f;
}

.similar-properties {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dddfe2;
}

.similar-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1877f2;
}

.similar-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.similar-item {
    min-width: 150px;
    background: #f0f2f5;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

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

.similar-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.similar-item-price {
    font-weight: bold;
    color: #1877f2;
    margin-top: 5px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #dddfe2;
}

.no-results i {
    font-size: 48px;
    color: #bec3c9;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 18px;
    color: #1c1e21;
    margin-bottom: 8px;
}

.no-results p {
    font-size: 14px;
    color: #65676b;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #65676b;
    font-size: 14px;
}

.error-display {
    background-color: #fde8e8;
    color: #c53030;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 16px;
}

/* الشريط السفلي (مطابق لـ index) */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 70px;
    background-color: #ffffff;
    backdrop-filter: blur(20px);
    border-top: 1px solid #dddfe2;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 5px;
}

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

.nav-item:hover {
    color: #1877f2;
    background-color: #f0f2f5;
}

.nav-item.active {
    color: #1877f2;
}

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

.nav-text {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.notification-badge {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e41e3f;
    color: white;
    font-size: 10px;
    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;
}

/* ==================== المودالات (كما هي من قبل) ==================== */
/* (لن أكررها هنا للاختصار، لكنها موجودة في ملف list.css الأصلي) */

/* عنصر التحميل */
.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) {
    .top-header { padding: 0 8px; }
    .header-actions { gap: 5px; }
    .add-property-btn { padding: 6px 10px; font-size: 12px; }
    .theme-toggle { width: 36px; height: 36px; font-size: 18px; }
    .request-btn { max-width: none; }
    .action-buttons { flex-direction: column; }
    .action-btn { width: 100%; }
    .rating-input i { font-size: 20px; }
    .agents-list { gap: 10px; }
    .agent-card { width: 100px; }
    .agent-avatar { width: 60px; height: 60px; }
}



* {
    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 .filters-container,
body.dark-mode .listing-card,
body.dark-mode .stat-card,
body.dark-mode .featured-section,
body.dark-mode .bottom-nav-bar,
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 .chart-container,
body.dark-mode .property-details-modal .property-card,
body.dark-mode .estimate-content,
body.dark-mode .request-buttons {
    background-color: #2d2d3a;
    color: #eee;
    border-color: #444;
}
body.dark-mode .option-btn,
body.dark-mode .filter-select,
body.dark-mode .add-property-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;
}

.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;
}

.add-property-btn {
    background-color: #1877f2;
    color: white;
    border: none;
    padding: 8px clamp(8px, 2vw, 16px);
    border-radius: 6px;
    font-size: clamp(12px, 3vw, 14px);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

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

.theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #65676b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: #f0f2f5;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* شريط أزرار الطلبات (مثل index) */
.request-buttons {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    border: 1px solid #dddfe2;
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    white-space: nowrap;
}

.request-btn {
    flex: 1;
    max-width: 200px;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 15px 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #1877f2;
}

.stat-label {
    color: #65676b;
    font-size: 14px;
}

.featured-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.featured-title {
    font-size: clamp(16px, 4vw, 20px);
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.featured-list::-webkit-scrollbar {
    height: 6px;
}
.featured-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}
.featured-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.5);
    border-radius: 10px;
}

.featured-item {
    background: rgba(255,255,255,0.15);
    padding: 10px 15px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.featured-item:hover {
    background: rgba(255,255,255,0.25);
}

.featured-item-price {
    font-weight: bold;
    color: #ffd700;
}

.filters-container {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid #dddfe2;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.filters-container::-webkit-scrollbar {
    height: 6px;
}
.filters-container::-webkit-scrollbar-track {
    background: #e4e6eb;
    border-radius: 10px;
}
.filters-container::-webkit-scrollbar-thumb {
    background: #1877f2;
    border-radius: 10px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: auto;
}

.filter-label {
    font-size: 14px;
    color: #65676b;
    font-weight: 500;
    white-space: nowrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    background-color: #f0f2f5;
    font-size: 14px;
    color: #1c1e21;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-select:focus {
    outline: none;
    border-color: #1877f2;
    background-color: #ffffff;
}

.chart-container {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.listings-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.listing-card {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #dddfe2;
    overflow: hidden;
    position: relative;
}

.listing-card.sold {
    opacity: 0.8;
    position: relative;
}

.listing-card.sold::after {
    content: "تم البيع";
    position: absolute;
    top: 20px;
    right: -30px;
    background: #e74c3c;
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.listing-card.featured {
    border: 3px solid gold;
    box-shadow: 0 0 20px gold;
}

.listing-card.low-price {
    border-right: 5px solid #4CAF50;
}
.listing-card.medium-price {
    border-right: 5px solid #FF9800;
}
.listing-card.high-price {
    border-right: 5px solid #f44336;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: gold;
    color: #000;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.media-container, .youtube-container, .swiper {
    height: 320px;
}

.swiper {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

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

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

.swiper-button-prev:after, .swiper-button-next:after {
    font-size: 18px;
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.7;
}

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

.youtube-container {
    position: relative;
    overflow: hidden;
    background-color: #000;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.media-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.play-video-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 12px;
    transition: transform 0.2s, background-color 0.2s;
}

.play-video-btn:hover {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.3);
}

.video-placeholder-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.youtube-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    background: #000;
}

.listing-content {
    padding: 16px;
}

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.listing-title {
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 600;
    color: #1c1e21;
    line-height: 1.4;
    flex: 1;
    white-space: pre-wrap;
}

.price-tag {
    background-color: #e7f3ff;
    color: #1877f2;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: clamp(13px, 3vw, 15px);
    font-weight: 600;
    white-space: nowrap;
}

.virtual-tour-badge {
    background-color: #9b59b6;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 10px;
}

.rating-stars {
    color: #f1c40f;
    font-size: 14px;
    margin: 5px 0;
}

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

.listing-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #65676b;
}

.detail-icon {
    color: #1877f2;
    font-size: 14px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-ready {
    background-color: #e7f6ea;
    color: #0a7c2f;
}

.status-not-ready {
    background-color: #fef2e8;
    color: #c55400;
}

.action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dddfe2;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1 1 auto;
    min-width: 90px;
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    font-size: clamp(11px, 3vw, 13px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #f0f2f5;
    color: #65676b;
}

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

.like-btn.liked {
    background-color: #e7f3ff;
    color: #1877f2;
}

.save-btn.saved {
    background-color: #fff9e6;
    color: #f39c12;
}

.delete-btn.visible {
    display: flex;
    background-color: #fef2f2;
    color: #dc2626;
}

.featured-btn.featured {
    background-color: gold;
    color: #000;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.whatsapp-btn:hover {
    background-color: #1da851;
}

.comments-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 12px;
}

.comments-section.expanded {
    max-height: 300px;
}

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

.comments-title {
    font-size: 15px;
    font-weight: 600;
    color: #1c1e21;
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.comment-item {
    background-color: #f0f2f5;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    color: #1c1e21;
}

.comment-form {
    margin-top: 12px;
}

.comment-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    background-color: #f0f2f5;
    font-size: 14px;
    color: #1c1e21;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 8px;
}

.comment-textarea:focus {
    outline: none;
    border-color: #1877f2;
    background-color: #ffffff;
}

.submit-comment-btn {
    background-color: #1877f2;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.rating-input {
    display: flex;
    gap: 5px;
    margin: 10px 0;
    direction: ltr;
    flex-wrap: wrap;
}

.rating-input i {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-input i.active {
    color: #f1c40f;
}

.similar-properties {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dddfe2;
}

.similar-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1877f2;
}

.similar-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.similar-item {
    min-width: 150px;
    background: #f0f2f5;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

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

.similar-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
}

.similar-item-price {
    font-weight: bold;
    color: #1877f2;
    margin-top: 5px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #dddfe2;
}

.no-results i {
    font-size: 48px;
    color: #bec3c9;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 18px;
    color: #1c1e21;
    margin-bottom: 8px;
}

.no-results p {
    font-size: 14px;
    color: #65676b;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #65676b;
    font-size: 14px;
}

.error-display {
    background-color: #fde8e8;
    color: #c53030;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 16px;
}

.property-details-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);
}

.property-card {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.property-header {
    padding: 15px;
    border-bottom: 1px solid #dddfe2;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.property-info {
    flex: 1;
}

.property-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
}

.property-meta {
    color: #65676b;
    font-size: 13px;
}

.property-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

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

.property-media video,
.property-media img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.property-description {
    white-space: pre-wrap;
    line-height: 1.5;
    margin-bottom: 15px;
}

.property-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.detail-item {
    background: #f0f2f5;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-size: 13px;
    color: #65676b;
}

.detail-value {
    font-weight: 600;
    color: #1c1e21;
}

.property-actions {
    display: flex;
    gap: 5px;
    padding: 15px;
    border-top: 1px solid #dddfe2;
}

.property-actions .action-btn {
    flex: 1;
}

.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2001;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

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

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

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 2002;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    cursor: pointer;
    padding: 20px;
    z-index: 2002;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 70px;
    background-color: #ffffff;
    backdrop-filter: blur(20px);
    border-top: 1px solid #dddfe2;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 5px;
}

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

.nav-item:hover {
    color: #1877f2;
    background-color: #f0f2f5;
}

.nav-item.active {
    color: #1877f2;
}

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

.nav-text {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.notification-badge {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e41e3f;
    color: white;
    font-size: 10px;
    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;
}

/* ==================== المودالات ==================== */
.auth-modal, .account-modal, .admin-panel-modal, .pending-properties-modal, .contact-modal, .saved-modal, .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);
}

.auth-modal-content, .account-modal-content, .admin-panel-content, .pending-properties-content, .contact-content, .saved-content, .estimate-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
}

.estimate-content {
    max-width: 400px;
}

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

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

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

.auth-tab {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #65676b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

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

.auth-panel {
    display: none;
}

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

.error-message {
    color: #e41e3f;
    margin-bottom: 15px;
    display: none;
    text-align: center;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: #1877f2;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
}

.admin-login-link {
    text-align: center;
    margin-top: 10px;
}

.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);
}

.users-table, .pending-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.users-table th, .users-table td, .pending-table th, .pending-table td {
    border: 1px solid #dddfe2;
    padding: 8px;
    text-align: center;
}

.add-coins-btn {
    background: #00a400;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.admin-panel-close, .pending-close {
    background: #f0f2f5;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: block;
    margin: 20px auto 0;
}

.approve-btn { background: #00a400; color: white; }
.reject-btn { background: #e74c3c; color: white; }
.view-btn { background: #1877f2; color: white; }

.account-info {
    margin-bottom: 20px;
    text-align: right;
}

.account-edit-input {
    width: 100%;
    padding: 8px;
    margin: 5px 0 15px;
    border: 1px solid #dddfe2;
    border-radius: 5px;
    display: none;
}

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

.account-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.account-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.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; }

.contact-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
}

.notification {
    position: fixed;
    top: 80px;
    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; }
}

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

@media (max-width: 600px) {
    .top-header { padding: 0 8px; }
    .request-btn { max-width: none; }
    .action-buttons { flex-direction: column; }
    .action-btn { width: 100%; }
    .rating-input i { font-size: 20px; }
}
/* ========== Slider السعر ========== */
#priceSlider {
    margin: 15px 0;
    height: 10px;
    border: none;
    background: #e4e6eb;
    border-radius: 5px;
}

#priceSlider .noUi-connect {
    background: #1877f2;
}

#priceSlider .noUi-handle {
    width: 24px;
    height: 24px;
    background: #1877f2;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    top: -7px;
}

#priceSlider .noUi-handle:before,
#priceSlider .noUi-handle:after {
    display: none;
}

#priceSlider .noUi-handle:hover {
    transform: scale(1.1);
}

.price-range-display {
    text-align: center;
    color: #1877f2;
    font-weight: 600;
    font-size: 14px;
    margin-top: 10px;
}

body.dark-mode #priceSlider {
    background: #3a3a4a;
}

body.dark-mode #priceSlider .noUi-connect {
    background: #4a9eff;
}

body.dark-mode #priceSlider .noUi-handle {
    background: #4a9eff;
    border-color: #2d2d3a;
}

body.dark-mode .price-range-display {
    color: #4a9eff;
}

/* ========== أزرار المشاركة ========== */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid #dddfe2;
    border-bottom: 1px solid #dddfe2;
    margin: 10px 0;
}

.share-label {
    font-size: 13px;
    color: #65676b;
    margin-left: 5px;
}

.share-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

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

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.telegram {
    background: #0088cc;
}

.share-btn.copy {
    background: #65676b;
}

body.dark-mode .share-buttons {
    border-color: #444;
}

body.dark-mode .share-label {
    color: #aaa;
}

/* ========== إشعارات Toast ========== */
.notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    animation: notificationSlideUp 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.notification-success { background: #2ecc71; }
.notification-error { background: #e74c3c; }
.notification-info { background: #3498db; }
.notification-warning { background: #f39c12; }

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

/* ========== Lightbox ========== */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.lightbox-modal.active {
    display: flex;
}

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

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

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 3001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background 0.3s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    cursor: pointer;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background 0.3s;
    user-select: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    right: 20px;
}

.lightbox-next {
    left: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}
