/* بلیط من — teal/navy brand shell */
:root {
  --teal: #0e7c8b;
  --teal-dark: #0a5f6b;
  --teal-soft: #e6f4f6;
  --navy: #142033;
  --navy-2: #1d2d45;
  --ink: #142033;
  --ink-2: #4a5a70;
  --ink-3: #7d8da3;
  --line: #dde5ec;
  --bg: #f4f7f9;
  --card: #ffffff;
  --ok: #0f9d6d;
  --ok-soft: #e4f6ef;
  --warn: #c8871a;
  --warn-soft: #fdf3e2;
  --bad: #c8453c;
  --bad-soft: #fbeceb;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 32, 51, .06), 0 8px 24px rgba(20, 32, 51, .06);
  --shadow-sm: 0 1px 2px rgba(20, 32, 51, .08);
  --topbar-h: 58px;
  --tabbar-h: 62px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Vazirmatn, "IRANSans", "Segoe UI", Tahoma, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
html[dir="ltr"] body { font-family: "Segoe UI", Roboto, system-ui, sans-serif; }

a { color: var(--teal-dark); text-decoration: none; }
input, select, textarea, button { font: inherit; color: inherit; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, var(--teal-dark) 140%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(20, 32, 51, .18);
}
.brand { display: flex; align-items: center; gap: 8px; color: #fff; }
.brand-mark {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(140deg, #16a3b5, var(--teal));
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.brand-name { font-weight: 700; letter-spacing: .2px; }
.grow { flex: 1; }
.iconbtn {
  min-width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 10px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 19px;
  cursor: pointer;
}
.iconbtn:active { background: rgba(255, 255, 255, .25); }
#roleChip {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: 12px;
  color: #fff;
}

/* ---------- layout ---------- */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 12px calc(var(--tabbar-h) + 26px);
}
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 420px) { .grid3 { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 12px; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-head h3 { margin: 0; font-size: 16px; }

h1 { font-size: 24px; margin: 0 0 6px; line-height: 1.5; }
h2 { font-size: 18px; margin: 18px 0 8px; }
.muted { color: var(--ink-3); font-size: 13px; }
.dim { color: var(--ink-2); }
.strong { font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.sep { height: 1px; background: var(--line); margin: 12px 0; border: 0; }

/* ---------- hero / landing ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 26px 20px 22px;
  color: #eaf6f8;
  background: radial-gradient(1200px 320px at 100% -10%, rgba(22, 163, 181, .55), transparent 60%),
              linear-gradient(160deg, var(--navy) 0%, #16283f 55%, var(--teal-dark) 130%);
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -120px auto;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(14, 124, 139, .35);
  filter: blur(4px);
}
.hero h1 { color: #fff; font-size: 26px; }
.hero p { margin: 8px 0 0; color: #bcd7dd; font-size: 14px; }
.hero .hero-cta { position: relative; z-index: 1; margin-top: 18px; display: grid; gap: 10px; }
.kv-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; position: relative; z-index: 1; }
.kv-strip span {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .11);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 12.5px;
  color: #dff0f3;
}

.feature {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature .fico {
  flex: 0 0 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 18px;
}
.feature b { display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform .06s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--teal-dark); border-color: var(--line); }
.btn.navy { background: var(--navy); }
.btn.ok { background: var(--ok); }
.btn.bad { background: var(--bad); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.apk {
  background: linear-gradient(135deg, #12a3b5, var(--teal-dark));
  box-shadow: 0 6px 18px rgba(10, 95, 107, .35);
  font-size: 15.5px;
  min-height: 52px;
}
.btn.apk .apk-ico { font-size: 19px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- forms ---------- */
label.field { display: block; margin-bottom: 10px; }
label.field > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; }
label.field > span .req { color: var(--bad); }
input[type=text], input[type=tel], input[type=number], input[type=time], input[type=email],
select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  outline: none;
}
textarea { min-height: 78px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14, 124, 139, .13);
}
input[type=file] {
  width: 100%;
  padding: 9px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfe;
}
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: 18px; height: 18px; min-height: 0; }
.otpbox {
  letter-spacing: 8px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  direction: ltr;
}

.segs { display: flex; gap: 6px; background: #eaeff4; padding: 4px; border-radius: 12px; }
.segs button {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-weight: 600;
  cursor: pointer;
}
.segs button.on { background: #fff; color: var(--teal-dark); box-shadow: var(--shadow-sm); }

.scroller { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.scroller::-webkit-scrollbar { height: 4px; }
.scroller::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.daychip {
  flex: 0 0 auto;
  min-width: 74px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  font-size: 12.5px;
  cursor: pointer;
}
.daychip.on { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-dark); font-weight: 700; }

/* ---------- lists ---------- */
.item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px;
  box-shadow: var(--shadow-sm);
}
.item + .item { margin-top: 10px; }
.item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.route { font-weight: 700; font-size: 15.5px; }
.route .arrow { color: var(--teal); margin: 0 5px; }
.item-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.tag {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: #eef2f6;
  color: var(--ink-2);
}
.tag.teal { background: var(--teal-soft); color: var(--teal-dark); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.price { font-weight: 700; color: var(--teal-dark); }

.kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 14px; }
.kv + .kv { border-top: 1px dashed var(--line); }
.kv > span:first-child { color: var(--ink-2); }

.empty { padding: 34px 16px; text-align: center; color: var(--ink-3); }
.empty .big { font-size: 34px; display: block; margin-bottom: 8px; opacity: .5; }

.alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  border: 1px solid;
}
.alert.info { background: var(--teal-soft); border-color: #bfe0e5; color: var(--teal-dark); }
.alert.warn { background: var(--warn-soft); border-color: #f0dcb4; color: #8a5c0e; }
.alert.bad { background: var(--bad-soft); border-color: #f2c9c6; color: #96322b; }
.alert.ok { background: var(--ok-soft); border-color: #bde8d6; color: #0b7050; }

.ticketimg {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  display: block;
}

.skel { padding: 22px; text-align: center; color: var(--ink-3); font-size: 13px; }
.spin {
  width: 18px; height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--teal);
  border-radius: 50%;
  display: inline-block;
  animation: sp .7s linear infinite;
  vertical-align: -3px;
  margin-inline-end: 7px;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 35;
  height: var(--tabbar-h);
  display: flex;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 14px rgba(20, 32, 51, .06);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 7px 0;
  color: var(--ink-3);
  font-size: 11.5px;
}
.tabbar a .ti { font-size: 19px; line-height: 1.2; }
.tabbar a.on { color: var(--teal-dark); font-weight: 700; }

/* ---------- menu sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20, 32, 51, .5);
}
.sheet {
  position: fixed;
  z-index: 51;
  inset-inline-end: 0;
  top: 0; bottom: 0;
  width: min(330px, 86vw);
  background: #fff;
  box-shadow: -10px 0 30px rgba(20, 32, 51, .2);
  display: flex;
  flex-direction: column;
}
.sheet-head {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  background: var(--navy);
  color: #fff;
}
.sheet-head .iconbtn { font-size: 22px; }
.sheet-body { padding: 14px; overflow: auto; }
.menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: start;
}
.menu-item + .menu-item { margin-top: 8px; }
.menu-item .mi { color: var(--teal); font-size: 17px; }
.menu-item.danger { color: var(--bad); border-color: #f2c9c6; }
.menu-item.danger .mi { color: var(--bad); }

/* ---------- toasts ---------- */
.toast-wrap {
  position: fixed;
  z-index: 60;
  inset-inline: 12px;
  bottom: calc(var(--tabbar-h) + 14px);
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.toast {
  margin-inline: auto;
  max-width: 460px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  animation: pop .18s ease;
}
.toast.bad { background: #8f302a; }
.toast.ok { background: #0b6f50; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

.paxbox { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px; background: #fbfdfe; }
.paxbox + .paxbox { margin-top: 9px; }
.paxbox > b { display: block; margin-bottom: 7px; color: var(--teal-dark); font-size: 13.5px; }
.pax-type-id { align-items: end; }
.gender-radios { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.gender-radios label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.birth-row {
  display: flex; align-items: center; gap: 6px; direction: ltr;
}
.birth-row input {
  flex: 1; min-width: 0; text-align: center;
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 8px; background: #fff;
  font: inherit;
}
.birth-row input.p-by { flex: 1.4; }
.birth-row span { color: var(--muted); }

.quote {
  display: flex; align-items: center; gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  width: 100%;
  text-align: start;
  color: inherit;
  font: inherit;
}
.quote + .quote { margin-top: 8px; }
.quote.on { border-color: var(--teal); background: var(--teal-soft); }
.quote .qmain { flex: 1; min-width: 0; }
.quote .qmain b { display: block; font-size: 14px; }
.quote .qprice { font-weight: 800; color: var(--teal-dark); white-space: nowrap; }

/* ---------- steppers / chips / gateway / wallet ---------- */
.stepper {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  background: #fff;
}
.stepper button {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--teal-soft);
  color: var(--teal-dark); font-size: 18px; font-weight: 700; cursor: pointer;
}
.stepper .val { min-width: 28px; text-align: center; font-weight: 800; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
.chip.on {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  font-weight: 700;
}

.swap-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
  cursor: pointer; font-size: 18px; color: var(--teal-dark);
}

.fee-box {
  border: 1px dashed var(--teal);
  background: var(--teal-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13.5px;
  line-height: 1.9;
}
.fee-box .total { font-weight: 800; font-size: 15px; color: var(--teal-dark); }

.gateway-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.gateway-card .big-amt {
  font-size: 26px; font-weight: 800; color: var(--teal-dark);
  letter-spacing: .02em; margin: 6px 0 12px;
}
.gateway-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.gateway-row code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 15px; font-weight: 700; direction: ltr;
}

.tx-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 12px;
  margin-top: 8px;
}
.tx-row .tx-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.tx-row .tx-meta { color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filter-bar .chip { border-radius: 10px; }

.challenge-box {
  background: #142033; color: #fff;
  border-radius: var(--radius-sm);
  padding: 14px;
  line-height: 1.9;
  font-size: 14.5px;
  margin: 10px 0;
}

.station-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px; border-bottom: 1px solid var(--line);
}
.station-row .pop {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--warn-soft); color: var(--warn);
}

.detail-kv { display: grid; gap: 6px; margin: 10px 0; }
.detail-kv div {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid #eef3f6;
}
.detail-kv span { color: var(--ink-3); }
.detail-kv b { font-weight: 700; text-align: end; }

.ticket-preview {
  max-width: 100%; border-radius: 12px; border: 1px solid var(--line); margin-top: 10px;
}

.radio-row { display: flex; flex-direction: column; gap: 8px; }
.radio-row label {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; background: #fff; cursor: pointer;
}
.radio-row label.on { border-color: var(--teal); background: var(--teal-soft); }

.check-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }

.btn.ghost {
  background: #fff; color: var(--teal-dark); border: 1px solid var(--line);
}
.btn.danger {
  background: var(--bad); color: #fff; border: none;
}
.btn.block { width: 100%; }
.btn.sm { padding: 8px 12px; font-size: 13px; min-height: 40px; }

.section-title {
  margin: 18px 0 8px; font-size: 14px; font-weight: 800; color: var(--navy);
}

.day-strip {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch;
}
.day-strip button {
  flex: 0 0 auto; min-width: 72px; padding: 10px 8px;
  border-radius: 12px; border: 1px solid var(--line); background: #fff;
  cursor: pointer; font-size: 12.5px; line-height: 1.4;
}
.day-strip button.on { background: var(--teal); color: #fff; border-color: var(--teal); font-weight: 700; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
}
.badge.hurry { background: var(--warn-soft); color: var(--warn); }
.badge.vhurry { background: #fde8e6; color: var(--bad); }
.badge.pay { background: var(--teal-soft); color: var(--teal-dark); }

.actions-col { display: grid; gap: 8px; margin-top: 14px; }

.stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px;
}
.stat .lbl { color: var(--ink-3); font-size: 12px; }
.stat .num { font-weight: 800; font-size: 16px; margin-top: 4px; color: var(--navy); }

.contest-banner {
  background: linear-gradient(135deg, #0e7c8b, #142033);
  color: #fff; border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
}
.contest-banner .sub { opacity: .85; font-size: 12.5px; margin-top: 4px; }

.station-suggest {
  position: relative;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  max-height: 220px;
  overflow: auto;
  box-shadow: var(--shadow-sm);
  z-index: 5;
}
.station-suggest .sug-item {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.station-suggest .sug-item:last-child { border-bottom: 0; }
.station-suggest .sug-item:hover,
.station-suggest .sug-item:focus { background: var(--teal-soft); color: var(--teal-dark); }

.station-list { margin-top: 8px; }
label.field { position: relative; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.tabbar a .ti {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}
.tabbar a.on .ti { background: var(--teal); color: #fff; }
