/* ملک‌یاب — لایه‌ی مدرن‌سازی (روی style.css). فقط افزودنی/بازنویسی کوچک. */
:root { --ring: 0 0 0 3px rgba(37, 99, 235, .25); --radius-sm: 10px; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* فیلد دام (honeypot) — از دید انسان و صفحه‌خوان پنهان */
.hp-field { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); font-size: .8rem; }
.text-warn { color: var(--warning); font-weight: 600; }
.inline-form { display: inline; margin: 0; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; margin: 3px 8px 3px 0; font-size: .85rem; cursor: pointer; }
.feature-filter { border: 0; padding: 0; margin: 0 0 10px; }
.feature-filter legend { font-weight: 600; font-size: .85rem; margin-bottom: 4px; }

/* کارت آگهی */
.prop-card-wrap { position: relative; }
.prop-card { transition: transform .15s ease, box-shadow .15s ease; }
.prop-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(30, 41, 59, .12); }
.prop-cover { overflow: hidden; }
.prop-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-badge-drop { position: absolute; bottom: 10px; inset-inline-start: 10px; background: #dcfce7; color: #166534;
  font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.compare-check { position: absolute; bottom: 8px; inset-inline-end: 10px; background: rgba(255,255,255,.92);
  padding: 2px 8px; border-radius: 999px; font-size: .74rem; cursor: pointer; z-index: 2; }
.compare-bar { position: fixed; bottom: 14px; inset-inline: 14px; max-width: 520px; margin: 0 auto; background: #0f172a; color: #fff;
  padding: 10px 16px; border-radius: 14px; display: flex; gap: 10px; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); z-index: 50; }
.compare-bar[hidden] { display: none; }
.compare-bar .disabled { opacity: .5; pointer-events: none; }
.compare-table th, .compare-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: start; vertical-align: top; }
.compare-table img { border-radius: 10px; object-fit: cover; }

/* نوار نتایج */
.result-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 16px; }
.result-count { font-weight: 700; flex: 1; }
.sort-form select { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* جزئیات آگهی */
.prop-description { white-space: pre-line; line-height: 2; }
.detail-title { margin-top: 0; font-size: 1.35rem; }
.detail-meta-line { color: var(--muted); font-size: .8rem; margin: 6px 0; }
.price-drop-note { background: #dcfce7; color: #166534; padding: 6px 12px; border-radius: 10px; font-size: .85rem; margin: 8px 0; font-weight: 600; }
.price-history { font-size: .82rem; margin: 6px 0; }
.price-history ul { margin: 6px 0 0; padding-inline-start: 18px; }
.preview-banner { margin-bottom: 16px; }
.detail-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.report-card summary { cursor: pointer; font-weight: 600; }

/* آگهی‌های من / اعلان‌ها / ذخیره‌ها */
.ad-cell { display: flex; gap: 10px; align-items: center; }
.ad-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.saved-list, .notif-list { list-style: none; margin: 0; padding: 0; }
.saved-list li, .notif-list li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.notif-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
.notif-list li.unread { background: #eff6ff; border-radius: 10px; padding-inline: 12px; }
.static-page { max-width: 820px; margin: 0 auto; }
.agency-status-item { margin-bottom: 8px; }

/* زنگوله */
.nav-bell { position: relative; font-size: 1.05rem; }
.bell-count { position: absolute; top: -6px; inset-inline-start: -8px; background: var(--danger); color: #fff; font-size: .62rem;
  min-width: 17px; height: 17px; line-height: 17px; text-align: center; border-radius: 999px; padding: 0 4px; font-weight: 700; }

/* آپلود */
.upload-progress { margin-top: 12px; }
.upload-progress-bar { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.upload-progress-bar span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.upload-progress-bar span.indeterminate { width: 40%; animation: indet 1.2s infinite ease-in-out; }
@keyframes indet { 0% { margin-inline-start: -40%; } 100% { margin-inline-start: 100%; } }
.existing-media { position: relative; }
.existing-media-cover { position: absolute; bottom: 4px; inset-inline-start: 4px; background: rgba(255,255,255,.9); border: 0;
  border-radius: 999px; width: 26px; height: 26px; cursor: pointer; }

/* موبایل */
@media (max-width: 640px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .result-bar { flex-direction: column; align-items: stretch; }
  .detail-title { font-size: 1.15rem; }
}

/* ======== نسخه‌ی ۳: چت، نقشه، پرداخت، پلن‌ها، آمار، تنظیمات ======== */
.premium-badge { background: linear-gradient(90deg,#fef3c7,#fde68a); color: #92400e; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; display: inline-block; margin: 6px 0; }
.pay-box { max-width: 460px; margin: 30px auto; }
.pay-amount { font-size: 1.6rem; font-weight: 800; margin: 8px 0 16px; }
.pay-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; font-size: 2rem; background: #e2e8f0; }
.pay-icon.ok { background: #dcfce7; color: #166534; } .pay-icon.bad { background: #fee2e2; color: #991b1b; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.plan-card { text-align: center; transition: transform .15s; } .plan-card:hover { transform: translateY(-3px); }
.plan-price { font-size: 1.7rem; font-weight: 800; color: var(--primary); } .plan-price small { font-size: .8rem; color: var(--muted); }

/* چت */
.chat-shell { padding: 0; display: flex; flex-direction: column; height: min(78vh, 720px); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-head-info { flex: 1; display: flex; flex-direction: column; line-height: 1.5; } .chat-head-info small { color: var(--muted); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); scroll-behavior: smooth; }
.chat-empty { margin: auto; color: var(--muted); font-size: .9rem; text-align: center; }
.chat-msg { display: flex; flex-direction: column; max-width: 78%; }
.chat-msg.mine { align-self: flex-start; align-items: flex-start; }   /* RTL: شروع = راست */
.chat-msg.theirs { align-self: flex-end; align-items: flex-end; }
.chat-bubble { padding: 9px 14px; border-radius: 16px; white-space: pre-wrap; word-break: break-word; line-height: 1.8; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.chat-msg.mine .chat-bubble { background: var(--primary); color: #fff; border-end-start-radius: 4px; }
.chat-msg.theirs .chat-bubble { background: var(--surface); border: 1px solid var(--border); border-end-end-radius: 4px; }
.chat-time { font-size: .68rem; color: var(--muted); margin-top: 2px; padding: 0 4px; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; border-radius: 14px; max-height: 140px; min-height: 42px; }
.chat-hint { padding: 0 14px 8px; }
.chat-list { list-style: none; margin: 0; padding: 0; }
.chat-row { display: flex; gap: 12px; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--border); }
.chat-row:hover { background: var(--bg); } .chat-row.has-unread .chat-row-title { font-weight: 800; }
.chat-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.chat-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-row-title small { color: var(--muted); font-weight: 400; }
.chat-row-preview { color: var(--muted); font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: .7rem; color: var(--muted); }

/* نقشه */
.browse-map-box { margin-bottom: 16px; } .browse-map-box[hidden] { display: none; }
.browse-map-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.browse-map { height: 420px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #e2e8f0; }
.map-pin-label { display: inline-block; transform: translate(-50%,-100%); background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.map-pin-featured .map-pin-label { background: #d97706; }
.map-popup { min-width: 180px; } .map-popup img { width: 100%; height: 100px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; } .map-popup a { font-weight: 700; display: block; }
#mapToggleBtn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
@media (max-width: 640px) { .browse-map { height: 320px; } .chat-shell { height: 74vh; } .chat-msg { max-width: 90%; } }

/* ======== حالت تیره ======== */
.theme-toggle { background: none; border: 0; cursor: pointer; font-size: 1.1rem; padding: 4px 8px; border-radius: 8px; color: inherit; }
:root[data-theme="dark"] {
  --bg: #0f172a; --surface: #1e293b; --text: #e2e8f0; --muted: #94a3b8; --border: #334155;
  --shadow: 0 4px 24px rgba(0,0,0,.4); color-scheme: dark;
}
:root[data-theme="dark"] .btn-outline, :root[data-theme="dark"] .stat-card, :root[data-theme="dark"] input,
:root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: var(--surface); color: var(--text); }
:root[data-theme="dark"] .checkbox-list label, :root[data-theme="dark"] .radio-list label { background: #273449; }
:root[data-theme="dark"] .navbar, :root[data-theme="dark"] .site-footer, :root[data-theme="dark"] .card { background: var(--surface); }
:root[data-theme="dark"] .chat-msg.theirs .chat-bubble { background: #273449; }
:root[data-theme="dark"] .notif-list li.unread { background: #1e3a5f; }
:root[data-theme="dark"] .alert-success { background: #14532d; color: #bbf7d0; }
:root[data-theme="dark"] .alert-danger { background: #7f1d1d; color: #fecaca; }
:root[data-theme="dark"] .alert-warning { background: #78350f; color: #fde68a; }
:root[data-theme="dark"] .alert-info { background: #0c4a6e; color: #bae6fd; }
:root[data-theme="dark"] img { opacity: .92; }
:root[data-theme="dark"] .navbar { background: rgba(30,41,59,.88); }

/* ===== نقشه (Leaflet محلی) ===== */
.mk-map-embed { height: 260px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #e9eef5; position: relative; z-index: 0; }
.mk-map-preview { margin-top: 10px; height: 200px; }
.mk-map-canvas { position: absolute; inset: 0; }
.mk-map-note { position: absolute; z-index: 800; inset-inline: 10px; bottom: 10px; background: rgba(15,23,42,.85); color: #fff; font-size: .78rem; padding: 8px 12px; border-radius: 10px; text-align: center; }
.mk-modal { width: min(820px, 100%); }
.mk-modal .map-modal-body { height: min(62vh, 480px); }
.mk-search { position: relative; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.mk-search input { width: 100%; }
.mk-results { position: absolute; z-index: 900; inset-inline: 14px; top: calc(100% - 4px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.18); max-height: 260px; overflow: auto; }
.mk-result { display: block; width: 100%; text-align: start; background: none; border: 0; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border); color: inherit; font: inherit; }
.mk-result:hover { background: var(--bg); }
.mk-result small { display: block; color: var(--muted); font-size: .76rem; }
.mk-noresult { padding: 12px 14px; color: var(--muted); font-size: .85rem; }
.mk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mk-info { min-width: 0; flex: 1; font-size: .82rem; }
.mk-addr { font-weight: 700; }
.mk-coord { color: var(--muted); direction: ltr; text-align: start; }
.mk-actions { display: flex; gap: 8px; }
.mk-pin span { display: block; width: 30px; height: 30px; background: var(--primary, #0f766e); border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 3px 8px rgba(0,0,0,.4); }
.mk-pin-featured span { background: #d97706; }
.leaflet-container { font-family: inherit; }
.browse-map { min-height: 420px; }

/* ===== ظاهر مدرن: هیرو، جستجوی سریع، کارت‌ها ===== */
.hero-modern { position: relative; overflow: hidden; text-align: center; padding: clamp(28px, 6vw, 56px) clamp(16px, 4vw, 40px);
  background: radial-gradient(1200px 400px at 85% -20%, rgba(255,255,255,.22), transparent 60%), linear-gradient(135deg, #1e3a8a, var(--primary) 55%, var(--accent)); }
.hero-modern h1 { font-size: clamp(1.5rem, 1rem + 3vw, 2.3rem); font-weight: 800; letter-spacing: -.01em; }
.hero-modern p { max-width: 560px; margin: 0 auto; }
.hero-search { margin: 22px auto 0; max-width: 760px; background: rgba(255,255,255,.96); border-radius: 18px; padding: 12px; box-shadow: 0 20px 50px rgba(15,23,42,.25); color: var(--text); text-align: start; }
.hero-tabs { display: flex; gap: 6px; padding: 4px; background: var(--bg); border-radius: 12px; margin-bottom: 10px; }
.hero-tabs label { flex: 1; cursor: pointer; }
.hero-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.hero-tabs span { display: block; text-align: center; padding: 8px 10px; border-radius: 9px; font-weight: 700; font-size: .9rem; color: var(--muted); transition: all .15s; }
.hero-tabs input:checked + span { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.hero-tabs input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.hero-fields { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.hero-fields select { margin: 0; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.hero-chips a { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: .85rem; backdrop-filter: blur(4px); transition: background .15s; }
.hero-chips a:hover { background: rgba(255,255,255,.3); }
@media (max-width: 640px) { .hero-fields { grid-template-columns: 1fr; } }
.prop-card { border-radius: 16px; transition: transform .2s ease, box-shadow .2s ease; }
.card, .prop-card { border-color: color-mix(in srgb, var(--border) 80%, transparent); }
.btn { transition: transform .12s ease, box-shadow .15s ease, background .15s; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(37,99,235,.28); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-box { max-width: 440px; margin-inline: auto; border-radius: 20px; padding: clamp(20px, 4vw, 32px); box-shadow: 0 20px 50px rgba(30,41,59,.1); }
.otp-code-input { text-align: center; font-size: 1.6rem; letter-spacing: .6em; direction: ltr; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== v4.2: پوستر چرخشی، چینش جمع‌وجور، نوار پایین موبایل ===== */
.hero-theme-blue   { --h1:#2563eb; --h2:#06b6d4; }
.hero-theme-green  { --h1:#059669; --h2:#34d399; }
.hero-theme-orange { --h1:#ea580c; --h2:#f59e0b; }
.hero-theme-purple { --h1:#7c3aed; --h2:#c026d3; }
.hero-theme-rose   { --h1:#e11d48; --h2:#fb7185; }
.hero-theme-teal   { --h1:#0f766e; --h2:#2dd4bf; }
.hero-theme-dark   { --h1:#0f172a; --h2:#334155; }
.hero-slider { position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 12px; color: #fff;
  min-height: 110px; background: linear-gradient(135deg, var(--h1,#2563eb), var(--h2,#06b6d4)); transition: background .4s; }
.hero-slide { display: none; padding: 20px 22px 26px; text-align: center; color: #fff; }
.hero-slide.is-active { display: block; animation: heroIn .45s ease; }
a.hero-slide:hover { color: #fff; }
.hero-slide h1, .hero-slide h2 { margin: 0 0 4px; font-size: clamp(1.15rem, .9rem + 1.6vw, 1.7rem); font-weight: 800; }
.hero-slide p { margin: 0; opacity: .92; font-size: .9rem; }
.hero-dots { position: absolute; bottom: 8px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; }
.hero-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); }
.hero-dots span.on { background: #fff; width: 16px; border-radius: 4px; }
@keyframes heroIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-slide.is-active { animation: none; } }

.m-search { margin-bottom: 10px; }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips a { flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: .86rem; font-weight: 600; white-space: nowrap; }
.cat-chips a.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.filters-top { margin-bottom: 12px; }
.filters-top .filters-details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.filters-top .filters-summary { cursor: pointer; font-weight: 700; }
.filters-top .filters-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 14px; }
.filters-top .filters-form > .feature-filter, .filters-top .filters-form > button, .filters-top .filters-form > a,
.filters-top .filters-form > input[type=hidden] + button, .filters-top .filters-form > label.check-inline,
.filters-top .filters-form > #saleFilterFields, .filters-top .filters-form > #rentFilterFields { grid-column: 1 / -1; }
.filters-top #saleFilterFields, .filters-top #rentFilterFields { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 14px; }
.filters-top #filterSubmitBtn { max-width: 260px; }
.result-bar { margin-bottom: 10px; }

/* نوار پایین موبایل (الهام از دیوار) */
.tabbar { display: none; }
@media (max-width: 860px) {
  body { padding-bottom: 68px; }
  .site-footer { padding-bottom: 20px; }
  .tabbar { display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 60; background: var(--surface);
    border-top: 1px solid var(--border); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px;
    font-size: .68rem; color: var(--muted); font-weight: 600; position: relative; }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a.on { color: var(--primary); }
  .tabbar a.tab-add span.plus { width: 40px; height: 40px; margin-top: -18px; border-radius: 50%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(37,99,235,.4); border: 3px solid var(--surface); }
  .tabbar .tab-dot { position: absolute; top: 3px; inset-inline-start: 55%; background: #ef4444; color: #fff; border-radius: 999px; font-size: .6rem; padding: 0 5px; }
  .page { padding-top: 14px; }
  .navbar-inner { min-height: 56px; }
  .hero-slide { padding: 14px 16px 22px; }
  .hero-slider { min-height: 84px; border-radius: 12px; }
  .hero-slide p { font-size: .8rem; }

  /* کارت افقیِ لیستی شبیه دیوار */
  .browse-main .grid-3 { grid-template-columns: 1fr; gap: 0; background: var(--surface); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
  .browse-main .prop-card-wrap { position: relative; border-bottom: 1px solid var(--border); }
  .browse-main .prop-card-wrap:last-child { border-bottom: 0; }
  .browse-main .prop-card { flex-direction: row; border: 0; border-radius: 0; box-shadow: none; transform: none; padding: 12px; gap: 12px; align-items: stretch; }
  .browse-main .prop-cover { width: 128px; min-width: 128px; height: 108px; border-radius: 10px; overflow: hidden; }
  .browse-main .prop-cover img { width: 100%; height: 100%; object-fit: cover; }
  .browse-main .prop-badge { display: none; }
  .browse-main .prop-badge-featured { top: auto; bottom: 6px; left: auto; right: 6px; background: #dc2626; padding: 2px 8px; font-size: .68rem; border-radius: 6px; }
  .browse-main .prop-badge-drop { font-size: .65rem; }
  .browse-main .prop-body { padding: 0; gap: 4px; justify-content: space-between; min-width: 0; }
  .browse-main .prop-title { font-size: .95rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .browse-main .prop-meta { font-size: .76rem; gap: 8px; }
  .browse-main .prop-price { font-size: .9rem; color: var(--text); }
  .browse-main .prop-card-featured { border: 0; box-shadow: none; background: rgba(245,158,11,.06); }
  .browse-main .fav-btn { top: 8px; inset-inline-end: 10px; }
  .browse-main .compare-check { display: none; }
}

/* پنل ادمین پوستر */
.hero-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.hero-admin-preview { border-radius: 10px; color: #fff; padding: 12px; margin-bottom: 12px; text-align: center;
  background: linear-gradient(135deg, var(--h1,#2563eb), var(--h2,#06b6d4)); }
.hero-admin-preview b { display: block; } .hero-admin-preview small { opacity: .9; }

/* ===== ثبت آگهی چندمرحله‌ای ===== */
.wiz-stepper { display: none; list-style: none; margin: 0 0 18px; padding: 0; gap: 8px; }
form[data-wizard] .wiz-stepper { display: flex; }
.wiz-stepper li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px;
  background: var(--bg); border: 1.5px solid var(--border); color: var(--muted); font-size: .85rem; font-weight: 600; }
.wiz-stepper li b { width: 24px; height: 24px; border-radius: 50%; background: var(--border); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: .8rem; }
.wiz-stepper li.active { border-color: var(--primary); color: var(--primary); background: var(--surface); }
.wiz-stepper li.active b { background: var(--primary); color: #fff; }
.wiz-stepper li.done { color: #059669; cursor: pointer; }
.wiz-stepper li.done b { background: #059669; color: #fff; }
.wiz-title { margin-top: 0; }
.wiz-tip { background: #e0f2fe; color: #075985; border-radius: 10px; padding: 8px 12px; font-size: .84rem; margin-bottom: 12px; }
:root[data-theme="dark"] .wiz-tip { background: #0c4a6e; color: #bae6fd; }
.wiz-errors { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.wiz-errors ul { margin: 6px 0 0; padding-inline-start: 18px; }
:root[data-theme="dark"] .wiz-errors { background: #450a0a; border-color: #7f1d1d; color: #fecaca; }
.field-invalid { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220,38,38,.15); border-radius: 10px; }
.wiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
#submitForm:not([data-wizard]) .wiz-nav [data-wiz], #submitForm:not([data-wizard]) .wiz-stepper { display: none; }
#submitForm:not([data-wizard]) .wiz-nav { border: 0; padding: 0; justify-content: flex-start; }
.wiz-saved { position: fixed; top: 74px; inset-inline-start: 50%; transform: translate(-50%, -10px); background: #059669; color: #fff;
  padding: 6px 14px; border-radius: 999px; font-size: .82rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; }
.wiz-saved.on { opacity: 1; transform: translate(-50%, 0); }
.video-busy-bar { position: fixed; bottom: 14px; inset-inline: 14px; z-index: 70; background: var(--primary); color: #fff; border-radius: 12px;
  padding: 10px 14px; font-size: .86rem; box-shadow: 0 8px 24px rgba(0,0,0,.25); text-align: center; }
@media (max-width: 860px) {
  .video-busy-bar { bottom: 78px; }
  .wiz-stepper li span { display: none; }
  .wiz-stepper li.active span { display: inline; }
  .wiz-nav { position: sticky; bottom: 64px; background: var(--surface); padding: 10px 0; z-index: 5; }
}
/* پیش‌نویس‌ها در «آگهی‌های من» */
.drafts-box { border: 1.5px dashed #f59e0b; background: rgba(245,158,11,.06); margin-bottom: 16px; }
.drafts-box h3 { margin: 0 0 10px; font-size: 1rem; }
.draft-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--border); }
.draft-row:first-of-type { border-top: 0; }
.draft-row .muted { font-size: .8rem; }
.video-busy-cancel { margin-top: 6px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.45); color: #fff; border-radius: 8px; padding: 3px 10px; font-size: .78rem; cursor: pointer; }

/* انتخاب چندمحله‌ای */
.multi-select { border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface); }
.multi-select summary { cursor: pointer; padding: 10px 14px; font-size: .92rem; list-style: none; display: flex; justify-content: space-between; }
.multi-select summary::after { content: "▾"; color: var(--muted); }
.multi-select[open] summary { border-bottom: 1px solid var(--border); }
.multi-list { max-height: 220px; overflow: auto; padding: 8px 12px; display: grid; gap: 4px; }
.multi-list input[type=search] { width: 100%; margin-bottom: 6px; padding: 8px 10px; }
.multi-list .check-inline { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 0; font-weight: 500; }

/* پرسش‌های سنجاق‌شده و چت */
.faq-pinned { border-inline-start: 4px solid #f59e0b; }
.faq-item { border-top: 1px solid var(--border); padding: 8px 0; }
.faq-item:first-of-type { border-top: 0; }
.faq-item summary { cursor: pointer; font-weight: 700; }
.faq-answer { margin-top: 6px; color: var(--text); line-height: 1.9; white-space: pre-line; }
.pin-panel { margin: 10px 12px; border: 1.5px dashed #f59e0b; border-radius: 10px; padding: 8px 12px; background: rgba(245,158,11,.05); }
.pin-panel summary { cursor: pointer; font-weight: 700; }
.pin-panel textarea { width: 100%; }
.chat-bubble.pin-pick { outline: 2px solid #f59e0b; }
.chat-shell .chat-body .chat-bubble { cursor: default; }

/* ---- کپچای ورود ادمین/بنگاه ---- */
.captcha-row{display:flex;align-items:center;gap:8px;margin:6px 0 8px}
.captcha-img{border:1px solid var(--border,#d7dde8);border-radius:8px;background:#f3f6fb;max-width:100%;height:auto}
.captcha-refresh{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;border:1px solid var(--border,#d7dde8);font-size:20px;text-decoration:none;color:inherit}

/* ---- بند انگشتیِ ملک در سربرگ چت ---- */
.chat-prop-thumb{flex:0 0 auto;width:56px;height:56px;border-radius:12px;overflow:hidden;border:2px solid var(--primary);background:#eef2ff;display:flex;align-items:center;justify-content:center;font-size:24px;text-decoration:none}
.chat-prop-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.chat-prop-thumb:hover{box-shadow:0 0 0 3px rgba(37,99,235,.2)}

/* ---- صفحه ورود/ثبت‌نام ---- */
.auth-choice{border:1.5px solid var(--border);border-radius:14px;padding:14px;background:#fff}
.auth-choice-main{border-color:var(--primary);background:linear-gradient(180deg,#eff6ff,#fff)}
.auth-choice-title{font-weight:800;margin-bottom:6px;cursor:pointer}
.auth-or{display:flex;align-items:center;gap:10px;margin:14px 0;color:var(--muted);font-size:.85rem}
.auth-or:before,.auth-or:after{content:"";flex:1;height:1px;background:var(--border)}
.auth-steps{display:flex;gap:6px;list-style:none;padding:0;margin:0 0 12px;font-size:.78rem}
.auth-steps li{flex:1;text-align:center;padding:6px 4px;border-radius:999px;background:#f1f5f9;color:var(--muted)}
.auth-steps li.on{background:var(--primary);color:#fff;font-weight:700}
.auth-steps li.done{background:#dcfce7;color:#166534}
/* v4.8 */
.hk-row { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding:10px 0; border-bottom:1px solid var(--border); }
.hk-row:last-child { border-bottom:0; }
.hk-info { flex:1 1 260px; min-width:0; }
.hk-act { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.chat-list li { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--border); }
.chat-list li .chat-row { flex: 1; min-width: 0; border-bottom: 0; }
.chat-del { margin: 0; flex: none; }
/* فیلتر جمع‌شونده با شمارنده و دکمه‌ی حذف کنار عنوان */
.filters-wrap { position: relative; }
.filters-wrap .filters-summary { padding-inline-end: 110px; }
.filters-clear {
  position: absolute; top: 0; inset-inline-end: 0; font-size: .82rem; font-weight: 700;
  color: var(--danger, #b91c1c); text-decoration: none; padding: 2px 8px; border: 1px solid currentColor; border-radius: 999px;
}
.filters-clear:hover { background: #fef2f2; }
.member-badge { font-size:.8rem; font-weight:700; padding:5px 12px; border-radius:999px; margin-inline-start:6px; }
.member-expiring, .member-pending { background:#fef3c7; color:#92400e; }
.member-expired { background:#fee2e2; color:#b91c1c; }
.aa-msg { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.aa-admin { border-inline-start: 4px solid var(--primary); }
.aa-head { display:flex; justify-content:space-between; gap:8px; margin-bottom:6px; }
.aa-body { white-space: pre-wrap; word-break: break-word; }
.aa-files { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }

/* ---- v4.9.1: قیمت هر متر، اشتراک‌گذاری، نوار چسبیده‌ی موبایل ---- */
.prop-ppm { margin-top: 4px; font-size: .8rem; color: var(--muted, #6b7280); }
.ppm-box { background: var(--surface-2, rgba(37,99,235,.07)); border: 1px dashed var(--border); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; font-size: .92rem; }
.sticky-cta { display: none; }
@media (max-width: 820px) {
  .sticky-cta { display: block; position: fixed; inset-inline: 0; bottom: 0; z-index: 40; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--surface, #fff); border-top: 1px solid var(--border); box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
  body { scroll-padding-bottom: 80px; }
  #contactCard { scroll-margin-top: 70px; }
}

/* ---- v5.0: مراجعه حضوری، کارت‌های تطبیق، شبکه‌های اجتماعی ---- */
.walkin-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.walkin-tabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; margin: 10px 0 14px; }
.walkin-filter summary { list-style: none; cursor: pointer; }
.walkin-filter summary::-webkit-details-marker { display: none; }
.walkin-filter-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface, #fff); }
.walkin-filter-form input[type=search], .walkin-filter-form select { flex: 1 1 140px; min-width: 0; }
.walkin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.walkin-card { display: block; text-decoration: none; color: inherit; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; transition: box-shadow .15s, transform .15s; }
.walkin-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.wc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wc-meta, .wc-budget { font-size: .88rem; margin-top: 6px; color: var(--muted, #6b7280); }
.wc-budget { color: inherit; font-weight: 600; }
.wc-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: .8rem; }
.match-pill { background: rgba(22,163,74,.12); color: #15803d; border-radius: 999px; padding: 2px 10px; font-weight: 700; white-space: nowrap; }
.match-pill-none { background: rgba(107,114,128,.14); color: #6b7280; }
.walkin-detail { margin-bottom: 18px; }
.walkin-facts { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0; }
.walkin-facts span { background: var(--surface-2, rgba(37,99,235,.07)); border-radius: 999px; padding: 3px 12px; font-size: .88rem; }
.walkin-follow { margin: 12px 0; }
.walkin-follow summary, .walkin-extras summary { cursor: pointer; font-weight: 600; }
.walkin-follow-form { display: grid; gap: 8px; margin-top: 8px; max-width: 520px; }
.walkin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.walkin-matches-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.walkin-matches-head .tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 10px 0 20px; }
.match-card { display: flex; gap: 10px; background: var(--surface, #fff); border: 1px solid var(--border); border-inline-start: 4px solid #9ca3af; border-radius: 12px; padding: 10px; min-width: 0; }
.match-excellent { border-inline-start-color: #16a34a; } .match-good { border-inline-start-color: #2563eb; } .match-fair { border-inline-start-color: #f59e0b; }
.match-cover { flex: 0 0 96px; height: 76px; border-radius: 8px; overflow: hidden; background: var(--surface-2, #eef2ff); display: flex; align-items: center; justify-content: center; }
.match-cover img { width: 100%; height: 100%; object-fit: cover; }
.match-noimg { font-size: 1.8rem; }
.match-body { flex: 1 1 auto; min-width: 0; }
.match-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.match-title { font-weight: 700; text-decoration: none; color: inherit; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.match-score { flex: 0 0 auto; font-weight: 800; font-size: .95rem; padding: 1px 9px; border-radius: 999px; background: rgba(37,99,235,.1); color: #1d4ed8; }
.match-excellent .match-score { background: rgba(22,163,74,.14); color: #15803d; } .match-fair .match-score { background: rgba(245,158,11,.16); color: #b45309; }
.match-meta { font-size: .8rem; color: var(--muted, #6b7280); margin-top: 3px; }
.match-price { font-weight: 700; font-size: .9rem; margin-top: 3px; }
.match-bar { height: 5px; border-radius: 4px; background: var(--border); margin: 6px 0; overflow: hidden; }
.match-bar span { display: block; height: 100%; background: linear-gradient(90deg, #2563eb, #06b6d4); }
.match-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.match-tags span { font-size: .74rem; border-radius: 999px; padding: 1px 8px; }
.mt-ok { background: rgba(22,163,74,.1); color: #15803d; } .mt-warn { background: rgba(245,158,11,.14); color: #b45309; }
.match-more { font-size: .8rem; margin-top: 4px; } .match-more summary { cursor: pointer; color: var(--muted, #6b7280); }
.match-more ul { margin: 4px 0 0; padding-inline-start: 16px; } .mt-ok-t { color: #15803d; } .mt-warn-t { color: #b45309; }
.match-box { margin-top: 10px; border: 1px dashed var(--border); border-radius: 12px; padding: 8px 12px; }
.match-box > summary { cursor: pointer; font-weight: 700; }
@media (max-width: 520px) { .match-grid { grid-template-columns: 1fr; } .walkin-grid { grid-template-columns: 1fr; } .match-cover { flex-basis: 78px; height: 64px; } }

/* شبکه‌های اجتماعی */
.social-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin: 18px 0 6px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(6,182,212,.08)); border: 1px solid var(--border); }
.social-strip .social-title { flex: 1 1 100%; text-align: center; font-weight: 700; margin-bottom: 2px; }
.social-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; color: #fff !important; text-decoration: none; font-weight: 700; font-size: .9rem; box-shadow: 0 3px 10px rgba(0,0,0,.14); transition: transform .15s; }
.social-chip:hover { transform: translateY(-2px); }
.social-chip .si { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.25); display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; }
.social-telegram { background: #229ed9; } .social-instagram { background: linear-gradient(45deg, #f09433, #dc2743 55%, #bc1888); } .social-rubika { background: #e8236c; }
.social-eitaa { background: #f26522; } .social-bale { background: #17b85a; } .social-whatsapp { background: #25d366; } .social-aparat { background: #ed145b; }
.social-footer { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.social-footer .social-chip { padding: 5px 12px; font-size: .8rem; box-shadow: none; }
.seo-note { font-size: .78rem; color: var(--muted, #6b7280); text-align: center; max-width: 760px; margin: 8px auto; line-height: 1.9; }

/* ---- v5.2: صفحه‌ی ورود ---- */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.auth-split .btn { text-align: center; justify-content: center; }
.auth-guide { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2, rgba(37,99,235,.06)); font-size: .86rem; line-height: 1.9; }
.auth-guide ul { margin: 6px 0 0; padding-inline-start: 18px; }
@media (max-width: 380px) { .auth-split { grid-template-columns: 1fr; } }

/* ---- v5.2: منوی دسته‌بندی‌شده‌ی موبایل ---- */
.nav-toggle { gap: 6px; }
.nav-toggle-label { display: none; font-weight: 700; font-size: .85rem; }
.nav-login-m { display: none; }
.msheet { display: none; }
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; font: inherit;
  font-size: .68rem; color: var(--muted); font-weight: 600; position: relative; background: none; border: 0; cursor: pointer; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--primary); }
@media (max-width: 860px) {
  /* منوی بالای قدیمی جایش را به منوی دسته‌بندی‌شده می‌دهد */
  .nav-links { display: none !important; }
  .navbar-inner { align-items: center; gap: 8px; }
  .brand { margin-inline-end: auto; }
  .nav-toggle { width: auto; min-width: 46px; height: 42px; padding: 0 12px; border-radius: 12px; background: var(--primary); border-color: var(--primary); color: #fff; }
  .nav-toggle-label { display: inline; }
  .nav-login-m { display: inline-flex; }
  .msheet { display: block; position: fixed; inset: 0; z-index: 200; }
  .msheet[hidden] { display: none; }
  .msheet-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.5); opacity: 0; transition: opacity .2s; }
  .msheet-panel { position: absolute; inset-inline: 0; bottom: 0; max-height: 88vh; overflow-y: auto; background: var(--surface);
    border-radius: 22px 22px 0 0; padding: 6px 16px calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%);
    transition: transform .22s ease; box-shadow: 0 -10px 30px rgba(0,0,0,.2); }
  .msheet.show .msheet-backdrop { opacity: 1; }
  .msheet.show .msheet-panel { transform: translateY(0); }
  .msheet-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface);
    padding: 12px 0 8px; z-index: 1; }
  .msheet-head::before { content: ""; position: absolute; top: 4px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--border); }
  .msheet-close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1rem; cursor: pointer; }
  .msheet-account { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px;
    border-radius: 16px; background: linear-gradient(135deg, rgba(37,99,235,.1), rgba(6,182,212,.1)); border: 1px solid var(--border); }
  .msheet-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .msheet-user small { display: block; color: var(--muted); font-size: .76rem; }
  .msheet-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; flex: 0 0 auto; }
  .msheet-account-actions { display: flex; gap: 8px; }
  .msheet-account-actions form { margin: 0; }
  .msheet-title { margin: 16px 0 8px; font-size: .9rem; color: var(--muted); }
  .msheet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .msheet-grid a, .msheet-grid button { position: relative; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 12px;
    border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none;
    font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; text-align: start; }
  .msheet-grid a:active, .msheet-grid button:active { background: var(--surface-2, rgba(37,99,235,.08)); }
  .msheet-grid i { font-style: normal; font-size: 1.2rem; flex: 0 0 auto; }
  .msheet-badge { margin-inline-start: auto; font-style: normal; background: #ef4444; color: #fff; border-radius: 999px; font-size: .7rem; padding: 1px 7px; }
  body.menu-open { overflow: hidden; }
}
@media (min-width: 861px) { .msheet { display: none !important; } }

/* ---- v5.2.1: راهنمای ورود جمع‌شونده در بالا ---- */
.auth-guide { margin: 0 0 14px; padding: 0; background: var(--surface-2, rgba(37,99,235,.06)); border-radius: 12px; font-size: .86rem; line-height: 1.9; }
.auth-guide > summary { cursor: pointer; padding: 10px 14px; font-weight: 700; list-style: none; }
.auth-guide > summary::-webkit-details-marker { display: none; }
.auth-guide > summary::before { content: "▸ "; }
.auth-guide[open] > summary::before { content: "▾ "; }
.auth-guide ul { margin: 0; padding: 0 30px 12px 14px; }
.auth-register-btn { margin-bottom: 16px; text-align: center; }
.auth-forgot-btn { margin-top: 12px; text-align: center; }

.map-notice { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.4); font-size: .85rem; line-height: 1.9; }
.map-notice ul { margin: 4px 0 0; padding-inline-start: 18px; }

/* منوی ساده‌شده: فهرست متنی، بدون آیکون */
@media (max-width: 860px) {
  .msheet-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
  .msheet-list a, .msheet-list button { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 10px 14px;
    background: var(--surface); color: var(--text); text-decoration: none; font: inherit; font-size: .92rem; border: 0; cursor: pointer; text-align: start; width: 100%; }
  .msheet-list > * + * { border-top: 1px solid var(--border); }
  .msheet-list a::after { content: "‹"; color: var(--muted); font-size: 1.2rem; }
  .msheet-list a:active, .msheet-list button:active { background: var(--surface-2, rgba(37,99,235,.08)); }
  .msheet-list .msheet-badge { margin-inline-start: auto; margin-inline-end: 8px; }
  .msheet-title { margin: 14px 2px 6px; }
  .msheet-account { padding: 10px 12px; }
}

/* آمادگی پرداخت (تنظیمات ادمین) */
.pay-ready { margin: 10px 0; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; }
.pay-ready > summary { cursor: pointer; font-weight: 700; }
.pay-ready ul { list-style: none; margin: 8px 0 0; padding: 0; font-size: .86rem; line-height: 2; }
.pr-ok { color: #15803d; } .pr-warn { color: #b45309; } .pr-fail { color: #b91c1c; font-weight: 700; }

/* ---- v5.5: فوتر چسبیده به پایین، جدول‌های اسکرول‌پذیر در موبایل ---- */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main.page { flex: 1 0 auto; width: 100%; }
.site-footer { flex-shrink: 0; }
@media (max-width: 700px) {
  /* جدول‌های بدون حالت کارتی (بیشتر صفحه‌های مدیریت): به‌جای بیرون‌زدن از صفحه، افقی اسکرول می‌شوند */
  .page table:not(.responsive-table):not(.compare-table) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ---- v5.6: قلب علاقه‌مندی روی موبایل، کنتراست تم تاریک ---- */
@media (max-width: 860px) {
  /* کارت افقی: قلب روی گوشه‌ی بالای «عکس» می‌نشیند، نه روی متن */
  .browse-main .fav-btn { top: 18px; left: auto; right: 18px; inset-inline-end: auto; width: 30px; height: 30px; font-size: .95rem;
    background: rgba(255,255,255,.92); box-shadow: 0 1px 6px rgba(0,0,0,.28); }
}
/* تقویم بازشونده و کادرهای سفیدِ ثابت در تم تاریک */
:root[data-theme="dark"] .jalali-picker-panel { background: var(--surface); border-color: var(--border); box-shadow: 0 12px 28px rgba(0,0,0,.55); }
:root[data-theme="dark"] .jalali-picker-nav { background: #273449; color: var(--text); border-color: var(--border); }
:root[data-theme="dark"] .jalali-picker-nav:hover, :root[data-theme="dark"] .jalali-picker-day:hover { background: #334155; }
:root[data-theme="dark"] .jalali-picker-day { color: var(--text); }
:root[data-theme="dark"] .jalali-picker-day.is-today { color: #93c5fd; }
:root[data-theme="dark"] .jalali-picker-day.is-selected { background: var(--primary); color: #fff; }
:root[data-theme="dark"] .jalali-picker-weekdays span { color: #cbd5e1; }
:root[data-theme="dark"] .stat-card, :root[data-theme="dark"] .map-modal, :root[data-theme="dark"] .auth-choice { background: var(--surface); color: var(--text); }
:root[data-theme="dark"] .nav-links a:hover, :root[data-theme="dark"] .nav-links a.active { background: #273449; color: #93c5fd; }
:root[data-theme="dark"] .upload-box { background: #172033; }
:root[data-theme="dark"] .upload-box:hover { background: #1e2a44; }
:root[data-theme="dark"] .upload-box-video:hover { background: #2a1f3a; }
:root[data-theme="dark"] .media-chip, :root[data-theme="dark"] .chat-prop-thumb { background: #273449; color: #93c5fd; }
:root[data-theme="dark"] .media-chip-warn, :root[data-theme="dark"] .badge-pending, :root[data-theme="dark"] .member-expiring, :root[data-theme="dark"] .member-pending { background: #78350f; color: #fde68a; }
:root[data-theme="dark"] .badge-rejected, :root[data-theme="dark"] .badge-cancelled, :root[data-theme="dark"] .member-expired, :root[data-theme="dark"] .btn-danger { background: #7f1d1d; color: #fecaca; }
:root[data-theme="dark"] .auth-steps li { background: #273449; }
:root[data-theme="dark"] .wiz-errors, :root[data-theme="dark"] .filters-clear:hover { background: #7f1d1d; color: #fecaca; border-color: #991b1b; }
:root[data-theme="dark"] .emp-bar { background: #172033; border-color: #334155; }
:root[data-theme="dark"] table.responsive-table tr.rejection-reason-row { background: #3b2a12; }
:root[data-theme="dark"] .badge-visit_scheduled { background: #4a1d5c; color: #f0abfc; }
:root[data-theme="dark"] .captcha-img { background: #e2e8f0; }
:root[data-theme="dark"] .error-text { color: #fca5a5; }

/* ---- v6.0: قیمت اشتراک محله‌ها ---- */
.hood-price-form { display: flex; gap: 6px; align-items: center; }
.hood-price-form input[type=text] { width: 150px; max-width: 40vw; }

/* ---- اشتراک مشاور املاک / حسابداری ---- */
.sub-city { border: 1px solid var(--border); border-radius: 12px; margin: 8px 0; padding: 4px 12px; }
.sub-city > summary { cursor: pointer; padding: 8px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sub-hoods { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; padding: 6px 0 10px; }
.sub-hood { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.sub-hood em { margin-inline-start: auto; font-style: normal; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.sub-hood:has(input:checked) { border-color: var(--primary); background: var(--surface-2, rgba(37,99,235,.08)); }
.sub-total { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; margin: 16px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2, rgba(37,99,235,.07)); }
.sub-total-final { font-size: 1.08rem; margin-inline-start: auto; }
.invoice-box { max-width: 860px; margin-inline: auto; }
.invoice-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 10px; }
.invoice-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0; font-size: .9rem; }
.invoice-table { width: 100%; }
.invoice-totals { margin: 12px 0; line-height: 2; text-align: end; }
.invoice-final { font-size: 1.15rem; border-top: 1px dashed var(--border); padding-top: 6px; margin-top: 4px; }
.invoice-bank { margin: 12px 0; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 12px; line-height: 2; }
.sub-pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.receipt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.receipt-row:first-child { border-top: 0; }
.acc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 12px 0; }
.acc-stats .card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; }
.acc-stats b { font-size: 1.25rem; } .acc-stats span { font-size: .8rem; color: var(--muted); }
.acc-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.acc-filter input[type=search] { flex: 1 1 220px; }
.acc-start-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.acc-review { display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.acc-review form { display: flex; gap: 6px; flex-wrap: wrap; }
.acc-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.acc-actions form { display: flex; gap: 6px; flex-wrap: wrap; }
@media print {
  .navbar, .tabbar, .site-footer, .msheet, .panel-nav, .no-print, .alert, .receipt-row { display: none !important; }
  body { background: #fff !important; color: #000 !important; display: block !important; }
  .invoice-box { max-width: 100%; border: 0; box-shadow: none; }
}

/* ---- v6.1: اسلایدر با کشیدن انگشت ---- */
.hero-slider { touch-action: pan-y; }
.hero-slide { will-change: transform, opacity; }
.hero-slide.from-left { animation: heroFromLeft .28s ease; }
.hero-slide.from-right { animation: heroFromRight .28s ease; }
@keyframes heroFromLeft { from { transform: translateX(-28px); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes heroFromRight { from { transform: translateX(28px); opacity: .2; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-slide.from-left, .hero-slide.from-right { animation: none; } }

/* آبیِ برند (کنتراست ۲٫۸ روی زمینه‌ی تاریک) و قرمز، وقتی «رنگ متن» هستند در تم تاریک روشن‌تر می‌شوند؛ دکمه‌های آبی دست‌نخورده می‌مانند */
:root[data-theme="dark"] .req-more>summary,
:root[data-theme="dark"] .btn-outline:hover,
:root[data-theme="dark"] .prop-price,
:root[data-theme="dark"] .radio-list input:checked + span,
:root[data-theme="dark"] .radio-list label:has(input:checked),
:root[data-theme="dark"] .filters-details summary.filters-summary::before,
:root[data-theme="dark"] .password-toggle-btn,
:root[data-theme="dark"] .stat-card .num,
:root[data-theme="dark"] .price-words,
:root[data-theme="dark"] .faq-item summary::before,
:root[data-theme="dark"] .faq-answer a,
:root[data-theme="dark"] .site-footer a:hover,
:root[data-theme="dark"] .jalali-picker-day.is-today,
:root[data-theme="dark"] .panel-nav a:hover,
:root[data-theme="dark"] .error-code,
:root[data-theme="dark"] .plan-price,
:root[data-theme="dark"] .tabbar a.on,
:root[data-theme="dark"] .wiz-stepper li.active,
:root[data-theme="dark"] .tabbar button.on { color: #60a5fa; }
:root[data-theme="dark"] .error-text,
:root[data-theme="dark"] .panel-nav .panel-nav-logout { color: #f87171; }

/* ---- v6.1: اصلاح خودکارِ کنتراست در تم تاریک (تولیدشده با ابزار بررسی) ---- */
:root[data-theme="dark"] .contact-wa { color: #15a758; }
:root[data-theme="dark"] .lead-followup.is-due { color: #eb6f66; }
:root[data-theme="dark"] .req-due { color: #eb6f66; }
:root[data-theme="dark"] .upload-box-video .upload-icon { color: #da60e6; }
:root[data-theme="dark"] .wiz-stepper li.done { color: #06aa77; }
:root[data-theme="dark"] .match-pill { color: #1eb556; }
:root[data-theme="dark"] .match-pill-none { color: #9ba1ac; }
:root[data-theme="dark"] .match-score { color: #7897ed; }
:root[data-theme="dark"] .match-excellent .match-score { color: #1fbd5a; }
:root[data-theme="dark"] .match-fair .match-score { color: #f69042; }
:root[data-theme="dark"] .mt-ok { color: #1eb556; }
:root[data-theme="dark"] .mt-warn { color: #f58a38; }
:root[data-theme="dark"] .mt-ok-t { color: #1cac52; }
:root[data-theme="dark"] .mt-warn-t { color: #ee6e0c; }
:root[data-theme="dark"] .pr-ok { color: #1cac52; }
:root[data-theme="dark"] .pr-warn { color: #ee6e0c; }
:root[data-theme="dark"] .pr-fail { color: #e97070; }

.text-warn-soft { color: #b45309; }
:root[data-theme="dark"] .text-warn-soft { color: #fbbf24; }

/* ---- v6.2: بازگشایی/کپی آگهی ---- */
.copy-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: rgba(37,99,235,.08); border: 1px solid var(--border); line-height: 1.9; font-size: .9rem; }
.copy-media { display: flex; gap: 8px; align-items: center; margin-top: 6px; cursor: pointer; }
.reopen-box { max-width: 720px; margin-inline: auto; }
.reopen-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin: 12px 0; }
.reopen-facts > div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; font-size: .88rem; }
.reopen-facts b { display: block; font-size: 1.05rem; margin-top: 2px; }
.reopen-price { margin: 14px 0; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 12px; }
.reopen-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.reopen-left { font-size: .75rem; color: var(--muted); display: block; }

/* ===== v52: مشاور عمومی، نشان تأییدشده، آمار بازار ===== */
.verified-badge { display:inline-flex; align-items:center; gap:4px; background:#e8f7ee; color:#146c3a; border:1px solid #b7e4c7; border-radius:999px; padding:1px 10px; font-size:.78rem; font-weight:600; }
:root[data-theme="dark"] .verified-badge { background:#12301f; color:#7ee0a3; border-color:#1f5a38; }
.advisor-avatar { width:52px; height:52px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:var(--card-alt,#eef2f7); font-size:1.5rem; }
.advisor-card:hover { box-shadow:0 4px 18px rgba(0,0,0,.08); }
.market-table { width:100%; border-collapse:collapse; }
.market-table th, .market-table td { padding:9px 10px; text-align:right; border-bottom:1px solid var(--border,#e5e7eb); white-space:nowrap; }
.market-table tr.market-few td { opacity:.7; }
.mk-up { color:#b42318; } .mk-down { color:#146c3a; }
.market-chart { width:100%; height:auto; max-height:260px; }
.market-chart .mc-line { stroke:var(--primary,#2563eb); stroke-width:2; }
.market-chart .mc-dot { fill:var(--primary,#2563eb); }
.market-chart .mc-axis { stroke:var(--border,#cbd5e1); stroke-width:1; }
.market-chart .mc-label { fill:var(--muted,#64748b); font-size:11px; }
.market-cmp { margin:8px 0; padding:8px 12px; border-radius:10px; background:var(--card-alt,#f1f5f9); font-size:.92rem; }
.market-cmp-below { border-inline-start:4px solid #16a34a; } .market-cmp-above { border-inline-start:4px solid #d97706; } .market-cmp-near { border-inline-start:4px solid #64748b; }

/* نشان تور مجازی روی کارت آگهی */
.prop-cover { position: relative; }
.tour-badge { position: absolute; bottom: 8px; inset-inline-start: 8px; background: rgba(37, 99, 235, .92); color: #fff; padding: 2px 9px; border-radius: 999px; font-size: .74rem; z-index: 2; }

/* آمار بازار: کارت‌های نوع ملک */
.market-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.market-type-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 2px solid var(--border, #e5e7eb); border-radius: 12px; text-decoration: none; color: inherit; background: var(--card, #fff); }
.market-type-card.on { border-color: #2563eb; background: rgba(37, 99, 235, .08); }
.market-type-card .mt-n { font-size: .78rem; color: var(--muted, #64748b); }
.market-type-card .mt-v { font-weight: 700; font-size: .98rem; margin-top: 2px; }
.market-type-card .mt-v small { font-weight: 400; color: var(--muted, #64748b); font-size: .72rem; }
@media (max-width: 520px) { .market-types { grid-template-columns: repeat(2, 1fr); } }

/* جدول آمار بازار روی موبایل: هر محله یک کارت (ستون‌ها بیرون از صفحه نمی‌روند) */
.market-filter label { margin: 0; }
.market-filter select { min-height: 42px; min-width: 150px; }
@media (max-width: 640px) {
  .market-table, .market-table tbody, .market-table tr, .market-table td { display: block; width: 100%; box-sizing: border-box; }
  .market-table thead { display: none; }
  .market-table tr { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; background: var(--card, #fff); }
  .market-table td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0; padding: 5px 0; white-space: normal; text-align: left; }
  .market-table td::before { content: attr(data-label); color: var(--muted, #64748b); font-size: .84rem; text-align: right; }
  .market-table td:first-child { font-weight: 700; font-size: 1rem; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px dashed var(--border, #e5e7eb); justify-content: flex-start; text-align: right; }
  .market-table td:first-child::before { content: none; }
  .market-table td.mk-act { justify-content: flex-start; padding-top: 8px; }
  .market-table td.mk-act::before { content: none; }
  .market-table tr.market-few td { opacity: 1; } .market-table tr.market-few { opacity: .8; }
}

/* ===== نظر و امتیاز مشاور ===== */
.rating-stars { color: #f59e0b; letter-spacing: 2px; font-size: 1.05em; white-space: nowrap; }
.rating-chip { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: 8px; padding: 1px 10px; border-radius: 999px; background: #fff7e6; color: #92400e; text-decoration: none; font-weight: 600; font-size: .85rem; }
.rate-summary { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.rate-big { display: flex; flex-direction: column; align-items: center; min-width: 110px; } .rate-big b { font-size: 2.2rem; line-height: 1.2; }
.rate-bars { flex: 1; min-width: 220px; display: grid; gap: 4px; }
.rate-row { display: grid; grid-template-columns: 38px 1fr 28px; gap: 8px; align-items: center; font-size: .85rem; }
.rate-bar { height: 8px; border-radius: 4px; background: #e5e7eb; overflow: hidden; } .rate-bar i { display: block; height: 100%; background: #f59e0b; }
.review-list { display: grid; gap: 12px; margin-top: 8px; }
.review-item { border-top: 1px solid var(--border, #e5e7eb); padding-top: 12px; }
.review-item p { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; }
.review-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.review-reply { margin-top: 6px; padding: 8px 12px; border-radius: 10px; background: var(--card-alt, #f1f5f9); font-size: .92rem; line-height: 1.8; overflow-wrap: anywhere; }
.rating-set { border: 0; padding: 0; margin: 0 0 14px; } .rating-set legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.rating-options { display: grid; gap: 8px; }
.rating-opt { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; border: 2px solid var(--border, #d7dce3); border-radius: 12px; cursor: pointer; background: var(--card, #fff); }
.rating-opt input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: #2563eb; }
.rating-opt.on, .rating-opt:has(input:checked) { border-color: #2563eb; background: rgba(37, 99, 235, .08); }
.rating-opt .rating-lbl { margin-inline-start: auto; color: var(--muted, #64748b); font-size: .9rem; }
.review-form textarea { width: 100%; font-size: 16px; box-sizing: border-box; }

/* ===== صفحه‌های سئوی شهر/محله/نوع ===== */
.seo-crumbs { font-size: .85rem; margin-bottom: 8px; line-height: 1.9; }
.seo-intro p { margin: 0 0 8px; line-height: 2; }
.seo-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.seo-links h2, .seo-faq h2 { font-size: 1.05rem; margin: 0 0 10px; }
.seo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.seo-chips a { padding: 6px 12px; border: 1px solid var(--border, #d7dce3); border-radius: 999px; text-decoration: none; color: inherit; font-size: .9rem; line-height: 1.6; background: var(--card, #fff); }
.seo-chips a:hover { border-color: #2563eb; } .seo-chips small { color: var(--muted, #64748b); }
.seo-faq details { border-top: 1px solid var(--border, #e5e7eb); padding: 10px 0; }
.seo-faq summary { cursor: pointer; font-weight: 600; line-height: 1.8; } .seo-faq details p { margin: 6px 0 0; line-height: 1.9; }

/* ===== v13: اصلاح کنتراست تم تیره برای بخش‌های جدید (تور مجازی، آمار بازار، نظرها، صفحه‌های سئو) =====
   ریشه‌ی مشکل: چند بخش از متغیرهای --card و --card-alt استفاده می‌کردند که فقط مقدار پیش‌فرض روشن داشت (سفیدِ ثابت زیر متن روشنِ تم تیره). */
:root { --card: #ffffff; --card-alt: #f1f5f9; }
:root[data-theme="dark"] { --card: #1e293b; --card-alt: #273449; }
:root[data-theme="dark"] .mk-up { color: #f87171; }
:root[data-theme="dark"] .mk-down { color: #4ade80; }
:root[data-theme="dark"] .rating-chip { background: #3b2a12; color: #fcd34d; }
:root[data-theme="dark"] .rate-bar { background: #334155; }
:root[data-theme="dark"] .rating-stars { color: #fbbf24; }
:root[data-theme="dark"] .market-cmp-near { border-inline-start-color: #94a3b8; }
:root[data-theme="dark"] .market-type-card.on,
:root[data-theme="dark"] .rating-opt.on, :root[data-theme="dark"] .rating-opt:has(input:checked) { background: rgba(96, 165, 250, .16); border-color: #60a5fa; }
:root[data-theme="dark"] .seo-chips a:hover { border-color: #60a5fa; }
:root[data-theme="dark"] .filters-clear { color: #f87171; }
:root[data-theme="dark"] .advisor-card:hover { box-shadow: 0 4px 18px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] .upload-progress-bar { background: #334155; }
:root[data-theme="dark"] .copy-note { background: rgba(96, 165, 250, .12); }
:root[data-theme="dark"] .req-note { background: #273449; color: #e2e8f0; }
.req-note { font-size: .8rem; margin-top: 4px; background: #f1f5f9; color: #1e293b; padding: 6px 10px; border-radius: 8px; }

/* ===== v14: نام کاربر واردشده در پنل مشاور املاک ===== */
.panel-who { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 6px 14px; border-radius: 999px; background: rgba(37, 99, 235, .12); color: var(--text); margin-inline-start: 4px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.panel-who small { font-weight: 500; font-size: .74rem; color: var(--muted); }
:root[data-theme="dark"] .panel-who { background: rgba(96, 165, 250, .18); }
