:root {
    --color-primary: #1e40af;
    --color-primary-hover: #1e3a8a;
    --color-gold: #f59e0b;
    --color-green: #16a34a;
    --color-red: #dc2626;
    --color-bg: #ffffff;
    --color-surface: #f8fafc;
    --color-border: #e2e8f0;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

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

body {
    font-family: var(--font-sans);
    font-size: 20px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

a {
    color: var(--color-primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--color-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    background: var(--color-bg);
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
}
.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.logo:hover {
    text-decoration: none;
}
.logo-icon {
    width: 28px;
    height: 28px;
}
.nav-search {
    flex: 1;
    max-width: 480px;
}
.search-wrapper {
    position: relative;
}
.search-input {
    width: 100%;
    padding: 10px 16px;
    font-size: 16px;
    font-family: var(--font-sans);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.15s;
}
.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}
.search-icon-lg {
    left: 16px;
}
.search-input-icon {
    padding-left: 40px;
}
.hero-search .search-input-icon {
    padding-left: 48px;
}
.hero-search-wrapper {
    flex: 1;
}
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 200;
    max-height: 320px;
    overflow-y: auto;
}
.autocomplete-results.active {
    display: block;
}
.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-item:hover {
    background: var(--color-surface);
}
.autocomplete-item .name {
    font-weight: 500;
}
.autocomplete-item .location {
    font-size: 14px;
    color: var(--color-text-muted);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    margin-left: auto;
}
.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-muted);
}
.nav-link:hover {
    color: var(--color-text);
    text-decoration: none;
}
.nav-user {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 16px;
    font-family: var(--font-sans);
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn:hover {
    text-decoration: none;
}
.btn-sm {
    padding: 6px 14px;
    font-size: 14px;
}
.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--color-primary-hover);
}
.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}
.btn-ghost:hover {
    background: var(--color-surface);
    color: var(--color-text);
}
.btn-lg {
    padding: 14px 32px;
    font-size: 18px;
}

/* Stars */
.star {
    color: var(--color-border);
    font-size: 1.1em;
}
.star.filled {
    color: var(--color-gold);
}
.rating-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.rating-number {
    font-weight: 600;
    font-size: 0.9em;
}

/* Cards */
.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s;
}
.card:hover {
    box-shadow: var(--shadow);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--color-text);
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 16px;
    font-family: var(--font-sans);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}
.form-textarea {
    resize: vertical;
    min-height: 120px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-hint {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 15px;
}
.alert-error {
    background: #fef2f2;
    color: var(--color-red);
    border: 1px solid #fecaca;
}
.alert-success {
    background: #f0fdf4;
    color: var(--color-green);
    border: 1px solid #bbf7d0;
}

/* Hero */
.hero {
    text-align: center;
    padding: 80px 0 60px;
}
.hero h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}
.hero p {
    font-size: 22px;
    color: var(--color-text-muted);
    margin-bottom: 36px;
}
.hero-search {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
}
.hero-search .search-input {
    font-size: 18px;
    padding: 14px 20px;
    padding-left: 48px;
}

/* Section */
.section {
    padding: 48px 0;
}
.section-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
}
.no-results {
    text-align: center;
    padding: 60px 20px;
}
.no-results h2 {
    font-size: 24px;
    margin-bottom: 8px;
}
.no-results p {
    color: var(--color-text-muted);
    font-size: 16px;
}

/* Landlord cards grid */
.landlord-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.landlord-card {
    text-decoration: none;
    color: inherit;
}
.landlord-card:hover {
    text-decoration: none;
}
.landlord-card .card-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}
.landlord-card .card-address {
    font-size: 15px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}
.landlord-card .card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}
.review-count {
    color: var(--color-text-muted);
}

/* Review cards */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.review-card {
    padding: 24px;
}
.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.review-title {
    font-size: 20px;
    font-weight: 600;
}
.review-meta {
    font-size: 14px;
    color: var(--color-text-muted);
}
.review-landlord-link {
    font-size: 14px;
    color: var(--color-primary);
    margin-bottom: 8px;
}
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}
.pros h4 {
    color: var(--color-green);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.cons h4 {
    color: var(--color-red);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.pros p, .cons p {
    font-size: 16px;
    line-height: 1.5;
}
.review-body {
    font-size: 16px;
    line-height: 1.6;
    margin-top: 12px;
}
.review-photos {
    margin-top: 16px;
}
.review-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 8px;
}

/* Tabs */
.detail-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 28px;
}
.detail-tabs .tab {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.detail-tabs .tab:hover {
    color: var(--color-text);
}
.detail-tabs .tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}
.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
}

/* Photo gallery full (photos tab) */
.photo-gallery-full {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.photo-gallery-full img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

/* Landlord detail page */
.landlord-header {
    padding: 40px 0 24px;
}
.about-blurb {
    padding: 16px 0 8px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-muted);
}
.about-blurb a {
    color: var(--color-primary);
    text-decoration: underline;
}
.entity-type-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
}
.landlord-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}
.landlord-address {
    font-size: 18px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}
.landlord-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.landlord-badges {
    display: flex;
    gap: 8px;
}
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 100px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

/* Map */
.satellite-thumbnail {
    display: none;
    width: 100%;
    height: 280px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background-size: cover;
    background-position: center;
    margin-bottom: 16px;
}
.map-container {
    width: 100%;
    height: 360px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    margin: 24px 0;
    overflow: hidden;
}
.map-container-sm {
    height: 300px;
}

/* Photo gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 24px 0;
}
.photo-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    cursor: pointer;
    transition: transform 0.15s;
}
.photo-gallery img:hover {
    transform: scale(1.02);
}

/* Star rating widget */
.star-rating-widget {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
    font-size: 32px;
}
.star-rating-widget input {
    display: none;
}
.star-rating-widget label {
    cursor: pointer;
    color: var(--color-border);
    transition: color 0.1s;
}
.star-rating-widget input:checked ~ label,
.star-rating-widget label:hover,
.star-rating-widget label:hover ~ label {
    color: var(--color-gold);
}

/* Photo upload preview */
.photo-upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s;
}
.photo-upload-area:hover {
    border-color: var(--color-primary);
}
.photo-previews {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.photo-previews img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

/* Auth pages */
.auth-page {
    max-width: 440px;
    margin: 60px auto;
}
.auth-page h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}
.auth-page .auth-subtitle {
    color: var(--color-text-muted);
    margin-bottom: 32px;
}
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 15px;
    color: var(--color-text-muted);
}

/* Detail layout */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 32px 0;
    margin-top: 64px;
}
.footer-inner {
    text-align: center;
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Lease dates */
.lease-dates {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: 8px;
}

/* Auth overlay on review form */
.auth-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.92);
    z-index: 10;
    border-radius: var(--radius);
    align-items: center;
    justify-content: center;
    text-align: center;
}
.auth-overlay-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}
.auth-overlay-content p {
    color: var(--color-text-muted);
    font-size: 16px;
}

/* Browse pages */
.breadcrumb {
    font-size: 15px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}
.breadcrumb a {
    color: var(--color-primary);
}
.browse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.browse-card {
    text-decoration: none;
    color: inherit;
    text-align: center;
    padding: 28px 20px;
}
.browse-card:hover {
    text-decoration: none;
}
.browse-card-name {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}
.browse-card-count {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    body { font-size: 17px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 18px; }
    .hero-search { flex-direction: column; }
    .header-inner { flex-wrap: wrap; }
    .nav-search { order: 3; max-width: 100%; flex-basis: 100%; }
    .detail-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .pros-cons { grid-template-columns: 1fr; }
    .landlord-grid { grid-template-columns: 1fr; }
}
