/* User Pages: Compare, Settings, Notifications, Saved Searches */
/* ============================================
   COMPARE PROPERTIES PAGE
   ============================================ */
.compare-page {
    min-height: 100vh;
    background: var(--bg-light);
}

.compare-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}

.empty-compare {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
}

.empty-compare svg {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-compare h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-compare p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

/* Comparison Table */
.comparison-table {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin: 2rem 0;
}

.comparison-row {
    display: grid;
    grid-template-columns: 200px repeat(4, 1fr);
    border-bottom: 1px solid var(--border-color);
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-row.images-row {
    grid-template-columns: 200px repeat(4, 1fr);
    border-bottom: 2px solid var(--border-color);
}

.row-label {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    border-right: 1px solid var(--border-color);
}

.property-column {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-color);
}

.property-column:last-child {
    border-right: none;
}

.property-column.empty {
    background: var(--bg-light);
}

.property-column.highlight {
    background: rgba(8, 49, 105, 0.05);
}

/* Property Images */
.images-row .property-column {
    flex-direction: column;
    padding: 0;
}

.property-image {
    position: relative;
    width: 100%;
    height: 200px;
}

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

.btn-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.property-image:hover .btn-remove {
    opacity: 1;
}

.btn-remove:hover {
    background: rgba(0, 0, 0, 0.8);
}

.property-header {
    padding: 1rem;
    text-align: center;
}

.property-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.property-header .property-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
}

.btn-view-details {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-view-details:hover {
    background: var(--primary-400);
}

/* Add Property Slot */
.add-property {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--text-gray);
    cursor: pointer;
}

.add-property svg {
    color: var(--text-light);
}

.add-property p {
    font-size: 0.875rem;
}

/* Comparison Sections */
.comparison-section {
    border-top: 2px solid var(--border-color);
}

.section-header {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
}

.section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Icons in Comparison */
.check-icon {
    color: #059669;
}

.cross-icon {
    color: #dc2626;
}

.score {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.score.good {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.score.moderate {
    background: rgba(212, 168, 83, 0.1);
    color: #d4a853;
}

.score.low {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ============================================
   SETTINGS PAGE
   ============================================ */
.settings-page {
    min-height: 100vh;
    background: var(--bg-light);
    padding: 80px 0 4rem;
}

.settings-page .container {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.settings-sidebar h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-nav button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: none;
    border: none;
    border-radius: var(--radius-md);
    text-align: left;
    font-size: 0.9375rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.2s;
}

.settings-nav button:hover {
    background: rgba(8, 49, 105, 0.05);
    color: var(--primary-blue);
}

.settings-nav button.active {
    background: var(--primary-blue);
    color: white;
}

.settings-content {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2rem;
}

.settings-section .section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-section .section-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.settings-section .section-header p {
    color: var(--text-gray);
}

/* Profile Photo */
.profile-photo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.photo-container img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.photo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-text-danger {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
}

/* Preference Groups */
.preference-group,
.notification-group,
.security-group {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.preference-group:last-child,
.notification-group:last-child,
.security-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.preference-group h3,
.notification-group h3,
.security-group h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.help-text {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

/* Toggle List */
.toggle-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.toggle-item strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toggle-item p {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .slider {
    background: var(--primary-blue);
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(22px);
}

/* Input Row */
.input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.input-row input {
    flex: 1;
}

/* Danger Zone */
.danger-zone {
    border: 2px solid #fee2e2;
    background: #fef2f2;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.danger-zone h3 {
    color: #dc2626;
}

.danger-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.btn-danger {
    padding: 0.625rem 1.25rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
}

/* Current Plan */
.current-plan {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.plan-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #059669;
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.plan-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.plan-info p {
    color: var(--text-gray);
}

.payment-methods,
.billing-history {
    margin-bottom: 2rem;
}

.payment-methods h3,
.billing-history h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.empty-state-small {
    text-align: center;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.empty-state-small svg {
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.empty-state-small p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

/* ============================================
   NOTIFICATIONS PAGE
   ============================================ */
.notifications-page {
    min-height: 100vh;
    background: var(--bg-light);
    padding: 80px 0 4rem;
}

.notifications-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.notifications-page .page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 1rem;
}

.btn-text:hover {
    text-decoration: underline;
}

/* Notifications Filters */
.notifications-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.notifications-filters button {
    padding: 0.625rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.notifications-filters button:hover {
    border-color: var(--primary-blue);
}

.notifications-filters button.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Notifications List */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.notification-item:hover {
    box-shadow: var(--shadow-md);
}

.notification-item.unread {
    background: rgba(8, 49, 105, 0.03);
    border-left: 4px solid var(--primary-blue);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.pricechange {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notification-icon.newlisting {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.notification-icon.showing {
    background: rgba(212, 168, 83, 0.1);
    color: #d4a853;
}

.notification-icon.message {
    background: rgba(8, 49, 105, 0.1);
    color: var(--primary-blue);
}

.notification-content {
    flex: 1;
}

.notification-content h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-content p {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

.unread-dot {
    width: 10px;
    height: 10px;
    background: var(--primary-blue);
    border-radius: 50%;
    flex-shrink: 0;
}

.btn-delete {
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
}

.notification-item:hover .btn-delete {
    opacity: 1;
}

.btn-delete:hover {
    border-color: var(--border-color);
    background: var(--bg-light);
    color: #dc2626;
}

.empty-notifications {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
}

.empty-notifications svg {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-notifications h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-notifications p {
    color: var(--text-gray);
}

/* ============================================
   SAVED SEARCHES PAGE
   ============================================ */
.saved-searches-page {
    min-height: 100vh;
    background: var(--bg-light);
    padding: 80px 0 4rem;
}

.saved-searches-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.saved-searches-page .page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.saved-searches-page .page-header p {
    color: var(--text-gray);
}

.empty-searches {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
}

.empty-searches svg {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-searches h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-searches p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .empty-searches {
    background: #1e293b;
}

[data-theme="dark"] .empty-searches h2 {
    color: #e2e8f0;
}

[data-theme="dark"] .search-card {
    background: #1e293b;
}

[data-theme="dark"] .modal-content {
    background: #1e293b;
}

[data-theme="dark"] .modal-header h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .modal-body p {
    color: #e2e8f0;
}

[data-theme="dark"] .modal-body .warning-text {
    background: rgba(220, 38, 38, 0.1);
    color: #f87171;
}

[data-theme="dark"] .modal-footer .btn-secondary {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .modal-footer .btn-secondary:hover {
    background: #334155;
}

/* Searches Grid */
.searches-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.search-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: all 0.2s;
}

.search-card:hover {
    box-shadow: var(--shadow-md);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.search-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.search-actions {
    display: flex;
    gap: 0.25rem;
}

.search-criteria {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.criterion-tag {
    padding: 0.375rem 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--text-dark);
}

.search-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.search-stats .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.search-stats .stat-label {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.search-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.notification-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.btn-view-results {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-view-results:hover {
    background: var(--primary-400);
}

.search-updated {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .comparison-row {
        grid-template-columns: 150px repeat(4, 1fr);
    }

    .settings-page .container {
        grid-template-columns: 1fr;
    }

    .settings-sidebar {
        margin-bottom: 2rem;
    }

    .searches-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .comparison-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .row-label {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .property-column {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .property-column:last-child {
        border-bottom: none;
    }

    .settings-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .settings-nav button {
        white-space: nowrap;
    }

    .profile-photo-section {
        flex-direction: column;
        text-align: center;
    }

    .toggle-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .danger-actions {
        flex-direction: column;
    }

    .current-plan {
        flex-direction: column;
        gap: 1rem;
    }

    .notifications-page .page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .saved-searches-page .page-header {
        flex-direction: column;
        gap: 1rem;
    }
}

