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

:root {
	--page: #F4F5F7;
	--surface: #FFFFFF;
	--surface-hover: #F8F9FB;
	--text: #1E2029;
	--text-muted: #6E7480;
	--text-faint: #9CA3AF;
	--border: #E2E4E9;
	--accent: #0D7C7C;
	--accent-hover: #0A6363;
	--accent-light: rgba(13,124,124,0.08);
	--accent-surface: #E8F4F4;
	--accent-20: rgba(13,124,124,0.20);
	--accent-80: rgba(13,124,124,0.80);
	--green: #16A34A;
	--green-bg: #DCFCE7;
	--amber: #D97706;
	--amber-bg: #FEF3C7;
	--red: #DC2626;
	--red-bg: #FEE2E2;
	--blue: #2563EB;

	--topbar-h: 56px;
	--topbar-bg: #FFFFFF;
	--topbar-border: #E2E4E9;
	--topbar-text: #1E2029;
	--topbar-muted: #6E7480;
	--topbar-subtle: #9CA3AF;
	--topbar-accent: #0D7C7C;
	--topbar-accent-bg: rgba(13,124,124,0.08);
	--topbar-danger: #DC2626;
	--radius: 10px;
	--shadow: 0 1px 3px rgba(0,0,0,0.06);
	--shadow-md: 0 4px 16px rgba(0,0,0,0.08);

	/* WordPress preset aliases — required by property-submit/view.css */
	--wp--preset--color--midnight: #1E2029;
	--wp--preset--color--copper:   #0D7C7C;
	--wp--preset--color--ivory:    #F4F5F7;
	--wp--preset--color--pearl:    #F8F9FB;
	--wp--preset--color--light:    #E2E4E9;
	--wp--preset--font-family--vazirmatn: Vazirmatn, system-ui, sans-serif;
}

html, body {
	font-family: Vazirmatn, system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: var(--text);
	background: var(--page);
	direction: rtl;
	min-height: 100vh;
	overflow-x: hidden;
}

body {
	display: flex;
	flex-direction: column;
}

/* ── Top bar ──────────────────────────────────────────────────────────────── */

.rap-topbar {
	height: var(--topbar-h);
	background: var(--topbar-bg);
	color: var(--topbar-text);
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 20px;
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid var(--topbar-border);
	flex-shrink: 0;
}

.rap-topbar__brand {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--topbar-accent);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
}

.rap-topbar__logo {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	object-fit: contain;
	display: block;
	flex-shrink: 0;
}

.rap-topbar__nav {
	display: flex;
	align-items: center;
	gap: 2px;
	flex: 1;
	padding-right: 16px;
}

.rap-nav-item {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 7px 13px;
	border-radius: 7px;
	color: var(--topbar-muted);
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	transition: background 0.15s, color 0.15s;
	white-space: nowrap;
}

.rap-nav-item:hover {
	background: var(--surface-hover);
	color: var(--text);
}

.rap-nav-item.is-active {
	background: var(--topbar-accent-bg);
	color: var(--topbar-accent);
}

.rap-topbar__end {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-shrink: 0;
}

.rap-quick-link {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--topbar-subtle);
	text-decoration: none;
	font-size: 12.5px;
	white-space: nowrap;
	transition: color 0.15s;
}

.rap-quick-link:hover { color: var(--accent); }

.rap-topbar__user {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-right: 14px;
	border-right: 1px solid var(--topbar-border);
}

.rap-topbar__avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	flex-shrink: 0;
}

.rap-topbar__display-name {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--topbar-text);
	white-space: nowrap;
}

.rap-topbar__logout {
	font-size: 12px;
	color: var(--topbar-subtle);
	text-decoration: none;
	transition: color 0.15s;
}

.rap-topbar__logout:hover { color: var(--topbar-danger); }

/* ── Main ─────────────────────────────────────────────────────────────────── */

.rap-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.rap-footer {
	padding: 16px 28px 20px;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--text-muted);
}

/* ── Page Header ─────────────────────────────────────────────────────────── */

.rap-page-header {
	padding: 24px 28px 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.rap-page-header__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.rap-page-header__title {
	font-size: 22px;
	font-weight: 800;
	color: var(--text);
	line-height: 1.3;
}

.rap-page-header__meta {
	font-size: 13px;
	color: var(--text-muted);
	line-height: 1.5;
}

.rap-page-header__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.rap-page-header__actions .rap-btn-primary {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	text-decoration: none;
	white-space: nowrap;
}

@media (max-width: 680px) {
	.rap-page-header {
		padding: 16px 16px 0;
	}
	.rap-page-header__title {
		font-size: 18px;
	}
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.rap-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 18px;
	border-radius: 8px;
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	text-decoration: none;
	transition: opacity 0.15s, transform 0.1s;
}

.rap-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.rap-btn:active { transform: translateY(0); }

.rap-btn--primary   { background: var(--accent); color: #fff; }
.rap-btn--secondary { background: var(--surface-hover); color: var(--text); border: 1px solid var(--border); }

/* ── Form view ────────────────────────────────────────────────────────────── */

.rap-form-wrap {
	padding: 24px 28px 48px;
	max-width: 1100px;
	margin-inline: auto;
}

@media (min-width: 640px) {
	.rap-form-wrap { min-width: 600px; }
}

.rap-form-wrap .re-submit-wrap {
	max-width: none !important;
	min-width: 0;
	width: 100%;
	border-radius: 12px;
}

@media (max-width: 639px) {
	.rap-form-wrap {
		width: 100%;
	}
}

@media (max-width: 680px) {
	.rap-form-wrap {
		padding: 0 0 40px;
	}
	.rap-form-wrap .re-submit-wrap {
		border-radius: 0;
	}
}

/* ── Toolbar ──────────────────────────────────────────────────────────────── */

.rap-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 28px 0;
}

.rap-toolbar__filters {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.rap-search-wrap {
	position: relative;
	flex: 1;
	min-width: 200px;
}

.rap-search-wrap svg {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-muted);
	pointer-events: none;
}

.rap-input {
	font-family: inherit;
	font-size: 13.5px;
	padding: 9px 36px 9px 14px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: #fff;
	color: var(--text);
	outline: none;
	width: 240px;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.rap-input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-light);
}

#rap-search { width: 100%; }

.rap-select {
	font-family: inherit;
	font-size: 13.5px;
	padding: 9px 36px 9px 14px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E7480' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
	color: var(--text);
	outline: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.15s;
}

.rap-select:focus { border-color: var(--accent); }

.rap-filter-icon {
	flex-shrink: 0;
	color: var(--text-muted);
}

/* ── Active filter chips ──────────────────────────────────────────────────── */

.rap-active-filters {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 0 28px;
	min-height: 0;
	transition: min-height 0.2s;
}

.rap-active-filters.has-active {
	padding-top: 10px;
	padding-bottom: 12px;
}

.rap-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12.5px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--accent-light, #e8f0fe);
	color: var(--accent, #1a73e8);
	border: 1px solid color-mix(in srgb, var(--accent, #1a73e8) 25%, transparent);
	line-height: 1.4;
}

.rap-chip-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	padding: 0;
	border: none;
	background: none;
	color: inherit;
	cursor: pointer;
	font-size: 12px;
	line-height: 1;
	border-radius: 50%;
	opacity: 0.6;
	transition: opacity 0.15s;
}

.rap-chip-remove:hover {
	opacity: 1;
	background: color-mix(in srgb, var(--accent, #1a73e8) 15%, transparent);
}

.rap-clear-filters {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 0;
	border: none;
	background: none;
	color: var(--text-muted);
	cursor: pointer;
	font-size: 12px;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
	transition: color 0.15s;
}

.rap-clear-filters:hover {
	color: var(--accent, #1a73e8);
}

.rap-toolbar__actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.rap-toolbar__add-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	text-decoration: none;
	white-space: nowrap;
}

@media (max-width: 680px) {
	.rap-toolbar__add-btn { display: none; }
}

/* ── Table ────────────────────────────────────────────────────────────────── */

.rap-table-wrap {
	margin: 16px 28px 0;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
}

.rap-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}

.rap-table thead {
	background: var(--surface-hover);
	border-bottom: 1px solid var(--border);
}

.rap-table th {
	padding: 10px 14px;
	text-align: right;
	font-weight: 600;
	font-size: 12.5px;
	color: var(--text);
	white-space: nowrap;
}

.rap-table td {
	padding: 9px 14px;
	vertical-align: middle;
	border-bottom: 1px solid var(--border);
}

.rap-table tbody tr:last-child td { border-bottom: none; }

.rap-table tbody tr:nth-child(even) { background: #F9FAFB; }

.rap-table tbody tr:hover {
	background: #EEF2FF;
	box-shadow: inset 3px 0 0 var(--accent);
}

.rap-table tbody tr.rap-row-clickable { cursor: pointer; }

.rap-table tbody tr.is-trash { opacity: 0.65; }

/* Thumbnail cell */
.rap-thumb {
	width: 76px;
	height: 76px;
	border-radius: 6px;
	object-fit: cover;
	display: block;
	background: var(--surface-hover);
	flex-shrink: 0;
}

.rap-thumb-placeholder {
	width: 76px;
	height: 76px;
	border-radius: 6px;
	background: var(--surface-hover);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--border);
}

/* Title cell */
.rap-title-cell { max-width: 220px; }

.rap-title-row {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.rap-title-link {
	font-weight: 700;
	font-size: 14px;
	color: var(--text);
	text-decoration: none;
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 0.15s;
}

.rap-title-link:hover { color: var(--accent); }

.rap-prop-code {
	font-size: 11px;
	color: var(--text-faint);
	margin-top: 1px;
}

/* Price emphasis */
.rap-price {
	font-size: 15px;
	font-weight: 700;
	color: var(--text);
	white-space: nowrap;
}

/* Inline featured-star button */
.rap-star-btn {
	flex-shrink: 0;
	background: none;
	border: none;
	cursor: pointer;
	padding: 3px 4px;
	border-radius: 4px;
	color: var(--text-muted);
	display: flex;
	align-items: center;
	transition: color 0.15s, background 0.12s;
}

.rap-star-btn:hover { color: var(--accent); background: var(--accent-light); }
.rap-star-btn.is-featured { color: var(--accent); }
.rap-star-btn.is-featured:hover { color: var(--accent-hover); background: var(--accent-light); }

.rap-star-btn .star-filled { display: none; }
.rap-star-btn .star-empty  { display: block; }
.rap-star-btn.is-featured .star-filled { display: block; }
.rap-star-btn.is-featured .star-empty  { display: none; }


/* Badges */
.rap-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 20px;
	font-size: 11.5px;
	font-weight: 600;
	white-space: nowrap;
}

.rap-badge--publish { background: var(--green-bg); color: var(--green); }
.rap-badge--draft   { background: var(--amber-bg); color: var(--amber); }
.rap-badge--trash   { background: var(--red-bg);   color: var(--red); }
.rap-badge--sale    { background: var(--accent-20); color: var(--accent); }
.rap-badge--rent    { background: #ede9fe; color: #7c3aed; }
.rap-badge--presale { background: #e0f2fe; color: #0369a1; }

/* Dots (kebab) button */
.rap-dots-btn {
	background: none;
	border: 1px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	padding: 4px 10px;
	color: var(--text);
	transition: background 0.12s, border-color 0.12s, color 0.12s;
	display: flex;
	align-items: center;
}

.rap-dots-btn:hover {
	background: var(--surface-hover);
	border-color: var(--border);
	color: var(--text);
}

/* Dropdown menu */
.rap-dropdown {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 10px;
	box-shadow: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
	padding: 6px;
	min-width: 180px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.rap-dropdown[hidden] { display: none; }

.rap-dd-item {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 9px 12px;
	border-radius: 7px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--text);
	background: none;
	border: none;
	cursor: pointer;
	text-decoration: none;
	text-align: right;
	transition: background 0.12s, color 0.12s;
}

.rap-dd-item:hover                { background: var(--surface-hover); }
.rap-dd-item--warn:hover          { background: #fef3c7; color: var(--amber); }
.rap-dd-item--danger              { color: var(--red); }
.rap-dd-item--danger:hover        { background: var(--red-bg); }
.rap-dd-item--restore             { color: var(--green); }
.rap-dd-item--restore:hover       { background: var(--green-bg); }

.rap-dd-sep {
	height: 1px;
	background: var(--border);
	margin: 4px 0;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */

.rap-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 20px 28px 32px;
}

.rap-page-btn {
	background: #fff;
	border: 1px solid var(--border);
	color: var(--text);
	font-family: inherit;
	font-size: 13px;
	padding: 7px 14px;
	border-radius: 7px;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

.rap-page-btn:hover { background: var(--surface-hover); border-color: var(--accent); }
.rap-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.rap-page-btn.is-current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

.rap-page-info {
	font-size: 12.5px;
	color: var(--text);
	padding: 0 4px;
}

/* ── Loading & Error ──────────────────────────────────────────────────────── */

.rap-loading-row td {
	text-align: center;
	padding: 48px !important;
	color: var(--text);
	font-size: 14px;
}

.rap-spinner {
	width: 28px;
	height: 28px;
	border: 3px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: rap-spin 0.7s linear infinite;
	display: inline-block;
	vertical-align: middle;
	margin-left: 10px;
}

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

.rap-error {
	margin: 16px 28px 0;
	background: var(--red-bg);
	border: 1px solid var(--red);
	color: var(--red);
	padding: 12px 16px;
	border-radius: var(--radius);
	font-size: 13.5px;
}

.rap-empty-row td {
	text-align: center;
	padding: 48px !important;
	color: var(--text-muted);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

/* Always allow horizontal scroll as safety fallback */
.rap-table-wrap { overflow-x: auto; }

@media (max-width: 960px) {
	.rap-table th:nth-child(5),
	.rap-table td:nth-child(5),
	.rap-table th:nth-child(7),
	.rap-table td:nth-child(7) { display: none; }
}

@media (max-width: 680px) {
	.rap-topbar { padding: 0 14px; gap: 6px; overflow: hidden; }
	.rap-topbar__brand span { display: none; }
	.rap-topbar__nav { padding-right: 4px; }
	.rap-nav-item span { display: none; }
	.rap-nav-item { padding: 7px 10px; }
	.rap-quick-link { display: none; }
	.rap-topbar__display-name { display: none; }
	.rap-toolbar {
		flex-direction: column;
		align-items: stretch;
		padding: 12px 16px 0;
		gap: 10px;
	}
	.rap-toolbar__filters {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto;
		gap: 8px;
	}
	.rap-search-wrap { grid-column: 1 / -1; }
	.rap-input { width: 100%; }
	.rap-select { width: 100%; }
	.rap-table-wrap { margin: 12px 16px 0; overflow-x: auto; }
	.rap-footer { padding: 14px 16px 18px; }
	.rap-active-filters { padding: 0 16px; }
	.rap-active-filters.has-active { padding-top: 8px; padding-bottom: 10px; }
}

/* ── Mobile card layout (merged into 680px block above) ───────────────────── */

@media (max-width: 680px) {
	/* Convert table to card list */
	.rap-table-wrap { overflow-x: visible; }

	.rap-table,
	.rap-table tbody { display: block; width: 100%; }

	.rap-table thead { display: none; }

	.rap-table tr {
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 10px 12px;
		border-bottom: 1px solid var(--border);
		position: relative;
	}

	.rap-table tr:last-child { border-bottom: none; }
	.rap-table tr.rap-loading-row,
	.rap-table tr.rap-empty-row { display: table-row; }
	.rap-table tr.rap-loading-row td,
	.rap-table tr.rap-empty-row td { display: table-cell; }

	.rap-table td {
		display: block;
		border-bottom: none;
		padding: 0;
	}

	/* Thumbnail — fixed width, no grow */
	.rap-table td:nth-child(1) {
		flex-shrink: 0;
	}

	/* Title — grows to fill */
	.rap-table td:nth-child(2) {
		flex: 1;
		min-width: 0;
	}

	.rap-title-cell { max-width: none; }
	.rap-title-link { font-size: 14px; }
	.rap-prop-code { font-size: 10.5px; }

	/* Status badge — shrink only */
	.rap-table td:nth-child(3) {
		flex-shrink: 0;
	}

	/* Hide: type, معامله, قیمت, زیربنا, زمین, تاریخ */
	.rap-table td:nth-child(4),
	.rap-table td:nth-child(5),
	.rap-table td:nth-child(6),
	.rap-table td:nth-child(7),
	.rap-table td:nth-child(8) { display: none; }

	/* Actions button — always visible */
	.rap-table td:nth-child(9) {
		flex-shrink: 0;
	}

	.rap-thumb { width: 44px; height: 44px; }
	.rap-thumb-placeholder { width: 44px; height: 44px; }

	/* Pagination compact */
	.rap-pagination { padding: 16px; gap: 5px; }
	.rap-page-btn { padding: 6px 10px; font-size: 12px; }
}

/* ── Toast notification ──────────────────────────────────────────────── */

.rap-toast {
	position: fixed;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%) translateY(12px);
	background: var(--text);
	color: #fff;
	font-size: 13.5px;
	font-weight: 500;
	padding: 10px 20px;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.10);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.22s, transform 0.22s;
	white-space: nowrap;
	z-index: 10000;
}

.rap-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

/* ── FAB (mobile add button) ─────────────────────────────────────────── */

.rap-fab-add {
	display: none;
	position: fixed;
	bottom: 24px;
	right: 20px;
	padding: 0 20px 0 24px;
	height: 52px;
	border-radius: 28px;
	background: var(--accent);
	color: #fff;
	align-items: center;
	gap: 8px;
	box-shadow: 0 4px 20px rgba(13,124,124,0.45), 0 2px 8px rgba(0,0,0,0.12);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	z-index: 200;
	transition: transform 0.15s, box-shadow 0.15s;
}

.rap-fab-add:hover {
	transform: scale(1.07);
	box-shadow: 0 6px 28px rgba(13,124,124,0.55), 0 2px 8px rgba(0,0,0,0.14);
}

.rap-fab-add:active { transform: scale(0.96); }

@media (max-width: 680px) {
	.rap-fab-add { display: flex; }
}

/* ── Login page ──────────────────────────────────────────────────────── */
.re-admin-login-page {
	background: var(--page);
	align-items: center;
	justify-content: center;
}

.re-admin-login {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 16px;
}

.re-admin-login__card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 40px 48px;
	width: 100%;
	max-width: 380px;
	text-align: center;
	box-shadow: var(--shadow-md);
}

.re-admin-login__icon { font-size: 2rem; margin-bottom: 12px; }

.re-admin-login__title {
	color: var(--text);
	font-size: 1.25rem;
	font-weight: 600;
	margin: 0 0 24px;
}

.re-admin-login__card .login-username,
.re-admin-login__card .login-password { margin-bottom: 16px; text-align: right; }

.re-admin-login__card label {
	display: block;
	color: var(--text-muted);
	font-size: 0.875rem;
	margin-bottom: 6px;
}

.re-admin-login__card input[type="text"],
.re-admin-login__card input[type="password"] {
	width: 100%;
	padding: 10px 14px;
	background: var(--page);
	border: 1px solid var(--border);
	border-radius: 8px;
	color: var(--text);
	font-family: Vazirmatn, sans-serif;
	font-size: 1rem;
	direction: rtl;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.re-admin-login__card input[type="text"]:focus,
.re-admin-login__card input[type="password"]:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-light);
}

.re-admin-login__card input[type="submit"] {
	width: 100%;
	margin-top: 8px;
	padding: 12px;
	background-color: var(--accent);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-family: Vazirmatn, sans-serif;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.2s;
}

.re-admin-login__card input[type="submit"]:hover { opacity: 0.9; }

/* ── Settings ─────────────────────────────────────────────────────────────── */
.rap-settings-wrap { max-width: 600px; margin: 32px auto; padding: 0 16px; }
.rap-settings-card { background: #fff; border-radius: 12px; padding: 28px 28px 24px; box-shadow: var(--shadow); }
.rap-settings-footer { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.rap-settings-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; color: var(--text); }
.rap-settings-group { display: flex; flex-direction: column; gap: 6px; }
.rap-settings-label { font-size: .875rem; font-weight: 600; color: var(--text); }
.rap-settings-hint { font-size: .8rem; color: var(--text-muted); margin-bottom: 4px; }
.rap-settings-msg { font-size: .85rem; margin-top: 8px; }

/* ── Settings tab bar ───────────────────────────────────────────────── */
.rap-settings-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--border);
	padding-bottom: 0;
	direction: rtl;
}
.rap-settings-tab {
	font-family: Vazirmatn, system-ui, sans-serif;
	font-size: .85rem;
	font-weight: 500;
	padding: 8px 18px;
	border: none;
	background: none;
	color: var(--text-muted);
	cursor: pointer;
	border-radius: 7px 7px 0 0;
	transition: background 0.15s, color 0.15s;
	margin-bottom: -1px;
	position: relative;
}
.rap-settings-tab:hover {
	background: var(--surface-hover);
	color: var(--text);
}
.rap-settings-tab.is-active {
	background: var(--topbar-accent-bg);
	color: var(--accent);
	font-weight: 600;
	border-bottom: 2px solid var(--accent);
}


.rap-btn-primary { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 10px 20px; font-family: Vazirmatn, sans-serif; font-size: .9rem; font-weight: 600; cursor: pointer; transition: opacity .2s; width: fit-content; }
.rap-btn-primary:hover { opacity: .9; }
.rap-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.rap-settings-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.rap-city-list { list-style: none; margin-bottom: 10px; display: flex; flex-direction: column; gap: 4px; }
.rap-city-list__empty { font-size: .8rem; color: var(--text-muted); padding: 4px 0; }
.rap-city-list__item { display: flex; align-items: center; gap: 8px; font-size: .875rem; padding: 6px 10px; background: var(--surface-hover); border-radius: 6px; }
.rap-add-city-row { display: flex; gap: 8px; align-items: center; }

/* ── Watermark settings (task 5.6) ────────────────────────────────────────── */

.rap-wm-preview { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 12px; background: var(--surface-hover); border-radius: 8px; }
.rap-wm-preview-img { max-width: 120px; max-height: 60px; border-radius: 4px; object-fit: contain; }
.rap-btn-secondary { background: var(--text-muted); color: #fff; border: none; border-radius: 8px; padding: 10px 20px; font-family: Vazirmatn, sans-serif; font-size: .9rem; font-weight: 600; cursor: pointer; transition: opacity .2s; width: fit-content; }
.rap-btn-secondary:hover { opacity: .9; }
.rap-btn-secondary:disabled { opacity: .6; cursor: not-allowed; }
.rap-btn-small { padding: 6px 14px; font-size: .8rem; }
.rap-btn-file { display: inline-block; position: relative; overflow: hidden; cursor: pointer; }
.rap-file-input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.rap-wm-msg { font-size: .85rem; margin-top: 6px; }
.rap-wm-opacity-row { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.rap-range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: var(--border); outline: none; direction: ltr; }
.rap-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.rap-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.rap-wm-regenerate { margin-top: 12px; }

/* ── Analytics tab ────────────────────────────────────────────────────────── */

.rap-analytics-wrap {
	padding: 24px 20px 48px;
	max-width: 960px;
	margin: 0 auto;
}

.rap-analytics-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}

.rap-analytics-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--text);
}

/* Period switcher */
.rap-period-switcher {
	display: flex;
	gap: 3px;
	background: var(--surface-hover);
	border-radius: 8px;
	padding: 3px;
}
.rap-period-btn {
	padding: 6px 14px;
	border: none;
	background: transparent;
	border-radius: 6px;
	font-family: Vazirmatn, system-ui, sans-serif;
	font-size: 13px;
	cursor: pointer;
	color: var(--text-muted);
	transition: background 0.15s, color 0.15s;
}
.rap-period-btn.is-active {
	background: #fff;
	color: var(--text);
	font-weight: 600;
	box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ── KPI Summary Cards ── */
.rap-kpi-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 16px;
}

.rap-kpi-card {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 16px 18px;
	box-shadow: var(--shadow);
	display: flex;
	align-items: center;
	gap: 14px;
	border-right: 3px solid var(--kpi-accent);
	transition: box-shadow 0.2s, transform 0.18s;
}

.rap-kpi-card:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-1px);
}

.rap-kpi-card--blue  { --kpi-accent: #2563eb; }
.rap-kpi-card--green { --kpi-accent: #16a34a; }
.rap-kpi-card--amber { --kpi-accent: #D4A843; }

.rap-kpi-icon {
	width: 38px;
	height: 38px;
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.rap-kpi-card--blue  .rap-kpi-icon { background: #eff6ff; color: #2563eb; }
.rap-kpi-card--green .rap-kpi-icon { background: #f0fdf4; color: #16a34a; }
.rap-kpi-card--amber .rap-kpi-icon { background: #fefce8; color: #a16207; }

.rap-kpi-body { flex: 1; min-width: 0; }

.rap-kpi-value {
	font-size: 24px;
	font-weight: 800;
	color: var(--text);
	line-height: 1;
	margin-bottom: 4px;
	font-variant-numeric: tabular-nums;
}

.rap-kpi-label {
	font-size: 12px;
	color: var(--text-muted);
	font-weight: 500;
	white-space: nowrap;
}

/* Table inside analytics wrap matches chart width */
.rap-analytics-wrap .rap-table-wrap {
	margin-left: 0;
	margin-right: 0;
}

/* ── Section title ── */
.rap-analytics-section-title {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--text);
	margin-bottom: 10px;
	padding-right: 10px;
	border-right: 3px solid var(--accent);
}


.rap-analytics-error { text-align: center; color: var(--red); padding: 24px !important; }

/* ── Inline ranking bars ── */
.rap-ranking-cell {
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.rap-ranking-bar {
	width: 56px;
	height: 4px;
	background: var(--surface-hover);
	border-radius: 2px;
	overflow: hidden;
	flex-shrink: 0;
}

.rap-ranking-bar__fill {
	height: 100%;
	border-radius: 2px;
	background: var(--bar-color, #2563eb);
	transition: width 0.5s cubic-bezier(.4,0,.2,1);
}

.rap-analytics-empty  { color: var(--text-muted); font-size: 14px; }
.rap-input--inline { flex: 1; min-width: 0; }

/* ── Overview chart ── */
.rap-overview-chart-wrap {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 18px 20px 14px;
	margin-bottom: 20px;
}
.rap-overview-chart-wrap[hidden] { display: none; }

.rap-chart-header { margin-bottom: 12px; }

.rap-overview-legend {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.rap-overview-legend__item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--text-muted);
	font-weight: 500;
}
.rap-overview-legend__item::before {
	content: '';
	display: inline-block;
	width: 24px;
	height: 3px;
	border-radius: 2px;
	background: var(--dot);
	flex-shrink: 0;
}
.rap-overview-chart-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 230px;
}
#rap-overview-chart {
	width: 100% !important;
	height: 230px !important;
	display: block;
}

.rap-export-templates {
	padding: 24px 20px 48px;
	max-width: 960px;
	margin: 0 auto;
}

/* ── Export template list ────────────────────────────────────────────── */
#rap-export-tpl-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rap-export-tpl {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 12px 14px;
	background: var(--surface-hover);
	border: 1px solid var(--border);
	border-radius: 8px;
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--text);
	text-align: right;
	transition: background 0.12s, border-color 0.12s;
}

.rap-export-tpl:hover {
	background: var(--surface-hover);
	border-color: var(--accent);
}

.rap-export-tpl:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.rap-export-tpl.is-loading {
	position: relative;
	color: transparent;
	pointer-events: none;
}

.rap-export-tpl.is-loading::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: rap-spin 0.6s linear infinite;
}

.rap-export-loading {
	color: var(--text-muted);
	font-size: 13px;
	text-align: center;
	padding: 12px 0;
}

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

/* ── Export Modal ────────────────────────────────────────────────────── */
.rap-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10000;
	font-family: inherit;
}
.rap-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.40);
}
.rap-modal-box {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0,0,0,0.18);
	max-width: 420px;
	width: 90%;
	direction: rtl;
	text-align: right;
	overflow: hidden;
}
.rap-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px 12px;
	border-bottom: 1px solid var(--border);
}
.rap-modal-header h3 { margin:0; font-size:16px; font-weight:600; color:var(--text); }
.rap-modal-close { background:none; border:none; cursor:pointer; font-size:18px; color:var(--text-muted); padding:4px; }
.rap-modal-close:hover { color:var(--text); }
.rap-modal-body { padding:16px 20px; }
.rap-modal-body .rap-form-group { margin-bottom:12px; }
.rap-modal-body .rap-form-label { display:block; font-size:13px; font-weight:600; color:var(--text); margin-bottom:6px; }
.rap-modal-body .rap-form-hint { font-size:12px; margin-top:6px; }
.rap-modal-body .rap-form-msg { font-size:13px; margin-top:8px; }
.rap-modal-prop-title { font-size:13px; color:var(--text-muted); margin-bottom:12px; }
/* ── Analytics responsive ── */
@media (max-width: 680px) {
	.rap-analytics-wrap {
		padding: 14px 12px 32px;
		width: 100%;
		margin: 0;
		box-sizing: border-box;
	}

	.rap-analytics-wrap .rap-table-wrap {
		margin-left: 0;
		margin-right: 0;
	}

	.rap-overview-chart-wrap { padding: 12px 10px 8px; margin-bottom: 12px; }
	#rap-overview-chart { height: 180px !important; }
	.rap-overview-chart-loading { height: 180px; }

	.rap-kpi-row {
		grid-template-columns: repeat(3, 1fr);
		gap: 8px;
		margin-bottom: 12px;
	}
	.rap-kpi-card {
		padding: 10px 8px;
		gap: 0;
		flex-direction: column;
		align-items: flex-start;
		border-right: none;
		border-top: 3px solid var(--kpi-accent);
	}
	.rap-kpi-icon { display: none; }
	.rap-kpi-value { font-size: 18px; }
	.rap-kpi-label { font-size: 11px; white-space: normal; line-height: 1.3; }

	.rap-ranking-bar { display: none; }
}

/* Delete confirmation dialog */
.rap-delete-confirm-dialog {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 10000;
font-family: inherit;
}

.rap-dialog-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.40);
}

.rap-dialog-box {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #fff;
border-radius: 12px;
padding: 24px;
box-shadow: 0 20px 60px rgba(0,0,0,0.18);
max-width: 400px;
width: 90%;
direction: rtl;
text-align: right;
}

.rap-dialog-box h3 {
margin: 0 0 12px;
font-size: 18px;
font-weight: 600;
color: var(--text);
}

.rap-dialog-box p {
margin: 0 0 16px;
font-size: 14px;
color: var(--text-muted);
line-height: 1.5;
}

.rap-checkbox-label {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 20px;
font-size: 14px;
color: var(--text-muted);
cursor: pointer;
direction: rtl;
}

.rap-checkbox-label input[type="checkbox"] {
width: 18px;
height: 18px;
cursor: pointer;
accent-color: var(--accent);
}

.rap-dialog-actions {
display: flex;
gap: 8px;
flex-direction: row-reverse;
}

.rap-btn {
flex: 1;
padding: 10px 16px;
font-size: 14px;
font-weight: 500;
border: none;
border-radius: 6px;
cursor: pointer;
font-family: inherit;
transition: background 0.12s;
}

.rap-btn--cancel {
background: var(--surface-hover);
color: var(--text);
}
.rap-btn--cancel:hover { background: var(--border); }

.rap-btn--danger {
background: var(--red);
color: #fff;
}
.rap-btn--danger:hover { background: #b91c1c; }

/* ── Property detail drawer ──────────────────────────────────────────── */
.rap-detail-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.40);
	z-index: 9998;
}

.rap-detail-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(680px, 95vw);
	z-index: 9999;
	background: var(--surface);
	box-shadow: -8px 0 32px rgba(0,0,0,0.12);
	direction: rtl;
	text-align: right;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	font-family: Vazirmatn, system-ui, sans-serif;
}
.rap-detail-drawer.is-open {
	transform: translateX(0);
}

.rap-detail-header {
	flex-shrink: 0;
	border-bottom: 1px solid var(--border);
	background: var(--surface);
	position: sticky;
	top: 0;
	z-index: 1;
}

.rap-detail-header-top {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 16px 16px 8px;
}

.rap-detail-close {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 20px;
	color: var(--text-muted);
	padding: 2px 4px;
	flex-shrink: 0;
	line-height: 1;
}
.rap-detail-close:hover { color: var(--text); }

.rap-detail-title-row {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.rap-detail-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--text);
	margin: 0;
	line-height: 1.4;
	word-break: break-word;
}

.rap-detail-title-col {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.rap-detail-header-sub {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--text-muted);
	flex-wrap: wrap;
}
.rap-detail-header-code {
	font-weight: 500;
}
.rap-detail-header-sep {
	color: var(--border);
}

.rap-detail-actions {
	display: flex;
	gap: 8px;
	padding: 0 16px 12px;
	flex-wrap: wrap;
}

.rap-detail-actions .rap-btn-primary,
.rap-detail-actions .rap-btn-secondary {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 14px;
	font-size: 13px;
	border-radius: 6px;
	font-family: inherit;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.12s;
}
.rap-detail-actions .rap-btn-primary {
	background: var(--accent);
	color: #fff;
	border: none;
}
.rap-detail-actions .rap-btn-primary:hover { background: var(--accent-hover); }
.rap-detail-actions .rap-btn-secondary {
	background: var(--surface-hover);
	color: var(--text);
	border: 1px solid var(--border);
}
.rap-detail-actions .rap-btn-secondary:hover { background: var(--border); }

.rap-detail-more-wrap { position: relative; }

.rap-detail-more-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 4px;
	min-width: 160px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.10);
	z-index: 10;
	direction: rtl;
	text-align: right;
	overflow: hidden;
}

.rap-detail-more-item {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 9px 14px;
	border: none;
	background: none;
	font-family: inherit;
	font-size: 13px;
	color: var(--text);
	cursor: pointer;
	text-align: right;
	transition: background 0.12s;
}
.rap-detail-more-item:hover { background: var(--surface-hover); }

.rap-detail-more-item--warn { color: var(--red); }
.rap-detail-more-item--warn:hover { background: var(--red-bg); }

.rap-detail-star-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 14px;
	font-size: 13px;
	border-radius: 6px;
	border: 1px solid var(--border);
	cursor: pointer;
	font-family: inherit;
	font-weight: 500;
	background: var(--surface-hover);
	color: var(--text-muted);
	transition: background 0.12s, color 0.12s;
}
.rap-detail-star-btn:hover { background: var(--border); color: var(--amber); }
.rap-detail-star-btn.is-featured { color: var(--amber); border-color: var(--amber); background: var(--amber-bg); }
.rap-detail-star-btn.is-featured:hover { background: var(--amber-bg); }

.rap-detail-actions .rap-btn-secondary--warn { color: var(--red); border-color: var(--red); background: var(--red-bg); }
.rap-detail-actions .rap-btn-secondary--warn:hover { background: #fecaca; }
.rap-detail-actions .rap-btn-secondary--danger { color: #fff; border-color: var(--red); background: var(--red); }
.rap-detail-actions .rap-btn-secondary--danger:hover { background: #b91c1c; }

.rap-detail-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
}

.rap-detail-hero-wrap {
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 10px;
	background: var(--surface-hover);
	position: relative;
	aspect-ratio: 16 / 10;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rap-detail-hero {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rap-detail-hero-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-faint);
	font-size: 13px;
	background: var(--surface-hover);
}

.rap-detail-gallery {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding-bottom: 4px;
	margin-bottom: 16px;
}

.rap-detail-gallery-thumb {
	width: 60px;
	height: 48px;
	border-radius: 4px;
	object-fit: cover;
	cursor: pointer;
	border: 2px solid transparent;
	flex-shrink: 0;
	transition: border-color 0.15s;
}
.rap-detail-gallery-thumb:hover,
.rap-detail-gallery-thumb.is-active {
	border-color: var(--accent);
}

.rap-detail-info-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	background: var(--border);
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 16px;
}

.rap-detail-info-item {
	background: var(--surface);
	padding: 10px 14px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.rap-detail-info-item--full {
	grid-column: 1 / -1;
}

.rap-detail-info-label {
	font-size: 11px;
	color: var(--text-faint);
	line-height: 1.3;
}

.rap-detail-info-value {
	font-size: 14px;
	font-weight: 600;
	color: var(--text);
	line-height: 1.4;
	word-break: break-word;
}

.rap-detail-section {
	margin-bottom: 20px;
}

.rap-detail-section h3 {
	font-size: 14px;
	font-weight: 700;
	color: var(--text);
	margin: 0 0 10px;
}

.rap-detail-features {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.rap-detail-feature-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	font-size: 12px;
	border-radius: 6px;
	background: var(--accent-surface);
	color: var(--accent);
}

.rap-detail-description {
	font-size: 13px;
	color: var(--text);
	line-height: 1.8;
	word-break: break-word;
}
.rap-detail-description p { margin: 0 0 8px; }
.rap-detail-description p:last-child { margin: 0; }

/* ── Summary card ── */
.rap-detail-summary {
	background: var(--accent-surface);
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.rap-detail-summary-title {
	font-size: 20px;
	font-weight: 800;
	color: var(--text);
	line-height: 1.3;
}
.rap-detail-summary-city {
	font-size: 13px;
	color: var(--text-muted);
	display: flex;
	align-items: center;
	gap: 4px;
}
.rap-detail-summary-price-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 4px;
}
.rap-detail-summary-price {
	font-size: 18px;
	font-weight: 700;
	color: var(--text);
}

/* ── Key specs row ── */
.rap-detail-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	padding: 10px 0;
	margin-bottom: 6px;
}
.rap-detail-spec {
	font-size: 13px;
	color: var(--text);
	font-weight: 500;
	white-space: nowrap;
}

/* ── Secondary metadata ── */
.rap-detail-meta-secondary {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	padding: 8px 0;
	margin-bottom: 12px;
	font-size: 11.5px;
	color: var(--text-faint);
	border-top: 1px solid var(--border);
}
.rap-detail-meta-secondary-label {
	font-weight: 600;
	color: var(--text-muted);
	margin-left: 2px;
}

/* ── Overflow grid ── */
.rap-detail-overflow-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	background: var(--border);
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 16px;
}
.rap-detail-overflow-item {
	background: var(--surface);
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	gap: 1px;
}
.rap-detail-overflow-item--full {
	grid-column: 1 / -1;
}
.rap-detail-overflow-label {
	font-size: 10.5px;
	color: var(--text-faint);
}
.rap-detail-overflow-value {
	font-size: 13px;
	font-weight: 500;
	color: var(--text);
}

@media (max-width: 600px) {
	.rap-detail-drawer {
		width: 100%;
	}
	.rap-detail-info-grid,
	.rap-detail-overflow-grid {
		grid-template-columns: 1fr;
	}
	.rap-detail-header-top {
		padding: 12px 12px 4px;
	}
	.rap-detail-actions {
		padding: 0 12px 8px;
	}
	.rap-detail-body {
		padding: 12px;
	}
}
