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

/* ---------- الشريط العلوي ---------- */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.app-name {
    font-size: 18px;
    font-weight: bold;
}

.header-icons {
    display: flex;
    gap: 10px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* ---------- القائمة الجانبية ---------- */
.sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.sidebar.open {
    right: 0;
}

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

.sidebar-header h3 {
    font-size: 16px;
    color: #333;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
}

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

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: #f5f5f5;
    color: #667eea;
}

.sidebar-menu li a i {
    width: 20px;
    text-align: center;
}

.auth-sidebar-buttons {
    padding: 15px;
    border-top: 1px solid #eee;
}

/* ---------- المحتوى الرئيسي ---------- */
.profile-main {
    padding: 80px 15px 80px;
    min-height: 100vh;
    background: #f5f7fa;
}

/* ---------- قسم الضيف ---------- */
.guest-section {
    text-align: center;
    padding: 40px 20px;
}

.guest-icon {
    font-size: 80px;
    color: #667eea;
    margin-bottom: 20px;
}

.guest-section h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.guest-section p {
    color: #666;
    margin-bottom: 30px;
}

.guest-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 300px;
    margin: 0 auto;
}

/* ---------- قسم المستخدم ---------- */
.user-section {
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- بطاقة الملف الشخصي ---------- */
.profile-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 35px;
}

.profile-info h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 5px;
}

.profile-info p {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

.profile-stats {
    display: flex;
    gap: 20px;
}

.profile-stats .stat {
    text-align: center;
}

.profile-stats .stat-value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
}

.profile-stats .stat-label {
    font-size: 12px;
    color: #888;
}

/* ---------- إجراءات سريعة ---------- */
.quick-actions {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.quick-actions h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.action-card:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateY(-2px);
}

.action-card i {
    font-size: 24px;
    color: #667eea;
}

.action-card span {
    font-size: 13px;
    color: #555;
}

/* ---------- عقاراتي ---------- */
.my-properties {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.my-properties h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.properties-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.empty-message {
    text-align: center;
    padding: 30px;
    color: #888;
}

.property-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.property-item-image {
    width: 60px;
    height: 60px;
    background: #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}

.property-item-info {
    flex: 1;
}

.property-item-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.property-item-price {
    color: #667eea;
    font-size: 14px;
}

.property-item-status {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
}

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

.property-item-status.approved {
    background: #d4edda;
    color: #155724;
}

/* ---------- إعدادات الحساب ---------- */
.account-settings {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.account-settings h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

.settings-list {
    display: flex;
    flex-direction: column;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: none;
    background: none;
    text-align: right;
    cursor: pointer;
    transition: background 0.3s;
    border-bottom: 1px solid #eee;
}

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

.setting-item:hover {
    background: #f8f9fa;
}

.setting-item i:first-child {
    width: 30px;
    height: 30px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}

.setting-item span {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.setting-item i:last-child {
    color: #aaa;
    font-size: 12px;
}

.setting-item.danger i:first-child {
    color: #dc3545;
}

/* ---------- الشريط السفلي ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.nav-item.active,
.nav-item:hover {
    color: #667eea;
}

.nav-icon {
    font-size: 18px;
}

.nav-text {
    font-size: 11px;
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 5px;
    width: 18px;
    height: 18px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- المودالات ---------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    position: relative;
}

.auth-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    position: relative;
}

.modal-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    z-index: 10;
}

.close-btn:hover {
    color: #333;
}

/* ---------- مودال المصادقة ---------- */
.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.auth-tab.active {
    color: #667eea;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

.auth-panel {
    display: none;
}

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

.auth-panel h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 13px;
    display: none;
}

.error-message.show {
    display: block;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* ---------- الوضع المظلم ---------- */
body.dark-mode {
    background-color: #1a1a2e;
    color: #fff;
}

body.dark-mode .top-header {
    background: linear-gradient(135deg, #2d2d44 0%, #3d3d5c 100%);
}

body.dark-mode .sidebar,
body.dark-mode .profile-card,
body.dark-mode .quick-actions,
body.dark-mode .my-properties,
body.dark-mode .account-settings,
body.dark-mode .modal-content,
body.dark-mode .auth-modal-content,
body.dark-mode .bottom-nav {
    background: #2d2d44;
    color: #fff;
}

body.dark-mode .profile-info h2,
body.dark-mode .quick-actions h3,
body.dark-mode .my-properties h3,
body.dark-mode .account-settings h3,
body.dark-mode .modal-title,
body.dark-mode .guest-section h2 {
    color: #fff;
}

body.dark-mode .profile-info p,
body.dark-mode .profile-stats .stat-label,
body.dark-mode .empty-message {
    color: #aaa;
}

body.dark-mode .action-card {
    background: #3d3d5c;
    border-color: #4d4d6c;
}

body.dark-mode .action-card span {
    color: #fff;
}

body.dark-mode .property-item {
    background: #3d3d5c;
}

body.dark-mode .property-item-title {
    color: #fff;
}

body.dark-mode .setting-item {
    color: #fff;
}

body.dark-mode .setting-item span {
    color: #fff;
}

body.dark-mode .nav-item {
    color: #aaa;
}

body.dark-mode .nav-item.active,
body.dark-mode .nav-item:hover {
    color: #667eea;
}

body.dark-mode .sidebar-menu li a {
    color: #fff;
}

body.dark-mode .sidebar-menu li a:hover,
body.dark-mode .sidebar-menu li a.active {
    background: #3d3d5c;
}

/* ---------- التجاوبية ---------- */
@media (max-width: 480px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        justify-content: center;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
