/* inFinder — سایت عمومی (infinder.ir)
   جدا از app.css پنل. بدون CDN و بدون JS: همه‌چیز از همین سرور.
   رنگ‌ها: docs/public-site-plan.md — اصلی سبزآبی، تأکید کهربایی. */

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

:root {
  color-scheme: light;
  --primary: #0F766E;
  --primary-hover: #115E59;
  --primary-soft: #CCFBF1;
  --primary-ink: #FFFFFF;
  --accent: #F59E0B;
  --accent-hover: #D97706;
  --accent-ink: #0F172A;
  --accent-soft: #FEF3C7;
  --text: #0F172A;
  --muted: #64748B;
  --bg: #FFFFFF;
  --card: #F1F5F9;
  --line: #E2E8F0;
  --danger: #B91C1C;
  --danger-soft: #FEE2E2;
  --ok: #047857;
  --radius: 14px;
  --radius-sm: 9px;
  --shell: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --primary: #2DD4BF;
    --primary-hover: #5EEAD4;
    --primary-soft: #123C3A;
    --primary-ink: #0B1220;
    --accent: #FBBF24;
    --accent-hover: #FCD34D;
    --accent-ink: #0B1220;
    --accent-soft: #3A2E0E;
    --text: #E2E8F0;
    --muted: #94A3B8;
    --bg: #0B1220;
    --card: #131C2E;
    --line: #22304A;
    --danger: #F87171;
    --danger-soft: #3B1518;
    --ok: #34D399;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.8 "Vazirmatn", "Segoe UI", Tahoma, system-ui, sans-serif;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.4; margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 16px; }
.sr, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: var(--radius-sm); z-index: 10; }
.skip:focus { top: 8px; }

/* ─── سربرگ و پانویس ─── */

.site-head { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.head-inner { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.logo { font-weight: 800; font-size: 22px; color: var(--text); letter-spacing: -.3px; }
.logo:hover { text-decoration: none; }
.logo-in { color: var(--primary); }
.head-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.head-nav a { color: var(--text); padding: 6px 10px; border-radius: var(--radius-sm); font-size: 15px; white-space: nowrap; }
.head-nav a:hover { background: var(--card); text-decoration: none; }
/* در موبایل جا نیست؛ دکمه‌ی ثبت‌نام در خود صفحه‌ها هست */
.site-head .head-cta { display: none; }

.site-foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
.foot-inner { display: grid; gap: 18px; }
.foot-brand p { margin: 6px 0 0; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-nav a { color: var(--muted); }
.foot-note { margin: 0; font-size: 13px; }

/* ─── دکمه و برچسب ─── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 18px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font: inherit; font-weight: 700; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-sm { min-height: 36px; padding: 4px 12px; font-size: 14px; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--card); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px; font-size: 13px; line-height: 1.9;
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
}
.chip b { font-weight: 700; color: var(--muted); }
.chip-quiet { color: var(--muted); }
.chip-ok { color: var(--ok); border-color: var(--ok); font-weight: 700; }
.chip-link:hover { border-color: var(--primary); text-decoration: none; }
.chip-link.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chip-link.on b { color: inherit; }
.chip-plat { font-weight: 700; }
.plat-rubino { color: #7C3AED; border-color: #DDD6FE; }
.plat-instagram { color: #BE185D; border-color: #FBCFE8; }
.plat-eitaa { color: #C2410C; border-color: #FED7AA; }
@media (prefers-color-scheme: dark) {
  .plat-rubino { color: #C4B5FD; border-color: #4C3A7A; }
  .plat-instagram { color: #F9A8D4; border-color: #6B2148; }
  .plat-eitaa { color: #FDBA74; border-color: #6B3410; }
}

.ico { width: 1.1em; height: 1.1em; fill: currentColor; vertical-align: -0.15em; }
.ico-sm { width: .85em; height: .85em; }

.avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff;
}
.avatar-lg { width: 76px; height: 76px; font-size: 32px; }
.av-0 { background: #0F766E; }
.av-1 { background: #B45309; }
.av-2 { background: #1D4ED8; }
.av-3 { background: #9D174D; }
.av-4 { background: #4D7C0F; }
.av-5 { background: #6D28D9; }

/* ─── اعلان‌ها ─── */

.notice { border-radius: var(--radius-sm); padding: 12px 14px; margin: 16px 0; font-size: 15px; }
.notice ul { margin: 0; padding-inline-start: 18px; }
.notice-err { background: var(--danger-soft); color: var(--danger); }
.notice-flag { background: var(--accent-soft); }
.notice-draft { background: var(--accent-soft); font-size: 14px; }
.notice-links { display: block; margin-top: 4px; }

/* ─── خانه ─── */

.hero { background: linear-gradient(180deg, var(--primary-soft), var(--bg)); padding: 40px 0 32px; }
.hero h1 { font-size: 28px; font-weight: 800; }
.lead { color: var(--muted); font-size: 17px; margin: 10px 0 0; max-width: 680px; }
.hero-search { display: flex; gap: 8px; margin-top: 20px; max-width: 620px; }
.hero-search input {
  flex: 1; min-width: 0; min-height: 50px; padding: 0 16px; font: inherit; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
}
.hero-search .btn { min-height: 50px; }
.tier-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

.block { margin-top: 36px; }
.block-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.block-h { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.more { font-weight: 700; white-space: nowrap; }
.empty { color: var(--muted); background: var(--card); border-radius: var(--radius); padding: 22px; text-align: center; margin: 0; }

.niche-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.niche {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text);
  border: 1px solid transparent;
}
.niche:hover { border-color: var(--primary); text-decoration: none; }
.niche b { color: var(--muted); font-weight: 700; font-size: 14px; }

.teaser, .owner-box {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  display: grid; gap: 14px; align-items: center;
}
.teaser { background: var(--accent-soft); }
.teaser h2, .owner-box h2 { font-size: 20px; font-weight: 800; }
.teaser p, .owner-box p { margin: 6px 0 0; color: var(--text); }
.teaser .btn, .owner-box > .btn { justify-self: start; }

/* ─── کارت پیج ─── */

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.c-card {
  display: grid; gap: 12px; padding: 16px; border-radius: var(--radius);
  background: var(--card); color: var(--text); border: 1px solid transparent;
}
.c-card:hover { border-color: var(--primary); text-decoration: none; }
.c-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.c-id { min-width: 0; }
.c-name { font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* هندل لاتین است (dir=ltr) ولی چیدمان راست‌به‌چپ — پس راست‌چین، زیر اسم */
.c-handle { color: var(--muted); font-size: 14px; text-align: right; overflow-wrap: anywhere; }
.c-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.c-stats div { background: var(--bg); border-radius: var(--radius-sm); padding: 8px; text-align: center; }
.c-stats dt { color: var(--muted); font-size: 12px; }
.c-stats dd { margin: 0; font-weight: 800; font-size: 16px; }
.c-flag { font-size: 12px; color: var(--muted); }

/* ─── جست‌وجو ─── */

.page { padding-top: 20px; }
.page-h { font-size: 26px; font-weight: 800; margin-top: 6px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }

.filters {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
  background: var(--card); border-radius: var(--radius); padding: 14px; margin-top: 18px;
}
.filters label, .field label, .field legend { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.filters input, .filters select, .field input, .field textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.f-q { grid-column: 1 / -1; }
.f-go { grid-column: 1 / -1; }
.f-go .btn { width: 100%; }
.count { color: var(--muted); margin: 16px 0 10px; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }

/* ─── صفحه‌ی کریتور ─── */

.p-head { display: flex; gap: 16px; align-items: center; margin-top: 14px; }
.p-head h1 { font-size: 26px; font-weight: 800; overflow-wrap: anywhere; }
.p-id { min-width: 0; display: grid; gap: 6px; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 14px; display: grid; gap: 2px; }
.stat-k { color: var(--muted); font-size: 13px; }
.stat-v { font-size: 22px; font-weight: 800; }
.stat-v-sm { font-size: 15px; }
.fine { color: var(--muted); font-size: 13px; margin: 10px 0 0; font-weight: 400; }

.accounts, .posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.account, .post {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px;
}
.acc-n, .post-age { color: var(--muted); font-size: 14px; }
.acc-flag { font-size: 12px; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 0 8px; }
.acc-ok { color: var(--ok); font-weight: 700; }
.post-n { display: flex; flex-wrap: wrap; gap: 4px 12px; font-weight: 700; font-size: 14px; }
.post-link { margin-inline-start: auto; font-size: 14px; font-weight: 700; }
.booking { margin: 12px 0 0; }

.chart { margin: 0; background: var(--card); border-radius: var(--radius); padding: 14px; }
.chart svg { display: block; width: 100%; height: 120px; }
.chart-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-area { fill: var(--primary); opacity: .12; stroke: none; }
.chart figcaption { direction: ltr; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.chart .up { color: var(--ok); font-weight: 700; }
.chart .down { color: var(--danger); font-weight: 700; }

.locked { display: grid; gap: 10px; }
.lock-box { background: var(--card); border-radius: var(--radius); padding: 16px; border: 1px dashed var(--line); }
.lock-box h3 { font-size: 17px; font-weight: 800; }
.lock-box p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.ghost-lines { display: grid; gap: 6px; margin-top: 10px; }
.ghost-lines i { display: block; height: 10px; border-radius: 6px; background: var(--line); }
.ghost-lines i:nth-child(1) { width: 70%; }
.ghost-lines i:nth-child(2) { width: 45%; }
.ghost-lines i:nth-child(3) { width: 58%; }
.lock-cta { justify-self: start; }
.owner-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── فرم‌ها و متن‌ها ─── */

.narrow { max-width: 720px; }
.form { display: grid; gap: 14px; margin-top: 18px; }
.field { margin: 0; border: 0; padding: 0; }
.field textarea { min-height: 96px; resize: vertical; }
.opt { color: var(--muted); font-size: 12px; }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input, .radio input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--primary); flex: none; }
.radio + .radio { margin-top: 6px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.done .lead { margin-bottom: 18px; }

.legal h2 { font-size: 19px; font-weight: 800; margin-top: 28px; }
.legal ul, .legal ol { padding-inline-start: 22px; }
.legal li + li { margin-top: 6px; }

/* ─── صفحه‌های بزرگ‌تر ─── */

@media (min-width: 640px) {
  .site-head .head-cta { display: inline-flex; }
  .hero { padding: 64px 0 48px; }
  .hero h1 { font-size: 38px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .niche-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .locked { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lock-cta { grid-column: 1 / -1; }
  .teaser, .owner-box { grid-template-columns: 1fr auto; }
  .owner-box > .btn, .teaser .btn { justify-self: end; }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-inner { grid-template-columns: 1fr 1fr; }
  .foot-note { grid-column: 1 / -1; }
}

@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .niche-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filters { display: flex; flex-wrap: wrap; align-items: flex-end; }
  .filters > div { flex: 1 1 130px; }
  .filters > .f-q { flex: 2 1 220px; }
  .filters > .f-go { flex: 0 0 auto; }
}
