:root {
	--rs-primary: #155eef;
	--rs-primary-dark: #0d47bd;
	--rs-text: #182230;
	--rs-muted: #667085;
	--rs-border: #e4e7ec;
	--rs-surface: #f8fafc;
	--rs-success: #087a45;
	--rs-danger: #b42318;
}

.rs-agent-registration,
.rs-agent-dashboard,
.rs-listing-single,
.rs-related-listings { box-sizing: border-box; }
.rs-agent-registration { max-width: 760px; margin: 0 auto; }
.rs-agent-dashboard { max-width: 1080px; }

.rs-field-group {
	border: 1px solid var(--rs-border);
	border-radius: 12px;
	padding: 20px;
	margin: 0 0 20px;
	background: #fff;
}
.rs-field-group legend { font-weight: 700; padding: 0 8px; color: var(--rs-text); }
.rs-field { margin: 0 0 14px; }
.rs-field label { display: block; font-size: 14px; font-weight: 600; color: var(--rs-text); }
.rs-field input:not([type="checkbox"]):not([type="radio"]),
.rs-field select,
.rs-field textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 10px 12px;
	margin-top: 6px;
	border: 1px solid #cfd4dc;
	border-radius: 7px;
	font: inherit;
	background: #fff;
}
.rs-field textarea { min-height: 110px; resize: vertical; }
.rs-field small { display: block; margin-top: 5px; color: var(--rs-muted); font-weight: 400; }
.rs-field-checkbox label { display: flex; align-items: center; gap: 8px; }
.rs-field-checkbox input { width: auto; }
.rs-submit { margin-top: 22px; }

.rs-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--rs-primary);
	color: #fff !important;
	border: 0;
	border-radius: 8px;
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none !important;
	cursor: pointer;
}
.rs-button:hover { background: var(--rs-primary-dark); }
.rs-button-secondary { background: #fff; color: var(--rs-primary) !important; border: 1px solid var(--rs-primary); }

.rs-notice { padding: 13px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; background: #f2f4f7; color: var(--rs-text); }
.rs-notice-success { background: #ecfdf3; color: var(--rs-success); border: 1px solid #abefc6; }
.rs-notice-error { background: #fef3f2; color: var(--rs-danger); border: 1px solid #fecdca; }
.rs-dashboard-status-card { padding: 16px; margin-bottom: 20px; border: 1px solid var(--rs-border); border-left: 4px solid var(--rs-primary); border-radius: 8px; background: #fff; }
.rs-current-agent-photo { width: 100px; height: 100px; object-fit: cover; border-radius: 50%; }

.rs-dashboard-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rs-border); margin-bottom: 24px; }
.rs-dashboard-tabs a { padding: 11px 16px; text-decoration: none; color: var(--rs-muted); font-weight: 700; border-bottom: 3px solid transparent; }
.rs-dashboard-tabs a.rs-tab-active { color: var(--rs-primary); border-bottom-color: var(--rs-primary); }
.rs-dashboard-table-wrap { overflow-x: auto; }
.rs-dashboard-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.rs-dashboard-table th, .rs-dashboard-table td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--rs-border); }
.rs-dashboard-table th { color: var(--rs-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.rs-table-note { display: block; max-width: 320px; margin-top: 5px; color: var(--rs-danger); }
.rs-delete-link { color: var(--rs-danger); }
.rs-form-help { color: var(--rs-muted); }
.rs-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.rs-checkbox-grid label { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.rs-front-gallery-sortable { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.rs-front-gallery-item { width: 130px; padding: 8px; border: 1px solid var(--rs-border); border-radius: 8px; background: #fff; cursor: move; }
.rs-front-gallery-item img { width: 100%; height: 100px; object-fit: cover; border-radius: 5px; display: block; }
.rs-front-gallery-item span { display: block; margin: 5px 0; font-size: 11px; color: var(--rs-muted); }
.rs-front-gallery-item label { font-size: 12px; font-weight: 500; }

.rs-agent-card { display: flex; gap: 14px; border: 1px solid var(--rs-border); border-radius: 12px; padding: 16px; background: #fff; }
.rs-agent-card__photo img { width: 76px; height: 76px; object-fit: cover; border-radius: 50%; }
.rs-agent-card__body h3 { margin: 0 0 4px; font-size: 17px; }
.rs-agent-card__body p { margin: 0; color: var(--rs-muted); font-size: 13px; }

.rs-listing-filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 22px; padding: 14px; background: var(--rs-surface); border: 1px solid var(--rs-border); border-radius: 10px; }
.rs-listing-filters select, .rs-listing-filters input { min-height: 42px; padding: 8px 10px; border: 1px solid #cfd4dc; border-radius: 6px; background: #fff; }
.rs-listing-filters input[type="number"] { width: 130px; }
.rs-listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.rs-listing-card { display: block; overflow: hidden; color: inherit; text-decoration: none !important; border: 1px solid var(--rs-border); border-radius: 12px; background: #fff; transition: transform .15s ease, box-shadow .15s ease; }
.rs-listing-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(16,24,40,.10); }
.rs-listing-card__media { position: relative; aspect-ratio: 4/3; background: #eef1f5; }
.rs-listing-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-listing-card__media-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #f2f4f7, #dfe3e8); }
.rs-listing-card__body { padding: 15px; }
.rs-listing-card__price { font-size: 21px; font-weight: 800; color: var(--rs-text); }
.rs-listing-card__headline { margin-top: 4px; font-weight: 700; color: var(--rs-text); }
.rs-listing-card__specs { display: flex; gap: 12px; margin: 7px 0; font-size: 13px; color: #344054; }
.rs-listing-card__address { color: var(--rs-muted); font-size: 13px; }
.rs-listing-card__transaction { margin-top: 9px; font-size: 12px; font-weight: 700; color: var(--rs-primary); text-transform: uppercase; }
.rs-badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; color: #fff; }
.rs-listing-card__media .rs-badge { position: absolute; top: 10px; left: 10px; }
.rs-badge-forsale { background: #155eef; }
.rs-badge-pending { background: #b54708; }
.rs-badge-sold { background: #475467; }
.rs-badge-rented { background: #087a45; }
.rs-badge-offmarket { background: #98a2b3; }
.rs-pagination { display: flex; gap: 7px; margin-top: 24px; }
.rs-pagination a { padding: 7px 12px; border: 1px solid var(--rs-border); border-radius: 6px; color: var(--rs-text); text-decoration: none; }
.rs-pagination a.rs-page-current { background: var(--rs-primary); color: #fff; border-color: var(--rs-primary); }
.rs-listing-empty { padding: 30px; text-align: center; color: var(--rs-muted); background: var(--rs-surface); border-radius: 10px; }

.rs-listing-single { max-width: 1240px; margin: 0 auto; padding: 28px 20px 90px; color: var(--rs-text); }
.rs-listing-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 22px; }
.rs-listing-hero h1 { margin: 4px 0 8px; font-size: clamp(28px, 4vw, 44px); line-height: 1.1; }
.rs-listing-eyebrow { margin: 0; color: var(--rs-primary); font-weight: 800; }
.rs-listing-meta-line { display: flex; flex-wrap: wrap; gap: 14px; color: var(--rs-muted); font-size: 13px; }
.rs-listing-hero__price { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; white-space: nowrap; }
.rs-listing-hero__price strong { font-size: 34px; }
.rs-listing-single__gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 210px; gap: 8px; overflow: hidden; margin-bottom: 28px; border-radius: 14px; }
.rs-listing-single__gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-listing-single__gallery .rs-gallery-primary { grid-row: span 2; }
.rs-listing-single__gallery--single { display: block; max-height: 650px; }
.rs-listing-single__gallery--single img { width: 100%; max-height: 650px; object-fit: cover; }
.rs-listing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 38px; align-items: start; }
.rs-listing-main { min-width: 0; }
.rs-listing-sidebar { position: sticky; top: 30px; }
.rs-listing-single__specs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 18px; margin: 0 0 24px; background: var(--rs-surface); border-radius: 12px; }
.rs-listing-single__specs li { display: flex; flex-direction: column; text-align: center; }
.rs-listing-single__specs strong { font-size: 21px; }
.rs-listing-single__specs span { font-size: 12px; color: var(--rs-muted); }
.rs-listing-summary { padding: 18px 20px; border-left: 4px solid var(--rs-primary); background: #f5f8ff; border-radius: 8px; font-size: 17px; }
.rs-content-section { padding: 28px 0; border-bottom: 1px solid var(--rs-border); }
.rs-content-section h2, .rs-listing-disclosures h2, .rs-related-listings h2 { margin: 0 0 18px; font-size: 24px; }
.rs-content-section h3 { font-size: 17px; }
.rs-prose { line-height: 1.75; color: #344054; }
.rs-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid var(--rs-border); border-radius: 10px; overflow: hidden; }
.rs-detail-grid div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--rs-border); }
.rs-detail-grid div:nth-child(odd) { border-right: 1px solid var(--rs-border); }
.rs-detail-grid dt { color: var(--rs-muted); }
.rs-detail-grid dd { margin: 0; font-weight: 700; text-align: right; }
.rs-amenities-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; padding: 0; list-style: none; }
.rs-amenities-list li { padding: 10px 12px; border: 1px solid var(--rs-border); border-radius: 8px; background: #fff; }
.rs-amenities-list li::before { content: "✓"; margin-right: 8px; color: var(--rs-success); font-weight: 800; }
.rs-resource-links { display: flex; flex-wrap: wrap; gap: 10px; }
.rs-resource-links a, .rs-map-link { display: inline-flex; padding: 10px 14px; border: 1px solid var(--rs-primary); border-radius: 7px; color: var(--rs-primary); text-decoration: none; font-weight: 700; }
.rs-open-house-section { padding: 24px; margin-top: 24px; border: 1px solid #fdb022; border-radius: 12px; background: #fffaeb; }
.rs-listing-disclosures { padding: 24px 0; color: var(--rs-muted); font-size: 12px; line-height: 1.6; }
.rs-contact-card { padding: 22px; border: 1px solid var(--rs-border); border-radius: 14px; box-shadow: 0 8px 24px rgba(16,24,40,.08); background: #fff; }
.rs-contact-card h2 { margin: 0 0 16px; font-size: 21px; }
.rs-agent-card--sidebar { padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--rs-border); border-radius: 0; }
.rs-contact-actions { display: grid; gap: 9px; margin-top: 16px; }
.rs-co-agent { margin: 14px 0 0; color: var(--rs-muted); font-size: 13px; }
.rs-related-listings { margin-top: 50px; }
.rs-mobile-contact-bar { display: none; }

@media (max-width: 900px) {
	.rs-listing-layout { grid-template-columns: 1fr; }
	.rs-listing-sidebar { position: static; }
	.rs-listing-single__specs { grid-template-columns: repeat(3, 1fr); }
	.rs-listing-single__gallery { grid-template-columns: 2fr 1fr; }
	.rs-listing-single__gallery img:nth-child(n+4) { display: none; }
	.rs-mobile-contact-bar { position: fixed; z-index: 999; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(2, 1fr); background: #fff; border-top: 1px solid var(--rs-border); box-shadow: 0 -8px 20px rgba(16,24,40,.12); }
	.rs-mobile-contact-bar a { padding: 15px; text-align: center; text-decoration: none; font-weight: 800; color: var(--rs-primary); }
}

@media (max-width: 640px) {
	.rs-field-group { padding: 16px; }
	.rs-listing-single { padding-left: 14px; padding-right: 14px; }
	.rs-listing-hero { display: block; }
	.rs-listing-hero__price { align-items: flex-start; margin-top: 14px; }
	.rs-listing-single__gallery { grid-template-columns: 1fr; grid-auto-rows: 260px; }
	.rs-listing-single__gallery .rs-gallery-primary { grid-row: auto; }
	.rs-listing-single__gallery img:not(:first-child) { display: none; }
	.rs-listing-single__specs { grid-template-columns: repeat(2, 1fr); }
	.rs-detail-grid { grid-template-columns: 1fr; }
	.rs-detail-grid div:nth-child(odd) { border-right: 0; }
	.rs-dashboard-table { min-width: 760px; }
}

/* Realty Suite 0.2.5: property inquiry + floating mortgage calculator */
.rs-property-inquiry { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--rs-border); }
.rs-property-inquiry h3 { margin: 0 0 12px; font-size: 18px; }
.rs-lead-form { display: grid; gap: 10px; }
.rs-lead-form label { display: grid; gap: 5px; color: var(--rs-text); font-size: 12px; font-weight: 700; }
.rs-lead-form input, .rs-lead-form textarea { width: 100%; box-sizing: border-box; padding: 10px 11px; border: 1px solid var(--rs-border); border-radius: 8px; background: #fff; color: var(--rs-text); font: inherit; }
.rs-lead-form textarea { resize: vertical; }
.rs-lead-form input:focus, .rs-lead-form textarea:focus, .rs-mortgage-panel input:focus, .rs-mortgage-panel select:focus { outline: 2px solid rgba(21,94,239,.2); border-color: var(--rs-primary); }
.rs-notice-success { padding: 10px 12px; margin: 0 0 12px; border-radius: 8px; background: #ecfdf3; color: #067647; font-size: 13px; }
.rs-mortgage-float { position: fixed; right: 22px; bottom: 22px; z-index: 1000; font-family: inherit; }
.rs-mortgage-toggle { border: 0; border-radius: 999px; padding: 13px 18px; background: var(--rs-primary); color: #fff; font-weight: 800; box-shadow: 0 10px 30px rgba(16,24,40,.24); cursor: pointer; }
.rs-mortgage-panel { position: absolute; right: 0; bottom: 56px; width: min(360px, calc(100vw - 28px)); box-sizing: border-box; padding: 18px; border: 1px solid var(--rs-border); border-radius: 16px; background: #fff; color: var(--rs-text); box-shadow: 0 18px 55px rgba(16,24,40,.22); }
.rs-mortgage-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 18px; }
.rs-mortgage-close { border: 0; background: transparent; color: var(--rs-muted); font-size: 26px; line-height: 1; cursor: pointer; }
.rs-mortgage-panel label { display: grid; gap: 5px; margin: 0 0 11px; font-size: 12px; font-weight: 700; }
.rs-mortgage-panel label span { display: flex; align-items: center; gap: 5px; }
.rs-mortgage-panel input, .rs-mortgage-panel select { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--rs-border); border-radius: 8px; background: #fff; }
.rs-mortgage-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rs-mortgage-result { padding: 14px; margin-top: 4px; border-radius: 10px; background: #f5f8ff; }
.rs-mortgage-result small { display: block; color: var(--rs-muted); }
.rs-mortgage-result strong { display: inline-block; margin-top: 3px; color: var(--rs-primary-dark); font-size: 28px; }
.rs-mortgage-result span { margin-left: 4px; color: var(--rs-muted); font-size: 12px; }
.rs-mortgage-disclaimer { margin: 10px 0 0; color: var(--rs-muted); font-size: 10px; line-height: 1.4; }
@media (max-width: 900px) { .rs-mortgage-float { right: 12px; bottom: 68px; } }
