/* ویتا — پایه‌ی سبک‌ها (M3-0): راست‌چین، موبایل‌اول، بدون هیچ منبع خارجی.

   جهت طراحی: «مه و جنگل گیلان» — سطح‌های سفید روی زمینه‌ی خاکستریِ سردِ مه‌آلود، سبز جنگلی برای اقدام،
   و یک نشان ویژه: «مهر ویتا» (تأیید) و «امضای مسئول» (نام مشاور روی هر فایل)، چون شعار ما همین است:
   «با نام مسئولش». بقیه‌ی صفحه عمداً ساکت می‌ماند.

   فونت: وزیرمتن. تا وقتی فایلش در static/fonts نیامده فقط اگر روی دستگاه نصب باشد استفاده می‌شود
   (ارجاع به فایل نبودن آن collectstatic را در سرور خراب می‌کند)؛ وگرنه فونت سیستم. */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Variable.f6d31671339d.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* رنگ‌های معنایی */
  /* پالت V5 (۱۴۰۵/۰۹/۰۲، هم‌راستا با ماکت): زمینه‌ی کرم، آبی‌سبز خاکستری برای اقدام؛ سبز فقط برای «مهر ویتا» */
  --bg: #fcfbf8;
  --surface: #ffffff;
  --ink: #202c33;           /* متن */
  --ink-strong: #1c363d;    /* تیتر و سربرگ */
  --muted: #5b676c;         /* ≥ 5.5:1 روی سفید و زمینه */
  --line: #e2e2db;
  --line-soft: #eeeee8;
  --brand: #315f66;         /* اقدام اصلی؛ روی سفید ≈ 7:1 */
  --brand-strong: #234a50;
  --brand-tint: #edf2f1;
  /* مکمل گرم؛ فقط برای جزئیات ظریف، نه رنگ غالب */
  --gold: #a9783d;
  --gold-ink: #7a5628;       /* طلایی برای متن (کنتراست ≥ ۴٫۵ روی روشن)؛ خودِ --gold فقط تزئینی */
  --coral: #c66c52;          /* فقط نوار/حاشیه‌ی تأکید (بازدید پیش رو)؛ برای متن --coral-ink */
  --coral-ink: #a24c35;
  --coral-tint: #f7eee8;
  --cream: #f3ede2;
  --seal: #0e7a55;
  --seal-tint: #dff3ea;
  --amber: #8f5600;         /* هشدار؛ روی سفید ≈ 6:1 */
  --amber-tint: #fbf0d8;
  --danger: #a3342b;
  --danger-tint: #f8e3e0;
  --info-tint: #e6eef5;

  /* ابعاد */
  --r-sm: 8px;              /* فیلد و دکمه */
  --r-md: 14px;             /* کارت */
  --r-lg: 20px;             /* پنل بزرگ */
  --gutter: 16px;
  /* مقیاس فاصله‌ی ۴پیکسلی (M3a به بعد) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-7: 32px; --sp-8: 40px; --sp-9: 48px;
  --shadow-pop: 0 6px 24px rgba(32, 44, 51, 0.14);
  --focus: 0 0 0 3px #fff, 0 0 0 5px var(--brand);

  --font: "Vazirmatn", "Noto Sans Arabic", "Noto Naskh Arabic", Tahoma, system-ui, sans-serif;

  /* نام‌های قدیمی (کلاس‌های M1 تا M2d هنوز از این‌ها استفاده می‌کنند؛ مقدارها به پالت تازه وصل است) */
  --green-900: var(--ink-strong);
  --green-700: var(--brand);
  --green-500: #668b90;
  --green-100: var(--brand-tint);
  --sand-50: var(--bg);
  --sand-100: var(--line-soft);
  --sand-300: var(--line);
  --radius: var(--r-md);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
}

a { color: var(--brand); text-underline-offset: 3px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

h1, h2, h3 { color: var(--ink-strong); line-height: 1.5; font-weight: 800; }

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- سربرگ: روشن و کم‌حجم؛ تمام‌توجه به محتوا --- */
.site-header {
  background: var(--surface);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-strong);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  line-height: 1.2;
}
.brand::before {
  content: "";
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.tagline {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  display: none;
}
@media (min-width: 48rem) { .tagline { display: block; } }

/* --- محتوا --- */
main { padding-block: 24px 48px; min-height: 60vh; }

.hero h1 {
  margin: 0 0 10px;
  font-size: 1.75rem;
  line-height: 1.55;
  color: var(--ink-strong);
  max-width: 36rem;
}
.hero p {
  margin: 0 0 22px;
  color: var(--muted);
  max-width: 38rem;
}
@media (min-width: 48rem) { .hero h1 { font-size: 2.25rem; } }

.paths {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 40rem) {
  .paths { grid-template-columns: 1fr 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
}
.card h2 { margin: 0 0 6px; font-size: 1.15rem; color: var(--ink-strong); }
.card p { margin: 0 0 12px; color: var(--muted); font-size: 0.95rem; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--muted);
  font-size: 0.8rem;
  border: 1px solid var(--line);
}

.notice {
  margin-top: 24px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- دکمه‌ها --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: var(--r-sm);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--brand);
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn[disabled], .btn.is-disabled { background: var(--line); border-color: var(--line); color: var(--muted); cursor: not-allowed; }

/* --- پاورقی --- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ===== M1: سربرگ، پیام‌ها، فرم‌ها، جدول‌ها ===== */
.header-row { flex-wrap: wrap; }
.brand-block { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: 0.95rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--brand); }
/* A2: منوی سه حالت کاربری (بدون جاوااسکریپت؛ داخل نوار پیمایشی بریده نشود، پس درون‌خطی باز می‌شود) */
.mode-menu { flex: none; }
.mode-menu summary {
  cursor: pointer; list-style: none; font-size: 0.85rem; padding: 4px 12px; border-radius: 999px;
  background: var(--green-100); color: var(--green-900); border: 1px solid var(--green-500); white-space: nowrap;
}
.mode-menu summary::-webkit-details-marker { display: none; }
.mode-menu summary::after { content: " ▾"; }
.mode-menu[open] summary::after { content: " ▴"; }
.mode-list { display: inline-flex; gap: 6px; margin-inline-start: 8px; }
.mode-list button {
  font: inherit; font-size: 0.85rem; padding: 4px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: #fff; color: var(--ink); border: 1px solid var(--sand-300);
}
.mode-list button[aria-current="true"] { background: var(--green-900); color: #fff; border-color: var(--green-900); }
.mode-list button:focus-visible, .mode-menu summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.count {
  display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 999px;
  background: var(--amber); color: #fff; font-size: 0.75rem; text-align: center;
}

.messages { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.msg { padding: 10px 14px; border-radius: 10px; background: var(--sand-100); border: 1px solid var(--sand-300); }
.msg-success { background: var(--green-100); border-color: var(--green-500); }
.msg-error { background: #f6dedb; border-color: var(--danger); color: var(--danger); }
.msg-warning { background: #f7ecd5; border-color: var(--amber); }

.narrow { max-width: 30rem; margin-inline: auto; }
.narrow h1, main > h1 { font-size: 1.5rem; line-height: 1.6; color: var(--green-900); margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 18px; }
.help { color: var(--muted); font-size: 0.85rem; margin: 4px 0 0; }
.error { color: var(--danger); font-size: 0.9rem; margin: 4px 0 0; }
.big { font-size: 2rem; font-weight: 700; margin: 0; color: var(--green-900); }

.form { display: grid; gap: 16px; margin-bottom: 20px; }
.form-inline { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--sand-300); }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: 4px; }
.field input[type=text], .field input[type=tel], .field textarea, .field select {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--sand-300); border-radius: 10px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--green-500); outline-offset: 1px;
}
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.field.check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.field.check input { margin-top: 8px; width: 18px; height: 18px; flex: none; }
.ltr { direction: ltr; text-align: left; letter-spacing: 0.12em; }
.radios ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.radios label { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.radios input { width: 18px; height: 18px; }

.btn-secondary { background: #fff; color: var(--green-700); border: 1px solid var(--green-700); }
.btn-secondary:hover { background: var(--green-100); color: var(--green-900); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.badge-ok { background: var(--green-100); border-color: var(--green-500); color: var(--green-900); }
.badge-bad { background: #f6dedb; border-color: var(--danger); color: var(--danger); }
.card + .card { margin-top: 12px; }
.card-new { border-color: var(--green-500); }
.narrow .card { margin-bottom: 12px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.tabs a {
  padding: 6px 14px; border-radius: 999px; background: var(--sand-100);
  border: 1px solid var(--sand-300); color: var(--ink); text-decoration: none; font-size: 0.9rem;
}
.tabs a.active { background: var(--green-700); border-color: var(--green-700); color: #fff; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); }
.table th, .table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--sand-300); font-size: 0.92rem; }
.table th { background: var(--sand-100); color: var(--muted); font-weight: 700; }
.site-footer a { color: var(--muted); }

/* --- M1.1: جستجو، کارت‌ها --- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search-form { display: flex; gap: 8px; margin: 12px 0 20px; }
.search-form input[type=search] {
  flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--sand-300); border-radius: 10px;
}
.search-form input[type=search]:focus { outline: 2px solid var(--green-500); outline-offset: 1px; }
.cards { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 20px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
.cards .card + .card { margin-top: 0; }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--green-700); }
.paths.three { grid-template-columns: 1fr; }
@media (min-width: 900px) { .paths.three { grid-template-columns: 1fr 1fr 1fr; } }

.muted { color: var(--muted); }

/* ---- ویزارد ثبت فایل (M2a) ---- */
.wizard-steps ol { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wizard-steps li a, .wizard-steps li span {
  display: inline-block; padding: 4px 12px; border: 1px solid var(--sand-300); border-radius: 999px;
  background: #fff; color: var(--ink); text-decoration: none; font-size: 0.9rem;
}
.wizard-steps li.current a, .wizard-steps li.current span {
  background: var(--green-700); border-color: var(--green-700); color: #fff; font-weight: 700;
}
.wizard-steps li.soon span { border-style: dashed; color: var(--muted); background: transparent; }
.wizard-card { max-width: 40rem; }
.choice-group { border: 1px solid var(--sand-300); border-radius: 10px; padding: 8px 14px 12px; margin: 0; background: #fff; }
.choice-group legend { font-weight: 700; padding: 0 6px; }
.choice-group > div, .choice-group > div > div { display: grid; gap: 6px; }
.choice-group label { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.choice-group input { width: 18px; height: 18px; }
.hint { color: var(--green-700); font-size: 0.9rem; margin: 2px 0 0; min-height: 0; }
.hint:empty, .error:empty { display: none; }
.warnings { list-style: none; margin: 0; padding: 0; color: var(--amber); }
.warnings li { margin: 4px 0; }
.autosave-status { min-height: 1.5em; font-size: 0.85rem; color: var(--muted); margin: 0; }
.autosave-status.ok { color: var(--green-700); }
.autosave-status.warn { color: var(--amber); }
.autosave-status.err { color: var(--danger); }
.completeness .bar { height: 10px; border-radius: 999px; background: var(--sand-100); overflow: hidden; margin: 6px 0 12px; }
.completeness .bar span { display: block; height: 100%; background: var(--green-500); }
.completeness .missing { margin: 0 0 12px; padding-inline-start: 20px; }
.completeness .missing.soft { color: var(--muted); }
.completeness .ok { color: var(--green-700); font-weight: 700; }
.missing-title { margin: 8px 0 4px; font-weight: 700; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-form select { padding: 4px 8px; border-radius: 8px; border: 1px solid var(--sand-300); background: #fff; font: inherit; }
.help-list { margin: 8px 0; padding-inline-start: 20px; color: var(--muted); font-size: 0.9rem; }

/* ---- عکس‌های فایل (M2b) ---- */
.btn-danger { background: #fff; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: #f6dedb; }
.photo-manager { margin: 0 0 20px; }
.upload-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.upload-form label.btn { cursor: pointer; }
.upload-form input[type=file]:focus-visible + .btn, .upload-form label.btn:focus-within { outline: 3px solid var(--green-500); }
.upload-status { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 6px; }
.upload-status li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--sand-300); border-radius: 8px; background: #fff; font-size: 0.9rem; }
.upload-status li.ok { border-color: var(--green-500); color: var(--green-900); }
.upload-status li.err { border-color: var(--danger); color: var(--danger); }
.upload-status li.warn { border-color: var(--amber); color: var(--amber); }
.photo-grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.photo-card { border: 1px solid var(--sand-300); border-radius: 12px; padding: 10px; background: #fff; display: grid; gap: 8px; align-content: start; }
.photo-card.is-main { border-color: var(--green-500); box-shadow: 0 0 0 2px var(--green-100); }
.photo-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: var(--sand-100); }
.photo-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.badge-main { background: var(--green-100); border-color: var(--green-500); color: var(--green-900); }
.badge-warn { background: #fdf0d5; border-color: var(--amber); color: var(--amber); }
.photo-edit { display: grid; gap: 6px; }
.photo-edit select, .photo-edit input[type=text] { width: 100%; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--sand-300); font: inherit; background: #fff; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.photo-actions form { margin: 0; }
.photo-actions .btn { padding: 6px 10px; font-size: 0.85rem; }
.photo-strip { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.photo-strip li { position: relative; }
.photo-strip img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--sand-300); display: block; }
.photo-strip .badge { position: absolute; top: 4px; inset-inline-start: 4px; }

/* --- بازبینی فایل (M2c-1) --- */
.notice-bad { background: #f6dedb; border-color: var(--danger); border-style: solid; color: var(--danger); }
.notice-bad .help { color: inherit; }
.sla { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.85rem; border: 1px solid transparent; }
.sla-ok { background: var(--green-100); border-color: var(--green-500); color: var(--green-900); }
.sla-warn { background: #fdf0d5; border-color: var(--amber); color: var(--amber); }
.sla-late { background: #f6dedb; border-color: var(--danger); color: var(--danger); font-weight: 700; }

.field-group { border: 1px solid var(--border, #d9d9d9); border-radius: 8px; padding: .75rem 1rem; margin: 0 0 1rem; }
.field-group legend { padding: 0 .4rem; font-weight: 600; }

/* مدارک خصوصی (M2d) */
.doc-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 12px; }
.doc-item { border: 1px solid var(--sand-300); border-radius: 12px; padding: 12px; background: #fff; }
.doc-item p { margin: 0 0 6px; }
.doc-item .inline-form { flex-wrap: wrap; margin-top: 6px; }


/* =====================================================================
   M3-0: اجزای صفحه‌های عمومی (کارت فایل، گالری، مهر، امضای مسئول، …)
   همه با ویژگی‌های منطقی (inline-start/end) تا راست‌چین بدون تکرار کار کند.
   ===================================================================== */

/* --- آیکن‌ها (اسپرایت درون‌صفحه‌ای: templates/includes/icons.html) --- */
.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; }
.i-fill { fill: currentColor; stroke: none; }

/* --- مهر ویتا: نشان تأیید (مدارک و اختیار عرضه) --- */
.seal { color: var(--seal); }
.badge-seal {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 12px 3px 10px; border-radius: 999px;
  background: var(--seal-tint); border: 1px solid #9fd8c0; color: #0a5a3f;
  font-size: 0.85rem; font-weight: 700; line-height: 1.7;
}
.badge-quiet { background: var(--surface); border-color: var(--line); color: var(--muted); font-weight: 500; }
.badge-info { background: var(--info-tint); border-color: #bcd0e0; color: #1d4466; }
.badge-sold { background: var(--ink-strong); border-color: var(--ink-strong); color: #fff; }

/* --- امضای مسئول: نام مشاور روی هر فایل --- */
.sig { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sig-avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand-strong); font-weight: 800; font-size: 1.05rem;
  border: 1px solid #c3d6d8;
}
.sig-text { min-width: 0; line-height: 1.5; }
.sig-name { display: block; font-weight: 700; color: var(--ink-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig-sub { display: block; font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig-seal { margin-inline-start: auto; flex: none; }

/* --- شبکه‌ی کارت‌ها --- */
.lgrid { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 0 0 24px; padding: 0; list-style: none; }
@media (min-width: 36rem) { .lgrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 62rem) { .lgrid { grid-template-columns: 1fr 1fr 1fr; } }

/* --- کارت فایل --- */
.lcard {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.lcard:hover { border-color: #aac0c1; box-shadow: var(--shadow-pop); }
.lcard-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--line-soft); }
.lcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lcard-media .ph { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 0.9rem; }
.lcard-deal {
  position: absolute; inset-block-start: 10px; inset-inline-start: 10px;
  padding: 2px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.95);
  color: var(--ink-strong); font-size: 0.82rem; font-weight: 700;
}
.lcard-star {
  position: absolute; inset-block-start: 8px; inset-inline-end: 8px; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.95); color: var(--ink-strong); cursor: pointer;
}
.lcard-star:hover { color: var(--amber); }
.lcard-star[aria-pressed="true"] { color: var(--amber); }
.lcard-star[aria-pressed="true"] .i { fill: currentColor; }
.lcard-body { display: grid; gap: 6px; padding: 14px 16px 12px; }
.lcard-price { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--ink-strong); line-height: 1.5; }
.lcard-price small { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.lcard-title { margin: 0; font-size: 0.95rem; font-weight: 500; color: var(--ink); }
.lcard-title a { color: inherit; text-decoration: none; }
.lcard-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* کل کارت قابل‌کلیک */
.lcard-specs { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.88rem; }
.lcard-specs li { display: inline-flex; align-items: center; gap: 6px; }
.lcard-place { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 0.88rem; }
.lcard-by { margin-top: auto; padding: 10px 16px 14px; border-top: 1px solid var(--line-soft); }
.lcard-sold .lcard-media img { filter: grayscale(0.85); opacity: 0.8; }

/* --- نوار فیلتر جستجو --- */
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; margin: 0 0 20px; display: grid; gap: 12px; }
.filters-row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (min-width: 48rem) { .filters-row { grid-template-columns: repeat(4, 1fr); } .filters-row-5 { grid-template-columns: repeat(5, 1fr); } }
.filters label { display: block; font-size: 0.85rem; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.filters select, .filters input[type=text], .filters input[type=number], .filters input[type=search] {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.filters-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 14px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); font-size: 0.9rem; text-decoration: none;
}
.chip[aria-current="true"], .chip.is-on { background: var(--ink-strong); border-color: var(--ink-strong); color: #fff; }
.result-count { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; }

/* --- صفحه‌بندی --- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.pager a, .pager span {
  display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none;
}
.pager [aria-current="page"] { background: var(--ink-strong); border-color: var(--ink-strong); color: #fff; font-weight: 700; }

/* --- صفحه‌ی فایل --- */
.lpage { display: grid; gap: 24px; }
@media (min-width: 62rem) { .lpage { grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; } .lpage-aside { position: sticky; inset-block-start: 16px; } }
.lpage-head { margin: 0 0 20px; }
.lpage-head h1 { margin: 6px 0 4px; font-size: 1.5rem; line-height: 1.6; }
.lpage-head .lcard-place { font-size: 0.95rem; }
.lpage-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.price-line { margin: 12px 0 0; font-size: 1.9rem; font-weight: 800; color: var(--ink-strong); line-height: 1.5; }
.price-line small { display: block; font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.price-sub { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* گالری: موبایل = نوار کشیدنی بدون JS؛ دسکتاپ = موزاییک */
.gallery { margin: 0 0 20px; padding: 0; list-style: none; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--r-md); }
.gallery li { flex: 0 0 88%; scroll-snap-align: center; position: relative; }
.gallery a, .gallery img { display: block; width: 100%; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); background: var(--line-soft); }
.gallery figcaption, .gallery .cap {
  position: absolute; inset-block-end: 8px; inset-inline-start: 8px; padding: 2px 10px; border-radius: 999px;
  background: rgba(32, 44, 51, 0.78); color: #fff; font-size: 0.8rem;
}
@media (min-width: 48rem) {
  .gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; overflow: hidden; aspect-ratio: 16 / 8; }
  .gallery li { flex: none; }
  .gallery li:first-child { grid-row: 1 / 3; }
  .gallery li, .gallery a, .gallery img { height: 100%; }
  .gallery img { aspect-ratio: auto; border-radius: 0; }
  .gallery li:nth-child(n+6) { display: none; }
}

/* خلاصه‌ی پنج‌ردیفی */
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0 0 20px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
@media (min-width: 40rem) { .specs { grid-template-columns: repeat(5, 1fr); } }
.spec { background: var(--surface); padding: 12px 14px; display: grid; gap: 2px; align-content: start; }
.spec-label { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); }
.spec-value { font-weight: 800; color: var(--ink-strong); line-height: 1.5; }

/* بخش‌های بازشونده */
.disclosure { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin: 0 0 10px; }
.disclosure summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; min-height: 52px; cursor: pointer; font-weight: 700; color: var(--ink-strong); list-style: none; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::after { content: ""; width: 10px; height: 10px; border-inline-end: 2px solid var(--muted); border-block-end: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.15s; flex: none; margin-block-end: 4px; }
.disclosure[open] summary::after { transform: rotate(-135deg); margin-block-end: -4px; }
.disclosure-body { padding: 0 16px 14px; }
.kv { display: grid; grid-template-columns: minmax(6rem, 9rem) 1fr; gap: 8px 16px; margin: 0; align-items: baseline; }
.kv dt { color: var(--muted); font-size: 0.92rem; }
.kv dd { margin: 0; font-weight: 500; }
.kv .unknown { color: var(--muted); font-weight: 400; }

/* پیام‌های ایستا: «چه چیزی باید بدانید»، پیش‌نمایش، واگذارشد */
.callout { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); border-inline-start-width: 5px; margin: 0 0 16px; }
.callout h2, .callout h3 { margin: 0; font-size: 1rem; }
.callout p { margin: 0; color: var(--ink); }
.callout ul { margin: 0; padding-inline-start: 20px; }
.callout-warn { background: var(--amber-tint); border-color: #e2c98c; border-inline-start-color: var(--amber); }
.callout-info { background: var(--info-tint); border-color: #bcd0e0; border-inline-start-color: #2d6a9f; }
.callout-bad { background: var(--danger-tint); border-color: #e3b3ae; border-inline-start-color: var(--danger); }
.preview-bar { position: sticky; inset-block-start: 0; z-index: 20; background: var(--ink-strong); color: #fff; padding: 8px var(--gutter); text-align: center; font-size: 0.9rem; }
.preview-bar a { color: #fff; }

/* کارت مشاور (ستون کناری) و نوار تماس چسبیده در موبایل */
.agent-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 14px; }
.agent-card .sig-avatar { width: 52px; height: 52px; font-size: 1.25rem; }
.agent-card .sig-name { white-space: normal; font-size: 1.05rem; }
.agent-note { margin: 0; font-size: 0.85rem; color: var(--muted); }
.contactbar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(32, 44, 51, 0.1); }
.contactbar-price { flex: 1; min-width: 0; font-weight: 800; color: var(--ink-strong); line-height: 1.4; }
.contactbar-price small { display: block; font-weight: 500; font-size: 0.78rem; color: var(--muted); }
.contactbar .btn { flex: none; }
.has-contactbar { padding-block-end: 84px; }
@media (min-width: 62rem) { .contactbar { display: none; } .has-contactbar { padding-block-end: 0; } }

/* دکمه‌های کمکی */
.btn-lg { min-height: 52px; padding: 10px 24px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); border-color: var(--brand-tint); color: var(--brand-strong); }
.btn-icon { width: 44px; padding: 0; }
.btn-secondary { border-color: var(--brand); }

/* حالت خالی */
.empty { text-align: center; padding: 40px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.empty h2 { margin: 0 0 6px; font-size: 1.2rem; }
.empty p { margin: 0 auto 16px; max-width: 28rem; color: var(--muted); }

/* صفحه‌ی نمونه‌ی اجزا (/dev/ui) */
.ui-section { margin: 0 0 40px; }
.ui-section > h2 { margin: 0 0 14px; font-size: 1.2rem; padding-block-end: 8px; border-bottom: 1px solid var(--line); }
.ui-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.swatch { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); font-size: 0.82rem; }
.swatch i { display: block; height: 52px; }
.swatch span { display: block; padding: 6px 10px; line-height: 1.5; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.lcard-deal.badge-sold { background: var(--ink-strong); color: #fff; }
.sw-bg { background: var(--bg); } .sw-surface { background: var(--surface); } .sw-ink { background: var(--ink-strong); }
.sw-brand { background: var(--brand); } .sw-seal { background: var(--seal); } .sw-amber { background: var(--amber); } .sw-danger { background: var(--danger); }
.ui-frame { position: relative; border: 1px dashed var(--line); border-radius: var(--r-md); overflow: hidden; max-width: 26rem; }
.ui-frame .contactbar { position: static; display: flex; box-shadow: none; }


/* =====================  M3a — صفحه‌ی عمومی فایل  ===================== */
.lpage-narrow { max-width: 56rem; margin-inline: auto; }
.lp-code { margin-block-start: var(--sp-4); }
.lp-text { margin: 0 0 var(--sp-4); }
.lp-text h2 { margin: 0 0 var(--sp-1); font-size: 1.05rem; }
.lp-text p { margin: 0; }

/* گالری با تعداد کم عکس (دسکتاپ) */
.gallery-note { margin: calc(-1 * var(--sp-3)) 0 var(--sp-5); }
.gallery-empty { margin-block-end: var(--sp-5); padding-block: var(--sp-7); }
@media (min-width: 48rem) {
  .gallery-n1 { grid-template-columns: 1fr; grid-template-rows: 1fr; aspect-ratio: 16 / 9; }
  .gallery-n2 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr; }
  .gallery-n3 { grid-template-columns: 2fr 1fr; }
  .gallery-n4 { grid-template-columns: 2fr 1fr; grid-template-rows: repeat(3, 1fr); }
  .gallery-n4 li:first-child { grid-row: 1 / 4; }
}
.gallery-extra { display: none; margin-block-end: var(--sp-3); }
@media (min-width: 48rem) { .gallery-extra { display: block; } }
.photo-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: var(--sp-2); }
.photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); background: var(--line-soft); }

/* شناسنامه‌ی فایل: وضعیت هر بررسی جدا؛ سبز فقط برای بررسی واقعی ویتا */
.idcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4); margin: 0 0 var(--sp-4); }
.idcard h2 { margin: 0 0 var(--sp-1); font-size: 1.05rem; }
.idlist { margin: var(--sp-3) 0 0; padding: 0; list-style: none; display: grid; gap: 0; }
.idrow { display: grid; grid-template-columns: 1fr; gap: var(--sp-1); padding: var(--sp-3) 0; border-block-start: 1px solid var(--line-soft); }
.idrow:first-child { border-block-start: 0; padding-block-start: 0; }
.idtitle { font-weight: 700; color: var(--ink-strong); }
.idtext { color: var(--muted); font-size: 0.92rem; }
.idstate { display: inline-flex; align-items: center; gap: var(--sp-1); width: fit-content; padding: 2px var(--sp-3); border-radius: 999px; font-size: 0.82rem; font-weight: 700; border: 1px solid var(--line); color: var(--muted); background: var(--bg); }
.idrow-ok .idstate { background: var(--seal-tint); border-color: #9fd8c0; color: #0a5a3f; }
.idrow-neutral .idstate { background: var(--info-tint); border-color: #bcd0e0; color: #1d4466; }
@media (min-width: 40rem) {
  .idrow { grid-template-columns: 9rem 1fr; column-gap: var(--sp-4); align-items: baseline; }
  .idstate { grid-column: 1; grid-row: 1; }
  .idtitle { grid-column: 2; grid-row: 1; }
  .idtext { grid-column: 2; grid-row: 2; }
}
.agent-lic { display: flex; align-items: center; gap: var(--sp-2); margin: 0; font-size: 0.9rem; font-weight: 600; color: #0a5a3f; }
.agent-card .callout { margin: 0; }
/* تعداد فرد خلاصه‌ی مشخصات روی موبایل: آخرین خانه تمام‌عرض (بدون خانه‌ی خالی خاکستری) */
@media (max-width: 39.99rem) { .specs .spec:last-child:nth-child(odd) { grid-column: 1 / -1; } }


/* نمایشگر عکس (لایت‌باکس) */
html.lb-open { overflow: hidden; }
.lb { padding: 0; border: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: #08140f; color: #fff; overflow: hidden; }
.lb::backdrop { background: #08140f; }
.lb[open] { display: grid; grid-template-rows: auto 1fr; }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); }
.lb-count { font-weight: 700; }
.lb-btn { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.lb-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lb-btn .i { width: 24px; height: 24px; }
.lb-btn[hidden] { display: none; }
.lb-stage { margin: 0; min-height: 0; display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center; padding: 0 var(--sp-4) var(--sp-4); gap: var(--sp-2); }
.lb-img { max-width: 100%; max-height: calc(100vh - 9rem); max-height: calc(100dvh - 9rem); object-fit: contain; border-radius: var(--r-sm); }
.lb-caption { font-size: 0.9rem; color: rgba(255, 255, 255, 0.85); text-align: center; min-height: 1.5em; }
.lb-nav { position: absolute; inset-block-start: 50%; transform: translateY(-50%); z-index: 2; }
.lb-prev { inset-inline-start: var(--sp-3); }
.lb-next { inset-inline-end: var(--sp-3); }
.lb-prev .i { transform: scaleX(-1); }
@media (max-width: 47.99rem) { .lb-nav { inset-block-start: auto; inset-block-end: var(--sp-5); transform: none; } .lb-img { max-height: calc(100vh - 11rem); max-height: calc(100dvh - 11rem); } }


/* بلوک «لینک فایل» در خلاصه‌ی فایل */
.linkblock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4); margin: 0 0 var(--sp-5); }
.linkblock h2 { margin: 0 0 var(--sp-3); font-size: 1.05rem; }
.linkblock-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.linkblock-url { flex: 1 1 14rem; min-width: 0; min-height: 44px; padding: 0 var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); font: inherit; direction: ltr; text-align: left; }
.linkblock-share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: var(--sp-3) 0 0; }

/* --- M3c: جستجو و فهرست --- */
.filters-sheet > summary { list-style: none; cursor: pointer; display: flex; justify-content: center; width: 100%; }
.filters-sheet > summary::-webkit-details-marker { display: none; }
.filters-sheet[data-wide] > summary { display: none; } /* فقط وقتی JS فعال و صفحه عریض است؛ وگرنه دکمه می‌ماند */
.filters-body { display: grid; gap: 14px; margin-top: 12px; }
.plans { margin: 18px 0; }
.plans h2 { font-size: 1.1rem; margin: 0 0 8px; }
.plan-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
.plan-grid li { margin: 0; }
.plan-grid a { display: block; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 6px; }
.plan-grid img { display: block; width: 100%; height: auto; object-fit: contain; }
.plan-grid .cap { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
@media (min-width: 48rem) { .plan-grid { grid-template-columns: 1fr 1fr; } }
.filters-pro { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.filters-pro > summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.filters-pro-area { padding: 8px 0 0; max-width: 24rem; }
.filters-pro-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; align-items: end; padding: 8px 0 4px; }
.filters-range { margin: 0; padding: 0; border: 0; min-width: 0; }
.filters-range legend { padding: 0; font-size: 0.85rem; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.filters-pair { display: flex; align-items: center; gap: 8px; }
.filters-pair input[type=text] { flex: 1 1 0; min-width: 0; text-align: left; }
.fchecks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.filters .fcheck { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; font-size: 0.95rem; color: var(--ink); cursor: pointer; }
.fcheck input { width: 20px; height: 20px; accent-color: var(--brand); }
.result-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin: 0 0 12px; }
.result-bar .result-count { margin: 0; }
.result-bar .chips { margin: 0; }
.chips-center { justify-content: center; }
.lcard-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.lcard-body .help { margin: 0; }
.lcard-body .price-sub { margin: 0; }
.chip .i { width: 14px; height: 14px; }

/* --- M3d: صفحه‌ی اصلی --- */
.quick-search .filters-row { align-items: end; }
.quick-go .btn { min-height: 44px; }
.how { margin: 32px 0 24px; }
.how-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: how; }
.how-steps li { position: relative; padding: 14px 16px 14px 16px; padding-inline-start: 64px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); counter-increment: how; }
.how-steps li::before {
  content: counter(how, persian); position: absolute; inset-inline-start: 16px; inset-block-start: 12px;
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: var(--ink-strong); color: #fff; font-weight: 800;
}
@media (min-width: 48rem) { .how-steps { grid-template-columns: repeat(3, 1fr); } }
.paths { margin: 28px 0; }
@media (min-width: 62rem) { .paths { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 47.99rem) { .quick-go { grid-column: 1 / -1; } }

/* --- M3e: ★ و نوار پایین موبایل --- */
a.lcard-star { text-decoration: none; }
.lcard-starform { margin: 0; }
.starform { margin: 8px 0 0; }
.star-btn[aria-pressed="true"] { color: var(--amber); border-color: var(--amber); }
.star-btn[aria-pressed="true"] .i { fill: currentColor; }
.bottom-nav {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 25; display: flex;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-block-end: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(32, 44, 51, 0.08);
}
.bottom-nav a {
  flex: 1 1 0; min-width: 0; min-height: 56px; display: grid; place-items: center; align-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 0.78rem; font-weight: 500;
}
.bottom-nav a .i { width: 22px; height: 22px; }
.bottom-nav a[aria-current="page"] { color: var(--brand); font-weight: 700; }
.bottom-nav a:focus-visible { outline-offset: -3px; }
.has-bottomnav { padding-block-end: calc(64px + env(safe-area-inset-bottom)); }
@media (min-width: 48rem) { .bottom-nav { display: none; } .has-bottomnav { padding-block-end: 0; } }
.statbox { margin: 16px 0; }
.stat-row { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 8px 0; padding: 0; list-style: none; }
.stat-row strong { font-size: 1.5rem; color: var(--ink-strong); margin-inline-end: 4px; }
.gone-list { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.gone p { margin: 0 0 8px; }

/* M3g: صفحه‌های ثابت */
.narrow.prose { max-width: 40rem; }
.prose h2 { font-size: 1.15rem; line-height: 1.7; color: var(--green-900); margin: 24px 0 6px; }
.prose h3 { font-size: 1rem; line-height: 1.7; margin: 18px 0 4px; }
.prose p, .prose li { line-height: 2; }
.prose ul { padding-inline-start: 22px; margin: 0 0 12px; }
.draft-note { background: var(--surface-2, #f3f4f2); border-radius: 8px; padding: 8px 12px; }

/* M3h: فیلتر فشرده‌ی دسکتاپ. زیر ۶۲rem همان ستون موبایل می‌ماند */
@media (min-width: 62rem) {
  .filters-body { grid-template-columns: repeat(12, 1fr); gap: 12px 16px; align-items: end; }
  .filters-body > .filters-row:first-child { grid-column: 1 / -1; }
  .filters-body > .filters-range { grid-column: span 4; }
  .filters-body > .filters-row:not(:first-child) { grid-column: span 4; grid-template-columns: 1fr 1fr; }
  .filters-body > .filters-feat, .filters-body > .filters-note { grid-column: 1 / -1; }
  .filters-body > .filters-pro { grid-column: 1 / -1; }
  .filters-pro-grid { grid-template-columns: repeat(4, 1fr); gap: 12px 16px; }
  .filters-body > .filters-flags { grid-column: span 8; }
  .filters-body > .filters-actions { grid-column: span 4; justify-content: flex-end; }
  .filters-feat .fchecks { column-gap: 22px; }
}
@media (min-width: 62rem) and (pointer: fine) { .filters .fcheck { min-height: 34px; } }
.starlink { margin-inline-start: 10px; font-size: 0.9rem; }
.starform { display: flex; flex-wrap: wrap; align-items: center; }

/* M3h: سربرگ موبایل یک ردیف قابل‌کشیدن (پایین هم نوار ناوبری دارد)؛ هدف لمسِ لینک‌های پایین‌صفحه بزرگ‌تر */
@media (max-width: 47.99rem) {
  .site-header .container { row-gap: 2px; padding-block: 8px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 18px; width: 100%; margin-inline: 0; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; white-space: nowrap; padding-block: 10px; }
}
.site-footer a { display: inline-block; padding-block: 8px; }

/* ---- اتاق نمایش مشتری (M5a): صفحه‌ی قفل‌شده بدون هدر و منو ---- */
.room-body { margin: 0; background: var(--bg, #fff); color: var(--ink); }
.room-main { padding-block: 20px 28px; }
.room-head { margin: 0 0 16px; }
.room-head h1 { margin: 0 0 8px; }
.room-message { margin: 0 0 8px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); line-height: 1.9; }
.room-back { margin: 0 0 12px; }
.room-note { margin: 4px 0 0; font-size: 0.92rem; color: var(--ink); }
.callout.room-note { margin: 0 0 16px; }
.room-agent { margin-block: 8px 24px; max-width: 26rem; }
.room-footer { padding: 14px var(--gutter) 22px; text-align: center; color: var(--muted); font-size: 0.82rem; }
.room-footer p { margin: 0 0 4px; }
.room-closed { max-width: 30rem; margin-inline: auto; text-align: center; }
.lcard-gone { background: var(--line-soft); border-color: var(--line); color: var(--muted); }
.lcard-gone .lcard-media { background: var(--line); }
.lcard-gone .lcard-title { color: var(--muted); }
.agent-lic { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.agent-note { margin: 0; font-size: 0.8rem; color: var(--muted); }
.react { margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); display: grid; gap: 10px; }
.react h2 { margin: 0; font-size: 1.05rem; }
.react .help { margin: 0; }
.react-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.react-form select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--sand-300); background: #fff; font: inherit; }
.react-form button[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); }
/* پنل مشاور */
.room-items { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }
.room-items .card + .card { margin-top: 0; }
.room-note-form { margin-top: 8px; flex-wrap: wrap; }
.room-note-form input { flex: 1 1 14rem; min-width: 0; }
.room-add { margin: 12px 0; flex-wrap: wrap; }

/* --- M6c: صفحه‌ی سرنخ، فهرست سرنخ‌ها، تقویم شمسی و ساعت ۲۴ساعته --- */
.lead-page { display: grid; gap: var(--sp-4); }
.lead-page .card + .card, .lead-main .card + .card, .lead-side .card + .card { margin-top: 0; }
.lead-main, .lead-side { display: grid; gap: var(--sp-4); align-content: start; min-width: 0; }
.crumb { margin: 0; }
.lead-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.lead-title { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.lead-title h1 { margin: 0; font-size: 1.35rem; line-height: 1.4; }
.lead-title .help { margin: 2px 0 0; }
.lead-avatar {
  display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand-strong); font-weight: 700; font-size: 1.25rem;
}
.lead-avatar.sm { width: 40px; height: 40px; font-size: 1.05rem; }
.lead-status { font-size: 0.9rem; padding: 4px 14px; }
.lead-grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 56rem) { .lead-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }

.stepper { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; list-style: none; margin: 0; padding: var(--sp-4) var(--sp-3); }
.stepper li { position: relative; padding-top: 28px; text-align: center; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.stepper li::before {
  content: ""; position: absolute; top: 4px; left: 50%; width: 16px; height: 16px; margin-left: -8px;
  border-radius: 50%; background: #fff; border: 2px solid var(--line); z-index: 1;
}
.stepper li::after { content: ""; position: absolute; top: 11px; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--line); }
.stepper li:last-child::after { display: none; }
.stepper li.done { color: var(--ink); }
.stepper li.done::before { background: var(--brand); border-color: var(--brand); }
.stepper li.done::after { background: var(--brand); }
.stepper li.current { color: var(--ink-strong); font-weight: 700; }
.stepper li.current::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
@media (min-width: 40rem) { .stepper li { font-size: 0.88rem; } }

.bubble {
  margin: 0 0 var(--sp-3); padding: var(--sp-3) var(--sp-4); background: var(--bg); border-radius: var(--r-md);
  border-inline-start: 4px solid var(--line); line-height: 1.9; overflow-wrap: anywhere;
}
.bubble-own { background: var(--brand-tint); border-inline-start-color: var(--brand); }
.contact-box { margin-top: var(--sp-2); }
.contact-box .btn { width: 100%; }
@media (min-width: 40rem) { .contact-box .btn { width: auto; } }
.quick-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }

.panel { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-top: var(--sp-3); }
.panel > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 48px;
  padding: 0 var(--sp-4); cursor: pointer; font-weight: 700; color: var(--ink-strong); list-style: none;
}
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary::after {
  content: ""; width: 9px; height: 9px; flex: none; border-inline-end: 2px solid var(--muted);
  border-block-end: 2px solid var(--muted); transform: rotate(45deg); margin-block-end: 4px; transition: transform 0.15s;
}
.panel[open] > summary::after { transform: rotate(-135deg); margin-block-end: -4px; }
.panel > .form { padding: 0 var(--sp-4) var(--sp-4); margin: 0; }
.panel-flat { border: 0; margin: 0; background: transparent; }
.panel-flat > summary { padding: 0; }
.panel-flat > .form { padding: var(--sp-3) 0 0; }
.card-visit { border-color: var(--brand); background: var(--brand-tint); }
.card-visit .panel { background: var(--surface); }
.visit-when { margin: 0 0 var(--sp-2); font-size: 1.25rem; font-weight: 700; color: var(--brand-strong); }

.field-row { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; align-items: end; }
@media (min-width: 30rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.timepick { border: 0; margin: 0; padding: 0; min-width: 0; }
.timepick legend { display: block; font-weight: 700; padding: 0; margin-bottom: 4px; }
.timepick-box { display: flex; align-items: center; gap: var(--sp-2); direction: ltr; }
.timepick-box select { flex: 1; min-width: 0; text-align: center; }

.jdate { position: relative; }
.jdate-box { display: flex; gap: var(--sp-2); }
.jdate-box input { flex: 1; min-width: 0; }
.jdate:not(.jdate-ready) .jdate-btn { display: none; }
.jdate-pop {
  position: absolute; z-index: 30; inset-inline-start: 0; top: calc(100% + 6px); width: min(21rem, 90vw);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-pop); padding: var(--sp-3);
}
.jdate-pop[hidden] { display: none; }
.jdate-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--sp-3); }
.jdate-chip, .jdate-nav {
  min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 0.85rem; cursor: pointer;
}
.jdate-chip:hover, .jdate-nav:hover { background: var(--brand-tint); border-color: var(--brand); }
.jdate-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.jdate-title { color: var(--ink-strong); }
.jdate-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.jdate-dow { padding: 4px 0; font-size: 0.8rem; color: var(--muted); }
.jdate-day {
  min-height: 40px; border: 1px solid transparent; border-radius: 10px; background: transparent;
  color: var(--ink); font: inherit; cursor: pointer;
}
.jdate-day:hover:not(:disabled) { background: var(--brand-tint); }
.jdate-day:disabled { color: #a9b3ae; cursor: not-allowed; }
.jdate-day.is-today { border-color: var(--brand); }
.jdate-day.is-selected { background: var(--brand); color: #fff; font-weight: 700; }
.jdate button:focus-visible, .timepick select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.lead-stats { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin: 0 0 var(--sp-4); padding: 0; list-style: none; }
.lead-stats li { flex: 1 1 6.5rem; padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.lead-stats strong { display: block; font-size: 1.6rem; color: var(--ink-strong); line-height: 1.3; }
.lead-stats span { font-size: 0.85rem; color: var(--muted); }
.lead-stats .is-hot { border-color: var(--amber); background: var(--amber-tint); }
.lead-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.lead-row { margin: 0; }
.lead-link {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-3) var(--sp-4); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); color: inherit; text-decoration: none;
}
.lead-link:hover { border-color: var(--brand); box-shadow: var(--shadow-pop); }
.lead-row.is-unseen .lead-link { border-color: var(--amber); background: var(--amber-tint); }
.lead-row-main { min-width: 0; }
.lead-row-main strong { display: block; color: var(--ink-strong); }
.lead-row-main .help { display: block; margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-row-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.lead-row-meta .help { margin: 0; }
@media (min-width: 40rem) {
  .lead-link { grid-template-columns: auto minmax(0, 1fr) auto; }
  .lead-row-meta { grid-column: auto; display: grid; justify-items: end; gap: 4px; text-align: end; }
}

/* A2: مقایسه‌ی ★ها */
.cmp-prefs { display: grid; gap: 10px; margin-block: 16px; }
.cmp-pref { border: 0; padding: 0; margin: 0; }
.cmp-pref legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.cmp-radios { display: flex; gap: 14px; flex-wrap: wrap; }
.cmp-radios label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.cmp-wrap { overflow-x: auto; margin-block: 16px; border: 1px solid var(--sand-300); border-radius: 12px; background: #fff; }
.cmp { border-collapse: collapse; min-width: 100%; }
.cmp th, .cmp td { padding: 10px 12px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--sand-300); min-width: 9.5rem; }
.cmp thead th { background: var(--sand-100); }
.cmp tbody th { background: var(--sand-100); font-weight: 700; white-space: nowrap; }
.cmp-code { display: block; color: var(--muted); font-size: 0.8rem; direction: ltr; text-align: end; }
.cmp-score td { font-size: 1.05rem; }
.cmp-top { background: var(--green-100); }
.chip-on { background: var(--green-900); color: #fff; border-color: var(--green-900); }
/* A2-3: میان‌برهای صفحه‌ی اصلی */
.shortcuts { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin-block: 12px; }
.next-visit { flex: 1 1 100%; margin-top: 4px; }
.next-visit h2 { font-size: 1.05rem; margin: 0 0 6px; }
/* A3: دفتر من */
.row-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-block: 8px; }
.row-actions p, .row-actions > span { margin: 0; flex: 1 1 14rem; }
.row-actions form { margin: 0; }
.plain { list-style: none; margin: 0; padding: 0; }
/* A3: رویدادهای درخواست مشاور */
.events { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: 6px; }
.events .when { color: var(--muted); font-size: 0.85rem; margin-inline-end: 6px; }
/* =====================================================================
   فاز UI (۱۴۰۵/۰۹/۰۱): «مه و جنگل گیلان» — Hero، سربرگ، کارت‌ها.
   همه‌چیز فقط CSS است (CSP-safe)، سبک و با احترام به prefers-reduced-motion.
   ===================================================================== */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px); }
.site-header .container { padding-block: 8px; }
.brand { font-size: 1.5rem; }
.brand::before { border-width: 3px; }


.lcard { transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s; }
.lcard:hover { box-shadow: 0 10px 26px rgba(32, 44, 51, 0.10); border-color: var(--brand-tint); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .lcard:hover { transform: none; } }
.card { box-shadow: 0 1px 0 rgba(32, 44, 51, 0.02); }
.btn { min-height: 44px; border-radius: 10px; }
.site-footer { background: linear-gradient(180deg, var(--surface), var(--cream)); }

/* کارت‌های هم‌قد در شبکه */
.lgrid > li { display: flex; }
.lgrid > li > .lcard { flex: 1; }
.lcard-media { flex: none; }
.lcard-body { flex: 1 1 auto; align-content: start; }
/* فرم‌های درون‌خطی: روی موبایل ستونی و هیچ‌وقت عریض‌تر از قاب (گزینه‌ی بلند select نباید صفحه را گسترش دهد) */
.form-inline { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.form-inline > * { min-width: 0; max-width: 100%; }
.form-inline select, .form-inline input:not([type="checkbox"]):not([type="radio"]) { width: 100%; max-width: 100%; }
@media (min-width: 40rem) { .form-inline select, .form-inline input:not([type="checkbox"]):not([type="radio"]) { width: auto; min-width: 12rem; } }
.form-inline label { flex: 1 1 100%; }
@media (min-width: 40rem) { .form-inline label { flex: none; } }
select { max-width: 100%; text-overflow: ellipsis; }
/* M4-1: تور عکس */
.tour-stage { margin: 0 0 12px; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.tour-stage img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.tour-stage figcaption { padding: 10px 14px; }
.tour-nav { display: flex; gap: 10px; margin-bottom: 12px; }
.tour-nav .btn { flex: 1; }
.tour-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tour-map { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.scene-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; margin-bottom: 10px; }
.scene-row img, .scene-pick img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); }
.scene-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); list-style: none; margin: 0; padding: 0; }
@media (max-width: 36rem) { .scene-row { grid-template-columns: 90px 1fr; } }
.save-search { margin-block: 8px 12px; }
.card-hl { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

/* شعار بلند ۱۴۰۵/۰۹/۰۲: در سربرگ فقط روی صفحه‌ی پهن */
@media (max-width: 63.99rem) { .site-header .tagline { display: none; } }

/* اتاق ← حساب مشتری */
.room-account { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; padding-block: 12px; border-top: 1px solid var(--line-soft); font-size: 0.92rem; }

/* =====================================================================
   V5 (۱۴۰۵/۰۹/۰۲): هم‌راستا با ماکت — سربرگ کم‌ارتفاع با لوگوی مربع‌گرد، Hero کم‌ارتفاع با عکس واقعی فایل،
   بنر «بازدید پیش رو»، کارت‌های مسیر، جستجوی سریع و کارت فایل. بدون حرکت پیوسته، بدون منبع بیرونی.
   ===================================================================== */
:root { --line-ctl: #d3d9d7; }

/* --- سربرگ --- */
.site-header { background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header .container { padding-block: 0; min-height: 66px; gap: 6px 16px; }
.brand { gap: 10px; font-size: 1.4rem; color: var(--ink); }
.brand::before { content: none; }
.brand-mark {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  border-radius: 10px 10px 10px 4px; background: var(--brand); color: #fff; font-size: 1.1rem; font-weight: 800; line-height: 1;
}
.nav { gap: 4px; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; border-bottom: 0; font-size: 0.9rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand); }
.nav a.nav-fav { border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; }
.nav a.nav-fav:hover { background: var(--brand-tint); }
.mode-menu summary {
  padding: 7px 12px; border-radius: 10px; background: var(--surface); color: var(--brand-strong);
  border: 1px solid var(--line-ctl); font-weight: 700; font-size: 0.85rem;
}
.mode-list button { border-radius: 10px; border-color: var(--line-ctl); }
.mode-list button[aria-current="true"] { background: var(--brand); border-color: var(--brand); }
@media (max-width: 47.99rem) {
  .site-header .container { min-height: 0; padding-block: 8px; }
  .nav { gap: 6px; }
}

/* --- بنر «بازدید پیش رو» --- */
.active-visit {
  display: flex; align-items: center; gap: 14px; margin: 0 0 12px; padding: 11px 15px;
  background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--coral); border-radius: 12px;
}
.visit-clock { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--coral-tint); color: var(--coral-ink); }
.visit-clock .i { width: 22px; height: 22px; }
.active-visit-text { flex: 1; min-width: 0; }
.eyebrow { display: block; margin: 0; color: var(--brand); font-size: 0.78rem; font-weight: 700; line-height: 1.6; }
.active-visit strong { display: block; color: var(--ink-strong); }
.visit-time { color: var(--coral-ink); font-weight: 800; }
.active-visit .help { margin: 0; }
@media (max-width: 40rem) { .active-visit { flex-wrap: wrap; } .active-visit .btn { width: 100%; } }

/* --- Hero --- */
.hero-v5 {
  display: grid; grid-template-columns: 1fr; margin: 0 0 var(--sp-5); overflow: hidden;
  border: 1px solid #e8e9e3; border-radius: 16px; background: #f0f2ee;
}
.hero-v5 .hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 22px 20px 24px; }
.hero-v5 h1 { margin: 4px 0 10px; font-size: 1.5rem; line-height: 1.75; max-width: 30rem; }
.hero-v5 .hero-copy > p { margin: 0 0 16px; max-width: 32rem; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-art { position: relative; order: -1; margin: 0; min-height: 160px; background: var(--brand-tint); }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-note {
  position: absolute; inset-inline-end: 12px; inset-block-end: 12px; z-index: 1; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(32, 44, 51, 0.08); box-shadow: 0 4px 16px rgba(32, 44, 51, 0.08); font-size: 0.82rem;
}
.hero-note span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-strong); font-weight: 700; }
.hero-note a { flex: none; font-weight: 700; }
@media (min-width: 48rem) {
  .hero-v5:not(.hero-noart) { grid-template-columns: 1.05fr 0.95fr; min-height: 252px; }
  .hero-v5 .hero-copy { padding: 28px 44px; }
  .hero-v5 h1 { font-size: 1.9rem; }
  .hero-art { order: 0; min-height: 0; }
  .hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(240, 242, 238, 0.78), rgba(240, 242, 238, 0.12) 58%, transparent); }
  .hero-note { z-index: 2; }
}

/* --- سرتیتر بخش‌ها --- */
.home-section { margin: 0 0 var(--sp-6); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.section-head h2 { margin: 0; font-size: 1.3rem; line-height: 1.5; }
.section-head p { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; }
.section-link { color: var(--brand); font-weight: 700; font-size: 0.9rem; text-decoration: none; white-space: nowrap; padding-block: 8px; }
.section-link:hover { text-decoration: underline; }

/* --- کارت‌های مسیر --- */
.mode-cards { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 0 0 var(--sp-6); }
@media (min-width: 48rem) { .mode-cards { grid-template-columns: repeat(3, 1fr); } }
.mode-card {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 16px; color: inherit; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.mode-card:hover { border-color: #aac0c1; box-shadow: 0 5px 16px rgba(32, 44, 51, 0.06); transform: translateY(-1px); }
.mode-icon { width: 45px; height: 45px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--brand-tint); color: var(--brand); }
.mode-icon .i { width: 22px; height: 22px; }
.mode-card strong { display: block; color: var(--ink-strong); }
.mode-card .sub { display: block; color: var(--muted); font-size: 0.82rem; line-height: 1.7; }
.mode-arrow { margin-inline-start: auto; color: var(--brand); }

/* --- جستجوی سریع و فرم‌ها --- */
.quick-search { margin-top: 0; box-shadow: none; border-radius: 14px; padding: 16px; }
.filters label { color: var(--ink); font-weight: 700; font-size: 0.8rem; }
.filters select, .filters input[type=text], .filters input[type=number], .filters input[type=search],
.field input[type=text], .field input[type=tel], .field textarea, .field select,
.search-form input[type=search] { border-color: var(--line-ctl); border-radius: 10px; background: #fbfcfb; }

/* --- کارت فایل --- */
.lcard { border-radius: 14px; box-shadow: 0 4px 16px rgba(32, 44, 51, 0.035); }
.lcard:hover { border-color: #cfd9d9; box-shadow: 0 8px 24px rgba(32, 44, 51, 0.08); }
.lcard-media { aspect-ratio: 16 / 11; }
.lcard-media::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, rgba(19, 35, 40, 0.22)); pointer-events: none; }
.lcard-deal { border-radius: 9px; padding: 3px 10px; font-size: 0.75rem; z-index: 1; }
.lcard-star { border-radius: 13px; color: var(--muted); }
.lcard-price { font-size: 1.12rem; color: var(--brand); }
.lcard-title { font-weight: 700; color: var(--ink-strong); }
.lcard-specs { gap: 6px; }
.lcard-specs li { padding: 3px 9px; border-radius: 8px; background: #f3f5f4; color: #4d5b61; font-size: 0.78rem; }
.lcard .sig-avatar { width: 32px; height: 32px; font-size: 0.9rem; background: #dbe7e8; border-color: transparent; }
.lcard .sig-sub { font-size: 0.75rem; }
.badge, .badge-seal { border-radius: 8px; }
.card { box-shadow: none; }
.site-footer { background: var(--surface); }

/* --- پنل‌های مالک و مشاور: ناوبری کناری (موبایل: نوار افقی کشویی) --- */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.side-nav { min-width: 0; }
@media (min-width: 48rem) { .workspace { grid-template-columns: 14.5rem minmax(0, 1fr); gap: 20px; } }
.workspace-main { min-width: 0; }
.workspace-main > h1 { font-size: 1.5rem; line-height: 1.6; color: var(--green-900); margin: 0 0 8px; }
.side-nav { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
@media (min-width: 48rem) { .side-nav { position: sticky; inset-block-start: 82px; } }
.side-nav h2 { margin: 0 6px 6px; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.side-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-nav a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.side-nav a:hover, .side-nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand); }
.side-nav a[aria-current="page"] { font-weight: 700; }
@media (max-width: 47.99rem) {
  .side-nav { padding: 6px; }
  .side-nav h2 { display: none; }
  .side-nav ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .side-nav ul::-webkit-scrollbar { display: none; }
  .side-nav li { flex: none; }
  .side-nav a { white-space: nowrap; padding: 9px 14px; }
}

/* روی موبایل، پیوندهای تکراری سربرگ وقتی نوار پنل زیرش هست پنهان می‌شوند */
@media (max-width: 47.99rem) { .nav a.nav-dup { display: none; } }
