/* سنجه — one stylesheet for the public site, the sellers' panel and the
   offices' dashboard. RTL, self-hosted Vazirmatn, no framework. */

@font-face { font-family: "Vazirmatn"; font-weight: 400; font-display: swap;
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 700; font-display: swap;
  src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"); }
@font-face { font-family: "Vazirmatn"; font-weight: 900; font-display: swap;
  src: url("../fonts/Vazirmatn-Black.woff2") format("woff2"); }

:root {
  --brand: #0f4c5c; --brand-2: #16677b; --brand-soft: #e3eff1;
  --accent: #e36414; --accent-soft: #fff1e2;
  --good: #268754; --good-soft: #e3f3ea; --bad: #b42318; --bad-soft: #fde8e6;
  --ink: #1b1f24; --muted: #6e757d; --line: #e2ded6; --bg: #f7f5f0; --card: #ffffff;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(15,76,92,.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Vazirmatn", Tahoma, sans-serif; color: var(--ink); background: var(--bg);
  line-height: 1.85; font-size: 16px; direction: rtl; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.45; margin: 0 0 .6em; }
h1 { font-weight: 900; font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-weight: 900; font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-weight: 700; font-size: 1.15rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
.num { font-feature-settings: "tnum"; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
code { background: #eee9df; padding: 0 .35em; border-radius: 6px; font-size: .92em; direction: ltr; unicode-bidi: embed; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* ---------- header / footer ---------- */
.site-head { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.35rem; color: var(--brand); }
.logo:hover { text-decoration: none; }
.logo img { width: 34px; height: 34px; }
.logo small { font-weight: 400; font-size: .8rem; color: var(--muted); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-inline-start: auto; align-items: center; }
.nav a { padding: 6px 12px; border-radius: 10px; color: var(--ink); }
.nav a:hover, .nav a.on { background: var(--brand-soft); text-decoration: none; color: var(--brand); }
.site-foot { margin-top: 64px; background: var(--brand); color: #d2e8ec; padding: 36px 0 28px; font-size: .92rem; }
.site-foot a { color: #fff; }
.site-foot .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }

/* ---------- buttons, forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border-radius: 12px;
  border: 1px solid transparent; background: var(--brand); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
  line-height: 1.6; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--brand-2); text-decoration: none; color: #fff; }
.btn.accent { background: var(--accent); } .btn.accent:hover { background: #c9550f; }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); color: var(--brand); }
.btn.light { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.light:hover { background: #f0ede6; color: var(--ink); }
.btn.danger { background: var(--bad); }
.btn.sm { padding: 4px 12px; font-size: .88rem; border-radius: 9px; }
.btn.lg { padding: 13px 26px; font-size: 1.08rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }
label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 4px; }
label .hint { font-weight: 400; color: var(--muted); }
input:not([type]), input[type=text], input[type=password], input[type=tel], input[type=number], input[type=search], input[type=date], input[type=email], input[type=url],
select, textarea { width: 100%; font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand-2); }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 14px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; align-items: end; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.check input { width: auto; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html, body { overflow-x: clip; }

/* ---------- cards, grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.stat .label { color: var(--muted); font-size: .88rem; }
.stat .value { font-size: 1.6rem; font-weight: 900; color: var(--brand); line-height: 1.5; }
.stat .sub { font-size: .82rem; color: var(--muted); }
.stat.warn .value { color: var(--accent); }

.badge { display: inline-block; padding: 1px 10px; border-radius: 99px; font-size: .8rem; font-weight: 700;
  background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.grey { background: #eeeae2; color: var(--muted); }

.flash { padding: 10px 16px; border-radius: 12px; margin: 12px 0; border: 1px solid; }
.flash.ok { background: var(--good-soft); border-color: #b9dfc9; color: #17573a; }
.flash.error { background: var(--bad-soft); border-color: #f4c3bd; color: var(--bad); }
.note { background: var(--accent-soft); border-inline-start: 4px solid var(--accent); padding: 10px 16px; border-radius: 10px; }
.note.info { background: var(--brand-soft); border-color: var(--brand); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
th { font-weight: 700; color: var(--muted); font-size: .85rem; background: #faf8f4; white-space: nowrap; }
tr:hover td { background: #fcfbf8; }
td.n, th.n { text-align: left; direction: ltr; font-feature-settings: "tnum"; white-space: nowrap; }
tr.hl td { background: var(--accent-soft) !important; }

/* ---------- public: hero, sections ---------- */
.hero { background: linear-gradient(160deg, var(--brand) 0%, #0b3a47 100%); color: #fff; padding: 64px 0 56px; }
.hero h1 { color: #fff; max-width: 820px; }
.hero p.lead { font-size: 1.15rem; color: #d2e8ec; max-width: 720px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.1); }
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 36px; }
.counters div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 14px; padding: 12px 16px; }
.counters b { display: block; font-size: 1.6rem; font-weight: 900; }
.counters span { font-size: .85rem; color: #bfdde3; }
section.block { padding: 56px 0 8px; }
section.block > .wrap > h2 { text-align: center; }
section.block > .wrap > p.sub { text-align: center; color: var(--muted); max-width: 720px; margin: 0 auto 28px; }
.aud { display: flex; flex-direction: column; }
.aud h3 { color: var(--brand); }
.aud .more { margin-top: auto; }
.pains li { margin-bottom: 6px; }
.feature { display: flex; gap: 14px; }
.feature .ic { flex: 0 0 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 1.3rem; }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; }
.steps li::before { content: counter(s, persian); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 900; margin-bottom: 8px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.cta-band { background: var(--accent-soft); border: 1px solid #f6d3b4; border-radius: 20px; padding: 28px; text-align: center; margin-top: 48px; }

/* ---------- plans ---------- */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: stretch; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; position: relative; }
.plan.hl { border: 2px solid var(--accent); box-shadow: 0 8px 28px rgba(227,100,20,.12); }
.plan .ribbon { position: absolute; top: -13px; inset-inline-start: 18px; background: var(--accent); color: #fff; font-size: .8rem;
  font-weight: 700; padding: 2px 12px; border-radius: 99px; }
.plan h3 { margin-bottom: 0; }
.plan .tag { color: var(--muted); font-size: .9rem; min-height: 3.2em; }
.plan .price { font-size: 1.7rem; font-weight: 900; color: var(--brand); margin: 8px 0 0; }
.plan .price small { font-size: .85rem; font-weight: 400; }
.plan ul { padding: 0; list-style: none; margin: 14px 0 18px; }
.plan li { padding: 4px 0; padding-inline-start: 24px; position: relative; font-size: .94rem; }
.plan li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--good); font-weight: 900; }
.plan .btn { margin-top: auto; }
.matrix td:not(:first-child), .matrix th:not(:first-child) { text-align: center; }
.yes { color: var(--good); font-weight: 900; } .no { color: #c9c3b8; }

/* ---------- report (HTML version) ---------- */
.report-head { background: var(--brand); color: #fff; border-radius: 18px 18px 0 0; padding: 22px 26px; }
.report-head .office { font-weight: 900; font-size: 1.3rem; }
.report-head h1 { color: #fff; font-size: 1.6rem; margin: 6px 0 0; }
.report-body { background: var(--card); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 18px 18px; padding: 22px 26px; }
.headline { font-size: 1.2rem; font-weight: 700; padding: 14px 18px; background: var(--bg); border-radius: 12px; margin-bottom: 18px; }
.range { position: relative; height: 54px; margin: 30px 8px 40px; }
.range .track { position: absolute; top: 22px; left: 0; right: 0; height: 10px; border-radius: 6px; background: #ece8e0; }
.range .iqr { position: absolute; top: 18px; height: 18px; border-radius: 6px; background: var(--brand); }
.range .med { position: absolute; top: 12px; width: 3px; height: 30px; background: #fff; border: 1px solid var(--brand); }
.range .ask { position: absolute; top: 0; width: 0; height: 54px; border-right: 3px dashed var(--accent); }
.range .ask span { position: absolute; top: -26px; transform: translateX(50%); white-space: nowrap; color: var(--accent); font-weight: 700; font-size: .85rem; }
.range .lab { position: absolute; top: 40px; font-size: .78rem; color: var(--muted); transform: translateX(50%); white-space: nowrap; }

/* ---------- panel layout ---------- */
.panel { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 64px); }
.side { background: var(--card); border-inline-end: 1px solid var(--line); padding: 16px 10px; }
.side a { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; color: var(--ink); margin-bottom: 2px; }
.side a:hover, .side a.on { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.side .sep { font-size: .78rem; color: var(--muted); padding: 14px 12px 4px; font-weight: 700; }
.main { padding: 24px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 1.5rem; margin: 0; }
.page-head .actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 4px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: .9rem; }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tabs a:hover { text-decoration: none; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.timeline .meta { font-size: .8rem; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 700; }
.areas-box { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 12px; background: #fff; }
.areas-box label { font-weight: 400; display: flex; gap: 6px; align-items: center; margin: 0; }
.areas-box label input { width: auto; }
.bar { height: 10px; border-radius: 6px; background: var(--brand); min-width: 3px; }
.bar.accent { background: var(--accent); }
.progress { height: 10px; background: #ece8e0; border-radius: 6px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); }
.copy { cursor: pointer; }
.empty { text-align: center; color: var(--muted); padding: 28px; }
.guide h2 { margin-top: 1.6em; padding-top: .4em; border-top: 1px solid var(--line); }
.guide h3 { margin-top: 1.3em; color: var(--brand); }
.guide blockquote { margin: 1em 0; padding: 10px 16px; background: var(--brand-soft); border-inline-start: 4px solid var(--brand); border-radius: 10px; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 22px; }
.toc ul { margin: 6px 0 0; padding-inline-start: 18px; columns: 2 260px; }
.toc .toc-3 { margin-inline-start: 14px; font-size: .92rem; }
.kit img { border-radius: 12px; border: 1px solid var(--line); }

@media (max-width: 860px) {
  .panel { grid-template-columns: 1fr; }
  .side { border-inline-end: 0; border-bottom: 1px solid var(--line); display: flex; overflow-x: auto; padding: 8px; }
  .side a { white-space: nowrap; } .side .sep { display: none; }
  .main { padding: 16px; }
  .hero { padding: 40px 0 36px; }
  .nav { width: 100%; margin: 0 0 8px; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; }
}
@media print {
  .site-head, .site-foot, .side, .no-print { display: none !important; }
  body { background: #fff; } .panel { display: block; } .main { padding: 0; }
}

/* ---------- radar rows, image tiles ---------- */
tr.mine td { background: var(--accent-soft); font-weight: 700; }
figure.shot { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
figure.shot img { display: block; width: 100%; }
figure.shot figcaption { padding: 6px 12px; font-size: .88rem; color: var(--muted); }

/* ---------- even grids (no orphan card on wide screens) ---------- */
@media (min-width: 1000px) {
  .g3 { grid-template-columns: repeat(3, 1fr); }
  .g4 { grid-template-columns: repeat(4, 1fr); }
  .plans.p4 { grid-template-columns: repeat(4, 1fr); }
  .plans.p3 { grid-template-columns: repeat(3, 1fr); }
  .steps.s5 { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 640px) and (max-width: 999px) {
  .g3, .g4, .plans, .steps { grid-template-columns: repeat(2, 1fr); }
}
