/* فونت به‌صورت کامل داخل پروژه سرو می‌شود (بدون وابستگی به CDN خارجی)
   چون این سایت روی اینترنت داخلی هم باید بدون خطا کار کند. */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #06b6d4;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(30, 41, 59, .06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

a { text-decoration: none; color: inherit; }

img, video { max-width: 100%; height: auto; }

/* تمام‌عرض: فقط روی مانیتورهای فوق‌عریض (بیش از ۲۲۰۰px) خطوط بیش از حد کشیده نمی‌شوند */
.container { max-width: 2200px; margin: 0 auto; padding: 0 clamp(12px, 3vw, 40px); }

/* ---------- Accessibility: keyboard focus & skip link ---------- */
.skip-link {
  position: absolute; right: 12px; top: -60px; z-index: 300;
  background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 10px;
  font-weight: 700; font-size: .85rem; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2.5px solid var(--primary); outline-offset: 2px; border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; }
.brand-badge {
  width: 42px; height: 42px; border-radius: 12px; display: block; flex-shrink: 0;
}
.brand small { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--muted);
  transition: .15s;
}
.nav-links a:hover, .nav-links a.active { background: #eef2ff; color: var(--primary); }
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content:center;
  padding: 10px 20px; border-radius: 10px; font-weight: 700; font-size: .92rem;
  border: none; cursor: pointer; transition: .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fef2f2; color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-block { width: 100%; }

/* ---------- Layout helpers ---------- */
.page { padding: 32px 0 60px; }
.section-title { font-size: clamp(1.2rem, 1rem + 1vw, 1.4rem); font-weight: 800; margin-bottom: 18px; }
.grid { display: grid; gap: 20px; }
/* رفع یک باگ کلاسیک CSS Grid: آیتم‌های گرید به‌صورت پیش‌فرض min-width:auto
   دارند، یعنی حاضر نیستند از عرض محتوای درونی‌شان (مثلاً یک ردیف عکس‌های
   کوچکِ غیرقابل‌جمع‌شدن در گالری) باریک‌تر شوند — حتی اگر خودِ آن محتوا
   overflow-x:auto داشته باشد، چون هیچ‌وقت اصلاً به آن عرضِ محدودشده نمی‌رسد.
   نتیجه این بود که صفحه‌ی جزئیاتِ آگهی با عکس/ویدیوی زیاد، از عرض گوشی
   بیرون می‌زد. min-width:0 این رفتار پیش‌فرض را خنثی می‌کند — هیچ چیز
   بصری را عوض نمی‌کند، فقط اجازه می‌دهد ستون‌های گرید واقعاً به عرض
   ستونشان محدود بمانند، در همه‌ی چیدمان‌های grid سایت. */
.grid > * { min-width: 0; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.grid-sidebar { grid-template-columns: 260px 1fr; align-items: start; }
@media (max-width: 900px) { .grid-sidebar { grid-template-columns: 1fr; } }

/* چیدمان صفحه‌ی جزئیات آگهی (گالری/توضیحات ۲ واحد + کارت قیمت/تماس ۱ واحد).
   قبلاً این نسبت با style="grid-template-columns: 2fr 1fr" مستقیم روی خودِ
   عنصر نوشته می‌شد که هیچ media query ای (حتی از کلاس‌های دیگر) نمی‌تواند
   آن را override کند — نتیجه این بود که روی گوشی هم این دو ستون کنار هم
   فشرده می‌ماندند و صفحه خیلی شلوغ/گسترده به نظر می‌رسید. حالا با یک کلاسِ
   دارای breakpoint مشخص جایگزین شده.
   */
.grid-detail { grid-template-columns: 2fr 1fr; align-items: start; }
@media (max-width: 900px) { .grid-detail { grid-template-columns: 1fr; } }
@media (max-width: 900px) and (min-width: 561px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr; } .container { padding: 0 14px; } }

/* ---------- Card ---------- */
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border); padding: 22px;
}

/* ---------- Property Card ---------- */
.prop-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--border); transition: .2s;
  display: flex; flex-direction: column;
}
.prop-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(30,41,59,.12); }
.prop-cover { height: 190px; background: #e2e8f0 center/cover no-repeat; position: relative; }
.prop-badge {
  position: absolute; top: 10px; right: 10px; background: rgba(37,99,235,.92); color: #fff;
  padding: 4px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700;
}
.prop-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.prop-title { font-weight: 700; font-size: 1rem; }
.prop-meta { color: var(--muted); font-size: .82rem; display: flex; gap: 10px; flex-wrap: wrap; }
.prop-price { font-weight: 800; color: var(--primary); font-size: 1.05rem; margin-top: auto; }

/* ---------- Featured listing ---------- */
.prop-card-featured { border: 2px solid #f59e0b; box-shadow: 0 4px 18px rgba(245, 158, 11, .18); }
.prop-badge-featured {
  position: absolute; top: 10px; left: 10px; background: rgba(245, 158, 11, .95); color: #fff;
  padding: 4px 12px; border-radius: 999px; font-size: .75rem; font-weight: 700;
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
input[type=text], input[type=number], input[type=password], input[type=tel],
select, textarea {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1.5px solid var(--border);
  font-family: inherit; font-size: .92rem; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; min-height: 90px; }
.checkbox-list { display: flex; flex-wrap: wrap; gap: 10px; }
.checkbox-list label { display: flex; align-items: center; gap: 6px; font-weight: 500; background: #f1f5f9;
  padding: 6px 12px; border-radius: 999px; font-size: .82rem; }
.checkbox-list input { width: auto; }
.radio-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.radio-list label { display: flex; align-items: center; gap: 6px; font-weight: 500; background: #f1f5f9;
  padding: 10px 16px; border-radius: 10px; font-size: .88rem; border: 1.5px solid var(--border); cursor: pointer; }
.radio-list input { width: auto; }
.radio-list input:checked + span, .radio-list label:has(input:checked) { border-color: var(--primary); color: var(--primary); }
.otp-code-input { letter-spacing: 8px; text-align: center; font-size: 1.4rem; font-weight: 700; }
.filters-details summary.filters-summary {
  cursor: pointer; list-style: none; font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; gap: 8px; user-select: none; padding: 2px 0;
}
.filters-details summary.filters-summary::-webkit-details-marker { display: none; }
.filters-details summary.filters-summary::before {
  content: "▸"; display: inline-block; transition: transform .15s ease; color: var(--primary); font-size: .8rem;
}
.filters-details[open] summary.filters-summary::before { transform: rotate(90deg); }
.error-text { color: var(--danger); font-size: .8rem; margin-top: 4px; }
.rejection-reason-row td {
  background: #fef2f2; color: var(--danger); font-size: .85rem; padding: 10px 14px;
  border-top: none;
}

/* ---------- Password show/hide toggle ---------- */
.password-field-wrap { position: relative; }
.password-field-wrap input[type=password], .password-field-wrap input[type=text] { padding-inline-end: 62px; }
.password-toggle-btn {
  position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 6px;
  background: none; border: none; cursor: pointer; font-size: .78rem; font-weight: 600;
  color: var(--primary); padding: 4px 8px;
}
.password-toggle-btn:hover { text-decoration: underline; }

.auth-box { max-width: 400px; margin: 60px auto; }
.auth-box h2 { text-align: center; margin-bottom: 6px; }
.auth-box p.sub { text-align: center; color: var(--muted); margin-bottom: 24px; }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; text-align: right; border-bottom: 1px solid var(--border); font-size: .88rem; }
th { color: var(--muted); font-weight: 700; }

/* جدول‌های بلند و پرستون (مثل «آگهی‌های من») روی موبایل به‌جای فشرده‌شدن یا
   اسکرول افقی، هر ردیف را به یک کارتِ عمودیِ خواناتر تبدیل می‌کنند. هر <td>
   باید data-label="..." داشته باشد تا برچسب ستون کنار مقدارش نشان داده شود. */
@media (max-width: 700px) {
  table.responsive-table thead { display: none; }
  table.responsive-table, table.responsive-table tbody, table.responsive-table tr, table.responsive-table td {
    display: block; width: 100%;
  }
  table.responsive-table tr {
    border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; padding: 4px 14px;
  }
  table.responsive-table tr.rejection-reason-row { padding: 10px 14px; background: #fff7ed; }
  table.responsive-table td {
    border-bottom: 1px dashed var(--border); padding: 9px 0; display: flex;
    justify-content: space-between; align-items: center; gap: 10px; text-align: left;
  }
  table.responsive-table td:last-child { border-bottom: none; }
  table.responsive-table td::before {
    content: attr(data-label); font-weight: 700; color: var(--muted); flex-shrink: 0; text-align: right;
  }
  table.responsive-table td:not([data-label])::before,
  table.responsive-table td[data-label=""]::before,
  table.responsive-table td.no-label::before { content: none; }
  table.responsive-table td.no-label { display: block; }
  table.responsive-table td .btn { font-size: .78rem; }
}

/* ---------- Badge / Status ---------- */
.badge { padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.badge-pending { background: #fef3c7; color: var(--warning); }
.badge-active { background: #dcfce7; color: var(--success); }
.badge-rejected, .badge-cancelled { background: #fee2e2; color: var(--danger); }
.badge-new { background: #dbeafe; color: var(--primary); }
.badge-contacted { background: #e0e7ff; color: #4338ca; }
.badge-visit_scheduled { background: #fae8ff; color: #a21caf; }
.badge-deal_done { background: #dcfce7; color: var(--success); }

/* ---------- Alerts ---------- */
.alerts { position: fixed; top: 84px; left: 50%; transform: translateX(-50%); z-index: 100; width: 92%; max-width: 460px;
  pointer-events: none; }
.alerts .alert { pointer-events: auto; }
@media (max-width: 480px) { .alerts { top: 74px; width: 94%; } }
.alert { padding: 12px 18px; border-radius: 10px; margin-bottom: 8px; font-size: .88rem; font-weight: 600;
  box-shadow: var(--shadow); }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #e0f2fe; color: #075985; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; border-radius: var(--radius); padding: clamp(24px, 5vw, 40px) clamp(18px, 4vw, 32px); margin-bottom: 26px;
}
.hero h1 { font-size: clamp(1.3rem, 1rem + 2vw, 1.7rem); margin: 0 0 8px; }
.hero p { margin: 0; opacity: .92; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 800px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-card .num { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat-card .label { color: var(--muted); font-size: .85rem; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---------- تایم‌لاینِ اقدامات هر درخواست (پنل بنگاه/ادمین) ---------- */
.action-timeline-wrap { padding: 10px 4px; }
.action-timeline { list-style: none; margin: 0; padding: 0; border-inline-start: 2px solid var(--border); }
.action-timeline li { position: relative; padding: 6px 0 6px 0; padding-inline-start: 16px; font-size: .9rem; }
.action-timeline li::before {
  content: ""; position: absolute; inset-inline-start: -5px; top: 14px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
}
.action-timeline .timeline-actor { font-weight: 700; }
.action-timeline .timeline-time { color: var(--muted); font-size: .8rem; }
[data-action="toggle-timeline"] svg { transition: transform .15s ease; }
[data-action="toggle-timeline"].is-open svg { transform: rotate(180deg); }

/* ---------- Price words hint ---------- */
.price-words {
  font-size: .78rem; color: var(--primary); margin-top: 4px; min-height: 1.1em; font-weight: 600;
}

/* ---------- Media preview chips ---------- */
/* ---------- Upload boxes (distinct icons for image vs video) ---------- */
.upload-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 24px 12px; border: 2px dashed var(--border); border-radius: var(--radius);
  cursor: pointer; text-align: center; transition: .15s; background: #fafbff;
}
.upload-box:hover { border-color: var(--primary); background: #eef2ff; }
.upload-icon { font-size: 1.8rem; }
.upload-text { font-weight: 700; font-size: .88rem; }
.upload-hint { font-size: .72rem; color: var(--muted); }
.upload-box-image:hover { border-color: var(--primary); }
.upload-box-video:hover { border-color: #a21caf; background: #fdf4ff; }
.upload-box-video .upload-icon { color: #a21caf; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 24px; }
.pagination-current { color: var(--muted); font-size: .86rem; font-weight: 600; }

.existing-media { position: relative; width: 90px; height: 66px; border-radius: 8px; overflow: hidden; }
.existing-media img { width: 100%; height: 100%; object-fit: cover; }
.existing-media-video {
  position: relative; width: 90px; height: 66px; background: #1e293b; color: #fff; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: .74rem; text-align: center;
}
.existing-media-remove {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(220,38,38,.9); color: #fff; border: none; font-size: .7rem; cursor: pointer;
  line-height: 1;
}

/* ---------- Favorite heart button ---------- */
.fav-btn {
  border: none; background: rgba(255,255,255,.9); width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1.05rem;
  position: absolute; top: 10px; left: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.15); transition: .15s;
}
.fav-btn:hover { transform: scale(1.1); }
.fav-btn.active { color: #e11d48; }
.fav-btn.inactive { color: #94a3b8; }

.media-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.media-chip {
  background: #eef2ff; color: var(--primary); font-size: .74rem; padding: 4px 10px;
  border-radius: 999px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.media-chip-warn { background: #fef3c7; color: var(--warning); }
.media-chip-remove {
  border: none; background: rgba(0,0,0,.08); color: inherit; width: 16px; height: 16px; line-height: 1;
  border-radius: 50%; cursor: pointer; font-size: .8rem; padding: 0; display: inline-flex;
  align-items: center; justify-content: center;
}
.media-chip-remove:hover { background: rgba(0,0,0,.18); }

/* ---------- Quote banner ---------- */
.quote-banner {
  background: linear-gradient(90deg, #eef2ff, #f0fdfa);
  border-bottom: 1px solid var(--border);
  text-align: center; padding: 8px 16px; font-size: .84rem; color: #3730a3; font-weight: 600;
}

/* ---------- FAQ / راهنما ---------- */
.faq-group { margin-bottom: 28px; }
.faq-group h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 10px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: .92rem; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; display: inline-block; width: 1.1em; color: var(--primary); font-weight: 800; }
.faq-item[open] summary::before { content: "−"; }
.faq-answer { margin-top: 10px; padding-inline-start: 1.1em; color: var(--muted); font-size: .88rem; line-height: 1.9; }
.faq-answer a { color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center; padding: 30px 16px 40px; color: var(--muted); font-size: .8rem;
}
.site-footer a { color: var(--muted); opacity: .6; font-size: .76rem; }
.site-footer a:hover { opacity: 1; color: var(--primary); }
.footer-links-main { display: flex; gap: 18px; justify-content: center; margin-top: 10px; }
.footer-admin-link {
  display: inline-block; margin-top: 22px; padding-top: 14px;
  border-top: 1px solid var(--border, #e5e7eb);
}

/* ---------- Header help/FAQ link ---------- */
.nav-help-link { display: flex; align-items: center; gap: 4px; }

/* ---------- View count badge ---------- */
.view-count {
  display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .78rem;
}

/* ---------- Gallery / Lightbox ---------- */
.gallery-main {
  height: clamp(200px, 42vw, 380px); border-radius: var(--radius); background: #e2e8f0 center/cover no-repeat;
  cursor: zoom-in; position: relative;
}
.gallery-thumbs { display: flex; gap: 8px; padding: 12px 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; max-width: 100%; min-width: 0; }
.gallery-thumbs img, .gallery-thumbs .video-thumb {
  height: 66px; width: 90px; object-fit: cover; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; flex-shrink: 0; background: #1e293b;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem;
}
.gallery-thumbs img.active, .gallery-thumbs .video-thumb.active { border-color: var(--primary); }
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.92); z-index: 200;
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 16px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img, .lightbox-overlay video { max-width: 92vw; max-height: 80vh; border-radius: 10px; }
.lightbox-close {
  position: absolute; top: 20px; left: 20px; color: #fff; font-size: 1.8rem; cursor: pointer;
  background: none; border: none;
}
.lightbox-nav { display: flex; gap: 30px; }
.lightbox-nav button {
  background: rgba(255,255,255,.12); color: #fff; border: none; width: 44px; height: 44px;
  border-radius: 50%; font-size: 1.3rem; cursor: pointer;
}
@media (max-width: 480px) {
  .lightbox-nav { gap: 16px; }
  .lightbox-close { top: 10px; left: 10px; }
}

/* ---------- Search box on browse ---------- */
.search-box { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.search-box input { flex: 1; min-width: 160px; }

/* ---------- Field grid section spacing ---------- */
.card h3 { margin-top: 24px; margin-bottom: 12px; font-size: 1.02rem; }
.card h3:first-child { margin-top: 0; }

/* ---------- Property detail spec list ---------- */
.spec-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; margin: 14px 0; }
@media (max-width: 480px) { .spec-list { grid-template-columns: 1fr; } }

/* ---------- چک‌لیست انتخاب مناطق برای کارشناس ---------- */
.region-checklist {
  max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; background: var(--bg);
}
.region-checklist-city { padding: 8px 0; border-top: 1px solid var(--border); }
.region-checklist-city:first-child { border-top: none; }
.region-checklist-city > label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.region-checklist-hood {
  display: flex; align-items: center; gap: 8px; margin-right: 26px; margin-top: 6px;
  font-size: .9rem; color: var(--text); cursor: pointer;
}
.region-checklist input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

/* ---------- تقویم شمسی بازشونده (برای تاریخ پیشنهادی بازدید) ---------- */
.jalali-picker-wrapper { position: relative; }
.jalali-picker-panel {
  display: none; position: absolute; z-index: 60; top: calc(100% + 6px); right: 0;
  width: 280px; max-width: 90vw; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 12px 28px rgba(15, 23, 42, .16); padding: 12px;
}
.jalali-picker-panel.open { display: block; }
.jalali-picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.jalali-picker-nav {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; width: 30px; height: 30px;
  font-size: 1.1rem; cursor: pointer; color: var(--text);
}
.jalali-picker-nav:hover { background: var(--border); }
.jalali-picker-title { font-weight: 700; }
.jalali-picker-weekdays, .jalali-picker-days {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center;
}
.jalali-picker-weekdays span { color: var(--muted); font-size: .78rem; padding: 4px 0; }
.jalali-picker-day {
  background: none; border: none; border-radius: 8px; padding: 7px 0; cursor: pointer; font-size: .85rem;
  color: var(--text);
}
.jalali-picker-day:hover { background: var(--bg); }
.jalali-picker-day.is-today { font-weight: 800; color: var(--primary); }
.jalali-picker-day.is-selected { background: var(--primary); color: #fff; }
.jalali-picker-foot { display: flex; gap: 8px; margin-top: 10px; }
@media (max-width: 480px) { .jalali-picker-panel { right: 50%; transform: translateX(50%); } }

/* ---------- Modal نقشه (انتخاب/نمایش موقعیت روی نقشه) ---------- */
.map-modal-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.map-modal {
  background: #fff; border-radius: var(--radius); width: min(720px, 100%); max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.map-modal-head {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
  border-bottom: 1px solid var(--border); font-weight: 700;
}
.map-modal-close { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.map-modal-body { height: min(60vh, 420px); position: relative; background: #eef2f7; }
.map-modal-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .9rem; text-align: center; padding: 20px;
}
.map-modal-foot { padding: 14px 18px; border-top: 1px solid var(--border); }
.spec-item { display: flex; justify-content: space-between; font-size: .86rem; border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.spec-item b { color: var(--text); font-weight: 700; }
.spec-item span.label { color: var(--muted); }

/* ---------- Panel nav (admin/agency shared sub-navigation) ---------- */
.panel-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.panel-nav a {
  padding: 7px 14px; border-radius: 999px; font-size: .85rem; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); transition: all .15s ease;
}
.panel-nav a:hover { color: var(--primary); border-color: var(--primary); }
.panel-nav a.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.panel-nav form { display: inline; }
.panel-nav .panel-nav-logout {
  margin-inline-start: auto; padding: 7px 14px; border-radius: 999px; font-size: .85rem;
  color: var(--danger); background: var(--surface); border: 1px solid var(--border); cursor: pointer;
  font-family: inherit;
}
.panel-nav .panel-nav-logout:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ---------- Error pages ---------- */
.error-page { text-align: center; padding: 70px 20px; }
.error-code { font-size: 4.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.error-desc { color: var(--muted); margin: 14px auto 26px; max-width: 480px; }

/* ---------- Alerts: dismiss button ---------- */
.alert { position: relative; padding-inline-end: 38px; }
.alert-close {
  position: absolute; top: 8px; left: 10px; background: none; border: none; cursor: pointer;
  font-size: 1rem; color: inherit; opacity: .6; line-height: 1;
}
.alert-close:hover { opacity: 1; }

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); border-radius: 8px;
  width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; color: var(--text);
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .brand small { display: none; }
  .nav-links {
    position: absolute; inset-inline: 0; top: 100%; background: var(--surface);
    flex-direction: column; align-items: stretch; gap: 6px; padding: 14px 16px;
    border-bottom: 1px solid var(--border); box-shadow: 0 8px 16px rgba(15,23,42,.08);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links .btn { width: 100%; text-align: center; }
  .navbar-inner { position: relative; flex-wrap: wrap; }
}

/* ---------- Submit-button loading state ---------- */
button[disabled].btn-loading { opacity: .7; cursor: progress; }
