:root {
  --ink: #16202b; --muted: #5d6b7a; --line: #dde3ea; --bg: #f4f6f9; --card: #fff;
  --brand: #1d6fd6; --brand-ink: #fff; --ok: #1a7f4b; --bad: #b3261e; --warn-bg: #fff4d6;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand span { color: var(--brand); font-weight: 500; margin-left: 6px; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
nav a { text-decoration: none; color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
nav a.on { color: var(--ink); border-color: var(--brand); }
nav form { margin: 0; }
main { max-width: 1040px; margin: 0 auto; padding: 24px 16px 64px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.card.narrow { max-width: 420px; margin: 40px auto; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 0 0 14px; }
h2.gap, p.gap { margin-top: 28px; }
h3 { margin: 8px 0 4px; }
label { display: block; font-weight: 600; margin: 14px 0 0; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit; color: inherit;
  border: 1px solid #b9c3cf; border-radius: 8px; background: #fff; }
input.inline { display: inline-block; width: auto; margin: 0 0 0 6px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #9cc4f5; outline-offset: 1px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 16px 0 0; padding: 8px 14px 12px; }
legend { font-weight: 600; padding: 0 6px; }
label.check { font-weight: 400; margin: 8px 0 0; }
.opt, .hint { color: var(--muted); font-weight: 400; font-size: 14px; }
.hint { margin: 6px 0 0; }
.empty { color: var(--muted); }
.btn { display: inline-block; margin-top: 18px; padding: 10px 18px; font: inherit; font-weight: 600; color: var(--brand-ink); background: var(--brand); border: 1px solid var(--brand); border-radius: 8px; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(0.93); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.small { margin: 0; padding: 6px 12px; font-size: 14px; color: var(--brand-ink); border-bottom: 1px solid var(--brand); }
.btn.ghost { background: transparent; color: var(--brand); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; }
.link.danger, .bad-text { color: var(--bad); }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; border: 1px solid; }
.flash.ok { background: #e8f6ee; border-color: #b5dfc6; }
.flash.bad { background: #fdecea; border-color: #f3c2bd; }
.flash.warn { background: var(--warn-bg); border-color: #ecd58f; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.actions form { margin: 0; }
.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 1px 8px; margin-left: 4px; white-space: nowrap; }
.tag.bad { color: var(--bad); border-color: #f3c2bd; }
.status { font-size: 13px; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.status.done { color: var(--ok); } .status.failed { color: var(--bad); } .status.cancelled { color: var(--muted); }
.profile { border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px 10px; margin-bottom: 14px; }
.dest { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); margin: 0; }
.switch { min-width: 52px; padding: 4px 10px; border-radius: 20px; border: 1px solid #b9c3cf; background: #eef1f5; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.switch.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.hero { padding: 48px 0 24px; max-width: 680px; }
.hero h1 { font-size: 36px; }
.hero p { font-size: 18px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.steps div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.steps b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
thead th { border-top: 0; color: var(--muted); font-weight: 600; }
td input, td select { margin: 0 !important; min-width: 110px; padding: 6px 8px !important; }
td form { margin: 0; }
label.check input.inline { display: inline-block; width: auto; margin: 0 0 0 6px; }
.langs { display: inline-flex; gap: 10px; padding-inline-start: 14px; border-inline-start: 1px solid var(--line); font-size: 14px; }
.langs a.on { font-weight: 700; }
footer { text-align: center; color: var(--muted); font-size: 14px; padding: 0 16px 32px; }
.card.wide { max-width: none; }
.gap-top { margin-top: 20px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.plan { border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.plan h3 { margin: 0; }
.price { font-size: 26px; font-weight: 700; margin: 6px 0 0; }
.bank { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; font: inherit; white-space: pre-wrap; margin: 12px 0 0; }
.narrow-form { max-width: 420px; }
[dir=rtl] body, html[dir=rtl] body { font-family: Vazirmatn, Tahoma, "Segoe UI", system-ui, sans-serif; }
html[dir=rtl] th, html[dir=rtl] td { text-align: right; }
html[dir=rtl] input.inline, html[dir=rtl] label.check input.inline { margin: 0 6px 0 0; }
html[dir=rtl] .tag { margin-left: 0; margin-right: 4px; }
html[dir=rtl] .brand span { margin-left: 0; margin-right: 6px; }
.ltr { unicode-bidi: isolate; display: inline-block; direction: ltr; }
[hidden] { display: none !important; }
.card.center { text-align: center; }
.qr { display: block; margin: 12px auto; background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--line); }
.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.story img, .story video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: #dde3ea; }
.story .btn.small { display: block; margin: 6px 0 0; text-align: center; }
.story .btn.small.ghost { color: var(--brand); }
.story details { margin-top: 8px; font-size: 14px; }
.story details form { margin: 10px 0 0; }
.story .hint { margin: 4px 0 0; }
nav .tag { margin: 0; }
td .actions { justify-content: flex-start; align-items: center; }
@media (max-width: 640px) {
  .top { padding: 10px 12px; gap: 6px; }
  nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; gap: 14px; white-space: nowrap; font-size: 15px; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  .langs { padding-inline-start: 10px; }
  main { padding: 16px 12px 48px; }
  .card { padding: 16px; }
}
