:root {
  --bg: #eef3ef;
  --card: #ffffff;
  --ink: #14532d;
  --muted: #64748b;
  --line: #dce8df;
  --green: #059669;
  --green-2: #047857;
  --green-soft: #ecfdf5;
  --mci: #0d9488;
  --mtn: #d97706;
  --rtl: #7c3aed;
  --ok: #059669;
  --bad: #dc2626;
  --shadow: 0 10px 28px rgba(20, 83, 45, .06);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: Vazirmatn, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.75; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input { font-family: inherit; }
img { max-width: 100%; display: block; }
.dir-ltr { direction: ltr; text-align: left; }
.mt-2 { margin-top: .7rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.dash { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.side {
  background: var(--card); border-left: 1px solid var(--line);
  padding: 1.3rem 1.1rem; display: flex; flex-direction: column; gap: .85rem;
  position: sticky; top: 0; height: 100vh; overflow: auto;
}
.logo { display: flex; align-items: center; gap: .6rem; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--green), #34d399); color: #fff;
  display: grid; place-items: center;
}
.logo-mark svg { width: 18px; height: 18px; }
.logo strong { display: block; font-size: 1.1rem; }
.logo small { display: block; color: var(--muted); font-size: .72rem; }
.mobile-menu-btn { display: none; background: none; border: 0; cursor: pointer; color: var(--ink); }
.side-buy, .page-card .side-buy {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--green); color: #fff; font-weight: 800;
  padding: .75rem; border-radius: 14px; box-shadow: 0 8px 18px rgba(5, 150, 105, .28);
}
.side-buy svg { width: 16px; height: 16px; }
.nav-links { display: flex; flex-direction: column; gap: .15rem; }
.nav-links a {
  display: flex; align-items: center; gap: .55rem;
  padding: .6rem .7rem; border-radius: 12px; color: var(--muted); font-weight: 700; font-size: .9rem;
}
.nav-links a svg { width: 17px; height: 17px; }
.nav-links a.active, .nav-links a:hover { background: var(--green-soft); color: var(--green-2); }
.promo {
  background: linear-gradient(160deg, #059669, #0f766e); color: #fff;
  border-radius: 18px; padding: 1rem 1rem 1.1rem; margin-top: auto;
}
.promo b { display: block; margin-bottom: .3rem; }
.promo p { font-size: .8rem; opacity: .9; margin-bottom: .7rem; }
.promo a {
  display: inline-block; background: #fff; color: var(--green-2); font-weight: 800;
  font-size: .8rem; padding: .4rem .8rem; border-radius: 10px;
}
.shop-card {
  display: flex; gap: .65rem; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: .7rem;
}
.avatar {
  width: 40px; height: 40px; border-radius: 12px; background: var(--green-soft);
  color: var(--green); display: grid; place-items: center;
}
.shop-card strong { display: block; font-size: .88rem; }
.shop-card a { color: var(--muted); font-size: .8rem; }
.side-copy { color: var(--muted); font-size: .75rem; }
.enamad { margin: .15rem 0 .35rem; }
.enamad img { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.enamad a { font-size: .75rem; font-weight: 800; color: var(--green-2); }

.canvas { padding: 1.4rem 1.5rem 2rem; }
.hero {
  display: grid; grid-template-columns: 200px 1fr; gap: 1rem; align-items: center;
  background: var(--card); border-radius: 22px; padding: 1.2rem 1.4rem; margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.hero-copy h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .35rem; }
.hero-copy > p { color: var(--muted); margin-bottom: .8rem; }
.hero-feats { display: flex; flex-wrap: wrap; gap: .7rem 1.1rem; }
.hero-feats li { display: flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--muted); font-weight: 600; }
.hero-feats svg { width: 15px; height: 15px; color: var(--green); }
.pack-stack { position: relative; height: 120px; }
.pack {
  position: absolute; width: 92px; height: 64px; border-radius: 12px; color: #fff;
  font-size: .72rem; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 10px 20px rgba(0,0,0,.12);
}
.pack-mtn { background: linear-gradient(145deg, #fbbf24, #d97706); right: 8px; top: 6px; transform: rotate(-12deg); }
.pack-mci { background: linear-gradient(145deg, #2dd4bf, #0f766e); right: 48px; top: 28px; transform: rotate(-4deg); }
.pack-rtl { background: linear-gradient(145deg, #c084fc, #6d28d9); right: 0; top: 52px; transform: rotate(8deg); }

.buy-card, .amount-card, .page-card {
  background: var(--card); border-radius: 22px; padding: 1.2rem 1.3rem;
  margin-bottom: 1rem; box-shadow: var(--shadow);
}
.stepper { display: flex; align-items: center; gap: .4rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted); font-weight: 700; }
.step i {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-size: .7rem; background: var(--bg); font-weight: 800;
}
.step.is-on { color: var(--green-2); }
.step.is-on i { background: var(--green); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--line); min-width: 16px; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .84rem; font-weight: 800; margin-bottom: .4rem; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; right: 12px; width: 18px; color: #94a3b8; }
.input-wrapper input {
  width: 100%; border: 1px solid var(--line); background: #f8faf8; border-radius: 14px;
  padding: 12px 42px 12px 12px; outline: 0; font-size: 1rem;
}
.input-wrapper input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(5, 150, 105, .12); }
.input-wrapper.is-ok input { border-color: var(--ok); }
.input-wrapper.is-bad input { border-color: var(--bad); }
.currency-wrapper input { padding-left: 48px; padding-right: 12px; }
.currency { position: absolute; left: 12px; color: #94a3b8; font-size: .8rem; }

.operator-logos { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; margin-top: .6rem; }
.op-badge {
  text-align: center; font-size: .82rem; font-weight: 800; color: var(--muted);
  background: #f8faf8; border: 1.5px solid var(--line); border-radius: 14px;
  padding: .85rem .3rem; opacity: .55;
}
.op-badge.active { opacity: 1; }
.op-badge.mci.active { color: var(--mci); border-color: var(--mci); background: #f0fdfa; }
.op-badge.mtn.active { color: var(--mtn); border-color: var(--mtn); background: #fffbeb; }
.op-badge.rightel.active { color: var(--rtl); border-color: var(--rtl); background: #f5f3ff; }

.extra-options:not([hidden]) { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .45rem; }
.check-option { display: flex; gap: .3rem; align-items: center; font-size: .82rem; cursor: pointer; }

.buy-card .form-group:has(.amount-grid) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0);
}

.payable-box { background: var(--green-soft); border-radius: 14px; padding: .8rem 1rem; margin-bottom: .85rem; }
.payable-row { display: flex; justify-content: space-between; font-weight: 700; }
.payable-box small { display: block; margin-top: .25rem; color: var(--muted); font-size: .74rem; }
.field-hint { font-size: .76rem; color: var(--muted); margin-top: .35rem; }
.form-error { color: var(--bad); background: #fef2f2; padding: .5rem .7rem; border-radius: 12px; margin-bottom: .55rem; font-size: .82rem; }
.btn-submit {
  width: 100%; border: 0; background: var(--green); color: #fff; font-weight: 800;
  padding: 1rem; border-radius: 14px; cursor: pointer;
  display: flex; justify-content: center; gap: .4rem; align-items: center;
  box-shadow: 0 10px 22px rgba(5, 150, 105, .28);
}
.btn-submit:disabled, .btn-submit.is-loading { opacity: .7; cursor: wait; }

.amount-card h2 { font-size: 1.05rem; margin-bottom: .9rem; }
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.amount-btn {
  background: #f8faf8; border: 1px solid var(--line); border-radius: 14px;
  padding: .9rem .3rem .7rem; cursor: pointer; font-weight: 800; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: .15rem;
}
.amount-btn small { font-size: .72rem; font-weight: 600; color: var(--muted); }
.amount-btn.active, .amount-btn:hover { border-color: var(--green); background: var(--green-soft); color: var(--green-2); }
.amount-btn:disabled { opacity: .35; cursor: not-allowed; }
.amount-custom {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  border: 1px dashed var(--green); border-radius: 14px; padding: .6rem .4rem; text-align: center;
}
.amount-custom svg { width: 16px; height: 16px; color: var(--green); }
.amount-custom span { font-size: .8rem; font-weight: 700; color: var(--green-2); }
.amount-custom input { width: 90%; border: 0; outline: 0; text-align: center; font-size: .85rem; background: transparent; }

.trust-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin-bottom: 1rem;
}
.trust-row article {
  background: #f0fdfa; border-radius: 16px; padding: .9rem .8rem; text-align: center;
}
.trust-row svg { width: 18px; height: 18px; color: var(--green); margin: 0 auto .35rem; }
.trust-row strong { display: block; font-size: .85rem; }
.trust-row p { color: var(--muted); font-size: .75rem; }

.orders-empty {
  background: var(--card); border-radius: 22px; padding: 1.2rem 1.3rem; box-shadow: var(--shadow);
}
.orders-empty h2 { font-size: 1.05rem; margin-bottom: .4rem; }
.orders-empty p { color: var(--muted); }

.page-card .kicker { font-size: .75rem; letter-spacing: .14em; color: var(--green); font-weight: 800; margin-bottom: .4rem; }
.page-card h1 { font-size: 1.7rem; margin-bottom: .7rem; }
.page-card > p { color: var(--muted); margin-bottom: 1rem; }
.contact-rows { display: grid; gap: .55rem; }
.contact-rows a, .contact-rows p {
  display: flex; align-items: center; gap: .5rem;
  background: var(--green-soft); border-radius: 12px; padding: .7rem .85rem; font-weight: 700;
}
.contact-rows svg { width: 16px; height: 16px; color: var(--green); }
.legal .rules-list { display: flex; flex-direction: column; gap: .6rem; width: 100%; text-align: right; }
.legal .rules-list article {
  width: 100%; background: #f8faf8; border-radius: 12px; padding: .8rem .9rem; text-align: right;
}
.legal .rules-list h4 { color: var(--green-2); margin: 0 0 .25rem; }
.legal .rules-list p { color: var(--muted); margin: 0; text-align: right; width: 100%; }

@media (max-width: 980px) {
  .dash { grid-template-columns: 1fr; }
  .side { position: relative; height: auto; border-left: 0; border-bottom: 1px solid var(--line); }
  .nav-links { display: none; }
  .nav-links.is-open { display: flex; }
  .mobile-menu-btn { display: block; position: absolute; top: 1.2rem; left: 1rem; }
  .hero, .trust-row, .price-grid { grid-template-columns: 1fr 1fr; }
  .operator-logos { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hero, .trust-row, .price-grid { grid-template-columns: 1fr; }
  .canvas { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
