/*
 * Aqarat - Unified Design System
 * عقارات - نظام التصميم الموحد
 * Version: 1.0
 */

/* ==================== CSS Variables ==================== */
:root {
    /* Colors */
    --primary: #009975;
    --primary-light: #00b388;
    --primary-dark: #007a5e;
    --primary-10: rgba(0, 153, 117, 0.1);
    --primary-20: rgba(0, 153, 117, 0.2);
    --primary-30: rgba(0, 153, 117, 0.3);
    
    --background: #050505;
    --background-light: #0a0a0a;
    --surface: #111111;
    --surface-light: #1a1a1a;
    
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-hint: rgba(255, 255, 255, 0.3);
    
    --border: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.05);
    
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    --star: #fbbf24;
    
    /* Chat Colors */
    --chat-user: #009975;
    --chat-other: #1a2e29;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-primary: 0 4px 20px rgba(0, 153, 117, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Z-Index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
}

/* ==================== Base Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Arabic', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

/* Selection */
::selection {
    background-color: var(--primary-30);
    color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Hide scrollbar but keep functionality */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-hint { color: var(--text-hint); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ==================== Layout ==================== */
.app-container {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    background-color: var(--background);
    display: flex;
    flex-direction: column;
}

.page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
    overflow-y: auto;
}

.page-content.feed-page {
    overflow: hidden;
}

/* Safe Area */
.safe-top {
    padding-top: max(env(safe-area-inset-top), 48px);
}

.safe-bottom {
    padding-bottom: max(env(safe-area-inset-bottom), 24px);
}

/* ==================== Glass Card ==================== */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
}

.card-primary {
    background: linear-gradient(135deg, var(--primary-10) 0%, transparent 100%);
    border-color: var(--primary-20);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-lg);
    height: 56px;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    outline: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background-color: var(--primary-light);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-30);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background-color: var(--primary-10);
}

.btn-ghost {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-sm {
    height: 40px;
    padding: 0 var(--spacing-md);
    font-size: 0.875rem;
}

.btn-lg {
    height: 64px;
    padding: 0 var(--spacing-xl);
    font-size: 1.125rem;
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: var(--radius-full);
}

.btn-icon-sm {
    width: 40px;
    height: 40px;
}

.btn-icon-lg {
    width: 56px;
    height: 56px;
}

/* ==================== Inputs ==================== */
.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.input-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0 var(--spacing-xs);
}

.input {
    width: 100%;
    height: 56px;
    padding: 0 var(--spacing-md);
    padding-right: 48px;
    background-color: var(--surface-light);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.input::placeholder {
    color: var(--text-hint);
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-10);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    top: 50%;
    right: var(--spacing-md);
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-fast);
}

.input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.input-action {
    position: absolute;
    top: 50%;
    left: var(--spacing-md);
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--spacing-xs);
}

.input-action:hover {
    color: var(--text-primary);
}

/* ==================== Header ==================== */
.header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    padding: var(--spacing-md);
    padding-top: max(env(safe-area-inset-top), var(--spacing-md));
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.header-title {
    flex: 1;
    text-align: center;
}

.header-title h1 {
    font-size: 1rem;
    font-weight: 700;
}

.header-title p {
    font-size: 0.625rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==================== Bottom Navigation ==================== */
.bottom-nav {
    position: sticky;
    bottom: 0;
    z-index: var(--z-sticky);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-content {
    max-width: 430px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
    cursor: pointer;
}

.nav-item span.material-symbols-outlined {
    font-size: 24px;
}

.nav-item .nav-label {
    font-size: 0.625rem;
    font-weight: 500;
}

.nav-item.active,
.nav-item:hover {
    color: var(--text-primary);
}

.nav-item.active .material-symbols-outlined {
    color: var(--primary);
}

/* Upload Button */
.nav-upload {
    width: 48px;
    height: 36px;
    background: linear-gradient(135deg, #ff6b6b 0%, var(--primary) 50%, #4ecdc4 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 153, 117, 0.4);
}

.nav-upload .material-symbols-outlined {
    font-size: 24px;
}

/* ==================== Video Feed ==================== */
.feed-container {
    height: 100vh;
    height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

.video-card {
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    flex-direction: column;
}

.video-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(5, 5, 5, 0.95) 0%,
        rgba(5, 5, 5, 0.5) 30%,
        transparent 50%,
        rgba(5, 5, 5, 0.3) 100%
    );
    pointer-events: none;
}

/* Video Info Bar */
.video-info-bar {
    position: absolute;
    top: max(env(safe-area-inset-top), 48px);
    left: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 10;
}

.info-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
}

.info-pill .price {
    font-size: 1rem;
    font-weight: 700;
}

.info-pill .location {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Side Actions */
.side-actions {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    z-index: 10;
}

[dir="rtl"] .side-actions {
    right: auto;
    left: var(--spacing-md);
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
}

.action-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.action-btn:active {
    transform: scale(0.95);
}

.action-label {
    font-size: 0.75rem;
    color: var(--text-primary);
}

.action-item.liked .action-btn {
    background: rgba(239, 68, 68, 0.8);
    border-color: transparent;
}

/* Video Bottom Section */
.video-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-md);
    padding-bottom: calc(80px + var(--spacing-md));
    z-index: 10;
}

/* Guarantees */
.guarantees-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.guarantee-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    background: var(--primary-10);
    border: 1px solid var(--primary-20);
}

.guarantee-item .material-symbols-outlined {
    font-size: 24px;
    color: var(--primary);
}

.guarantee-item span:last-child {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* CTA Buttons Row */
.cta-row {
    display: flex;
    gap: var(--spacing-sm);
}

.cta-row .btn {
    flex: 1;
}

.cta-row .btn-primary {
    flex: 1.5;
}

/* ==================== Advertiser Info ==================== */
.advertiser-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.advertiser-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary);
    overflow: hidden;
    flex-shrink: 0;
}

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

.advertiser-details {
    flex: 1;
}

.advertiser-name {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.875rem;
    font-weight: 700;
}

.verified-badge {
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.verified-badge .material-symbols-outlined {
    font-size: 12px;
}

.advertiser-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.advertiser-rating .material-symbols-outlined {
    font-size: 14px;
    color: var(--star);
}

.rating-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* ==================== Chat ==================== */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

.chat-date {
    text-align: center;
    margin: var(--spacing-lg) 0;
}

.chat-date span {
    font-size: 0.625rem;
    color: var(--text-hint);
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
}

.message {
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-sm);
    max-width: 85%;
    margin-bottom: var(--spacing-md);
}

.message.sent {
    flex-direction: row-reverse;
    margin-left: auto;
}

[dir="rtl"] .message.sent {
    margin-left: 0;
    margin-right: auto;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--primary-20);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar .material-symbols-outlined {
    font-size: 18px;
    color: var(--primary);
}

.message.sent .message-avatar {
    background: rgba(255, 255, 255, 0.1);
}

.message.sent .message-avatar .material-symbols-outlined {
    color: var(--text-muted);
}

.message-bubble {
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    line-height: 1.5;
}

.message.received .message-bubble {
    background: var(--chat-other);
    border-bottom-right-radius: var(--radius-xs);
}

[dir="rtl"] .message.received .message-bubble {
    border-bottom-right-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-xs);
}

.message.sent .message-bubble {
    background: var(--chat-user);
    border-bottom-left-radius: var(--radius-xs);
    box-shadow: var(--shadow-primary);
}

[dir="rtl"] .message.sent .message-bubble {
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-xs);
}

.message-time {
    font-size: 0.5625rem;
    color: var(--text-hint);
    margin-top: var(--spacing-xs);
}

.message.sent .message-time {
    text-align: left;
    color: rgba(255, 255, 255, 0.6);
}

[dir="rtl"] .message.sent .message-time {
    text-align: right;
}

/* Chat Input */
.chat-input-container {
    padding: var(--spacing-md);
    background: rgba(5, 5, 5, 0.9);
    border-top: 1px solid var(--border-light);
}

.chat-input-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.chat-input {
    flex: 1;
    height: 48px;
    padding: 0 var(--spacing-md);
    padding-right: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.chat-input::placeholder {
    color: var(--text-hint);
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-send-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--primary);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-primary);
    transition: transform var(--transition-fast);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* ==================== Property Card (Compact) ==================== */
.property-card-compact {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    border-radius: var(--radius-lg);
    border: 1px solid var(--primary-20);
}

.property-card-compact .thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.property-card-compact .details {
    flex: 1;
    overflow: hidden;
}

.property-card-compact .title {
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-card-compact .price {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--primary);
}

.property-card-compact .location {
    font-size: 0.625rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 2px;
}

.property-card-compact .location .material-symbols-outlined {
    font-size: 12px;
}

/* ==================== Inspection Report ==================== */
.report-value-card {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-10) 0%, transparent 100%);
    border: 1px solid var(--primary-20);
}

.report-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.report-value span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.report-grade {
    display: inline-flex;
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--primary-20);
    border: 1px solid var(--primary-30);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--primary);
    font-style: italic;
}

/* Progress Bar */
.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

/* Metric Item */
.metric-item {
    margin-bottom: var(--spacing-lg);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.metric-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
}

.metric-label .material-symbols-outlined {
    font-size: 18px;
    color: var(--primary);
}

.metric-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

/* ==================== Forms ==================== */
.form-section {
    margin-bottom: var(--spacing-lg);
}

.form-row {
    display: flex;
    gap: var(--spacing-md);
}

.form-row > * {
    flex: 1;
}

/* Select */
.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff50'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-size: 20px;
    padding-left: 48px;
}

[dir="rtl"] .select {
    background-position: right 16px center;
    padding-left: var(--spacing-md);
    padding-right: 48px;
}

/* Textarea */
.textarea {
    min-height: 120px;
    padding: var(--spacing-md);
    resize: vertical;
}

/* ==================== Utilities ==================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.px-md { padding-left: var(--spacing-md); padding-right: var(--spacing-md); }
.py-md { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }

.m-auto { margin: auto; }
.mt-auto { margin-top: auto; }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; min-height: 100dvh; }

.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-fade-in { animation: fadeIn var(--transition-normal) ease; }
.animate-slide-up { animation: slideUp var(--transition-normal) ease; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-bounce { animation: bounce 2s infinite; }

/* ==================== Layout Header Helpers ==================== */
.header-logo-link {
    text-decoration: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header-icon-link {
    color: var(--text-muted);
    text-decoration: none;
    position: relative;
}

.unread-badge {
    position: absolute;
    top: -6px;
    background: var(--error);
    color: #fff;
    font-size: 0.6rem;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

[dir="rtl"] .unread-badge { left: -8px; }
[dir="ltr"] .unread-badge { right: -8px; }

.lang-switch-btn {
    height: 32px;
    padding: 0 var(--spacing-sm);
    font-size: 0.75rem;
}

/* Flash Messages */
.flash-success {
    margin: var(--spacing-md);
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
    font-size: 0.9rem;
}

.flash-error {
    margin: var(--spacing-md);
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 0.9rem;
}

/* ==================== Shared: Alert ==================== */
.alert-error {
    padding: var(--spacing-md);
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: #fca5a5;
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: var(--spacing-md);
}

/* ==================== Shared: Decorative Circles ==================== */
.decor-circle {
    position: absolute;
    width: 250px;
    height: 250px;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.08;
    pointer-events: none;
}

.decor-circle.top {
    top: -100px;
    right: -100px;
}

.decor-circle.bottom {
    bottom: -100px;
    left: -100px;
}

/* ==================== Shared: Back Button ==================== */
.back-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

/* ==================== Shared: Page Header (inner pages) ==================== */
.page-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: max(env(safe-area-inset-top), 12px) var(--spacing-md) var(--spacing-md);
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.page-header h1 {
    flex: 1;
    font-size: 1.125rem;
    text-align: center;
}

/* ==================== Shared: Header Button (overlay) ==================== */
.header-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
}

/* ==================== Shared: Empty State ==================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    text-align: center;
}

.empty-state .material-symbols-outlined {
    font-size: 64px;
    color: var(--text-hint);
    margin-bottom: var(--spacing-md);
}

.empty-state h3 {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

/* ==================== Shared: Section Titles ==================== */
.section {
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.section-title .material-symbols-outlined {
    font-size: 20px;
    color: var(--primary);
}

/* ==================== Shared: Bottom Actions ==================== */
.bottom-actions {
    position: sticky;
    bottom: 0;
    padding: var(--spacing-md);
    padding-bottom: max(env(safe-area-inset-bottom), var(--spacing-md));
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    z-index: 40;
}

.bottom-actions-content {
    max-width: 430px;
    margin: 0 auto;
    display: flex;
    gap: var(--spacing-sm);
}

.bottom-actions .btn {
    flex: 1;
}

.bottom-actions .btn-primary {
    flex: 1.5;
}

/* ==================== Shared: Contact Bar ==================== */
.contact-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-md);
    padding-bottom: max(env(safe-area-inset-bottom), var(--spacing-md));
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    z-index: 40;
}

.contact-bar-inner {
    max-width: 430px;
    margin: 0 auto;
    display: flex;
    gap: var(--spacing-sm);
}

.contact-bar-inner .btn {
    flex: 1;
}

/* ==================== Shared: Stats Grid ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    padding: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==================== Shared: Spinner ==================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

/* ==================== Auth: Login Page ==================== */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60px;
    padding-bottom: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: var(--primary-10);
    border: 1px solid var(--primary-20);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.login-logo .material-symbols-outlined {
    font-size: 48px;
    color: var(--primary);
}

.login-brand {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
    z-index: 1;
}

.login-title h1 {
    font-size: 1.875rem;
    margin-bottom: var(--spacing-sm);
}

.login-title p {
    color: var(--text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.forgot-link {
    margin-top: var(--spacing-xs);
}

[dir="rtl"] .forgot-link { text-align: left; }
[dir="ltr"] .forgot-link { text-align: right; }

.forgot-link a {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

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

.login-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.biometric-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.biometric-btn:hover {
    color: var(--text-primary);
}

.biometric-btn .material-symbols-outlined {
    font-size: 28px;
}

.biometric-btn span:last-child {
    font-size: 0.875rem;
}

.login-footer {
    margin-top: auto;
    padding: var(--spacing-xl) 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.login-footer a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

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

/* ==================== Auth: Register Page ==================== */
.register-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    padding-top: max(env(safe-area-inset-top), 48px);
}

.register-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.register-title {
    flex: 1;
}

.register-title h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.register-title p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.progress-steps .step {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.progress-steps .step.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.progress-steps .step.completed {
    border-color: var(--primary);
    background: var(--primary-10);
    color: var(--primary);
}

.progress-steps .step-line {
    width: 40px;
    height: 2px;
    background: var(--border);
    transition: background var(--transition-fast);
}

.progress-steps .step-line.active {
    background: var(--primary);
}

.phone-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary-10);
    border: 1px solid var(--primary-20);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    direction: ltr;
    margin-bottom: var(--spacing-lg);
}

.phone-badge .material-symbols-outlined {
    font-size: 18px;
}

.user-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.user-type-card {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.user-type-card:hover {
    border-color: var(--primary-30);
}

.user-type-card.selected {
    border-color: var(--primary);
    background: var(--primary-10);
}

.user-type-card .material-symbols-outlined {
    font-size: 40px;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
    transition: color var(--transition-fast);
}

.user-type-card.selected .material-symbols-outlined {
    color: var(--primary);
}

.user-type-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.user-type-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.register-actions {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
}

.register-footer {
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.register-footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.register-footer a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.register-footer a:hover {
    text-decoration: underline;
}

.terms-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: var(--spacing-md);
}

.terms-text a {
    color: var(--primary);
    text-decoration: none;
}

/* ==================== Auth: OTP Page ==================== */
.otp-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    padding-top: max(env(safe-area-inset-top), 48px);
    position: relative;
    overflow: hidden;
}

.otp-icon {
    width: 100px;
    height: 100px;
    margin: var(--spacing-xl) auto var(--spacing-lg);
    border-radius: var(--radius-full);
    background: var(--primary-10);
    border: 2px solid var(--primary-20);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.otp-icon .material-symbols-outlined {
    font-size: 48px;
    color: var(--primary);
}

.otp-icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border: 2px dashed var(--primary-20);
    border-radius: var(--radius-full);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.otp-text {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.otp-text h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.otp-text p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.otp-text .phone {
    color: var(--primary);
    font-weight: 700;
    direction: ltr;
    display: inline-block;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    direction: ltr;
}

.otp-input {
    width: 64px;
    height: 72px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-light);
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    caret-color: var(--primary);
    transition: all var(--transition-fast);
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--primary-10);
    box-shadow: 0 0 0 4px var(--primary-10);
}

.otp-input.filled {
    border-color: var(--primary);
    background: var(--primary-10);
}

.otp-input.error {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.otp-timer {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.timer-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.timer-value {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.resend-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.resend-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--border);
    color: var(--text-muted);
}

.resend-btn .material-symbols-outlined {
    font-size: 18px;
}

.otp-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
}

.change-number {
    text-align: center;
    padding: var(--spacing-md) 0;
}

.change-number a {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
}

.change-number a:hover {
    color: var(--primary);
}

/* Success overlay for OTP */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.95);
    z-index: 100;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
}

.success-overlay.active {
    display: flex;
}

.success-check {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

.success-check .material-symbols-outlined {
    font-size: 48px;
    color: white;
}

/* ==================== Auth: Forgot Password ==================== */
.forgot-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    padding-top: max(env(safe-area-inset-top), 48px);
    position: relative;
    overflow: hidden;
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: var(--spacing-xl) auto var(--spacing-md);
    border-radius: var(--radius-full);
    background: var(--primary-10);
    border: 1px solid var(--primary-20);
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon .material-symbols-outlined {
    font-size: 40px;
    color: var(--primary);
}

.step-text {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.step-text h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.step-text p {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

.step-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.step-actions {
    margin-top: var(--spacing-lg);
}

.resend-section {
    text-align: center;
    padding: var(--spacing-md) 0;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: var(--spacing-2xl) auto var(--spacing-lg);
    border-radius: var(--radius-full);
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-icon .material-symbols-outlined {
    font-size: 56px;
    color: white;
}

.success-text {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.success-text h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.success-text p {
    color: var(--text-muted);
}

.password-requirements {
    padding: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-sm);
}

.password-requirements p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    font-size: 0.75rem;
    color: var(--text-hint);
    padding: 2px 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.password-requirements li .material-symbols-outlined {
    font-size: 14px;
}

.password-requirements li.valid {
    color: var(--success);
}

/* ==================== Home: Feed Page ==================== */
.feed-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: max(env(safe-area-inset-top), 12px) var(--spacing-md) var(--spacing-sm);
    margin-bottom: -60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    pointer-events: none;
}

.feed-header > * {
    pointer-events: auto;
}

.feed-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
}

.feed-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-20);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-logo .logo-icon .material-symbols-outlined {
    font-size: 22px;
    color: var(--primary);
}

.feed-logo .logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feed-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--error);
    border-radius: 9px;
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.notification-badge:empty {
    min-width: 8px;
    height: 8px;
    padding: 0;
}

[dir="rtl"] .notification-badge {
    right: auto;
    left: -6px;
}

/* Play button */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.video-card.paused .play-button {
    display: flex;
}

.play-button .material-symbols-outlined {
    font-size: 36px;
    color: white;
}

/* Guarantee chip (feed variant) */
.guarantee-chip {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-lg);
    background: var(--primary-10);
    border: 1px solid var(--primary-20);
}

.guarantee-chip .material-symbols-outlined {
    font-size: 18px;
    color: var(--primary);
}

.guarantee-chip span:last-child {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Video progress */
.video-progress {
    position: absolute;
    bottom: 80px;
    left: var(--spacing-md);
    right: var(--spacing-md);
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    z-index: 10;
}

.video-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.1s linear;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: bounce 2s infinite;
    z-index: 10;
    opacity: 0.6;
}

.scroll-hint .material-symbols-outlined {
    font-size: 24px;
    color: var(--text-primary);
}

/* Action items (like, save, share, AI) */
.action-item.saved .action-btn {
    background: rgba(239, 68, 68, 0.8);
    border-color: transparent;
}

.action-item.saved .action-btn .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

.action-item.ai .action-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, var(--primary) 100%);
    border: none;
}

.action-item.ai .action-btn .material-symbols-outlined {
    font-size: 22px;
}

.action-item.ai .action-label {
    color: var(--primary-light);
}

/* Feed empty / loading */
.empty-feed {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
}

.empty-feed .material-symbols-outlined {
    font-size: 80px;
    color: var(--text-hint);
    margin-bottom: var(--spacing-lg);
}

.empty-feed h2 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.empty-feed p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.feed-loading {
    display: flex;
    justify-content: center;
    padding: var(--spacing-xl);
}

/* Advertiser avatar placeholder */
.advertiser-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary-20);
    display: flex;
    align-items: center;
    justify-content: center;
}

.advertiser-avatar .avatar-placeholder .material-symbols-outlined {
    font-size: 24px;
    color: var(--primary);
}

/* ==================== Property Details Page ==================== */
.property-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 100px;
}

.property-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: max(env(safe-area-inset-top), 12px) var(--spacing-md) var(--spacing-md);
    margin-bottom: -72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
}

.video-section {
    position: relative;
    height: 400px;
    background: var(--surface);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.play-btn .material-symbols-outlined {
    font-size: 36px;
}

.video-counter {
    position: absolute;
    bottom: 80px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
}

[dir="rtl"] .video-counter { right: var(--spacing-md); }
[dir="ltr"] .video-counter { left: var(--spacing-md); }

.property-content {
    padding: var(--spacing-md);
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

/* Price Card */
.price-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.price-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.price-value span {
    font-size: 1rem;
    color: var(--text-secondary);
}

.price-badge {
    padding: 6px 12px;
    background: var(--primary-10);
    border: 1px solid var(--primary-20);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

.property-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.property-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
}

.property-location:hover {
    color: var(--primary);
}

.property-location .material-symbols-outlined {
    font-size: 18px;
}

/* Specs Grid */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border);
    margin-top: var(--spacing-md);
}

.spec-item {
    text-align: center;
    padding: var(--spacing-sm);
}

.spec-item .material-symbols-outlined {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 4px;
}

.spec-value {
    font-size: 1rem;
    font-weight: 700;
}

.spec-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Description */
.description-text {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    display: inline;
}

/* Guarantees List (detail variant) */
.guarantees-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.guarantee-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-10);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guarantee-icon .material-symbols-outlined {
    font-size: 24px;
    color: var(--primary);
}

.guarantee-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
}

.guarantee-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.guarantee-years {
    padding: 4px 12px;
    background: var(--primary-20);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

[dir="rtl"] .guarantee-years { margin-right: auto; }
[dir="ltr"] .guarantee-years { margin-left: auto; }

/* Advertiser Card (detail variant) */
.advertiser-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.advertiser-btn {
    padding: 8px 16px;
    background: var(--primary-10);
    border: 1px solid var(--primary-20);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

/* Map */
.map-container {
    height: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    color: var(--text-muted);
}

.map-placeholder .material-symbols-outlined {
    font-size: 48px;
}

.open-map-btn {
    position: absolute;
    bottom: var(--spacing-md);
    padding: 8px 16px;
    background: var(--primary);
    border-radius: var(--radius-full);
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    border: none;
    font-family: inherit;
}

[dir="rtl"] .open-map-btn { right: var(--spacing-md); }
[dir="ltr"] .open-map-btn { left: var(--spacing-md); }

/* FAL License */
.fal-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--primary-10);
    border: 1px solid var(--primary-20);
    border-radius: var(--radius-lg);
}

.fal-card .material-symbols-outlined {
    font-size: 28px;
    color: var(--primary);
}

.fal-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
}

.fal-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==================== Search Page ==================== */
.search-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 100px;
}

.search-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: max(env(safe-area-inset-top), 12px) var(--spacing-md) var(--spacing-md);
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    height: 48px;
    padding: 0 var(--spacing-md);
    padding-right: 48px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
}

[dir="ltr"] .search-input {
    padding-right: var(--spacing-md);
    padding-left: 48px;
}

.search-input::placeholder {
    color: var(--text-hint);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

[dir="rtl"] .search-icon { right: var(--spacing-md); }
[dir="ltr"] .search-icon { left: var(--spacing-md); }

.filter-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: var(--surface-light);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.filter-btn.has-filters::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

/* Quick Filters */
.quick-filters {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    overflow-x: auto;
}

.quick-filter {
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.quick-filter.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.quick-filter:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

/* Results */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--spacing-md) var(--spacing-md);
}

.results-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.sort-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
}

.sort-btn .material-symbols-outlined {
    font-size: 16px;
}

/* Property Grid */
.property-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    padding: 0 var(--spacing-md);
}

.property-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.property-card:hover {
    border-color: var(--primary-30);
    transform: translateY(-2px);
}

.property-image {
    position: relative;
    height: 140px;
    background-size: cover;
    background-position: center;
}

.property-badge {
    position: absolute;
    top: 8px;
    padding: 4px 8px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 700;
}

[dir="rtl"] .property-badge { right: 8px; }
[dir="ltr"] .property-badge { left: 8px; }

.property-save-btn {
    position: absolute;
    top: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

[dir="rtl"] .property-save-btn { left: 8px; }
[dir="ltr"] .property-save-btn { right: 8px; }

.property-save-btn .material-symbols-outlined {
    font-size: 18px;
}

.property-save-btn.saved {
    background: var(--error);
}

.property-save-btn.saved .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
}

.property-details {
    padding: var(--spacing-sm);
}

.property-price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.property-specs {
    display: flex;
    gap: var(--spacing-sm);
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.property-spec {
    display: flex;
    align-items: center;
    gap: 2px;
}

.property-spec .material-symbols-outlined {
    font-size: 14px;
}

/* Filter Modal */
.filter-modal {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.filter-modal.active {
    opacity: 1;
    visibility: visible;
}

.filter-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: var(--background);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.filter-modal.active .filter-content {
    transform: translateY(0);
}

.filter-header {
    background: var(--background);
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    flex-shrink: 0;
}

.filter-header h3 {
    font-size: 1.125rem;
}

.filter-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.filter-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.filter-section {
    margin-bottom: var(--spacing-xl);
}

.filter-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.filter-chip {
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.filter-chip.selected {
    background: var(--primary-10);
    border-color: var(--primary);
    color: var(--primary);
}

.price-range {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.price-input {
    flex: 1;
}

.price-input label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.price-input input {
    width: 100%;
    height: 44px;
    padding: 0 var(--spacing-md);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
}

.price-input input:focus {
    outline: none;
    border-color: var(--primary);
}

.price-separator {
    color: var(--text-muted);
    padding-top: 20px;
}

.filter-footer {
    background: var(--background);
    padding: var(--spacing-md) var(--spacing-lg);
    padding-bottom: max(env(safe-area-inset-bottom), var(--spacing-lg));
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.filter-reset {
    flex: 1;
}

.filter-apply {
    flex: 2;
}

/* ==================== Chat List Page ==================== */
.chats-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 100px;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-badge {
    padding: 4px 12px;
    background: var(--primary-10);
    border: 1px solid var(--primary-20);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

.chat-tabs {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
}

.chat-tab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.chat-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

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

.chat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.chat-item.unread {
    background: rgba(0, 153, 117, 0.05);
}

.chat-avatar {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
}

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

.online-indicator {
    position: absolute;
    bottom: 2px;
    width: 12px;
    height: 12px;
    background: var(--success);
    border: 2px solid var(--background);
    border-radius: 50%;
}

[dir="rtl"] .online-indicator { left: 2px; }
[dir="ltr"] .online-indicator { right: 2px; }

.chat-content {
    flex: 1;
    overflow: hidden;
}

.chat-name {
    font-size: 0.9375rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.chat-preview {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.chat-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.chat-time {
    font-size: 0.6875rem;
    color: var(--text-hint);
}

.chat-unread-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--primary);
    border-radius: 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intent-badge {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.625rem;
    font-weight: 600;
}

.intent-badge.visit {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.intent-badge.financial {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.intent-badge.general {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

/* ==================== Chat Show Page ==================== */
.chat-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: max(env(safe-area-inset-top), 12px) var(--spacing-md) var(--spacing-md);
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.chat-user-info {
    flex: 1;
}

.chat-user-info h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.chat-user-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

.chat-property-preview {
    margin: var(--spacing-md) 0 0;
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--surface);
    border: 1px solid var(--primary-20);
    border-radius: var(--radius-md);
}

.property-thumb {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.chat-property-preview .details h4 {
    font-size: 0.75rem;
    font-weight: 600;
}

.chat-property-preview .details p {
    font-size: 0.6875rem;
    color: var(--primary);
    font-weight: 600;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

.date-divider {
    text-align: center;
    margin: var(--spacing-lg) 0;
}

.date-divider span {
    font-size: 0.625rem;
    color: var(--text-hint);
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
}

.chat-input-area {
    padding: var(--spacing-md);
    padding-bottom: max(env(safe-area-inset-bottom), var(--spacing-md));
    background: rgba(5, 5, 5, 0.95);
    border-top: 1px solid var(--border-light);
}

.chat-input-area .chat-input-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.chat-attach-btn,
.chat-emoji-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ==================== Profile Page ==================== */
.profile-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 100px;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    border: 3px solid var(--primary);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    position: relative;
}

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

.profile-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: var(--primary);
    border-radius: var(--radius-full);
    border: 2px solid var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.profile-avatar-edit .material-symbols-outlined {
    font-size: 14px;
}

.profile-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary-20);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-placeholder .material-symbols-outlined {
    font-size: 40px;
    color: var(--primary);
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.profile-type {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
}

.profile-stats {
    display: flex;
    gap: var(--spacing-xl);
    padding: var(--spacing-md) 0;
}

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

.profile-stats .stat-number {
    font-size: 1.25rem;
    font-weight: 700;
}

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

.profile-menu {
    padding: 0 var(--spacing-md);
}

.menu-section {
    margin-bottom: var(--spacing-lg);
}

.menu-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-hint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--spacing-sm) 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

.menu-item:hover {
    color: var(--primary);
}

.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-icon .material-symbols-outlined {
    font-size: 22px;
    color: var(--text-secondary);
}

.menu-item-content {
    flex: 1;
}

.menu-item-content h4 {
    font-size: 0.9375rem;
    font-weight: 500;
}

.menu-item-content p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.menu-badge {
    padding: 2px 10px;
    background: var(--primary-10);
    border: 1px solid var(--primary-20);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

.menu-arrow .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-hint);
}

.language-toggle {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.lang-btn {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

.app-version {
    text-align: center;
    padding: var(--spacing-xl) 0;
    font-size: 0.75rem;
    color: var(--text-hint);
}

/* ==================== Favorites/Saved Page ==================== */
.favorites-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 100px;
}

.favorites-header {
    padding: var(--spacing-lg) var(--spacing-md);
}

.favorites-header h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.favorites-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.favorites-list {
    padding: 0 var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.favorite-card {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.favorite-card:hover {
    border-color: var(--primary-30);
}

.favorite-image {
    width: 110px;
    height: 100px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    position: relative;
}

.favorite-badge {
    position: absolute;
    top: 6px;
    padding: 2px 8px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 700;
}

[dir="rtl"] .favorite-badge { right: 6px; }
[dir="ltr"] .favorite-badge { left: 6px; }

.favorite-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.favorite-title {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-location {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 2px;
}

.favorite-location .material-symbols-outlined {
    font-size: 14px;
}

.favorite-price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary);
}

.favorite-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.remove-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: var(--error);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.remove-btn .material-symbols-outlined {
    font-size: 18px;
}

.favorite-date {
    font-size: 0.625rem;
    color: var(--text-hint);
}

/* ==================== Upload/Advertiser Create Page ==================== */
.upload-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 120px;
}

.upload-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: max(env(safe-area-inset-top), 12px) var(--spacing-md) var(--spacing-md);
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.upload-header h1 {
    font-size: 1.125rem;
    font-weight: 700;
}

.close-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
}

.upload-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
}

.upload-step {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    transition: all var(--transition-fast);
}

.upload-step.active {
    background: var(--primary);
    width: 60px;
}

.upload-step.completed {
    background: var(--primary-30);
}

.video-upload-section {
    padding: var(--spacing-md);
}

.video-upload-area {
    height: 200px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.video-upload-area:hover {
    border-color: var(--primary-30);
    background: var(--primary-10);
}

.upload-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--primary-10);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-icon .material-symbols-outlined {
    font-size: 32px;
    color: var(--primary);
}

.video-preview {
    position: relative;
    height: 200px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--surface);
}

.video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-form {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.required-badge {
    font-size: 0.75rem;
    color: var(--error);
    font-weight: normal;
}

.select-wrapper {
    position: relative;
}

.guarantees-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.guarantee-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.guarantee-card .guarantee-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-10);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guarantee-card .guarantee-icon .material-symbols-outlined {
    font-size: 22px;
    color: var(--primary);
}

.guarantee-card .guarantee-text {
    flex: 1;
}

.guarantee-card .guarantee-text h4 {
    font-size: 0.875rem;
    font-weight: 600;
}

.guarantee-card .guarantee-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.guarantee-toggle {
    position: relative;
    width: 48px;
    height: 28px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: 14px;
    transition: all var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    bottom: 3px;
    left: 3px;
    background: white;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

[dir="rtl"] .toggle-slider::before {
    left: auto;
    right: 3px;
}

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

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

[dir="rtl"] .guarantee-toggle input:checked + .toggle-slider::before {
    transform: translateX(-20px);
}

.submit-section {
    padding: var(--spacing-md);
}

.fal-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.fal-notice .material-symbols-outlined {
    font-size: 20px;
    color: var(--warning);
    flex-shrink: 0;
}

.fal-notice p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ==================== Inspection Request Page ==================== */
.inspection-page {
    min-height: 100vh;
    padding-bottom: 120px;
}

.property-mini {
    margin: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    gap: var(--spacing-md);
}

.property-mini-image {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.property-mini-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
}

.property-mini-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.property-mini-price {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
}

/* Inspector Card */
.inspector-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.inspector-card {
    padding: var(--spacing-md);
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.inspector-card:hover {
    border-color: var(--primary-30);
}

.inspector-card.selected {
    border-color: var(--primary);
    background: var(--primary-10);
}

.inspector-header {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.inspector-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary-30);
    overflow: hidden;
    flex-shrink: 0;
}

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

.inspector-info {
    flex: 1;
}

.inspector-name {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified-icon {
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.verified-icon .material-symbols-outlined {
    font-size: 12px;
}

.inspector-specialty {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.inspector-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    margin-top: 4px;
}

.inspector-rating .material-symbols-outlined {
    font-size: 16px;
    color: var(--star);
}

.inspector-rating span {
    color: var(--text-muted);
}

.inspector-stats {
    display: flex;
    gap: var(--spacing-lg);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border);
}

.inspector-stats .stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.inspector-stats .stat .material-symbols-outlined {
    font-size: 16px;
}

.inspector-price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary);
}

[dir="rtl"] .inspector-price { margin-right: auto; }
[dir="ltr"] .inspector-price { margin-left: auto; }

/* Date Selection */
.date-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
}

.date-item {
    padding: var(--spacing-md) var(--spacing-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.date-item:hover {
    border-color: var(--primary-30);
}

.date-item.selected {
    border-color: var(--primary);
    background: var(--primary-10);
}

.date-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.date-day {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.date-num {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2px 0;
}

.date-month {
    font-size: 0.625rem;
    color: var(--text-muted);
}

/* Time Selection */
.time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.time-item {
    padding: var(--spacing-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.time-item:hover {
    border-color: var(--primary-30);
}

.time-item.selected {
    border-color: var(--primary);
    background: var(--primary-10);
    color: var(--primary);
    font-weight: 600;
}

.time-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.notes-input {
    width: 100%;
    min-height: 100px;
    padding: var(--spacing-md);
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
}

.notes-input::placeholder {
    color: var(--text-hint);
}

.notes-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Summary */
.summary-card {
    margin: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.summary-row:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.summary-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.summary-value {
    font-size: 0.875rem;
    font-weight: 600;
}

.summary-total {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

/* ==================== Inspection Report Page ==================== */
.report-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: var(--spacing-lg);
}

.report-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: max(env(safe-area-inset-top), 12px) var(--spacing-md) var(--spacing-md);
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.report-header h1 {
    flex: 1;
    font-size: 1.125rem;
    text-align: center;
}

.value-card {
    margin: var(--spacing-md);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-10) 0%, transparent 100%);
    border: 1px solid var(--primary-20);
    border-radius: var(--radius-xl);
}

.value-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.grade-badge {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--primary-20);
    border: 1px solid var(--primary-30);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--primary);
    font-style: italic;
}

.value-meta {
    display: flex;
    gap: var(--spacing-lg);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.meta-item-end {
    text-align: end;
}

.meta-item .material-symbols-outlined {
    font-size: 16px;
    color: var(--primary);
}

.report-section {
    padding: var(--spacing-md);
}

.report-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.report-section h3 .material-symbols-outlined {
    font-size: 20px;
    color: var(--primary);
}

.metrics-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
}

.metric-row {
    padding: var(--spacing-md) 0;
}

.metric-row:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.metric-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: var(--spacing-sm);
}

.metric-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

.comparison-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
}

.comparison-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
}

.comparison-row:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.inspector-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.report-footer {
    padding: var(--spacing-md);
    text-align: center;
}

/* ==================== Contractors Page ==================== */
.contractors-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 100px;
}

.contractors-header {
    padding: var(--spacing-lg) var(--spacing-md);
}

.contractors-header h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.contractors-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.contractors-list,
.contractors-grid {
    padding: 0 var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Professional Card (Shared for contractors + architects) */
.professional-card {
    padding: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.professional-card:hover {
    border-color: var(--primary-30);
}

.professional-header {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.professional-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary-30);
    overflow: hidden;
    flex-shrink: 0;
}

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

.professional-info {
    flex: 1;
}

.professional-name {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.professional-specialty {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.professional-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    margin-top: 4px;
}

.professional-rating .material-symbols-outlined {
    font-size: 16px;
    color: var(--star);
}

.professional-rating span {
    color: var(--text-muted);
}

.professional-stats {
    display: flex;
    gap: var(--spacing-lg);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border);
}

.professional-stats .stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.professional-stats .stat .material-symbols-outlined {
    font-size: 16px;
}

/* Contractor/Architect specific wrappers (backwards compat) */
.contractor-card,
.architect-card {
    padding: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.contractor-card:hover,
.architect-card:hover {
    border-color: var(--primary-30);
}

.contractor-header,
.architect-header {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.contractor-avatar,
.architect-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    border: 2px solid var(--primary-30);
    overflow: hidden;
    flex-shrink: 0;
}

.contractor-avatar img,
.architect-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contractor-info,
.architect-info {
    flex: 1;
}

.contractor-name,
.architect-name {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.contractor-specialty,
.architect-specialty {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.contractor-rating,
.architect-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    margin-top: 4px;
}

.contractor-rating .material-symbols-outlined,
.architect-rating .material-symbols-outlined {
    font-size: 16px;
    color: var(--star);
}

.contractor-rating span,
.architect-rating span {
    color: var(--text-muted);
}

.contractor-stats,
.architect-stats {
    display: flex;
    gap: var(--spacing-lg);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border);
}

.contractor-stats .stat,
.architect-stats .stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.contractor-stats .stat .material-symbols-outlined,
.architect-stats .stat .material-symbols-outlined {
    font-size: 16px;
}

/* Professional detail pages */
.professional-detail-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.professional-avatar-lg {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    border: 3px solid var(--primary);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

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

.professional-name-lg {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.professional-specialty-lg {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.professional-rating-lg {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
    font-size: 0.9375rem;
}

.professional-rating-lg .material-symbols-outlined {
    font-size: 20px;
    color: var(--star);
}

/* ==================== Architects Page ==================== */
.architects-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 100px;
}

.architects-header {
    padding: var(--spacing-lg) var(--spacing-md);
}

.architects-header h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.architects-header p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.architects-list,
.architects-grid {
    padding: 0 var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Portfolio section */
.portfolio-section {
    padding: 0 var(--spacing-md);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.portfolio-item {
    height: 120px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
}

/* ==================== AI Designer Page ==================== */
.ai-designer-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 100px;
}

.ai-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    text-align: center;
}

.ai-icon {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), var(--primary-20));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.ai-icon .material-symbols-outlined {
    font-size: 48px;
    color: var(--primary);
}

.ai-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.ai-subtitle {
    color: var(--text-muted);
    margin-bottom: var(--spacing-xl);
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), var(--primary-10));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #a78bfa;
    margin-bottom: var(--spacing-lg);
}

.ai-features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
}

.ai-feature {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.ai-feature .material-symbols-outlined {
    font-size: 24px;
    color: var(--primary);
}

.ai-feature span:last-child {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* AI Designer Full UI */
.comparison-section {
    padding: var(--spacing-md);
}

.comparison-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 220px;
}

.comparison-images {
    display: flex;
    height: 100%;
}

.comparison-image {
    flex: 1;
    background-size: cover;
    background-position: center;
}

.comparison-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: white;
}

.comparison-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    cursor: ew-resize;
}

.comparison-labels {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.styles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
}

.style-card {
    position: relative;
    height: 100px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.style-card.selected {
    border-color: var(--primary);
}

.style-card::after {
    content: attr(data-label);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    font-size: 0.6875rem;
    text-align: center;
    color: white;
}

.style-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: var(--radius-full);
    display: none;
    align-items: center;
    justify-content: center;
}

.style-card.selected .style-check {
    display: flex;
}

.style-check .material-symbols-outlined {
    font-size: 14px;
}

.colors-row {
    display: flex;
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-fast);
}

.color-swatch.selected {
    border-color: white;
    box-shadow: 0 0 0 2px var(--primary);
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-md);
}

.material-card {
    height: 60px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.material-card.selected {
    border-color: var(--primary);
}

.material-card::after {
    content: attr(data-label);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2px;
    background: rgba(0, 0, 0, 0.6);
    font-size: 0.5625rem;
    text-align: center;
    color: white;
}

.rooms-row {
    display: flex;
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-md);
    overflow-x: auto;
}

.room-chip {
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.room-chip.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.generate-section {
    padding: var(--spacing-md);
}

.generate-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.generate-info .material-symbols-outlined {
    font-size: 20px;
    color: var(--primary);
}

.generate-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.generate-btn {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #8b5cf6 0%, var(--primary) 100%);
    border: none;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.4);
}

.generate-btn:active {
    transform: scale(0.98);
}

.generate-btn .material-symbols-outlined {
    font-size: 24px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.95);
    z-index: 100;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1rem;
    font-weight: 600;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, var(--primary));
    width: 0%;
    animation: progress 3s ease-in-out forwards;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ==================== Section Header ==================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.see-all {
    font-size: 0.8125rem;
    color: var(--primary);
    cursor: pointer;
}

/* ==================== Style Cards (AI Designer) ==================== */
.style-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.style-name {
    position: absolute;
    bottom: var(--spacing-sm);
    left: var(--spacing-sm);
    right: var(--spacing-sm);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

/* ==================== Color Items (AI Designer) ==================== */
.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    cursor: pointer;
}

.color-item.selected .color-swatch {
    border-color: var(--primary);
    transform: scale(1.1);
}

.color-name {
    font-size: 0.6875rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ==================== Material Cards (AI Designer) ==================== */
.material-image {
    width: 100%;
    height: 70px;
    object-fit: cover;
}

.material-name {
    text-align: center;
    font-size: 0.6875rem;
    padding: var(--spacing-xs);
    background: var(--surface);
}

/* ==================== Contractor Projects ==================== */
.contractor-projects {
    display: flex;
    gap: var(--spacing-xs);
    padding: 0 var(--spacing-md) var(--spacing-md);
    overflow-x: auto;
}

.contractor-projects .project-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.project-more {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-md);
    background: var(--primary-10);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.project-more span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
}

/* ==================== Active Project (Contractors) ==================== */
.active-project {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--spacing-md);
}

.active-project .project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.active-project .project-title {
    font-size: 1rem;
    font-weight: 700;
}

.project-status {
    padding: 4px 10px;
    background: var(--primary-10);
    border: 1px solid var(--primary-20);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--primary);
}

.project-contractor {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.project-contractor img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
}

.project-contractor span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==================== Progress Bar ==================== */
.progress-section {
    margin-bottom: var(--spacing-md);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.progress-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.progress-value {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
}

/* ==================== Milestones ==================== */
.milestones {
    display: flex;
    justify-content: space-between;
    padding-top: var(--spacing-md);
}

.milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.milestone-dot {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.milestone-dot .material-symbols-outlined {
    font-size: 14px;
    color: var(--background);
}

.milestone.completed .milestone-dot {
    background: var(--primary);
}

.milestone.current .milestone-dot {
    background: transparent;
    border: 2px solid var(--primary);
}

.milestone.current .milestone-dot .material-symbols-outlined {
    color: var(--primary);
}

.milestone-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    text-align: center;
}

.milestone.completed .milestone-label,
.milestone.current .milestone-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==================== Architect Detail Page ==================== */
.architect-profile {
    display: flex;
    gap: var(--spacing-md);
}

.architect-title {
    font-size: 0.875rem;
    color: var(--primary);
    margin-top: 2px;
}

.architect-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.architect-location .material-symbols-outlined {
    font-size: 16px;
}

.architect-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.architect-actions .btn {
    flex: 1;
}

/* ==================== Tabs ==================== */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 var(--spacing-md);
}

.tab {
    flex: 1;
    padding: var(--spacing-md);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==================== Projects Grid (Architect) ==================== */
.architect-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 2px;
}

.architect-project-card {
    position: relative;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

.architect-project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.architect-project-card:hover::after {
    opacity: 1;
}

.architect-project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-sm);
    z-index: 1;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-fast);
}

.architect-project-card:hover .architect-project-info {
    opacity: 1;
    transform: translateY(0);
}

.architect-project-name {
    font-size: 0.8125rem;
    font-weight: 600;
}

.architect-project-type {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* ==================== Blueprints ==================== */
.blueprints-section {
    padding: var(--spacing-md);
}

.blueprint-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.blueprint-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #0a1a15 0%, #1a2e29 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.blueprint-svg {
    width: 90%;
    height: 90%;
    opacity: 0.6;
}

.blueprint-controls {
    position: absolute;
    bottom: var(--spacing-sm);
    right: var(--spacing-sm);
    display: flex;
    gap: var(--spacing-xs);
}

.blueprint-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.blueprint-btn .material-symbols-outlined {
    font-size: 20px;
}

.blueprint-details {
    padding: var(--spacing-md);
}

.blueprint-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.blueprint-meta {
    display: flex;
    gap: var(--spacing-lg);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.blueprint-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.blueprint-meta .material-symbols-outlined {
    font-size: 16px;
}

.floor-tabs {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border);
}

.floor-tab {
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    font-family: inherit;
}

.floor-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ==================== Reviews ==================== */
.reviews-section {
    padding: var(--spacing-md);
}

.review-card {
    padding: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
}

.review-header {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    overflow: hidden;
}

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

.review-info {
    flex: 1;
}

.review-name {
    font-size: 0.9375rem;
    font-weight: 600;
}

.review-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.review-rating {
    display: flex;
    gap: 2px;
}

.review-rating .material-symbols-outlined {
    font-size: 16px;
    color: var(--star);
}

.review-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== Stat Item (Architect detail) ==================== */
.stat-item {
    text-align: center;
}

/* ==================== Media Queries ==================== */
@media (min-width: 500px) {
    body {
        background: linear-gradient(135deg, #0a1a15 0%, #051510 100%);
    }

    .app-container {
        border-radius: 40px;
        box-shadow:
            0 0 0 10px #111,
            0 0 0 12px #222,
            0 50px 100px rgba(0, 0, 0, 0.5);
        margin: 20px auto;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        overflow-x: hidden;
    }
}
