/* Global Styles & Variables */
:root {
    --primary-color: #4a6cf7;
    --primary-dark: #3a5ce4;
    --primary-light: #eef1fe;
    --secondary-color: #34a853;
    --accent-color: #ff6d00;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #80868b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --border-color: #dadce0;
    --shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.1);
    --shadow-md: 0 2px 6px rgba(60, 64, 67, 0.15);
    --shadow-lg: 0 4px 12px rgba(60, 64, 67, 0.2);
    --sidebar-width: 260px;
    --header-height: 64px;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-dark);
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* Header Styles */
.dashboard-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 70px;
    width: auto;
}

.sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

.sidebar-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-bar {
    position: relative;
    width: 300px;
}

.search-bar input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background-color: var(--bg-secondary);
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
}

.search-bar input:focus {
    outline: none;
    background-color: var(--bg-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
}

.search-bar button {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    background: none;
    border: none;
    font-size: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.user-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.notifications {
    position: relative;
    cursor: pointer;
}

.notifications i {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: calc(100vh - var(--header-height));
    width: var(--sidebar-width);
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    z-index: 900;
    transform: translateX(-100%);
    transition: transform var(--transition-speed) ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar.open, .sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    font-weight: 500;
    color: var(--text-primary);
}

.close-sidebar {
    display: none;
    color: var(--text-tertiary);
    font-size: 1.2rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    flex-grow: 1;
}

.sidebar-menu li {
    position: relative;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--text-secondary);
    transition: all var(--transition-speed) ease;
}

.sidebar-menu li a i {
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar-menu li a .badge {
    margin-left: auto;
    background-color: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
}

.sidebar-menu li.active a, 
.sidebar-menu li a:hover {
    color: var(--primary-color);
    background-color: var(--primary-light);
}

.sidebar-menu li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--primary-color);
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.sidebar-footer a i {
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Main Content Styles */
.dashboard-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

.main-content {
    flex: 1;
    padding: 1.5rem;
    margin-left: 0;
    transition: margin-left var(--transition-speed) ease, width var(--transition-speed) ease;
    width: 100%;
}

/* Page Title and Controls */
.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title h1 {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-right: auto; /* Push other elements to the right */
}

/* Filter Controls - Group filter button and time filter closer together */
.filter-controls {
    display: flex;
    align-items: center;
    gap: 15px; /* Reduced gap between filter and time range */
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-filter select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
    font-size: 0.9rem;
}

/* Properties Page Styles */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.property-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #fff;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.property-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.property-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.property-image.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-tertiary);
    z-index: 1;
}

.property-image.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.add-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 2;
}

.add-favorite:hover {
    background: #fff;
    color: #e74c3c;
    transform: scale(1.1);
}

.add-favorite.active i {
    color: #e74c3c;
}

.add-favorite i {
    font-size: 1.2rem;
    color: var(--text-tertiary);
}

.add-favorite i.fas {
    color: #e74c3c;
}

.property-details {
    padding: 1rem;
}

.property-source {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 12px;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.property-source img {
    height: 16px;
    width: auto;
    display: block;
}

.property-source.zillow {
    background-color: rgba(0, 106, 255, 0.1);
}

.property-source.loopnet {
    background-color: rgba(255, 102, 0, 0.1);
}

.property-details h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.property-address {
    color: #666;
    margin: 0 0 8px 0;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.property-features span {
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    display: flex;
    align-items: center;
}

.property-features span i {
    margin-right: 5px;
    color: #4a6491;
}

.view-details {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.view-details:hover {
    background-color: var(--primary-dark);
}

/* Filter Styles */
.filter-options {
    display: flex;
    gap: 10px;
    position: relative;
}

.filter-btn, .sort-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.filter-btn:hover, .sort-btn:hover {
    background-color: var(--bg-tertiary);
}

.filter-btn.open {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Improved Filter Styles */
.property-filters {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    display: none;
    overflow: hidden;
    width: 600px; /* Wider filter box */
    position: absolute;
    right: 0;
    z-index: 100;
}

.property-filters.open {
    display: block;
}

/* Filter layout - horizontal layout */
.filter-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns for parallel items */
    gap: 15px;
    padding: 15px;
}

#filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

#filter-header h3 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

#filter-close {
    color: var(--text-tertiary);
    font-size: 1rem;
    cursor: pointer;
}

.filter-group {
    padding: 10px;
    border-bottom: none;
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.filter-group select,
.filter-group input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
    font-size: 0.85rem;
}

.price-range,
.cap-rate-range,
.units-range,
.building-size-range,
.year-built-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;
}

.price-range span,
.cap-rate-range span,
.units-range span,
.building-size-range span,
.year-built-range span {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

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

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.active-filters-container {
    grid-column: span 2; /* Span across both columns */
    padding: 12px 15px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    margin-top: 10px;
    border-bottom: none;
}

.active-filters-container h4 {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.filter-tag {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background-color: var(--primary-light);
    border-radius: 16px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.filter-tag i {
    cursor: pointer;
    font-size: 0.7rem;
}

.clear-filters {
    color: var(--primary-color);
    background: none;
    border: none;
    font-size: 0.8rem;
    padding: 0;
    cursor: pointer;
}

.filter-actions {
    grid-column: span 2; /* Span across both columns */
    padding: 12px 15px;
    display: flex;
    justify-content: flex-end;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.apply-filters {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.apply-filters:hover {
    background-color: var(--primary-dark);
}

/* Time filter adjustments */
.time-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-filter label {
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

.time-filter select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 1rem 0;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.page-numbers button {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.page-numbers button:hover:not([disabled]) {
    background-color: var(--bg-tertiary);
}

.page-numbers button.active {
    background-color: var(--primary-color);
    color: white;
}

.page-numbers button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    color: var(--text-tertiary);
}

/* Footer Styles */
.dashboard-footer {
    background-color: var(--bg-primary);
    padding: 2rem 1.5rem;
    margin-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* Dashboard Controls */
.dashboard-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

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

/* Property Search Styles 
.property-search-container {
    width: 100%;
    margin: 15px 0;
    max-width: 600px;
}
*/
.property-search {
    display: flex;
    align-items: center;
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.property-search input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 15px;
    color: #333;
    outline: none;
    background: transparent;
}

.property-search input::placeholder {
    color: #999;
}

.property-search button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.property-search button:hover {
    background-color: var(--primary-dark);
}

/* No results styling */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

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

.no-results p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.clear-search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.clear-search-btn:hover {
    background-color: var(--primary-dark);
}

.logout-btn {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #f5f5f5;
}

.logout-btn i {
    margin-right: 10px;
    width: 20px;
}

/* Property Details Panel - Main Styles */
.property-details-panel {
    position: fixed;
    top: 0;
    right: -480px;
    width: 480px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    overflow-y: auto;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
}

.property-details-panel.panel-active {
    right: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eaeaea;
    background-color: var(--primary-color);
    color: white;
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
}

.close-panel-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-panel-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.panel-content {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.panel-overlay.panel-active {
    display: block;
    opacity: 1;
}

.panel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: #666;
}

.panel-loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Property Details Content Styles */
.property-detail-container {
    font-family: 'Roboto', sans-serif;
}

.property-header {
    margin-bottom: 20px;
}

.property-image-slider {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    height: 220px;
    background-color: #f5f5f5;
}

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

.image-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.property-title h2 {
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    color: #333;
}

.property-address {
    color: #666;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.property-address i {
    margin-right: 5px;
    color: var(--primary-color);
}

.property-price {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Property Tabs */
.property-tabs {
    display: flex;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.property-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.property-tab {
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    position: relative;
    white-space: nowrap;
}

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

.property-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Property Highlights */
.property-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.highlight-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.highlight-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

.highlight-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

/* Property Description */
.property-description {
    margin-bottom: 25px;
}

.property-description h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #333;
}

.property-description p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* Units Tab */
.units-list {
    margin-bottom: 25px;
}

.units-list h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #333;
}

.unit-item {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.unit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f8f9fa;
    font-weight: 500;
    color: #333;
}

.unit-status {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.unit-status.occupied {
    background-color: #e6f7ee;
    color: #00a651;
}

.unit-status.vacant {
    background-color: #fff4e5;
    color: #ff9800;
}

.unit-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 15px;
}

.unit-detail-item {
    display: flex;
    flex-direction: column;
}

.unit-detail-label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 3px;
}

.unit-detail-value {
    font-size: 0.9rem;
    color: #333;
}

/* Photos Tab */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    height: 150px;
    background-color: #f5f5f5;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Contact Tab */
.contact-form {
    max-width: 100%;
}

.contact-form h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
}

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

/* Success Message */
.success-message {
    text-align: center;
    padding: 30px 0;
}

.success-message i {
    font-size: 3rem;
    color: #00a651;
    margin-bottom: 15px;
}

.success-message h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #333;
}

.success-message p {
    margin: 0;
    color: #555;
}

/* No Data Message */
.no-data-message {
    text-align: center;
    padding: 30px 0;
    color: #666;
    font-style: italic;
}

/* Additional Utility Classes */
.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: #00a651;
}

.text-warning {
    color: #ff9800;
}

.text-danger {
    color: #dc3545;
}

.text-muted {
    color: #6c757d;
}

.font-weight-bold {
    font-weight: 600;
}

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

/* Property amenities */
.property-amenities {
    margin-top: 20px;
}

.property-amenities h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #333;
}

.amenities-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.amenity-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #555;
}

.amenity-item i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Property location */
.property-location {
    margin-top: 20px;
}

.property-location h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #333;
}

.location-map {
    height: 200px;
    background-color: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

/* Financial details */
.financial-details {
    margin-top: 20px;
}

.financial-details h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #333;
}

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

.financial-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
}

.financial-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

.financial-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

/* Document section */
.property-documents {
    margin-top: 20px;
}

.property-documents h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    color: #333;
}

.document-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    margin-bottom: 10px;
}

.document-icon {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.document-info {
    flex-grow: 1;
}

.document-name {
    font-size: 0.9rem;
    color: #333;
    margin: 0 0 3px 0;
}

.document-size {
    font-size: 0.8rem;
    color: #666;
}

.document-download {
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
}

.document-download:hover {
    color: var(--primary-dark);
}

/* Loading and Error States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-tertiary);
    font-size: 1rem;
}

.loading > i,
.loading-spinner i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

.error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #e74c3c;
    font-size: 1rem;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: var(--border-radius);
}

.error i {
    margin-right: 0.5rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Styles */
@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }
    
    .sidebar.active ~ .main-content {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }
}

@media (max-width: 991px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .close-sidebar {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .properties-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .property-filters {
        width: 100%;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .header-right {
        gap: 1rem;
    }
    
    .search-bar {
        width: 200px;
    }
    
    .user-profile span {
        display: none;
    }
    
    .page-title {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .property-details-panel {
        width: 100%;
        right: -100%;
    }
    
    .property-highlights {
        grid-template-columns: 1fr;
    }
    
    .unit-details {
        grid-template-columns: 1fr 1fr;
    }
    
    .photo-gallery {
        grid-template-columns: 1fr;
    }
    
    .filter-layout {
        grid-template-columns: 1fr;
    }
    
    .active-filters-container,
    .filter-actions {
        grid-column: 1;
    }
    
    .dashboard-controls {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .property-search-container,
    .results-count,
    .filter-sort-container {
        margin: 5px 0;
        width: 100%;
    }
    
    .filter-sort-container {
        display: flex;
        justify-content: space-between;
    }
    
    .time-filter {
        flex-grow: 1;
        margin-left: 10px;
    }
    
    .time-filter select {
        width: 100%;
    }

    .sticky-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .property-search-container {
        max-width: none;
        min-width: auto;
    }

    .filter-sort-controls {
        justify-content: space-between;
        gap: 10px;
    }

    .time-filter select,
    .sort-controls select {
        min-width: 140px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .dashboard-header {
        padding: 0 1rem;
    }
    
    .search-bar {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .property-filters {
        padding: 1rem;
    }
    
    .filter-group {
        padding: 0.8rem;
    }
    
    .checkbox-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .panel-content {
        padding: 15px;
    }
    
    .property-image-slider {
        height: 180px;
    }
    
    .property-title h2 {
        font-size: 1.3rem;
    }
    
    .property-price {
        font-size: 1.2rem;
    }
    
    .property-tab {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .unit-details {
        grid-template-columns: 1fr;
    }

    .filter-sort-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .time-filter,
    .sort-controls {
        justify-content: space-between;
    }

    .time-filter select,
    .sort-controls select {
        flex: 1;
        min-width: auto;
    }
}

/* Animation for panel opening */
@keyframes slideIn {
    from { right: -480px; }
    to { right: 0; }
}

@keyframes slideOut {
    from { right: 0; }
    to { right: -480px; }
}

.panel-slide-in {
    animation: slideIn 0.3s forwards;
}

.panel-slide-out {
    animation: slideOut 0.3s forwards;
}

/* Cap Rate Badge Styles */
.cap-rate-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #2c3e50, #4a6491);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  font-weight: 700;
  font-size: 18px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.cap-rate-badge.negative {
  background: linear-gradient(135deg, #6b2130, #91344a);
}

.cap-rate-badge span {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
  text-transform: uppercase;
}

/* Last Updated Badge Styles */
.last-updated-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  z-index: 5;
}

.last-updated-badge.recent {
  background-color: rgba(40, 167, 69, 0.8);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 480px) {
  .cap-rate-badge {
    font-size: 14px;
    padding: 6px 10px;
  }

  .cap-rate-badge span {
    font-size: 10px;
  }
  
  .last-updated-badge {
    font-size: 11px;
    padding: 4px 8px;
  }
}


/* Fixed Sticky Controls Layout */
.sticky-controls {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sticky-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.sticky-header h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
    flex-shrink: 0;
}

.property-search-container {
    flex: 1;
    width: 100%;
    min-width: 500px;
}

.results-count {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

/* Enhanced Filter and Sort Controls */
.filter-sort-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-options .filter-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-options .filter-btn:hover {
    background: #1557b0;
}

.time-filter,
.sort-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-filter label,
.sort-controls label {
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    font-size: 14px;
}

.time-filter select,
.sort-controls select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    font-size: 14px;
    cursor: pointer;
    min-width: 160px;
}

.time-filter select:focus,
.sort-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.2);
}

