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

:root {
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #e6f4f2;
  --accent: #f59e0b;
  --wa: #25d366;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --danger: #b91c1c;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: Vazirmatn, Tahoma, sans-serif; color: var(--text); background: var(--bg);
  line-height: 1.9; font-size: 16px;
}
a { color: var(--brand); }
img { max-width: 100%; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

header.site { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
header.site .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { font-weight: 700; font-size: 22px; color: var(--brand); text-decoration: none; }
.logo::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-inline-start: 4px; }
nav.main a { margin-inline-start: 18px; text-decoration: none; color: var(--text); font-size: 15px; }
nav.main a:hover { color: var(--brand); }

.hero { background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; padding: 64px 0 72px; }
.hero h1 { font-size: 36px; line-height: 1.6; margin: 0 0 12px; }
.hero p { font-size: 18px; opacity: .92; margin: 0 0 28px; max-width: 680px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  padding: 12px 22px; border-radius: 10px; font: inherit; font-weight: 700; text-decoration: none;
  background: var(--brand); color: #fff; transition: transform .1s, background .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn.light { background: #fff; color: var(--brand); }
.btn.accent { background: var(--accent); color: #1f2937; }
.btn.wa { background: var(--wa); color: #073b1d; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.danger { background: var(--danger); }
.btn.block { width: 100%; }
.btn.big { padding: 16px 28px; font-size: 18px; }

section { padding: 56px 0; }
section h2 { font-size: 26px; margin: 0 0 8px; }
section .lead { color: var(--muted); margin: 0 0 28px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.step-num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 10px;
}

.two-col { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  nav.main a:not(.btn) { display: none; }
}

.form-card { max-width: 640px; margin: 32px auto; }
label { display: block; font-weight: 700; margin: 14px 0 6px; font-size: 15px; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff;
}
textarea { min-height: 160px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.hint { color: var(--muted); font-size: 14px; margin-top: 4px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 8px; }
.alert { padding: 12px 16px; border-radius: 10px; margin: 12px 0; }
.alert.error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert.ok { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #b7e0da; }

.pill { white-space: nowrap; display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 13px; }
.pill.gray { background: #f3f4f6; color: var(--muted); }
.pill.amber { background: #fef3c7; color: #92400e; }
.pill.red { background: #fee2e2; color: var(--danger); }

.cand { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; margin-bottom: 14px; }
.cand.picked { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.cand-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.score { font-weight: 700; color: var(--brand); }
.meta { color: var(--muted); font-size: 14px; }

footer.site { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 14px; background: #fff; }
footer.site .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.wa-float {
  position: fixed; bottom: 18px; left: 18px; width: 56px; height: 56px; border-radius: 50%; background: var(--wa);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.18); z-index: 20;
}
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* admin */
.admin header.site { background: #0b3b37; }
.admin header.site a, .admin .logo { color: #fff; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
th { background: #f3f4f6; font-weight: 700; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 18px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 24px; color: var(--brand); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
pre.preview { white-space: pre-wrap; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 14px; font: inherit; font-size: 14px; }
.ltr { direction: ltr; unicode-bidi: embed; }

/* mobile app promotion */
.btn.ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.7); }
.app-promo { display: flex; align-items: center; gap: 12px; background: var(--brand-soft); border: 1px solid #b7e0da; border-radius: var(--radius); padding: 12px 14px; margin: 16px 0; text-align: right; }
.app-promo img { border-radius: 11px; flex: none; }
.app-promo div { flex: 1; min-width: 0; line-height: 1.6; }
.app-promo b { display: block; color: var(--brand-dark); }
.app-promo span { color: var(--muted); font-size: 14px; }
.promo-wrap { margin-bottom: 0; }
.appbar { position: fixed; inset-inline: 10px; bottom: 10px; z-index: 30; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; box-shadow: 0 8px 28px rgba(0,0,0,.16); }
.appbar[hidden] { display: none; }
.appbar img { border-radius: 10px; flex: none; }
.appbar div { flex: 1; min-width: 0; line-height: 1.5; }
.appbar b { display: block; font-size: 15px; }
.appbar span { color: var(--muted); font-size: 13px; }
.appbar-close { border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; padding: 0 4px; line-height: 1; }
body.has-appbar { padding-bottom: 84px; }
body.has-appbar .wa-float { bottom: 96px; }
.dl-hero { padding: 48px 0 56px; }
.dl-grid { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.dl-icon { border-radius: 20px; box-shadow: 0 6px 18px rgba(0,0,0,.2); margin-bottom: 8px; }
.dl-free { font-size: 15px !important; opacity: .85; }
.dl-done { background: rgba(255,255,255,.15); border-radius: 10px; padding: 10px 14px; margin-top: 16px !important; }
.dl-qr { text-align: center; color: var(--text); padding: 18px; }
.dl-qr img { display: block; width: 200px; height: 200px; margin: 0 auto 6px; }
.dl-qr p { color: var(--muted); font-size: 14px; }
.dl-os ol { margin: 6px 0 0; padding-inline-start: 20px; color: var(--muted); }
.dl-os.mine { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.ios-share { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
@media (max-width: 760px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dl-qr { display: none; }
  nav.main a.btn { padding: 6px 10px; }
}
nav.main a.btn { color: #fff; }
