        html, body {
            height: auto;
            min-height: 100vh;
            overflow-x: hidden;
            overflow-y: auto !important; /* Override styles.css overflow:hidden to enable scrolling */
            scroll-behavior: smooth;
        }
        
        body {
            background-color: #f8f9fa;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            margin: 0;
            padding: 0;
        }
        
        .property-container {
            max-width: 1600px;
            margin: 0 auto;
            padding: 16px;
            min-height: calc(100vh - 48px);
            position: relative;
            z-index: 1;
            overflow: visible; /* Ensure sticky positioning works */
        }
        
        /* Fixed Header Container - always stays at top */
        .sticky-header-container {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            z-index: 1000 !important;
            background: white !important;
            width: 100% !important;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .sticky-header-content {
            max-width: 1600px;
            margin: 0 auto;
        }
        
        @media (max-width: 768px) {
            .sticky-header-container {
                padding-top: 8px;
            }
            
            .property-title-bar {
                padding-top: 28px;
                padding-bottom: 16px;
            }
            
            .property-main-address {
                margin-top: 4px;
            }
        }
        
        /* Add padding to body to account for fixed header */
        body {
            padding-top: 0; /* Will be set dynamically via JS */
        }

        /* Property Title Bar */
        .property-title-bar {
            background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
            color: white;
            padding: 20px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            position: relative;
            z-index: 2;
        }
        
        .property-main-address {
            font-size: 2rem;
            font-weight: 700;
            margin: 0;
            text-shadow: 0 1px 2px rgba(0,0,0,0.2);
            flex: 1;
            text-align: center;
        }

        /* Back button positioned on left side of title (large screens) */
        .back-btn-left {
            margin-right: 16px;
            flex-shrink: 0;
        }

        /* Hide mobile back button on large screens */
        .back-btn-mobile {
            display: none !important;
        }

        .favorite-btn-details {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            color: rgba(255, 255, 255, 0.8);
            font-size: 1.2rem;
            backdrop-filter: blur(10px);
        }

        .favorite-btn-details:hover {
            border-color: #FFD700;
            color: #FFD700;
            transform: scale(1.05);
            background: rgba(255, 215, 0, 0.1);
        }

        .favorite-btn-details.active {
            border-color: #FFD700;
            background-color: rgba(255, 215, 0, 0.2);
            color: #FFD700;
        }

        .favorite-btn-details.active i {
            color: #FFD700;
        }

        /* Share Button Styles */
        .share-btn-details {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            color: rgba(255, 255, 255, 0.8);
            font-size: 1.2rem;
            backdrop-filter: blur(10px);
            margin-right: 8px;
        }

        .share-btn-details:hover {
            border-color: #0d6efd;
            color: #0d6efd;
            transform: scale(1.05);
            background: rgba(30, 58, 95, 0.1);
        }

        .notes-btn-details {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            color: rgba(255, 255, 255, 0.8);
            font-size: 1.2rem;
            backdrop-filter: blur(10px);
            margin-right: 8px;
        }

        .notes-btn-details:hover {
            border-color: #ffc107;
            color: #ffc107;
            transform: scale(1.05);
            background: rgba(255, 193, 7, 0.1);
        }

        .notes-btn-details.has-notes {
            border-color: #ffc107;
            background: rgba(255, 193, 7, 0.2);
            color: #ffc107;
        }

        .notebook-btn-details {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            width: 48px;
            height: 48px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            color: rgba(255, 255, 255, 0.8);
            font-size: 1.2rem;
            backdrop-filter: blur(10px);
            margin-right: 8px;
            text-decoration: none;
        }

        .notebook-btn-details:hover {
            border-color: #20c997;
            color: #20c997;
            background: rgba(32, 201, 151, 0.1);
            transform: scale(1.05);
            text-decoration: none;
        }

        /* Back Button in Header */
        .back-btn-details {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            color: rgba(255, 255, 255, 0.8);
            font-size: 1.2rem;
            backdrop-filter: blur(10px);
            margin-right: 8px;
        }

        .back-btn-details:hover {
            border-color: #6c757d;
            color: #fff;
            transform: scale(1.05);
            background: rgba(108, 117, 125, 0.2);
        }

        /* Chat Button in Header */
        .chat-btn-details {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            color: rgba(255, 255, 255, 0.8);
            font-size: 1.2rem;
            backdrop-filter: blur(10px);
            margin-right: 8px;
            position: relative;
        }

        .chat-btn-details:hover {
            border-color: #0d6efd;
            color: #0d6efd;
            transform: scale(1.05);
            background: rgba(30, 58, 95, 0.1);
        }

        .chat-btn-details.has-conversation {
            border-color: #0d6efd;
            background: rgba(30, 58, 95, 0.35);
            color: #fff;
            box-shadow: 0 0 8px rgba(30, 58, 95, 0.4);
        }

        .chat-btn-details.has-unread {
            border-color: #dc3545;
            background: rgba(220, 53, 69, 0.2);
            color: #dc3545;
            animation: pulse-unread 2s infinite;
        }

        @keyframes pulse-unread {
            0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
            50% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
        }

        .chat-unread-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            background: #dc3545;
            color: white;
            font-size: 10px;
            min-width: 18px;
            height: 18px;
            border-radius: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            position: relative;
            z-index: 2;
        }

        /* Share Modal Styles */
        .share-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

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

        .share-modal {
            background: white;
            border-radius: 16px;
            width: 90%;
            max-width: 480px;
            max-height: 90vh;
            overflow: hidden;
            transform: scale(0.9);
            transition: transform 0.3s ease;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }

        .share-modal-overlay.active .share-modal {
            transform: scale(1);
        }

        .share-modal-header {
            background: linear-gradient(135deg, #0d6efd 0%, #003785 100%);
            color: white;
            padding: 20px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .share-modal-header h3 {
            margin: 0;
            font-size: 18px;
            font-weight: 600;
        }

        .share-modal-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s ease;
        }

        .share-modal-close:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .share-modal-tabs {
            display: flex;
            border-bottom: 1px solid #e9ecef;
        }

        .share-modal-tab {
            flex: 1;
            padding: 14px;
            border: none;
            background: transparent;
            font-size: 14px;
            font-weight: 500;
            color: #6c757d;
            cursor: pointer;
            transition: all 0.2s ease;
            border-bottom: 2px solid transparent;
        }

        .share-modal-tab:hover {
            color: #0d6efd;
            background: #f8f9fa;
        }

        .share-modal-tab.active {
            color: #0d6efd;
            border-bottom-color: #0d6efd;
        }

        .share-modal-content {
            padding: 24px;
            max-height: 400px;
            overflow-y: auto;
        }

        .share-tab-pane {
            display: none;
        }

        .share-tab-pane.active {
            display: block;
        }

        .share-input-group {
            margin-bottom: 16px;
        }

        .share-input-group label {
            display: block;
            font-size: 14px;
            font-weight: 500;
            color: #495057;
            margin-bottom: 8px;
        }

        .share-input-group textarea,
        .share-input-group input {
            width: 100%;
            padding: 12px;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            font-size: 14px;
            transition: border-color 0.2s ease;
            resize: vertical;
        }

        .share-input-group textarea:focus,
        .share-input-group input:focus {
            outline: none;
            border-color: #0d6efd;
            box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
        }

        .share-btn-primary {
            width: 100%;
            padding: 14px;
            background: linear-gradient(135deg, #0d6efd 0%, #003785 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .share-btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
        }

        .share-btn-primary:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .copy-link-container {
            display: flex;
            gap: 8px;
            margin-bottom: 16px;
        }

        .copy-link-input {
            flex: 1;
            padding: 12px;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            font-size: 13px;
            background: #f8f9fa;
        }

        .copy-link-btn {
            padding: 12px 20px;
            background: #28a745;
            color: white;
            border: none;
            border-radius: 8px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .copy-link-btn:hover {
            background: #218838;
        }

        .copy-link-btn.copied {
            background: #17a2b8;
        }

        .no-agent-message {
            text-align: center;
            padding: 20px;
            color: #6c757d;
        }

        .no-agent-message i {
            font-size: 48px;
            color: #dee2e6;
            margin-bottom: 12px;
        }

        /* Notes Panel Styles */
        .notes-panel {
            position: fixed;
            top: 0;
            right: -400px;
            width: 400px;
            max-width: 90vw;
            height: 100vh;
            background: white;
            box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
            z-index: 10001;
            display: flex;
            flex-direction: column;
            transition: right 0.3s ease;
        }

        .notes-panel.active {
            right: 0;
        }

        .notes-panel-header {
            background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
            color: #212529;
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .notes-panel-header h3 {
            margin: 0;
            font-size: 18px;
            font-weight: 600;
        }

        .notes-panel-close {
            background: rgba(0, 0, 0, 0.1);
            border: none;
            color: #212529;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
        }

        .notes-panel-content {
            flex: 1;
            overflow-y: auto;
            padding: 16px;
        }

        .note-item {
            background: #fff9e6;
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 12px;
            border-left: 3px solid #ffc107;
        }

        .note-item .note-text {
            font-size: 14px;
            color: #333;
            margin-bottom: 6px;
        }

        .note-item .note-time {
            font-size: 12px;
            color: #6c757d;
        }

        .notes-panel-input {
            padding: 16px;
            border-top: 1px solid #e9ecef;
            display: flex;
            gap: 8px;
        }

        .notes-panel-input textarea {
            flex: 1;
            padding: 12px;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            resize: none;
            font-size: 14px;
        }

        .notes-panel-input button {
            padding: 12px 16px;
            background: #ffc107;
            color: #212529;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
        }

        .empty-notes {
            text-align: center;
            padding: 40px 20px;
            color: #6c757d;
        }

        .empty-notes i {
            font-size: 48px;
            color: #dee2e6;
            margin-bottom: 12px;
        }

        /* Conversation Panel Styles - Slide out from right */
        .conversation-panel {
            position: fixed;
            top: 0;
            right: -420px;
            width: 400px;
            max-width: 90vw;
            height: 100vh;
            background: white;
            box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
            z-index: 10001;
            display: flex;
            flex-direction: column;
            transition: right 0.3s ease;
        }

        .conversation-panel.active {
            right: 0;
        }

        .conversation-panel-header {
            background: linear-gradient(135deg, #0d6efd 0%, #003785 100%);
            color: white;
            padding: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            cursor: pointer;
        }

        .conversation-panel-header h4 {
            margin: 0;
            font-size: 14px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .conversation-badge {
            background: #dc3545;
            color: white;
            font-size: 11px;
            padding: 2px 6px;
            border-radius: 10px;
            font-weight: 600;
        }

        .conversation-panel-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 12px;
        }

        .conversation-messages {
            flex: 1;
            overflow-y: auto;
            padding: 16px;
        }

        .conversation-message {
            margin-bottom: 12px;
            max-width: 85%;
        }

        .conversation-message.sent {
            margin-left: auto;
        }

        .conversation-message .bubble {
            padding: 10px 14px;
            border-radius: 16px;
            font-size: 14px;
            line-height: 1.4;
        }

        .conversation-message.received .bubble {
            background: #f1f3f4;
            color: #333;
            border-bottom-left-radius: 4px;
        }

        .conversation-message.sent .bubble {
            background: #0d6efd;
            color: white;
            border-bottom-right-radius: 4px;
        }

        .conversation-message .meta {
            font-size: 11px;
            color: #6c757d;
            margin-top: 4px;
            padding: 0 4px;
        }

        .conversation-message.sent .meta {
            text-align: right;
        }

        .conversation-input-area {
            padding: 12px;
            border-top: 1px solid #e9ecef;
            display: flex;
            gap: 8px;
        }

        .conversation-input-area input {
            flex: 1;
            padding: 10px 14px;
            border: 1px solid #dee2e6;
            border-radius: 20px;
            font-size: 14px;
        }

        .conversation-input-area input:focus {
            outline: none;
            border-color: #0d6efd;
        }

        .conversation-input-area button {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #0d6efd;
            color: white;
            border: none;
            cursor: pointer;
        }

        
        /* Header Section */
        .header-section {
            background: white;
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 16px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            border: 1px solid #e9ecef;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 16px;
        }
        
        .property-title-section {
            flex: 1;
            min-width: 300px;
            display: flex;
            align-items: center;
            gap: 16px;
            flex-wrap: wrap;
        }
        
        .property-address {
            font-size: 1.8rem;
            font-weight: 700;
            color: #212529;
            margin-bottom: 4px;
            line-height: 1.2;
        }
        
        .listing-price {
            font-size: 2.2rem;
            font-weight: 700;
            color: #0066cc;
        }
        
        .sheriff-details {
            display: inline-flex;
            gap: 8px;
            flex-wrap: wrap;
            align-items: center;
            flex-shrink: 0;
        }
        
        .sheriff-field {
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 12px;
            padding: 4px 10px;
            font-size: 0.8rem;
            display: inline-flex;
            align-items: center;
            gap: 4px;
            white-space: nowrap;
        }
        
        .sheriff-label {
            font-weight: 600;
            color: #6c757d;
            font-size: 0.8rem;
        }
        
        .sheriff-value {
            color: #374151;
            font-weight: 500;
            font-size: 0.8rem;
        }
        
        .property-specs {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            align-items: center;
            align-self: center;
        }
        
        .spec-item {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 12px;
            background: #f8f9fa;
            border-radius: 6px;
            border: 1px solid #e9ecef;
            font-size: 0.9rem;
        }
        
        .spec-item i {
            color: #0066cc;
            font-size: 0.8rem;
        }
        
        .spec-value {
            font-weight: 600;
            color: #212529;
        }
        
        .na-value {
            color: #6c757d !important;
            font-style: italic;
            opacity: 0.8;
        }
        
        /* Main Content Grid */
        .main-content-grid {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 10px;
            margin-bottom: 10px;
            max-width: 100%;
            overflow: hidden;
            position: relative;
            z-index: 1;
        }
        
        /* Image Gallery Section */
        .image-section {
            background: white;
            border-radius: 12px;
            padding: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            border: 1px solid #e9ecef;
            min-width: 0; /* Allow flex item to shrink below content size */
            overflow: hidden; /* Prevent content from overflowing */
            position: relative;
            z-index: 1;
        }
        
        .image-gallery-container {
            width: 100%;
            position: relative;
            max-width: 100%;
            overflow: hidden;
            z-index: 1;
        }

        /* Vertical Gallery Layout */
        .booking-gallery-grid {
            display: flex;
            flex-direction: column;
            gap: 12px;
            border-radius: 12px;
            overflow: hidden;
        }
        
        /* Main Large Image */
        .main-image-container {
            position: relative;
            background: #f8f9fa;
            overflow: visible;
            cursor: pointer;
            border-radius: 8px;
            width: 100%;
            aspect-ratio: 16/10;
        }
        
        .main-property-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            transition: transform 0.3s ease;
            border-radius: 8px;
            overflow: hidden;
        }
        
        .main-image-container:hover .main-property-image {
            transform: scale(1.02);
        }
        
        /* Horizontal Thumbnail Strip */
        .small-images-grid {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding: 4px 0;
            scroll-behavior: smooth;
        }
        
        .small-images-grid::-webkit-scrollbar {
            height: 6px;
        }
        
        .small-images-grid::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 6px;
        }
        
        .small-images-grid::-webkit-scrollbar-thumb {
            background: #0066cc;
            border-radius: 6px;
        }
        
        .small-images-grid::-webkit-scrollbar-thumb:hover {
            background: #004499;
        }
        
        .small-image-container {
            position: relative;
            background: #f8f9fa;
            overflow: hidden;
            cursor: pointer;
            flex-shrink: 0;
            width: 120px;
            height: 80px;
            border-radius: 6px;
            border: 2px solid transparent;
            transition: all 0.2s ease;
        }
        
        .small-image-container:hover {
            border-color: #0066cc;
            transform: scale(1.05);
        }
        
        .small-property-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }
        
        .small-image-container:hover .small-property-image {
            transform: scale(1.05);
        }
        
        /* More Photos Overlay */
        .more-photos-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .small-image-container:last-child .more-photos-overlay {
            opacity: 1;
        }
        
        .small-image-container:last-child:hover .more-photos-overlay {
            background: rgba(0, 0, 0, 0.8);
        }
        
        .more-photos-count {
            font-size: 1.5rem;
            margin-bottom: 4px;
        }
        
        .more-photos-text {
            font-size: 0.9rem;
            opacity: 0.9;
        }
        
        /* Image Counter for Main Image */
        .main-image-counter {
            position: absolute;
            top: 12px;
            left: 12px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 6px 12px;
            border-radius: 16px;
            font-size: 0.85rem;
            font-weight: 500;
            backdrop-filter: blur(4px);
        }
        
        /* Hover overlay for clickable indication */
        .gallery-hover-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.1);
            opacity: 0;
            transition: opacity 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.1rem;
        }
        
        .main-image-container:hover .gallery-hover-overlay,
        .small-image-container:hover .gallery-hover-overlay {
            opacity: 1;
        }
        
        /* Gallery Header */
        .gallery-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }
        
        .gallery-title {
            font-size: 1rem;
            font-weight: 600;
            color: #212529;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .gallery-title i {
            color: #0066cc;
        }
        
        .view-all-btn {
            background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.8) 100%);
            border: 2px solid #0066cc;
            color: #0066cc;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.25s ease;
            box-shadow: 0 2px 4px rgba(0,102,204,0.15), 0 1px 2px rgba(0,102,204,0.1);
            position: relative;
            overflow: hidden;
        }

        .view-all-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(0,102,204,0.1), transparent);
            transition: left 0.5s ease;
        }

        .view-all-btn:hover {
            background: #0066cc;
            color: white;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0,102,204,0.25), 0 2px 4px rgba(0,102,204,0.15);
            border-color: #0052a3;
        }

        .view-all-btn:hover::before {
            left: 100%;
        }

        .view-all-btn:active {
            transform: translateY(0);
            box-shadow: 0 1px 2px rgba(0,102,204,0.1);
            transition: all 0.1s ease;
        }
        
        /* Image Lightbox Modal */
        .image-lightbox {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 9999;
            display: none;
            justify-content: center;
            align-items: center;
        }
        
        .lightbox-content {
            position: relative;
            max-width: 90vw;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
        }
        
        .lightbox-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px;
            color: white;
        }
        
        .lightbox-counter {
            font-size: 1rem;
            font-weight: 500;
        }
        
        .lightbox-close {
            background: none;
            border: none;
            color: white;
            font-size: 2rem;
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            transition: background 0.2s ease;
        }
        
        .lightbox-close:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        
        .lightbox-image-container {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 60vh; /* Fixed minimum height to prevent layout shifts */
            width: 100%;
        }
        
        .lightbox-image {
            max-width: 100%;
            max-height: 60vh; /* Fixed max height */
            min-height: 40vh; /* Fixed minimum height */
            object-fit: contain;
            border-radius: 8px;
            transition: opacity 0.3s ease; /* Smooth transition when changing images */
        }
        
        .lightbox-nav {
            position: fixed; /* Fixed positioning relative to viewport */
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.8);
            color: white;
            border: none;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 1.5rem;
            transition: all 0.2s ease;
            z-index: 10000; /* Ensure buttons are always on top */
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }
        
        .lightbox-nav:hover {
            background: rgba(0, 0, 0, 0.9);
            transform: translateY(-50%) scale(1.1);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
        }
        
        .lightbox-nav.prev {
            left: 20px; /* Fixed distance from left edge */
        }
        
        .lightbox-nav.next {
            right: 20px; /* Fixed distance from right edge */
        }
        
        .lightbox-thumbnails {
            display: flex;
            gap: 8px;
            justify-content: center;
            padding: 16px;
            overflow-x: auto;
            max-width: 90vw;
        }
        
        .lightbox-thumbnail {
            flex-shrink: 0;
            width: 60px;
            height: 45px;
            border-radius: 4px;
            overflow: hidden;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s ease;
        }
        
        .lightbox-thumbnail:hover {
            border-color: white;
        }
        
        .lightbox-thumbnail.active {
            border-color: #0066cc;
        }
        
        .lightbox-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .image-placeholder {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: #6c757d;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            position: absolute;
            top: 0;
            left: 0;
        }
        
        .image-placeholder i {
            font-size: 3rem;
            margin-bottom: 12px;
            opacity: 0.5;
        }
        
        .image-placeholder span {
            font-size: 0.9rem;
            opacity: 0.7;
        }
        
        /* Investment Scores Section */
        .investment-scores-section {
            background: white;
            border-radius: 12px;
            padding: 12px 16px;
            margin-bottom: 10px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
            border: 1px solid #e9ecef;
            transition: box-shadow 0.2s ease;
            overflow: visible;
            position: relative;
            z-index: 100;
        }
        
        .investment-scores-section:hover {
            box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
        }
        
        .scores-header-optimized {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0;
            gap: 10px;
            padding-bottom: 0;
            border-bottom: none;
            flex-wrap: wrap;
            overflow: visible;
            position: relative;
            z-index: 200;
        }
        
        /* Deal Score Badges - Compact horizontal display in header */
        .deal-score-badges {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            overflow: visible;
            position: relative;
            z-index: 200;
        }
        
        .score-badge {
            display: flex;
            align-items: center;
            gap: 6px;
            background: #f8f9fa;
            padding: 6px 10px;
            border-radius: 8px;
            border: 1px solid #e9ecef;
            position: relative;
        }
        
        .score-badge .badge-value {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.9rem;
            color: white;
            flex-shrink: 0;
        }
        
        .score-badge .badge-label {
            font-size: 0.75rem;
            font-weight: 600;
            color: #495057;
            white-space: nowrap;
            display: flex;
            align-items: center;
        }
        
        /* Badge info icon - visible ⓘ indicator (gray like other tooltips) */
        .badge-info-icon {
            font-size: 0.65rem;
            color: #6c757d;
            margin-left: 3px;
            font-style: normal;
        }
        
        .score-badge:hover .badge-info-icon {
            color: #495057;
        }
        
        /* Deal Score uses Bootstrap tooltip (HTML with colors) – hide CSS pseudo tooltip */
        .metric-tooltip.deal-score-bs-tooltip::after,
        .metric-tooltip.deal-score-bs-tooltip::before {
            display: none !important;
        }
        
        /* Score badge tooltips - use same style as other page tooltips */
        .score-badge.metric-tooltip {
            cursor: help;
        }
        
        .score-badge.metric-tooltip::after {
            content: attr(data-tooltip);
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.95);
            color: white;
            padding: 12px 14px;
            border-radius: 8px;
            font-size: 0.8rem;
            font-weight: 400;
            white-space: pre-line;
            width: max-content;
            max-width: 380px;
            min-width: 200px;
            text-align: left;
            line-height: 1.6;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            z-index: 99999;
            margin-top: 8px;
            box-shadow: 0 6px 20px rgba(0,0,0,0.4);
            border: 1px solid rgba(255,255,255,0.1);
        }
        
        .score-badge.metric-tooltip::before {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-bottom-color: rgba(0,0,0,0.95);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            z-index: 99999;
            margin-top: -4px;
        }
        
        .score-badge.metric-tooltip:hover::after,
        .score-badge.metric-tooltip:hover::before {
            opacity: 1;
        }
        
        /* Mobile: show tooltip on click/tap via tooltip-active class */
        .score-badge.metric-tooltip.tooltip-active::after,
        .score-badge.metric-tooltip.tooltip-active::before {
            opacity: 1;
        }
        
        /* Tooltip position adjustments to prevent viewport overflow */
        .score-badge.metric-tooltip.tooltip-left::after {
            left: 0;
            transform: translateX(0);
        }
        
        .score-badge.metric-tooltip.tooltip-left::before {
            left: 14px;
            transform: translateX(0);
        }
        
        .score-badge.metric-tooltip.tooltip-right::after {
            left: auto;
            right: 0;
            transform: translateX(0);
        }
        
        .score-badge.metric-tooltip.tooltip-right::before {
            left: auto;
            right: 14px;
            transform: translateX(0);
        }
        
        /* On touch devices, disable hover and rely on click */
        @media (hover: none) and (pointer: coarse) {
            .score-badge.metric-tooltip:hover::after,
            .score-badge.metric-tooltip:hover::before {
                opacity: 0;
            }
            
            .score-badge.metric-tooltip.tooltip-active::after,
            .score-badge.metric-tooltip.tooltip-active::before {
                opacity: 1;
            }
        }
        
        /* Badge value colors - ranks (Deal Score - much larger for emphasis) */
        .score-badge .badge-value.rank-1,
        .score-badge .badge-value.rank-2,
        .score-badge .badge-value.rank-3,
        .score-badge .badge-value.rank-4,
        .score-badge .badge-value.rank-5 {
            width: 40px;
            height: 40px;
            font-size: 1.5rem;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }
        
        /* Deal Score badge container - more prominent styling */
        .score-badge.deal-score-primary {
            padding: 10px 14px;
            background: linear-gradient(135deg, #ffffff, #f8f9fa);
            border: 1px solid #e9ecef;
            border-radius: 12px;
        }
        
        .score-badge.deal-score-primary .badge-label {
            font-size: 0.9rem;
            font-weight: 700;
            color: #212529;
        }
        
        /* Other score badges - keep smaller for contrast */
        .score-badge:not(.deal-score-primary) .badge-value {
            width: 26px;
            height: 26px;
            font-size: 0.85rem;
        }
        
        .score-badge:not(.deal-score-primary) .badge-label {
            font-size: 0.7rem;
        }
        
        .score-badge .badge-value.rank-1 { background: linear-gradient(135deg, #198754, #28a745); }
        .score-badge .badge-value.rank-2 { background: linear-gradient(135deg, #28a745, #20c997); }
        .score-badge .badge-value.rank-3 { background: linear-gradient(135deg, #ffc107, #ffb300); color: #212529; }
        .score-badge .badge-value.rank-4 { background: linear-gradient(135deg, #dc3545, #c82333); }
        .score-badge .badge-value.rank-5 { background: linear-gradient(135deg, #ff0000, #dc3545); }
        
        /* Badge value colors - grades */
        .score-badge .badge-value.grade-A { background: linear-gradient(135deg, #28a745, #20c997); }
        .score-badge .badge-value.grade-B { background: linear-gradient(135deg, #20c997, #17a2b8); }
        .score-badge .badge-value.grade-C { background: linear-gradient(135deg, #ffc107, #ffb300); color: #212529; }
        .score-badge .badge-value.grade-D { background: linear-gradient(135deg, #fd7e14, #dc3545); }
        .score-badge .badge-value.grade-E { background: linear-gradient(135deg, #dc3545, #c82333); }
        
        .badge-loading, .badge-na {
            font-size: 0.8rem;
            color: #6c757d;
            font-style: italic;
        }
        
        .scores-title {
            font-size: 1.15rem;
            font-weight: 700;
            color: #212529;
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
            letter-spacing: -0.01em;
        }

        .view-map-btn.view-map-btn-mobile {
            display: none;
        }
        
        .scores-title i {
            color: #0066cc;
            font-size: 1.1rem;
        }
        
        .scores-controls {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        
        /* Strategy Tabs */
        .strategy-tabs {
            display: flex;
            background: linear-gradient(135deg, #f6f9ff 0%, #eef2f7 100%);
            border-radius: 12px;
            padding: 4px;
            border: 1px solid #dbe3ef;
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
        }
        
        .strategy-tab {
            padding: 8px 14px;
            border: none;
            background: transparent;
            color: #6c757d;
            font-weight: 500;
            font-size: 0.85rem;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
            border: 1px solid transparent;
            flex: 1 1 0;
            justify-content: center;
        }
        
        .strategy-tab.active {
            background: linear-gradient(135deg, #0d6efd 0%, #004499 100%);
            color: white;
            box-shadow: 0 3px 8px rgba(0,0,0,0.12);
            font-weight: 600;
            border-color: rgba(0,102,204,0.3);
        }
        
        .strategy-tab.loading {
            position: relative;
            pointer-events: none;
        }
        
        .strategy-tab.loading > i,
        .strategy-tab.loading > span {
            opacity: 0;
        }
        
        .strategy-tab-spinner {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 20px;
            height: 20px;
        }
        
        .strategy-tab-spinner img {
            width: 100%;
            height: 100%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        
        .strategy-tab:hover:not(.active) {
            color: #004499;
            background: rgba(30,58,95,0.08);
            border-color: rgba(30,58,95,0.12);
        }
        
        .strategy-tab:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            pointer-events: none;
        }
        
        .strategy-tab:disabled:hover {
            background: transparent;
            color: #6c757d;
        }
        
        .strategy-tab i {
            font-size: 0.9rem;
        }

        /* Integrated Scores and Deal Info - now hidden as all content is in header badges */
        .scores-deal-integrated {
            display: none;
        }
        
        .compact-about-deal,
        .compact-factors,
        .compact-factor-item {
            display: none;
        }

        .scores-grid {
            display: none;
        }

        .compact-about-deal .compact-intro {
            font-size: 0.8rem;
            color: #495057;
            margin-bottom: 10px;
            font-weight: 500;
            line-height: 1.4;
        }

        .compact-about-deal .compact-factors {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 10px;
            margin-top: 0;
            padding-top: 20px;
        }

        .compact-about-deal .compact-factor-item {
            font-size: 0.75rem;
            padding: 10px 12px;
            background: #f8f9fa;
            border-radius: 6px;
            border: 1px solid #e9ecef;
            transition: all 0.2s ease;
            display: flex;
            flex-direction: column;
            gap: 6px;
            position: relative;
        }

        .compact-about-deal .compact-factor-item:hover {
            background: #f0f0f0;
            border-color: #dee2e6;
            transform: translateY(-1px);
        }

        .compact-about-deal .compact-factor-header {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .compact-about-deal .compact-grade-square {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.85rem;
            color: white;
            flex-shrink: 0;
            box-shadow: 0 2px 4px rgba(0,0,0,0.15);
            position: relative;
        }

        .compact-about-deal .compact-grade-square.rank-1 { background: linear-gradient(135deg, #198754, #28a745); }
        .compact-about-deal .compact-grade-square.rank-2 { background: linear-gradient(135deg, #28a745, #20c997); }
        .compact-about-deal .compact-grade-square.rank-3 { background: linear-gradient(135deg, #ffc107, #ffb300); color: #212529; }
        .compact-about-deal .compact-grade-square.rank-4 { background: linear-gradient(135deg, #dc3545, #c82333); }
        .compact-about-deal .compact-grade-square.rank-5 { background: linear-gradient(135deg, #ff0000, #dc3545); }
        .compact-about-deal .compact-grade-square.grade-A { background: linear-gradient(135deg, #28a745, #20c997); }
        .compact-about-deal .compact-grade-square.grade-B { background: linear-gradient(135deg, #20c997, #17a2b8); }
        .compact-about-deal .compact-grade-square.grade-C { background: linear-gradient(135deg, #ffc107, #ffb300); color: #212529; }
        .compact-about-deal .compact-grade-square.grade-D { background: linear-gradient(135deg, #fd7e14, #dc3545); }
        .compact-about-deal .compact-grade-square.grade-E { background: linear-gradient(135deg, #dc3545, #c82333); }
        .compact-about-deal .compact-grade-square.grade-na, .compact-about-deal .compact-grade-square.rank-na { background: linear-gradient(135deg, #6c757d, #5a6268); color: white; }

        .compact-about-deal .compact-rank-item .compact-grade-square {
            width: 75px;
            height: 75px;
            font-size: 3.5rem;
        }

        .compact-about-deal .compact-factor-label {
            font-weight: 600;
            font-size: 0.8rem;
            color: #212529;
            letter-spacing: 0.01em;
            flex: 1;
        }

        .compact-about-deal .compact-factor-value {
            font-size: 0.75rem;
            color: #495057;
            line-height: 1.4;
            margin-top: 2px;
        }

        .compact-about-deal .compact-motivations {
            margin-top: 6px;
            padding-left: 0;
        }

        .compact-about-deal .compact-motivations ul {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .compact-about-deal .compact-motivations li {
            font-size: 0.7rem;
            color: #6c757d;
            line-height: 1.4;
            margin: 3px 0;
            padding-left: 16px;
            position: relative;
        }

        .compact-about-deal .compact-motivations li::before {
            content: '→';
            position: absolute;
            left: 0;
            color: #0066cc;
            font-weight: 600;
            font-size: 0.65rem;
        }

        .demographics-within-scores {
            flex: 1;
            min-width: 300px;
            padding: 16px;
            background: #f8f9fa;
            border-radius: 6px;
            border: 1px solid #e9ecef;
        }

        .demographics-title {
            font-size: 0.85rem;
            font-weight: 600;
            color: #495057;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .demographics-title i {
            color: #0066cc;
            font-size: 0.75rem;
        }

        .demographics-horizontal {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            align-items: baseline;
        }

        .demo-item {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 4px 8px;
            background: white;
            border-radius: 4px;
            border: 1px solid #dee2e6;
            font-size: 0.8rem;
            min-height: 24px;
            line-height: 1.2;
        }

        .demo-item.featured {
            background: linear-gradient(135deg, #e8f4fd 0%, #cce7ff 100%);
            border-color: #0066cc;
        }

        .demo-label {
            color: #6c757d;
            font-weight: 500;
            font-size: 0.7rem;
        }

        .demo-value {
            font-weight: 600;
            color: #212529;
        }

        .demo-item.featured .demo-value {
            color: #0066cc;
        }
        
        .main-rank {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-right: 0;
        }
        
        .main-rank-square {
            width: 64px;
            height: 64px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            position: relative;
            justify-content: center;
            font-weight: 700;
            font-size: 1.9rem;
            color: white;
            margin-bottom: 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.25), 0 2px 4px rgba(0,0,0,0.15);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            z-index: 10;
        }
        
        .main-rank-square:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.3), 0 3px 6px rgba(0,0,0,0.2);
        }
        
        .main-rank-label {
            font-size: 0.875rem;
            color: #6c757d;
            font-weight: 600;
            letter-spacing: 0.02em;
        }
        
        .other-scores {
            display: flex;
            gap: 16px;
            align-items: flex-start;
        }
        
        .score-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            transition: transform 0.2s ease;
        }
        
        .score-item:hover {
            transform: translateY(-2px);
        }
        
        /* Deal Analysis Section */
        .deal-analysis-card {
            background: white;
            border-radius: 12px;
            padding: 12px 16px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            border: 1px solid #e9ecef;
        }

        /* Off-market instant rent CTA (fits main content grid, matches card style) */
        .instant-rent-cta-card {
            grid-column: 1;
            width: 100%;
            min-width: 0;
            max-width: 100%;
            box-sizing: border-box;
            background: white;
            border-radius: 12px;
            padding: 1.25rem 1.5rem;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            border: 1px solid #e9ecef;
        }
        .instant-rent-cta-card .instant-rent-cta-title {
            font-size: 0.95rem;
            color: #6c757d;
            margin-bottom: 1rem;
            line-height: 1.5;
        }
        .instant-rent-cta-card .btn-primary {
            display: inline-flex;
            align-items: center;
        }

        /* Full-width analysis card when only "Run monthly rent analysis" is shown */
        #analysis.rent-analysis-minimal {
            grid-column: 1 / -1;
        }

        /* Big "Run monthly rent analysis" button inside deal metrics (when rent not available) */
        .metric-item-instant-rent {
            flex-direction: column;
            align-items: stretch;
            padding: 20px;
        }
        .metric-item-instant-rent .metric-content {
            margin-bottom: 12px;
        }
        .metric-action-instant-rent {
            width: 100%;
            margin-left: 0;
            margin-top: 4px;
        }
        .instant-rent-cta-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            min-height: 52px;
            padding: 14px 28px;
            font-size: 1.05rem;
            font-weight: 600;
            border-radius: 10px;
            text-decoration: none;
            transition: opacity 0.2s ease, transform 0.1s ease;
        }
        .instant-rent-cta-btn:hover {
            opacity: 0.92;
            transform: translateY(-1px);
        }
        
        .section-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: #212529;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .section-title i {
            color: #0066cc;
        }
        
        .deal-metrics {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        
        .metric-item {
            padding: 10px 12px;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-radius: 8px;
            border: 1px solid #dee2e6;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .metric-item.featured {
            background: linear-gradient(135deg, #e8f4fd 0%, #cce7ff 100%);
            border-color: #0066cc;
            padding: 12px;
        }
        
        .metric-content {
            display: flex;
            flex-direction: column;
            flex: 1;
        }
        
        .metric-label {
            font-size: 0.85rem;
            color: #6c757d;
            margin-bottom: 2px;
            font-weight: 500;
        }
        
        .metric-value {
            font-size: 1.2rem;
            font-weight: 700;
            color: #212529;
        }
        
        .metric-item.featured .metric-value {
            color: #0066cc;
            font-size: 1.4rem;
        }
        
        /* Combined Metrics (side-by-side values) */
        .metric-item.combined-metric {
            padding: 12px 16px;
        }
        
        .metric-item.combined-metric .metric-label {
            font-size: 0.85rem;
            font-weight: 600;
            color: #495057;
            margin-bottom: 8px;
        }
        
        .combined-values-row {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }
        
        .combined-metric-value {
            flex: 1;
            min-width: 100px;
            text-align: center;
            padding: 10px 12px;
            background: white;
            border-radius: 8px;
            border: 1px solid #dee2e6;
        }
        
        .combined-metric-label {
            font-size: 0.7rem;
            font-weight: 600;
            color: #6c757d;
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .combined-metric-val {
            font-size: 1.2rem;
            font-weight: 700;
            color: #212529;
        }
        
        .combined-metric-val.na-value {
            color: #adb5bd;
            font-style: italic;
        }
        
        /* BRRRR Analysis Section */
        .brrrr-analysis-section {
            padding: 16px 0;
        }

        .brrrr-slider-stack {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 8px;
        }

        /* Assumptions + report rows sit below the BRRRR summary (grid, health checks, disclaimer) */
        .brrrr-basis-metrics {
            margin-top: 16px;
        }

        .brrrr-metrics-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 10px;
            margin-bottom: 16px;
            padding: 14px;
            background: #f8f9fa;
            border-radius: 10px;
            border: 1px solid #e9ecef;
        }

        .brrrr-metric {
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
        }

        .brrrr-metric .brrrr-metric-value {
            font-size: 1.1em;
            font-weight: 600;
            color: #212529;
        }

        .brrrr-metric .brrrr-metric-value.primary {
            font-size: 1.4em;
            font-weight: 700;
        }

        .brrrr-metric .brrrr-metric-label {
            font-size: 0.78em;
            color: #6c757d;
        }

        .brrrr-health-checks {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 14px;
        }

        .brrrr-health-badge {
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 0.8em;
            font-weight: 500;
        }

        .brrrr-health-badge.pass {
            background: #d1e7dd;
            color: #0f5132;
        }

        .brrrr-health-badge.fail {
            background: #f8d7da;
            color: #842029;
        }

        .brrrr-health-badge.warn {
            background: #fff3cd;
            color: #664d03;
        }

        .brrrr-disclaimer {
            margin: 0 0 8px 0;
            font-size: 0.82em;
            color: #6c757d;
        }

        .brrrr-disclaimer i {
            margin-right: 4px;
        }

        .metric-action {
            margin-left: 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        
        .mini-action-btn {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            transition: all 0.25s ease;
            border: 2px solid rgba(0,0,0,0.1);
            font-size: 0.85rem;
            cursor: pointer;
            position: relative;
            box-shadow: 0 2px 4px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.1);
            background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
        }
        
        .mini-action-btn.report {
            background: linear-gradient(135deg, #1e88e5, #1976d2);
            color: white;
        }
        
        .mini-action-btn.rehab {
            background: linear-gradient(135deg, #ffc107, #ffb300);
            color: #212529;
        }
        
        .mini-action-btn:hover {
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.15);
            border-color: rgba(0,0,0,0.2);
        }

        .mini-action-btn:active {
            transform: translateY(0) scale(0.98);
            box-shadow: 0 1px 2px rgba(0,0,0,0.1), inset 0 1px 2px rgba(0,0,0,0.1);
            transition: all 0.1s ease;
        }
        
        .mini-action-btn.disabled {
            background: #f8f9fa;
            color: #6c757d;
            cursor: not-allowed;
            opacity: 0.6;
            box-shadow: none;
            border-color: rgba(0,0,0,0.05);
        }

        .mini-action-btn.disabled:hover {
            transform: none;
            box-shadow: none;
            border-color: rgba(0,0,0,0.05);
        }

        /* Button labels */
        .btn-label {
            font-size: 0.65rem;
            font-weight: 600;
            color: #495057;
            text-align: center;
            margin-top: 4px;
            line-height: 1;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            opacity: 0.8;
        }

        .mini-action-btn:hover + .btn-label,
        .mini-action-btn:active + .btn-label {
            color: #212529;
            opacity: 1;
        }
        
        .mini-action-btn.offer {
            background: linear-gradient(135deg, #4CAF50, #45a049);
            color: white;
        }
        
        .mini-action-btn.video-tour {
            background: linear-gradient(135deg, #6f42c1, #5a32a3);
            color: white;
        }
        
        .mini-action-btn::after {
            content: attr(data-tooltip);
            position: absolute;
            top: 50%;
            right: 100%;
            transform: translateY(-50%);
            background: rgba(0,0,0,0.95);
            color: white;
            padding: 10px 14px;
            border-radius: 8px;
            font-size: 0.8rem;
            white-space: pre-line;
            max-width: 300px;
            min-width: 200px;
            text-align: left;
            line-height: 1.4;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            z-index: 1000;
            margin-right: 10px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            border: 1px solid rgba(255,255,255,0.1);
        }
        
        .mini-action-btn::before {
            content: '';
            position: absolute;
            top: 50%;
            right: 100%;
            transform: translateY(-50%) translateX(4px);
            border: 6px solid transparent;
            border-left-color: rgba(0,0,0,0.95);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            z-index: 1000;
            margin-right: 4px;
        }

        .mini-action-btn:hover::after,
        .mini-action-btn:hover::before {
            opacity: 1;
        }
        
        /* Score Badge Styling */
        .main-rank-square.rank-1, .grade-square.rank-1 { background: linear-gradient(135deg, #198754, #28a745); }
        .main-rank-square.rank-2, .grade-square.rank-2 { background: linear-gradient(135deg, #28a745, #20c997); }
        .main-rank-square.rank-3, .grade-square.rank-3 { background: linear-gradient(135deg, #ffc107, #ffb300); color: #212529; }
        .main-rank-square.rank-4, .grade-square.rank-4 { background: linear-gradient(135deg, #dc3545, #c82333); }
        .main-rank-square.rank-5, .grade-square.rank-5 { background: linear-gradient(135deg, #ff0000, #dc3545); }
        
        .grade-square {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.95rem;
            color: white;
            margin-bottom: 6px;
            box-shadow: 0 3px 6px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.1);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            position: relative;
            z-index: 10;
        }
        
        .grade-square:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.25), 0 2px 4px rgba(0,0,0,0.15);
        }
        
        .grade-square.grade-A { background: linear-gradient(135deg, #28a745, #20c997); }
        .grade-square.grade-B { background: linear-gradient(135deg, #20c997, #17a2b8); }
        .grade-square.grade-C { background: linear-gradient(135deg, #ffc107, #ffb300); color: #212529; }
        .grade-square.grade-D { background: linear-gradient(135deg, #fd7e14, #dc3545); }
        .grade-square.grade-E { background: linear-gradient(135deg, #dc3545, #c82333); }
        .grade-square.grade-na, .main-rank-square.rank-na { background: linear-gradient(135deg, #6c757d, #5a6268); color: white; }
        
        .score-label {
            font-size: 0.8rem;
            color: #6c757d;
            font-weight: 600;
            text-align: center;
            letter-spacing: 0.02em;
            margin-top: 2px;
        }
        
        /* Content Sections */
        .content-section {
            background: white;
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 16px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            border: 1px solid #e9ecef;
        }

        /* Dedicated Neighborhood Section */
        .neighborhood-section {
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            border: 1px solid #e9ecef;
            padding: 24px;
            margin-bottom: 16px;
            position: relative;
            z-index: 1;
        }

        .neighborhood-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 12px;
            margin-top: 16px;
        }

        .neighborhood-item {
            background: white;
            padding: 12px;
            border-radius: 8px;
            border: 1px solid #e9ecef;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            transition: all 0.2s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .neighborhood-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.15);
            border-color: #0066cc;
        }

        .neighborhood-item.featured {
            background: linear-gradient(135deg, #e8f4fd 0%, #cce7ff 100%);
            border-color: #0066cc;
            border-width: 2px;
        }
        
        /* Property Map Section */
        .property-map-section {
            background: white;
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 16px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            border: 1px solid #e9ecef;
        }
        
        .map-section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
            flex-wrap: wrap;
            gap: 12px;
        }
        
        .map-section-header .section-title {
            margin: 0;
        }
        
        .map-controls {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .street-view-btn {
            background: linear-gradient(135deg, #34a853, #2d8f47);
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 6px rgba(52,168,83,0.3);
        }
        
        .street-view-btn:hover {
            background: linear-gradient(135deg, #2d8f47, #247a3d);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(52,168,83,0.4);
        }
        
        .street-view-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 6px rgba(52,168,83,0.3);
        }
        
        .street-view-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            pointer-events: none;
        }
        
        .street-view-btn i {
            font-size: 0.9rem;
        }
        
        .view-map-btn {
            background: linear-gradient(135deg, #0066cc, #004499);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 6px rgba(0,102,204,0.3);
        }
        
        .view-map-btn:hover {
            background: linear-gradient(135deg, #004499, #003366);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,102,204,0.4);
        }
        
        .view-map-btn:active {
            transform: translateY(0);
            box-shadow: 0 2px 6px rgba(0,102,204,0.3);
        }
        
        .view-map-btn i {
            font-size: 1rem;
        }
        
        .map-view-toggle {
            display: flex;
            background: #f8f9fa;
            border-radius: 8px;
            padding: 4px;
            border: 1px solid #dee2e6;
            gap: 4px;
        }
        
        .map-view-toggle-btn {
            background: transparent;
            border: none;
            padding: 8px 12px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s ease;
            color: #6c757d;
            font-size: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .map-view-toggle-btn:hover {
            background: rgba(0,102,204,0.1);
            color: #0066cc;
        }
        
        .map-view-toggle-btn.active {
            background: linear-gradient(135deg, #0066cc, #004499);
            color: white;
            box-shadow: 0 2px 4px rgba(0,102,204,0.2);
        }
        
        .map-view-toggle-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            pointer-events: none;
        }
        
        .property-map-container {
            width: 100%;
            height: 400px;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            margin-top: 0;
        }
        
        .property-map-container .leaflet-container {
            height: 100%;
            width: 100%;
            border-radius: 8px;
        }
        
        @media (max-width: 768px) {
            .map-section-header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .map-controls {
                width: 100%;
                justify-content: space-between;
                flex-wrap: wrap;
                gap: 8px;
            }
            
            .street-view-btn {
                padding: 6px 12px;
                font-size: 0.8rem;
            }
            
            .street-view-btn span {
                display: none;
            }
        }

        .neighborhood-icon {
            font-size: 1.6rem;
            color: #0066cc;
            margin-bottom: 6px;
        }

        .neighborhood-label {
            font-size: 0.75rem;
            color: #6c757d;
            font-weight: 500;
            margin-bottom: 4px;
        }

        .neighborhood-value {
            font-size: 1.1rem;
            font-weight: 700;
            color: #212529;
        }

        .neighborhood-item.featured .neighborhood-value {
            color: #0066cc;
        }

        /* Neighborhood tooltips - JavaScript-based to avoid clipping */
        .neighborhood-item[data-tooltip] {
            cursor: help;
        }

        .neighborhood-tooltip-floating {
            position: fixed;
            background: rgba(0, 0, 0, 0.95);
            color: white;
            padding: 14px 18px;
            border-radius: 8px;
            font-size: 0.875rem;
            line-height: 1.6;
            white-space: pre-line;
            max-width: 340px;
            min-width: 280px;
            z-index: 10000;
            text-align: left;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .neighborhood-tooltip-floating.visible {
            opacity: 1;
        }
        
        
        /* Loan Section - Minimal Design */
        .loan-grid {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin: 16px 0 12px 0;
        }
        
        .loan-item {
            flex: 1;
            min-width: 140px;
            padding: 12px;
            background: #f8f9fa;
            border-radius: 6px;
            border: 1px solid #e9ecef;
            text-align: left;
        }
        
        .loan-item.featured {
            background: linear-gradient(135deg, #e8f4fd 0%, #cce7ff 100%);
            border-color: #0066cc;
        }
        
        .loan-label {
            font-size: 0.8rem;
            color: #6c757d;
            margin-bottom: 3px;
            font-weight: 500;
        }
        
        .loan-value {
            font-size: 1.1rem;
            font-weight: 600;
            color: #212529;
        }
        
        .loan-item.featured .loan-value {
            color: #0066cc;
        }
        
        .loan-assumptions-trigger {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            color: #6c757d;
            font-size: 0.8rem;
            cursor: help;
            margin-top: 8px;
            padding: 4px 6px;
            border-radius: 4px;
            transition: all 0.2s ease;
        }
        
        .loan-assumptions-trigger:hover {
            background: #f8f9fa;
            color: #495057;
        }
        
        .loan-assumptions-trigger i {
            font-size: 0.7rem;
        }
        
        /* Tooltip for assumptions */
        .loan-assumptions-tooltip {
            position: relative;
        }
        
        .loan-assumptions-tooltip::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: 100%;
            right: 0;
            background: rgba(0,0,0,0.9);
            color: white;
            padding: 12px 14px;
            border-radius: 6px;
            font-size: 0.8rem;
            white-space: pre-line;
            width: 280px;
            text-align: left;
            line-height: 1.4;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            z-index: 1000;
            margin-bottom: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }
        
        .loan-assumptions-tooltip::before {
            content: '';
            position: absolute;
            bottom: 100%;
            right: 12px;
            border: 5px solid transparent;
            border-top-color: rgba(0,0,0,0.9);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            z-index: 1000;
            margin-bottom: 3px;
        }
        
        .loan-assumptions-tooltip:hover::after,
        .loan-assumptions-tooltip:hover::before {
            opacity: 1;
        }
        
        /* Loading indicator styles */
        .loading-indicator {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: #6c757d;
        }

        .loading-indicator i {
            color: #0066cc;
        }

        .metric-tooltip {
            position: relative;
            cursor: help;
            z-index: auto;
        }
        
        .metric-tooltip::after {
            content: attr(data-tooltip);
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.95);
            color: white;
            padding: 14px 16px;
            border-radius: 8px;
            font-size: 0.8rem;
            white-space: pre-line;
            max-width: 380px;
            min-width: 260px;
            text-align: left;
            line-height: 1.5;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            z-index: 30010;
            margin-top: 10px;
            box-shadow: 0 6px 20px rgba(0,0,0,0.4);
            border: 1px solid rgba(255,255,255,0.1);
        }

        .metric-tooltip::before {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%) rotate(180deg);
            border: 6px solid transparent;
            border-top-color: rgba(0,0,0,0.95);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            z-index: 30010;
            margin-top: 4px;
        }

        /* Top tooltip for sticky offer button */
        .prominent-offer-btn.metric-tooltip::after {
            bottom: 100%;
            left: 50%;
            right: auto;
            top: auto;
            transform: translateX(-50%);
            margin-bottom: 12px;
            margin-left: 0;
            margin-right: 0;
            max-width: 320px;
            min-width: 280px;
        }

        .prominent-offer-btn.metric-tooltip::before {
            bottom: 100%;
            left: 50%;
            right: auto;
            top: auto;
            transform: translateX(-50%);
            border-top-color: rgba(0,0,0,0.95);
            border-right-color: transparent;
            border-left-color: transparent;
            border-bottom-color: transparent;
            margin-bottom: 6px;
            margin-left: 0;
            margin-right: 0;
        }
        
        .metric-tooltip:hover::after,
        .metric-tooltip:hover::before {
            opacity: 1;
        }
        
        /* Score tooltips - higher than images container but below prominent offer button */
        .investment-scores-section .metric-tooltip::after,
        .scores-grid .metric-tooltip::after,
        .main-rank-square.metric-tooltip::after,
        .grade-square.metric-tooltip::after {
            z-index: 1040 !important;
        }
        
        .investment-scores-section .metric-tooltip::before,
        .scores-grid .metric-tooltip::before,
        .main-rank-square.metric-tooltip::before,
        .grade-square.metric-tooltip::before {
            z-index: 1040 !important;
        }
        
        /* Header action button tooltips - above nav tabs */
        .header-actions .metric-tooltip::after,
        .back-btn-details.metric-tooltip::after,
        .back-btn-left.metric-tooltip::after,
        .chat-btn-details.metric-tooltip::after,
        .notes-btn-details.metric-tooltip::after,
        .share-btn-details.metric-tooltip::after,
        .favorite-btn-details.metric-tooltip::after {
            z-index: 1050 !important;
        }
        
        .header-actions .metric-tooltip::before,
        .back-btn-details.metric-tooltip::before,
        .back-btn-left.metric-tooltip::before,
        .chat-btn-details.metric-tooltip::before,
        .notes-btn-details.metric-tooltip::before,
        .share-btn-details.metric-tooltip::before,
        .favorite-btn-details.metric-tooltip::before {
            z-index: 1050 !important;
        }
        
        /* Deal Score tooltip - position above element to avoid overlapping Value element below */
        .main-rank-square.metric-tooltip::after {
            bottom: 100% !important;
            top: auto !important;
            margin-bottom: 12px !important;
            margin-top: 0 !important;
            transform: translateX(-50%) !important;
        }
        
        .main-rank-square.metric-tooltip::before {
            bottom: 100% !important;
            top: auto !important;
            margin-bottom: 6px !important;
            margin-top: 0 !important;
            transform: translateX(-50%) !important;
            border-top-color: rgba(0,0,0,0.95) !important;
            border-bottom-color: transparent !important;
            border-right-color: transparent !important;
            border-left-color: transparent !important;
            rotate: 0deg !important;
        }
        
        /* Hide score tooltips on mobile (except when clicked) */
        @media (max-width: 768px) {
            .investment-scores-section .metric-tooltip::after,
            .scores-grid .metric-tooltip::after,
            .main-rank-square.metric-tooltip::after,
            .grade-square.metric-tooltip::after {
                display: none !important;
            }
            
            .investment-scores-section .metric-tooltip::before,
            .scores-grid .metric-tooltip::before,
            .main-rank-square.metric-tooltip::before,
            .grade-square.metric-tooltip::before {
                display: none !important;
            }
            
            /* Allow score badge tooltips to show when clicked (tooltip-active) */
            .score-badge.metric-tooltip.tooltip-active::after {
                display: block !important;
                opacity: 1 !important;
            }
            
            .score-badge.metric-tooltip.tooltip-active::before {
                display: block !important;
                opacity: 1 !important;
            }
            
            /* Hide header action button tooltips on mobile */
            .header-actions .metric-tooltip::after,
            .back-btn-details.metric-tooltip::after,
            .chat-btn-details.metric-tooltip::after,
            .notes-btn-details.metric-tooltip::after,
            .share-btn-details.metric-tooltip::after,
            .favorite-btn-details.metric-tooltip::after {
                display: none !important;
            }
            
            .header-actions .metric-tooltip::before,
            .back-btn-details.metric-tooltip::before,
            .chat-btn-details.metric-tooltip::before,
            .notes-btn-details.metric-tooltip::before,
            .share-btn-details.metric-tooltip::before,
            .favorite-btn-details.metric-tooltip::before {
                display: none !important;
            }
            
            /* Ensure investment scores section has proper z-index on mobile */
            .investment-scores-section {
                z-index: 100 !important;
            }
        }
        
        
        /* Co-pilot Note */
        .co-pilot-note {
            background: rgba(30, 58, 95, 0.04);
            border: 1px solid rgba(30, 58, 95, 0.12);
            border-radius: 10px;
            padding: 10px 14px;
            margin-bottom: 12px;
            display: flex;
            align-items: flex-start;
            gap: 10px;
        }
        
        .co-pilot-note i {
            color: #6c757d;
            margin-top: 1px;
            flex-shrink: 0;
            font-size: 0.85rem;
        }
        
        .co-pilot-note-content {
            flex: 1;
        }
        
        .co-pilot-note-title {
            font-weight: 600;
            color: #495057;
            margin-bottom: 2px;
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        
        .co-pilot-note-text {
            color: #6c757d;
            font-size: 0.82rem;
            line-height: 1.45;
        }
        
        /* Responsive Design */

        /* Larger screens - bigger action buttons */
        @media (min-width: 1201px) {
            .mini-action-btn {
                width: 48px;
                height: 48px;
                font-size: 1rem;
                border-width: 2px;
                box-shadow: 0 3px 6px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.15);
            }

            .mini-action-btn:hover {
                transform: translateY(-3px) scale(1.05);
                box-shadow: 0 6px 12px rgba(0,0,0,0.25), 0 3px 6px rgba(0,0,0,0.2);
            }

            .mini-action-btn:active {
                transform: translateY(0) scale(0.98);
                box-shadow: 0 2px 4px rgba(0,0,0,0.15), inset 0 1px 2px rgba(0,0,0,0.1);
            }

            .mini-action-btn::after {
                max-width: 350px;
                min-width: 250px;
                padding: 12px 16px;
                font-size: 0.85rem;
            }

            .view-all-btn {
                padding: 10px 20px;
                font-size: 0.95rem;
                border-radius: 8px;
                border-width: 2px;
                box-shadow: 0 3px 6px rgba(0,102,204,0.2), 0 2px 4px rgba(0,102,204,0.15);
            }

            .view-all-btn:hover {
                transform: translateY(-2px);
                box-shadow: 0 6px 12px rgba(0,102,204,0.3), 0 3px 6px rgba(0,102,204,0.2);
            }


            .btn-label {
                font-size: 0.7rem;
                font-weight: 700;
                margin-top: 6px;
            }
        }

        @media (max-width: 1200px) {
            .main-content-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }
            
            .main-image-container {
                aspect-ratio: 16/10;
            }
            
            .investment-scores-section {
                padding: 20px;
            }

            .scores-deal-integrated {
                gap: 0;
            }

            .scores-grid {
                margin-bottom: 12px;
                padding-bottom: 12px;
                flex-wrap: wrap;
                justify-content: flex-start;
                gap: 20px;
            }

            .main-rank-square {
                width: 68px;
                height: 68px;
                font-size: 1.9rem;
            }

            .other-scores {
                gap: 18px;
            }

            .grade-square {
                width: 30px;
                height: 30px;
                font-size: 0.9rem;
            }
            
            .lightbox-nav.prev {
                left: -50px;
            }
            
            .lightbox-nav.next {
                right: -50px;
            }
        }

        /* Tablet - 3 columns */
        @media (max-width: 1024px) and (min-width: 769px) {
            .neighborhood-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 10px;
            }

            .neighborhood-item {
                padding: 10px;
            }

            .neighborhood-icon {
                font-size: 1.4rem;
            }

            .neighborhood-label {
                font-size: 0.72rem;
            }

            .neighborhood-value {
                font-size: 1rem;
            }
        }
        
        @media (max-width: 768px) {
            .property-container {
                padding: 8px;
            }

            .neighborhood-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 8px;
            }

            .neighborhood-item {
                padding: 10px 8px;
            }

            .neighborhood-icon {
                font-size: 1.3rem;
                margin-bottom: 4px;
            }

            .neighborhood-label {
                font-size: 0.7rem;
            }

            .neighborhood-value {
                font-size: 0.95rem;
            }

            .neighborhood-tooltip-floating {
                max-width: 280px;
                min-width: 260px;
                font-size: 0.8rem;
                padding: 12px 14px;
                line-height: 1.5;
            }
            
            .property-title-bar {
                margin: -16px -16px 16px -16px;
                padding: 16px;
                flex-direction: column;
                gap: 12px;
            }
            
            .property-main-address {
                font-size: 1.4rem;
                text-align: center;
                width: 100%;
            }
            
            .header-actions {
                width: 100%;
                justify-content: center;
            }
            
            .header-section {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }
            
            .listing-price {
                font-size: 2rem;
            }
            
            .property-specs {
                width: 100%;
                justify-content: flex-start;
                gap: 8px;
            }

            .spec-item {
                padding: 6px 8px;
                font-size: 0.8rem;
            }
            
            .investment-scores-section {
                padding: 16px;
                margin-bottom: 16px;
                overflow: visible !important;
                z-index: 100 !important;
            }

            .scores-header-optimized {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
                margin-bottom: 20px;
                padding-bottom: 12px;
            }

            .scores-title {
                font-size: 1.15rem;
                width: 100%;
                justify-content: space-between;
            }

            .view-map-btn-mobile {
                display: flex;
                margin-left: auto;
                padding: 6px 12px;
                font-size: 0.8rem;
                border-radius: 8px;
            }

            .view-map-btn-mobile i {
                color: white;
            }
            
            /* Deal score badges mobile */
            .deal-score-badges {
                width: 100%;
                justify-content: flex-start;
                gap: 8px;
            }
            
            .score-badge {
                padding: 4px 8px;
            }
            
            .score-badge .badge-value {
                width: 22px;
                height: 22px;
                font-size: 0.75rem;
            }
            
            /* Deal Score larger on mobile too */
            .score-badge .badge-value.rank-1,
            .score-badge .badge-value.rank-2,
            .score-badge .badge-value.rank-3,
            .score-badge .badge-value.rank-4,
            .score-badge .badge-value.rank-5 {
                width: 38px;
                height: 38px;
                font-size: 1.1rem;
            }
            
            .score-badge .badge-label {
                font-size: 0.65rem;
            }
            
            .score-badge.deal-score-primary {
                padding: 6px 10px;
            }
            
            .score-badge.deal-score-primary .badge-label {
                font-size: 0.8rem;
            }
            
            /* Combined metrics mobile */
            .combined-values-row {
                flex-direction: column;
                gap: 8px;
            }
            
            .combined-metric-value {
                min-width: auto;
                width: 100%;
            }
            
            .combined-metric-val {
                font-size: 1rem;
            }

            .scores-deal-integrated {
                gap: 0;
            }

            .scores-controls {
                width: 100%;
                gap: 10px;
            }

            .scores-controls .view-map-btn {
                display: none;
            }

            .strategy-tabs {
                flex: 1;
                min-width: 0;
            }

            .strategy-tab {
                padding: 8px 10px;
                font-size: 0.8rem;
                white-space: nowrap;
                height: auto;
                gap: 4px;
            }

            .strategy-tab i {
                font-size: 0.85rem;
            }

            .scores-grid {
                flex-direction: column;
                align-items: center;
                gap: 20px;
                width: 100%;
                margin-bottom: 12px;
                padding-bottom: 12px;
            }

            .compact-about-deal .compact-factors {
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .main-rank-square {
                width: 64px;
                height: 64px;
                font-size: 1.75rem;
            }

            .main-rank-label {
                font-size: 0.8rem;
            }

            .other-scores {
                gap: 16px;
                justify-content: center;
                width: 100%;
            }

            .grade-square {
                width: 30px;
                height: 30px;
                font-size: 0.9rem;
            }

            .score-label {
                font-size: 0.75rem;
            }

            .compact-about-deal {
                font-size: 0.75rem;
            }

            .compact-about-deal .compact-intro {
                font-size: 0.8rem;
                margin-bottom: 6px;
            }

            .compact-about-deal .compact-factors {
                flex-direction: column;
                gap: 8px;
                margin-top: 6px;
            }

            .compact-about-deal .compact-factor-item {
                min-width: 100%;
                font-size: 0.7rem;
                padding: 8px 10px;
            }

            .compact-about-deal .compact-grade-square {
                width: 24px;
                height: 24px;
                font-size: 0.75rem;
            }

            .compact-about-deal .compact-rank-item .compact-grade-square {
                width: 36px;
                height: 36px;
                font-size: 1.1rem;
            }

            .compact-about-deal .compact-factor-label {
                font-size: 0.8rem;
            }

            .compact-about-deal .compact-factor-value {
                font-size: 0.75rem;
            }

            .compact-about-deal .compact-motivations li {
                font-size: 0.7rem;
            }

            .demographics-within-scores {
                width: 100%;
                padding: 12px;
            }

            .demographics-horizontal {
                gap: 8px;
                justify-content: flex-start;
                align-items: baseline;
            }

            .demo-item {
                padding: 3px 6px;
                font-size: 0.75rem;
                min-height: 20px;
            }

            .demo-label {
                font-size: 0.65rem;
            }
            
            .other-scores {
                justify-content: flex-start;
                gap: 8px;
            }

            .score-item {
                flex-direction: row;
                gap: 6px;
                align-items: center;
            }

            .grade-square {
                width: 20px;
                height: 20px;
                font-size: 0.7rem;
                margin-bottom: 0;
            }

            .score-label {
                font-size: 0.65rem;
                text-align: left;
                margin: 0;
            }
            
            
            /* Demographics responsive for tablet */
            .demographics-horizontal {
                gap: 10px;
                align-items: baseline;
            }

            .demo-item {
                padding: 4px 7px;
                font-size: 0.78rem;
                min-height: 22px;
            }

            /* Gallery responsive styles for tablet */
            .main-image-container {
                aspect-ratio: 16/10;
            }
            
            .small-image-container {
                width: 100px;
                height: 70px;
            }
            
            .more-photos-count {
                font-size: 1.2rem;
            }
            
            .more-photos-text {
                font-size: 0.8rem;
            }

            /* BRRRR Analysis mobile */
            .brrrr-metrics-grid {
                grid-template-columns: repeat(3, 1fr);
                gap: 8px;
                padding: 10px;
            }

            .brrrr-metric .brrrr-metric-value.primary {
                font-size: 1.2em;
            }

            .brrrr-metric .brrrr-metric-value {
                font-size: 0.95em;
            }

            .brrrr-health-checks {
                gap: 6px;
            }

            .brrrr-health-badge {
                padding: 3px 8px;
                font-size: 0.75em;
            }

            .brrrr-disclaimer {
                font-size: 0.75em;
            }
        }
        
        @media (max-width: 480px) {
            .property-main-address {
                font-size: 1.4rem;
            }
            
            .property-specs {
                flex-wrap: wrap;
                gap: 6px;
                justify-content: flex-start;
            }

            .spec-item {
                padding: 4px 6px;
                font-size: 0.75rem;
                min-width: auto;
                flex: 0 0 auto;
            }

            .spec-item i {
                font-size: 0.7rem;
            }
            
            .scores-header-optimized {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }
            
            .scores-controls {
                width: 100%;
                justify-content: space-between;
            }
            
            /* Ensure investment scores section has proper z-index on small mobile */
            .investment-scores-section {
                overflow: visible !important;
                z-index: 100 !important;
            }
            
            
            .strategy-tabs {
                flex: 1;
            }

            .strategy-tab {
                padding: 8px 8px;
                font-size: 0.78rem;
                gap: 3px;
            }

            .strategy-tab {
                padding: 7px 8px;
                font-size: 0.75rem;
                gap: 3px;
            }

            .strategy-tab i {
                font-size: 0.8rem;
            }

            /* BRRRR Analysis extra-small screens */
            .brrrr-metrics-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 6px;
                padding: 8px;
            }

            .brrrr-metric .brrrr-metric-value.primary {
                font-size: 1.1em;
            }

            .brrrr-metric .brrrr-metric-value {
                font-size: 0.88em;
            }

            .brrrr-metric .brrrr-metric-label {
                font-size: 0.7em;
            }
            
            /* Gallery responsive styles for mobile */
            .main-image-container {
                aspect-ratio: 16/10;
            }
            
            .small-image-container {
                width: 80px;
                height: 60px;
            }
            
            .small-images-grid {
                gap: 6px;
            }
            
            .gallery-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
            
            .view-all-btn {
                align-self: stretch;
                text-align: center;
            }
            
            .more-photos-count {
                font-size: 1rem;
            }
            
            .more-photos-text {
                font-size: 0.7rem;
            }
            
            /* Lightbox mobile styles */
            .lightbox-content {
                max-width: 95vw;
                max-height: 95vh;
            }
            
            .lightbox-image-container {
                min-height: 50vh; /* Smaller minimum height on mobile */
            }
            
            .lightbox-image {
                max-height: 50vh;
                min-height: 30vh;
            }
            
            .lightbox-nav {
                width: 50px;
                height: 50px;
                font-size: 1.3rem;
            }
            
            .lightbox-nav.prev {
                left: 10px;
            }
            
            .lightbox-nav.next {
                right: 10px;
            }
            
            .lightbox-thumbnails {
                padding: 8px;
                gap: 6px;
            }
            
            .lightbox-thumbnail {
                width: 50px;
                height: 38px;
            }
        }

        /* Price History Section Styles */
        .price-history-section {
            margin-top: 20px;
            padding: 16px;
            background: white;
            border-radius: 12px;
            border: 1px solid #e9ecef;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }

        .price-analytics-compact {
            margin-bottom: 16px;
        }

        .analytics-summary {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }

        .summary-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .summary-label {
            font-size: 0.75rem;
            color: #6c757d;
            font-weight: 500;
        }

        .summary-value {
            font-size: 0.9rem;
            font-weight: 600;
            color: #212529;
        }

        .price-history-chart {
            background: white;
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .price-analytics-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 12px;
            margin-bottom: 16px;
        }

        .analytics-card {
            background: white;
            border-radius: 8px;
            padding: 16px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            border-left: 4px solid #0066cc;
        }

        .analytics-card.trend-up {
            border-left-color: #28a745;
        }

        .analytics-card.trend-down {
            border-left-color: #dc3545;
        }

        .analytics-card.trend-stable {
            border-left-color: #ffc107;
        }

        .analytics-label {
            font-size: 0.85rem;
            color: #6c757d;
            margin-bottom: 4px;
            font-weight: 500;
        }

        .analytics-value {
            font-size: 1.2rem;
            font-weight: 600;
            color: #212529;
            margin-bottom: 2px;
        }

        .analytics-trend {
            font-size: 0.8rem;
            font-weight: 500;
        }

        .trend-up {
            color: #28a745;
        }

        .trend-down {
            color: #dc3545;
        }

        .trend-stable {
            color: #ffc107;
        }

        .price-history-table {
            background: white;
            border-radius: 8px;
            overflow: visible;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .price-history-table table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
        }

        .price-history-table table th {
            padding: 6px 12px !important;
            text-align: left !important;
            border-bottom: 1px solid #e9ecef !important;
            font-size: 0.85rem !important;
            background: #f8f9fa !important;
            font-weight: 600 !important;
            color: #495057 !important;
        }
        
        .price-history-table table td {
            padding: 4px 12px !important;
            text-align: left !important;
            border-bottom: 1px solid #e9ecef !important;
            font-size: 0.85rem !important;
        }

        .date-column {
            min-width: 120px !important;
            width: 25% !important;
            white-space: nowrap;
        }

        .price-column {
            min-width: 100px !important;
            width: 30% !important;
        }

        .change-column {
            width: 45% !important;
        }


        .price-history-table tbody tr:hover {
            background: #f8f9fa;
        }

        .price-change-positive {
            color: #28a745;
            font-weight: 500;
        }

        .price-change-negative {
            color: #dc3545;
            font-weight: 500;
        }

        .price-change-neutral {
            color: #6c757d;
        }

        .no-price-data {
            text-align: center;
            padding: 40px 20px;
            color: #6c757d;
            background: white;
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .no-price-data i {
            font-size: 2rem;
            margin-bottom: 12px;
            display: block;
        }

        /* Chart.js custom styles */
        .chart-container {
            position: relative;
            height: 200px;
            width: 100%;
        }

        /* Inline Price Trend Styles (next to listing price) */
        .price-trend-inline {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
            align-self: center;
        }

        /* Prominent Make Offer Button Styles - Sticky Floating Button */
        .prominent-offer-section {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 1050;
            margin: 0;
        }

        .prominent-offer-btn {
            background: linear-gradient(135deg, #1e40af 0%, #2d5a2d 100%);
            border: none;
            border-radius: 50px;
            padding: 16px 24px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            position: relative;
            min-width: 200px;
            height: auto;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .prominent-offer-btn:hover {
            transform: translateY(-2px) scale(1.02);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
            background: linear-gradient(135deg, #1c3faa 0%, #1f4529 100%);
        }

        .prominent-offer-btn:active {
            transform: translateY(0) scale(0.98);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }

        .offer-btn-content {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 16px;
            position: relative;
            z-index: 2;
        }

        .offer-icon {
            font-size: 1.3rem;
            color: white;
            opacity: 0.9;
        }

        .offer-text {
            text-align: left;
            flex: 1;
        }

        .offer-title {
            font-size: 1rem;
            font-weight: 600;
            color: white;
            margin-bottom: 1px;
        }

        .offer-subtitle {
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.8);
            font-weight: 400;
        }

        .arrow-icon {
            font-size: 0.9rem;
            color: white;
            opacity: 0.8;
            transition: transform 0.3s ease;
        }

        .prominent-offer-btn:hover .arrow-icon {
            transform: translateX(2px);
        }

        /* Mobile responsive for sticky offer button */
        @media (max-width: 768px) {
            .prominent-offer-section {
                bottom: 16px;
                right: 16px;
            }

            .prominent-offer-btn {
                min-width: 180px;
                padding: 14px 20px;
            }

            .offer-btn-content {
                gap: 12px;
            }

            .offer-icon {
                font-size: 1.1rem;
            }

            .offer-title {
                font-size: 0.9rem;
            }

            .offer-subtitle {
                font-size: 0.65rem;
            }

            .arrow-icon {
                font-size: 0.75rem;
            }
        }

        @media (max-width: 480px) {
            .prominent-offer-section {
                bottom: 12px;
                right: 12px;
                left: 12px;
                width: auto;
            }

            .prominent-offer-btn {
                min-width: auto;
                width: 100%;
                padding: 12px 16px;
            }

            .offer-btn-content {
                gap: 10px;
            }

            .offer-icon {
                font-size: 1rem;
            }

            .offer-title {
                font-size: 0.85rem;
            }

            .offer-subtitle {
                font-size: 0.6rem;
            }
        }

        .price-trend-badge {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 600;
            white-space: nowrap;
        }

        .price-trend-badge.trend-up {
            /* Price went up - green */
            background: rgba(40, 167, 69, 0.1);
            color: #28a745;
            border: 1px solid rgba(40, 167, 69, 0.2);
        }

        .price-trend-badge.trend-down {
            /* Price went down (price cut) - red */
            background: rgba(220, 53, 69, 0.1);
            color: #dc3545;
            border: 1px solid rgba(220, 53, 69, 0.2);
        }

        .price-trend-badge.trend-stable {
            background: rgba(255, 193, 7, 0.1);
            color: #ffc107;
            border: 1px solid rgba(255, 193, 7, 0.2);
        }

        .price-trend-icon {
            font-size: 0.7rem;
        }

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

        @media (max-width: 768px) {
            .price-analytics-grid {
                grid-template-columns: 1fr;
            }

            .price-history-chart {
                padding: 12px;
            }

            .analytics-card {
                padding: 12px;
            }

            .property-title-section {
                flex-direction: row;
                align-items: center;
                flex-wrap: wrap;
                gap: 12px;
            }

            .price-trend-inline {
                margin-top: 0;
            }

            /* Mobile table fixes */
            .price-history-table {
                overflow-x: auto !important;
                -webkit-overflow-scrolling: touch;
            }

            .price-history-table table {
                min-width: 300px;
                white-space: nowrap;
            }

            .price-history-table table th {
                padding: 4px 10px !important;
                font-size: 0.6rem !important;
                background: #f8f9fa !important;
                font-weight: 600 !important;
                color: #495057 !important;
            }
            
            .price-history-table table td {
                padding: 3px 10px !important;
                font-size: 0.6rem !important;
            }

            .date-column {
                min-width: 100px !important;
                width: 25% !important;
            }

            .price-column {
                min-width: 90px !important;
                width: 30% !important;
            }

            .change-column {
                width: 45% !important;
            }
        }

        /* Extra small screens - ensure price trend wraps and aligns left */
        @media (max-width: 480px) {
            .property-title-section {
                min-width: 0;
                width: 100%;
                flex-direction: row;
                justify-content: flex-start;
                align-items: center;
            }

            .property-address {
                font-size: 1.45rem;
            }

            .listing-price {
                font-size: 1.65rem;
            }

            .price-trend-inline {
                flex-shrink: 1;
                min-width: 0;
            }
        }

        /* Smart Navigation Tabs */
        .smart-nav-tabs {
            background: white;
            border-top: 1px solid #e9ecef;
            border-bottom: 2px solid #e9ecef;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            padding-left: 24px;
            padding-right: 24px;
            position: relative;
            z-index: 1;
        }

        .nav-tabs-container {
            display: flex;
            gap: 0;
            overflow-x: auto;
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE and Edge */
            position: relative;
            z-index: 1;
        }

        .nav-tabs-container::-webkit-scrollbar {
            display: none; /* Chrome, Safari, Opera */
        }

        .nav-tab {
            padding: 16px 20px;
            color: #6c757d;
            font-weight: 500;
            font-size: 0.95rem;
            border: none;
            background: transparent;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            transition: all 0.3s ease;
            white-space: nowrap;
            display: flex;
            align-items: center;
            gap: 8px;
            position: relative;
            z-index: 1;
        }

        .nav-tab i {
            font-size: 0.9rem;
            opacity: 0.7;
        }

        .nav-tab:hover {
            color: #0066cc;
            background: linear-gradient(to bottom, transparent 0%, rgba(0,102,204,0.05) 100%);
        }

        .nav-tab:hover i {
            opacity: 1;
        }

        .nav-tab.active {
            color: #0066cc;
            border-bottom-color: #0066cc;
            font-weight: 600;
        }

        .nav-tab.active i {
            opacity: 1;
        }

        .nav-tab-badge {
            background: #0066cc;
            color: white;
            font-size: 0.7rem;
            padding: 2px 6px;
            border-radius: 10px;
            font-weight: 600;
            margin-left: 4px;
        }

        .nav-tab.active .nav-tab-badge {
            background: #004499;
        }

        /* Section scroll target offset for fixed header */
        .nav-section {
            scroll-margin-top: 160px; /* Adjust based on fixed header height + extra padding */
        }

        /* Reports Section Styles */
        .reports-section {
            background: white;
            border-radius: 12px;
            padding: 12px;
            margin-top: 16px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            border: 1px solid #e9ecef;
        }

        .report-container {
            margin-top: 20px;
            border-radius: 8px;
            overflow: hidden;
            background: #f8f9fa;
            border: 1px solid #dee2e6;
        }

        .report-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-bottom: 1px solid #dee2e6;
        }

        .report-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: #212529;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .report-title i {
            color: #0066cc;
        }

        .report-open-new {
            padding: 6px 12px;
            background: #0066cc;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .report-open-new:hover {
            background: #004499;
            color: white;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,102,204,0.3);
        }

        .report-content-container {
            background: white;
            border-radius: 8px;
            border: 1px solid #e9ecef;
            overflow: hidden;
            margin-top: 8px;
        }

        .report-embedded-content {
            width: 100%;
            background: white;
            padding: 0;
            position: relative;
        }

        .report-embedded-content iframe {
            width: 100%;
            border: none;
            display: block;
            background: white;
        }

        .report-loading-overlay {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 400px;
            padding: 40px;
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            color: #6c757d;
        }

        .report-loading-overlay i {
            font-size: 3rem;
            margin-bottom: 16px;
            color: #0066cc;
        }

        .report-loading-text {
            font-size: 1.1rem;
            font-weight: 500;
            margin-bottom: 8px;
        }

        .report-loading-subtext {
            font-size: 0.9rem;
            opacity: 0.8;
        }

        .report-actions {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            padding: 16px;
            background: #f8f9fa;
            border-top: 1px solid #e9ecef;
        }

        .report-action-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            background: white;
            color: #495057;
            border: 1px solid #dee2e6;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
        }

        .report-action-btn:hover {
            background: #0066cc;
            color: white;
            border-color: #0066cc;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,102,204,0.3);
        }

        .report-action-btn i {
            font-size: 0.85rem;
        }

        .report-action-btn.primary {
            background: linear-gradient(135deg, #0066cc, #004499);
            color: white;
            border: none;
        }

        .report-action-btn.primary:hover {
            background: linear-gradient(135deg, #0052a3, #003366);
        }

        .report-unavailable {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 200px;
            color: #6c757d;
            padding: 40px 20px;
            text-align: center;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .report-unavailable i {
            font-size: 3rem;
            margin-bottom: 16px;
            opacity: 0.3;
        }

        .report-unavailable-text {
            font-size: 1.1rem;
            font-weight: 500;
            margin-bottom: 8px;
        }

        .report-unavailable-subtext {
            font-size: 0.9rem;
            opacity: 0.8;
        }

        /* Report hint banner */
        .reports-hint-banner {
            background: linear-gradient(135deg, #e8f4fd 0%, #cce7ff 100%);
            border: 1px solid #0066cc;
            border-left: 4px solid #0066cc;
            padding: 12px 16px;
            border-radius: 8px;
            margin-top: 16px;
            display: flex;
            align-items: center;
            gap: 12px;
            transition: all 0.3s ease;
        }

        .reports-hint-banner:hover {
            background: linear-gradient(135deg, #d0ebfc 0%, #b3d9ff 100%);
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0,102,204,0.2);
        }

        .reports-hint-banner i {
            color: #0066cc;
            font-size: 1.2rem;
            flex-shrink: 0;
        }

        .reports-hint-text {
            flex: 1;
            color: #004499;
            font-size: 0.9rem;
            font-weight: 500;
        }

        .reports-hint-arrow {
            color: #0066cc;
            font-size: 1rem;
            animation: bounce-down 2s infinite;
        }

        @keyframes bounce-down {
            0%, 20%, 50%, 80%, 100% {
                transform: translateY(0);
            }
            40% {
                transform: translateY(5px);
            }
            60% {
                transform: translateY(3px);
            }
        }

        /* Lazy load placeholder */
        .report-lazy-placeholder {
            min-height: 400px;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #6c757d;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .smart-nav-tabs {
                padding-left: 16px;
                padding-right: 16px;
            }

            .property-title-bar {
                padding: 12px 16px;
                flex-direction: column;
                gap: 10px;
            }
            
            /* Hide back button on left for mobile - show mobile version in header-actions */
            .back-btn-left {
                display: none;
            }

            /* Show mobile back button in header-actions */
            .back-btn-mobile {
                display: flex !important;
            }
            
            .property-main-address {
                font-size: 1.2rem;
                text-align: center;
                width: 100%;
                line-height: 1.3;
            }
            
            .header-actions {
                width: 100%;
                justify-content: center;
                gap: 12px;
            }
            
            .header-actions button,
            .header-actions a {
                width: 42px;
                height: 42px;
                font-size: 1rem;
            }

            .nav-tab {
                padding: 12px 16px;
                font-size: 0.85rem;
            }

            .nav-tab i {
                font-size: 0.8rem;
            }

            .nav-section {
                scroll-margin-top: 140px; /* Adjust for mobile fixed header height */
            }

            .reports-section {
                padding: 8px;
                margin-left: -8px;
                margin-right: -8px;
                border-radius: 0;
            }

            .report-header {
                flex-direction: column;
                gap: 12px;
                align-items: flex-start;
            }

            .report-open-new {
                align-self: stretch;
                justify-content: center;
            }

            .report-content-container {
                margin-top: 8px;
                border-radius: 0;
            }

            .report-actions {
                flex-wrap: wrap;
                padding: 12px;
            }

            .report-action-btn {
                flex: 1;
                justify-content: center;
                min-width: 120px;
            }

            .report-embedded-content iframe {
                min-height: 600px;
            }

            .reports-hint-banner {
                padding: 10px 14px;
                margin-top: 12px;
            }

            .reports-hint-banner i {
                font-size: 1rem;
            }

            .reports-hint-text {
                font-size: 0.85rem;
            }

            .reports-hint-arrow {
                font-size: 0.9rem;
            }
        }

        @media (max-width: 480px) {
            .nav-tab {
                padding: 10px 12px;
                font-size: 0.8rem;
            }

            .nav-tab span {
                display: none;
            }

            .nav-tab i {
                font-size: 1rem;
                margin: 0;
            }

            .report-content-container {
                margin-top: 8px;
            }

            .report-actions {
                padding: 10px;
                gap: 8px;
            }

            .report-action-btn {
                font-size: 0.85rem;
                padding: 8px 16px;
            }

            .report-embedded-content iframe {
                min-height: 500px;
            }

            .reports-hint-banner {
                padding: 8px 12px;
                flex-direction: column;
                text-align: center;
            }

            .reports-hint-text {
                font-size: 0.8rem;
            }
        }
        
        /* Guest Banner Styles */
        .guest-banner {
            background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
            color: white;
            padding: 12px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px;
            position: sticky;
            top: 0;
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
            z-index: 1001;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }
        
        .guest-banner-content {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
        }
        
        .guest-banner-icon {
            width: 28px;
            height: 28px;
            object-fit: contain;
            flex-shrink: 0;
        }
        
        .guest-banner-text {
            font-size: 0.95rem;
        }
        
        .guest-banner-text strong {
            font-weight: 700;
        }
        
        .guest-banner-actions {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        
        .guest-banner-btn {
            padding: 8px 20px;
            border-radius: 6px;
            font-weight: 600;
            font-size: 0.9rem;
            text-decoration: none;
            transition: all 0.2s ease;
            cursor: pointer;
            border: none;
        }
        
        .guest-banner-btn-primary {
            background: white;
            color: #ff6b35;
            font-weight: 700;
            text-shadow: none;
        }
        
        .guest-banner-btn-primary:hover {
            background: #f0f7ff;
            transform: translateY(-1px);
        }
        
        .guest-banner-btn-secondary {
            background: transparent;
            color: white;
            border: 2px solid rgba(255, 255, 255, 0.8);
            font-weight: 700;
        }
        
        .guest-banner-btn-secondary:hover {
            background: rgba(255, 255, 255, 0.2);
            border-color: white;
            color: white;
        }
        
        @media (max-width: 768px) {
            .guest-banner {
                padding: 10px 15px;
                flex-direction: column;
                text-align: center;
                align-items: stretch;
            }
            
            .guest-banner-content {
                flex-direction: column;
                gap: 8px;
                align-items: center;
                text-align: center;
            }
            
            .guest-banner-actions {
                width: 100%;
                justify-content: center;
            }
            
            .guest-banner-btn {
                flex: 1;
                max-width: 150px;
            }
        }

        @media (max-width: 480px) {
            .guest-banner {
                padding: 10px 12px;
            }

            .guest-banner-text {
                font-size: 0.9rem;
                line-height: 1.35;
            }

            .guest-banner-actions {
                flex-direction: column;
                gap: 8px;
            }

            .guest-banner-btn {
                width: 100%;
                max-width: none;
                padding: 10px 14px;
            }
        }
        
        /* Property Specs Row (status + specs aligned) */
        .property-specs-row {
            display: flex;
            align-items: center;
            gap: 16px;
            flex-wrap: wrap;
        }
        
        /* Override styles.css for property-specs inside specs-row */
        .property-specs-row .property-specs {
            justify-content: flex-start;
            margin-bottom: 0;
            align-items: center;
        }
        
        /* Property Status Indicators (dot + text style, next to price trend) */
        .property-status-indicators {
            display: inline-flex;
            align-items: center;
            flex-shrink: 0;
            align-self: center;
        }
        
        .property-status-item {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 10px;
            background: #f8f9fa;
            border-radius: 12px;
            border: 1px solid #e9ecef;
            font-size: 0.8rem;
            color: #374151;
            white-space: nowrap;
        }
        
        .status-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            flex-shrink: 0;
            box-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }
        
        .status-dot.source-market {
            background-color: #0d6efd;
        }
        
        .status-dot.source-sheriff {
            background-color: #8B5CF6;
        }
        
        .status-dot.status-for-sale {
            background-color: #10B981;
        }
        
        .status-dot.status-under-contract {
            background-color: #808080;
        }
        
        .status-dot.status-foreclosure {
            background-color: #FFA500;
        }
        
        .status-dot.status-auction {
            background-color: #FFA500;
        }
        
        .status-dot.status-sold {
            background-color: #000000;
        }
        
        .status-dot.status-off-market {
            background-color: #000000;
        }
        
        @media (max-width: 768px) {
            .property-status-item {
                font-size: 0.75rem;
                padding: 3px 8px;
                gap: 4px;
            }
            
            .status-dot {
                width: 10px;
                height: 10px;
            }
            
            .sheriff-field {
                font-size: 0.75rem;
                padding: 3px 8px;
            }
            
            .sheriff-label {
                font-size: 0.75rem;
            }
        }
        
        /* ============================================
           SSR Property Summary - Server-Side Rendered content for SEO
           Visible by default, hidden when JavaScript loads full content
           ============================================ */
        .ssr-property-summary {
            padding: 1rem;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            border-radius: 12px;
            margin-bottom: 1rem;
            border: 1px solid #dee2e6;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        
        .ssr-property-summary .ssr-price {
            font-size: 2rem;
            font-weight: 700;
            color: #212529;
            margin-bottom: 0.5rem;
        }
        
        .ssr-property-summary .ssr-specs {
            color: #6c757d;
            margin: 0.5rem 0;
            font-size: 1rem;
        }
        
        .ssr-property-summary .ssr-specs span {
            margin-right: 1rem;
        }
        
        .ssr-property-summary .ssr-specs span::after {
            content: '•';
            margin-left: 1rem;
            color: #dee2e6;
        }
        
        .ssr-property-summary .ssr-specs span:last-child::after {
            content: '';
        }
        
        .ssr-property-summary .ssr-metrics {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-top: 1rem;
        }
        
        .ssr-property-summary .ssr-metric {
            background: white;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            border: 1px solid #dee2e6;
            display: flex;
            flex-direction: column;
            min-width: 100px;
        }
        
        .ssr-property-summary .ssr-metric .label {
            color: #6c757d;
            font-size: 0.75rem;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .ssr-property-summary .ssr-metric .value {
            font-weight: 700;
            font-size: 1.1rem;
            color: #28a745;
        }
        
        /* Hide SSR summary once JavaScript loads full property data */
        /* This ensures users see the full interactive content, not the SSR placeholder */
        body.js-property-loaded .ssr-property-summary {
            display: none;
        }
        
        /* Mobile responsive adjustments for SSR summary */
        @media (max-width: 768px) {
            .ssr-property-summary {
                padding: 0.75rem;
            }
            
            .ssr-property-summary .ssr-price {
                font-size: 1.5rem;
            }
            
            .ssr-property-summary .ssr-specs {
                font-size: 0.9rem;
            }
            
            .ssr-property-summary .ssr-specs span {
                margin-right: 0.5rem;
            }
            
            .ssr-property-summary .ssr-specs span::after {
                margin-left: 0.5rem;
            }
            
            .ssr-property-summary .ssr-metrics {
                gap: 0.5rem;
            }
            
            .ssr-property-summary .ssr-metric {
                padding: 0.4rem 0.75rem;
                min-width: 80px;
            }
            
            .ssr-property-summary .ssr-metric .label {
                font-size: 0.65rem;
            }
            
            .ssr-property-summary .ssr-metric .value {
                font-size: 0.95rem;
            }
        }
        
        /* SSR Neighborhood Insights Section */
        .ssr-property-summary .ssr-neighborhood {
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid #dee2e6;
        }
        
        .ssr-property-summary .ssr-neighborhood-title {
            font-size: 0.9rem;
            font-weight: 600;
            color: #495057;
            margin-bottom: 0.75rem;
        }
        
        .ssr-property-summary .ssr-neighborhood-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        
        .ssr-property-summary .ssr-neighborhood-item {
            background: white;
            padding: 0.4rem 0.75rem;
            border-radius: 6px;
            border: 1px solid #dee2e6;
            font-size: 0.85rem;
        }
        
        .ssr-property-summary .ssr-neighborhood-item .label {
            color: #6c757d;
            font-size: 0.7rem;
            font-weight: 500;
            display: block;
        }
        
        .ssr-property-summary .ssr-neighborhood-item .value {
            color: #212529;
            font-weight: 600;
        }
        
        @media (max-width: 768px) {
            .ssr-property-summary .ssr-neighborhood {
                margin-top: 0.75rem;
                padding-top: 0.75rem;
            }
            
            .ssr-property-summary .ssr-neighborhood-title {
                font-size: 0.85rem;
            }
            
            .ssr-property-summary .ssr-neighborhood-item {
                padding: 0.3rem 0.5rem;
                font-size: 0.8rem;
            }
            
            .ssr-property-summary .ssr-neighborhood-item .label {
                font-size: 0.65rem;
            }
        }