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

:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --ink: #1d2a2e;
  --ink-2: #4f5f65;
  --muted: #86959a;
  --line: #e3eae8;
  --gray-soft: #eef2f1;

  /* sampled from the Rabin logo */
  --green: #10cd9e;
  --green-2: #68dd8b;
  --green-ink: #0a7f62;
  --green-btn: #0b9673;
  --green-soft: #e4f7ef;
  --green-softer: #f2fbf7;
  --orange: #fe8d40;
  --orange-2: #f3a832;
  --orange-ink: #b4581a;
  --orange-soft: #fff1e3;

  --danger: #c8443d;
  --danger-soft: #fdeceb;
  --blue-soft: #e8f1fb;
  --blue-ink: #2a64a8;

  --grad: linear-gradient(160deg, var(--green) 0%, var(--green-2) 100%);
  --grad-orange: linear-gradient(90deg, var(--orange) 0%, var(--orange-2) 100%);
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(18, 48, 40, 0.04), 0 6px 20px rgba(18, 48, 40, 0.05);
  --pad: 16px;
  --tabbar: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--green-ink); text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 750; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--tabbar) + 24px + env(safe-area-inset-bottom)); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px var(--pad);
  background: rgba(244, 247, 246, 0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.brand img.mark { width: 34px; height: 34px; }
.brand .wm { height: 24px; width: auto; }
.brand .en-name { font-weight: 800; font-size: 19px; color: var(--green-ink); letter-spacing: 0.2px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); box-shadow: var(--shadow); position: relative; flex: none;
}
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn .dot { position: absolute; top: 8px; inset-inline-end: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); border: 2px solid var(--surface); }
.lang-btn { font-weight: 700; font-size: 13px; width: auto; padding: 0 12px; }

.demo-pill {
  display: flex; align-items: center; gap: 6px; margin: 0 var(--pad) 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--orange-soft); color: var(--orange-ink); font-size: 12.5px; font-weight: 600; width: fit-content;
}
.demo-pill svg { width: 14px; height: 14px; }

/* ---------- bottom tabs ---------- */
.tabbar {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 30;
  display: flex; justify-content: center;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-inner { display: flex; width: 100%; max-width: 560px; height: var(--tabbar); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 12px; font-weight: 600; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--green-ink); }
.tab.on .tab-ic { background: var(--green-soft); }
.tab-ic { width: 52px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background 0.2s; }

/* ---------- layout ---------- */
.page { padding: 4px var(--pad) 8px; animation: enter 0.22s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .page { animation: none; } * { transition: none !important; } }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.section-head h2 { font-size: 17.5px; }
.section-head a, .link { font-size: 13.5px; font-weight: 650; color: var(--green-ink); }
.page-title { font-size: 22px; margin: 8px 0 4px; }
.lead { color: var(--ink-2); font-size: 14.5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad) 10px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.tap { transition: transform 0.15s; display: block; color: inherit; }
.card.tap:active { transform: scale(0.985); }
.card h3 { font-size: 16px; }

.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 22px 20px 20px;
  background: linear-gradient(150deg, #e3f8ef 0%, #f3fbf6 55%, #fff4e8 100%);
}
.hero .deco { position: absolute; width: 190px; height: 190px; inset-inline-end: -46px; top: -40px; opacity: 0.16; pointer-events: none; }
.hero h1 { font-size: 23px; position: relative; }
.hero p { color: var(--ink-2); margin-top: 6px; position: relative; max-width: 30ch; }
.hero .actions { display: flex; gap: 10px; margin-top: 18px; position: relative; flex-wrap: wrap; }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--ink); font-size: 12.5px; font-weight: 600; text-align: center; line-height: 1.35; }
.quick .qi { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); color: var(--green-ink); }
.quick .qi svg { width: 25px; height: 25px; }
.quick a:nth-child(4n+2) .qi, .quick a.accent .qi { color: var(--orange-ink); }

.svc-card { width: 236px; display: flex; flex-direction: column; gap: 8px; }
.svc-card .svc-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--green-soft); color: var(--green-ink); }
.svc-card .svc-ic svg { width: 23px; height: 23px; }
.svc-card p { color: var(--ink-2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.pkg {
  position: relative; overflow: hidden; border-radius: var(--r); padding: 18px; color: var(--ink);
  background: linear-gradient(140deg, #fff3e6 0%, #fffaf3 60%, #f0fbf6 100%); box-shadow: var(--shadow);
}
.pkg::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 5px; background: var(--grad-orange); }
.pkg .tag { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 700; color: var(--orange-ink); white-space: nowrap; }
.pkg .tag svg { width: 15px; height: 15px; }
.pkg ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pkg li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.pkg li svg { width: 17px; height: 17px; color: var(--green-ink); flex: none; margin-top: 3px; }
.price { font-weight: 800; font-size: 17px; color: var(--ink); }
.price small { font-weight: 600; font-size: 12px; color: var(--muted); margin-inline-start: 3px; }

/* consultants */
.avatar {
  --h: 160; width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 800; font-size: 19px; color: hsl(var(--h) 45% 30%);
  background: linear-gradient(150deg, hsl(var(--h) 60% 90%), hsl(var(--h) 55% 80%));
}
.avatar.lg { width: 84px; height: 84px; font-size: 30px; }
.cons-mini { width: 168px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cons-mini .avatar { width: 64px; height: 64px; font-size: 23px; }
.cons-mini h3 { font-size: 14.5px; }
.cons-row { display: flex; gap: 12px; align-items: flex-start; }
.cons-row h3 { font-size: 15.5px; }
.cons-row .meta { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; line-height: 1.7;
  background: var(--gray-soft); color: var(--ink-2);
}
.badge svg { width: 12px; height: 12px; }
.badge.senior { background: var(--orange-soft); color: var(--orange-ink); }
.badge.approved { background: var(--green-soft); color: var(--green-ink); }
.badge.green { background: var(--green-soft); color: var(--green-ink); }
.badge.orange { background: var(--orange-soft); color: var(--orange-ink); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.blue { background: var(--blue-soft); color: var(--blue-ink); }
.stars { color: var(--orange-2); display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 13px; }
.stars svg { width: 14px; height: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap;
}
.chip.on { background: var(--green-soft); border-color: transparent; color: var(--green-ink); }
.chip.tag { padding: 3px 10px; font-size: 12px; background: var(--gray-soft); border-color: transparent; }

.fav { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--gray-soft); flex: none; }
.fav svg { width: 19px; height: 19px; }
.fav.on { color: #e2575a; background: #fdeced; }
.fav.on svg { fill: currentColor; }

.news { display: flex; gap: 12px; align-items: flex-start; }
.news .ni { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--orange-soft); color: var(--orange-ink); }
.news .ni svg { width: 20px; height: 20px; }
.news.event .ni { background: var(--blue-soft); color: var(--blue-ink); }
.news.new .ni { background: var(--green-soft); color: var(--green-ink); }
.news h3 { font-size: 14.5px; }
.news p { font-size: 13.5px; color: var(--ink-2); }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 14px;
  background: var(--green-btn); color: #fff; font-weight: 700; font-size: 15px; transition: transform 0.12s, opacity 0.2s; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 19px; height: 19px; }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 11px; }
.btn.ghost { background: var(--surface); color: var(--green-ink); box-shadow: inset 0 0 0 1.5px var(--green-soft); }
.btn.soft { background: var(--green-soft); color: var(--green-ink); }
.btn.orange { background: var(--grad-orange); color: #3a1e05; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.plain { background: var(--gray-soft); color: var(--ink-2); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); outline: none; transition: border-color 0.15s;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.7; }
.input:focus { border-color: var(--green); }
.input.ltr { direction: ltr; text-align: left; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.switch-row + .switch-row { border-top: 1px solid var(--line); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #d5dcda; transition: background 0.2s; pointer-events: none; }
.switch i::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform 0.2s; }
.switch input:checked + i { background: var(--green-btn); }
.switch input:checked + i::after { transform: translateX(20px); }
[dir='rtl'] .switch input:checked + i::after { transform: translateX(-20px); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--green-btn); }

/* list rows */
.list { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; color: var(--ink); width: 100%; text-align: start; }
.li + .li { border-top: 1px solid var(--line); }
.li .lic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--green-softer); color: var(--green-ink); flex: none; }
.li .lic svg { width: 19px; height: 19px; }
.li .lit { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; }
.li .lit small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.chev { width: 18px; height: 18px; color: var(--muted); flex: none; }
[dir='rtl'] .chev { transform: scaleX(-1); }
.li.dim .lit { color: var(--muted); }

/* tabs (segmented) */
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 4px calc(-1 * var(--pad)) 14px; padding: 0 var(--pad); }
.seg::-webkit-scrollbar { display: none; }
.seg button { padding: 8px 14px; border-radius: 12px; background: var(--surface); font-weight: 650; font-size: 13.5px; color: var(--ink-2); box-shadow: var(--shadow); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--ink); color: #fff; }
.seg .count { background: var(--orange); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; }

/* booking flow */
.steps { display: flex; gap: 6px; margin: 6px 0 16px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--green); }
.pick { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); width: 100%; text-align: start; border: 2px solid transparent; }
.pick.on { border-color: var(--green); background: var(--green-softer); }
.pick + .pick { margin-top: 10px; }
.days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad) 8px; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 66px; padding: 9px 0; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); text-align: center; line-height: 1.35; }
.day b { display: block; font-size: 18px; }
.day small { font-size: 11.5px; color: var(--muted); }
.day.on { background: var(--ink); color: #fff; }
.day.on small { color: #cfd8d6; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot { height: 44px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 700; }
.slot.on { background: var(--green-btn); border-color: var(--green-btn); color: #fff; }
.slot[disabled] { background: var(--gray-soft); color: var(--muted); border-color: transparent; text-decoration: line-through; cursor: not-allowed; }
.slot.soon[disabled] { text-decoration: none; }
.summary .sr { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 14.5px; }
.summary .sr + .sr { border-top: 1px dashed var(--line); }
.summary .sr span:first-child { color: var(--ink-2); }
.summary .sr b { text-align: end; }
.total { font-size: 19px; }
.sticky-cta { position: sticky; bottom: calc(var(--tabbar) + 12px + env(safe-area-inset-bottom)); margin-top: 18px; z-index: 5; }

.cardnum {
  border-radius: var(--r); padding: 18px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(140deg, #0b9673 0%, #22b98b 60%, #5fd28b 100%);
}
.cardnum .n { font-size: 21px; font-weight: 750; letter-spacing: 1.5px; direction: ltr; text-align: left; margin: 14px 0 6px; font-variant-numeric: tabular-nums; }
.cardnum img { position: absolute; width: 120px; inset-inline-end: -26px; bottom: -30px; opacity: 0.22; filter: brightness(3); }
.upload { display: grid; place-items: center; gap: 6px; padding: 22px; border: 2px dashed #cfe4dc; border-radius: var(--r); background: var(--green-softer); color: var(--green-ink); text-align: center; cursor: pointer; font-weight: 650; }
.upload svg { width: 28px; height: 28px; }
.upload img { max-height: 220px; border-radius: 10px; }

/* status */
.status-line { display: flex; flex-wrap: wrap; gap: 6px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding-inline-start: 26px; padding-bottom: 14px; font-size: 14px; color: var(--muted); }
.timeline li::before { content: ''; position: absolute; inset-inline-start: 5px; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.timeline li::after { content: ''; position: absolute; inset-inline-start: 9.5px; top: 19px; bottom: 0; width: 1.5px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { background: var(--green); }
.timeline li.now { color: var(--ink); font-weight: 700; }
.timeline li.now::before { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }

.note { padding: 12px 14px; border-radius: 14px; background: var(--green-softer); color: var(--ink-2); font-size: 13.5px; display: flex; gap: 10px; }
.note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--green-ink); }
.note.warn { background: var(--orange-soft); }
.note.warn svg { color: var(--orange-ink); }
.note.err { background: var(--danger-soft); }
.note.err svg { color: var(--danger); }

.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; color: #c4d3ce; margin: 0 auto 8px; }

.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 14px; white-space: pre-wrap; }
.bubble.me { background: var(--green-soft); margin-inline-start: auto; border-end-end-radius: 4px; }
.bubble.them { background: var(--surface); box-shadow: var(--shadow); border-end-start-radius: 4px; }
.bubble small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }

.stat { color: var(--ink); padding: 14px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.stat b { display: block; font-size: 20px; line-height: 1.3; }
.stat span { font-size: 12.5px; color: var(--ink-2); }
.stat.alert b { color: var(--orange-ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 9px 6px; text-align: start; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 650; font-size: 12.5px; }
.progress { height: 10px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--grad-orange); border-radius: 99px; }
.hours { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.hours button { height: 36px; border-radius: 10px; background: var(--gray-soft); font-size: 13px; font-weight: 650; color: var(--ink-2); }
.hours button.on { background: var(--green-btn); color: #fff; }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(20, 32, 30, 0.35); z-index: 50; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; bottom: 0; inset-inline: 0; margin: 0 auto; max-width: 560px; max-height: 88vh; overflow-y: auto; z-index: 51;
  background: var(--bg); border-radius: 24px 24px 0 0; padding: 10px var(--pad) calc(24px + env(safe-area-inset-bottom));
  animation: up 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes up { from { transform: translateY(40%); opacity: 0; } }
.sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: #cfd8d6; margin: 0 auto 12px; }
.sheet h2 { font-size: 18px; margin-bottom: 4px; }

.toast {
  position: fixed; bottom: calc(var(--tabbar) + 20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  animation: fade 0.2s; max-width: calc(100vw - 32px);
}
.loading { display: grid; place-items: center; min-height: 70vh; }
.loading img { width: 72px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(0.92); opacity: 0.7; } }

.foot { text-align: center; margin: 34px 0 6px; color: var(--muted); font-size: 12px; }
.foot img { width: 26px; margin: 0 auto 4px; opacity: 0.8; }
