:root {
  --bg: #F3F5F9;
  --card: #FFFFFF;
  --ink: #1C2430;
  --muted: #8B95A8;
  --line: #E6EAF2;
  --brand: #2F6BFF;
  --brand-soft: #EAF0FF;
  --ok: #22C55E;
  --warn: #F59E0B;
  --danger: #EF4444;
  --shadow: 0 8px 24px rgba(28, 36, 48, 0.06);
  --radius: 18px;
  --bottom-nav-h: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html {
  color-scheme: only light;
}
body.app-body {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  color: var(--ink);
  background: #E8ECF3;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  color-scheme: only light;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }

.phone-shell {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 0;
}
.app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 0 1px rgba(28,36,48,.04);
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: rgba(243, 245, 249, 0.92);
  backdrop-filter: blur(12px);
}
.app-title {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}
.home-top .app-title {
  font-size: .78rem;
  line-height: 1.35;
  letter-spacing: -.02em;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.icon-btn.ghost { visibility: hidden; pointer-events: none; box-shadow: none; background: transparent; }
.icon-btn svg { width: 22px; height: 22px; display: block; }
.notif-bell { position: relative; }
.notif-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #EF4444;
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}

.notif-list {
  display: grid;
  gap: 12px;
}
.notif-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}
.notif-card.is-new {
  border-color: #C9D9FF;
  background: linear-gradient(180deg, #F7F9FF, #FFFFFF);
}
.notif-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.notif-card-top strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}
.notif-card-top time {
  flex: 0 0 auto;
  font-size: .75rem;
  color: var(--muted);
  font-weight: 600;
}
.notif-card p {
  margin: 0;
  color: #475569;
  font-size: .9rem;
  line-height: 1.7;
  white-space: pre-wrap;
}
.notif-link {
  width: fit-content;
  color: var(--brand);
  font-weight: 800;
  font-size: .88rem;
}

.support-compose .desc { margin-bottom: 12px; }
.support-compose-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.support-compose-actions .btn { flex: 1; min-width: 120px; }

.support-inbox { gap: 14px; }
.support-inbox-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2F6BFF 0%, #4B86FF 55%, #6AA0FF 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(47, 107, 255, 0.28);
}
.support-inbox-hero-ico {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.18);
  flex-shrink: 0;
}
.support-inbox-hero-ico svg { width: 24px; height: 24px; display: block; }
.support-inbox-hero strong { display: block; font-size: 1rem; font-weight: 800; }
.support-inbox-hero p { margin: 4px 0 0; font-size: .82rem; opacity: .92; font-weight: 500; line-height: 1.5; }

.support-new-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1.5px dashed #B7C8FF;
  background: linear-gradient(180deg, #F7F9FF, #fff);
  color: var(--brand);
  font-weight: 800;
  box-shadow: var(--shadow);
}
.support-new-btn-ico {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
}

.support-inbox-list-wrap { display: grid; gap: 10px; }
.support-inbox-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}
.support-inbox-list-head h2 { margin: 0; font-size: 1rem; }

.support-thread-list { display: grid; gap: 8px; }
.support-thread-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}
.support-thread-avatar {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: .95rem;
  flex-shrink: 0;
}
.support-thread-main { flex: 1; min-width: 0; }
.support-thread-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.support-thread-top strong {
  display: block;
  font-size: .95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.support-thread-top time {
  flex-shrink: 0;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
}
.support-thread-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.support-thread-row.is-unread {
  border-color: #C9D9FF;
  background: linear-gradient(180deg, #F7F9FF, #fff);
}
.support-thread-row.is-unread strong { color: var(--brand); }

.support-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  background: #EEF2F7;
  color: #64748B;
}
.support-status-chip.status-open { background: #FFF4E5; color: #D97706; }
.support-status-chip.status-answered { background: #E9F9EF; color: #16A34A; }
.support-status-chip.status-closed { background: #EEF2F7; color: #64748B; }
.support-unread-dot {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  background: #EF4444;
  color: #fff;
}

.support-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.support-empty p { margin: 0; font-weight: 800; color: var(--ink); }
.support-empty span { display: block; margin-top: 6px; font-size: .84rem; font-weight: 600; }
.support-empty.soft {
  background: transparent;
  border: 0;
  padding: 40px 12px;
}

/* Chat room (app-like) */
.app:has(.support-room) .main {
  padding: 0;
  min-height: calc(100vh - 64px - var(--safe-top));
  display: flex;
  flex-direction: column;
}
.support-room {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 64px - var(--safe-top));
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(47,107,255,.08), transparent 60%),
    radial-gradient(360px 200px at 0% 100%, rgba(47,107,255,.05), transparent 55%),
    var(--bg);
}
.support-room-head {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 10px 16px 12px;
  background: rgba(243, 245, 249, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(230, 234, 242, .9);
}
.support-room-head-text strong {
  display: block;
  font-size: .98rem;
  font-weight: 800;
  line-height: 1.4;
}
.support-room-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.support-room-code {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
}
.support-room-alert { margin: 10px 16px 0; }

.support-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.support-day-sep {
  display: grid;
  place-items: center;
  margin: 4px 0 2px;
}
.support-day-sep span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.support-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 92%;
}
.support-msg.is-me {
  align-self: flex-start;
  flex-direction: row-reverse;
}
.support-msg.is-op { align-self: flex-end; }
.support-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .75rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-bottom: 18px;
}
.support-msg-col { min-width: 0; }
.support-msg.is-me .support-msg-col { display: flex; flex-direction: column; align-items: flex-start; }
.support-msg.is-op .support-msg-col { display: flex; flex-direction: column; align-items: flex-end; }

.support-bubble {
  max-width: 100%;
  padding: 11px 13px;
  border-radius: 18px;
  border: 1px solid transparent;
  box-shadow: 0 6px 16px rgba(28, 36, 48, 0.06);
}
.support-bubble.is-me {
  background: linear-gradient(180deg, #3B76FF, #2F6BFF);
  color: #fff;
  border-bottom-left-radius: 6px;
}
.support-bubble.is-op {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  border-bottom-right-radius: 6px;
}
.support-bubble p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: inherit;
}
.support-msg-time {
  margin-top: 4px;
  font-size: .68rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0 4px;
}

.support-composer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px calc(12px + var(--safe-bottom));
  background: rgba(255,255,255,.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
  box-shadow: 0 -8px 24px rgba(28, 36, 48, 0.06);
}
.support-composer textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  border: 1px solid var(--line);
  background: #F7F9FC;
  color: var(--ink);
  border-radius: 16px;
  padding: 11px 14px;
  outline: none;
  line-height: 1.5;
}
.support-composer textarea:focus {
  border-color: #AFC3FF;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47,107,255,.12);
}
.support-send-btn {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(47, 107, 255, 0.28);
}
.support-send-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  transform: scaleX(-1);
}
.support-send-btn:active { transform: scale(.96); }
.support-closed-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  text-align: center;
  padding: 14px 16px calc(14px + var(--safe-bottom));
  background: #EEF2F7;
  color: #64748B;
  font-weight: 700;
  font-size: .88rem;
  border-top: 1px solid var(--line);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  resize: vertical;
  min-height: 110px;
}
.field textarea:focus {
  border-color: #AFC3FF;
  box-shadow: 0 0 0 4px rgba(47,107,255,.12);
}

.main {
  display: grid;
  gap: 16px;
  padding: 4px 16px calc(var(--bottom-nav-h) + var(--safe-bottom) + 18px);
}

.search-wrap { margin-top: 2px; }
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border-radius: 18px;
  padding: 8px 8px 8px 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 10px 4px;
  font-size: 15px;
  color: var(--ink);
}
.search-bar input::placeholder { color: #A0AABC; }
.search-ico {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.search-ico .ui-ico { width: 20px; height: 20px; color: #fff; }
.search-bar-link {
  cursor: pointer;
}
.search-placeholder {
  flex: 1;
  min-width: 0;
  padding: 10px 4px;
  font-size: 15px;
  color: #A0AABC;
  font-weight: 500;
}

.block { display: grid; gap: 12px; }
.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.block-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}
.block-head a {
  color: var(--brand);
  font-size: .86rem;
  font-weight: 700;
}
.muted-count { color: var(--muted); font-size: .84rem; font-weight: 600; }

.popular-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
}
.popular-item {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.popular-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
}
.popular-icon .ui-ico { width: 26px; height: 26px; }
.popular-label {
  font-size: .78rem;
  font-weight: 700;
  color: #334155;
  line-height: 1.35;
}

.promo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #5B8CFF, #2F6BFF 55%, #2557D6);
  color: #fff;
  box-shadow: 0 14px 28px rgba(47, 107, 255, 0.28);
  min-height: 104px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
a.promo-banner:active {
  transform: scale(0.985);
}
.promo-copy strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
}
.promo-copy p {
  margin: 6px 0 0;
  opacity: .92;
  font-size: .86rem;
}
.promo-art {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.18);
  font-size: 1.8rem;
}

.cat-list, .svc-list, .menu-list, .order-list {
  display: grid;
  gap: 10px;
}

.cat-row, .svc-row, .menu-row {
  display: grid;
  grid-template-columns: 52px 1fr 24px;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.cat-row:active, .svc-row:active, .menu-row:active { transform: scale(.99); }
.cat-row-icon, .svc-row-icon, .menu-ico, .order-ico {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
}
.cat-row-icon .ui-ico, .svc-row-icon .ui-ico, .menu-ico .ui-ico, .order-ico .ui-ico {
  width: 24px; height: 24px;
}
.cat-row-text, .svc-row-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.cat-row-text strong, .svc-row-text strong, .menu-row strong {
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.4;
}
.cat-row-text small, .svc-row-text small {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
}
.cat-row-chev { color: #B0B8C7; display: grid; place-items: center; }
.cat-row-chev .ui-ico { width: 18px; height: 18px; }

.svc-row-thumb {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  background: #EEF2F7;
}
.svc-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.svc-row-meta .price {
  color: var(--brand);
  font-style: normal;
  font-weight: 800;
  font-size: .86rem;
}

.tabs-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.tabs-row::-webkit-scrollbar { display: none; }
.tab-chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  font-size: .86rem;
}
.tab-chip.active {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #D6E2FF;
  box-shadow: inset 0 -2px 0 var(--brand);
}

.order-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}
.order-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.order-card h3 {
  margin: 0;
  font-size: .98rem;
  font-weight: 800;
}
.order-sub {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
}
.order-price {
  color: var(--brand);
  font-weight: 800;
  font-size: 1rem;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 800;
}
.status-badge.tone-blue { background: #EAF0FF; color: #2F6BFF; }
.status-badge.tone-green { background: #E9F9EF; color: #16A34A; }
.status-badge.tone-orange { background: #FFF4E5; color: #D97706; }
.status-badge.tone-red { background: #FFECEC; color: #DC2626; }
.status-badge.tone-gray { background: #EEF2F7; color: #64748B; }

a.order-card { color: inherit; }
.order-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.order-pay-hint {
  font-size: .78rem;
  font-weight: 800;
  color: #D97706;
  background: #FFF4E5;
  padding: 5px 10px;
  border-radius: 999px;
}
.order-list { display: grid; gap: 10px; }
.order-detail h2 { font-weight: 800; }
.order-kv {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}
.order-kv > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #F7F9FC;
  border: 1px solid var(--line);
}
.order-kv dt {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}
.order-kv dd {
  margin: 0;
  font-weight: 800;
  font-size: .9rem;
  text-align: left;
}
.order-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--brand-soft);
  border: 1px solid #D6E2FF;
}
.order-note strong { display: block; margin-bottom: 6px; font-size: .88rem; }
.order-note p { margin: 0; font-size: .9rem; line-height: 1.7; color: #334155; }
.order-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
}
.order-form-data {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.order-form-data h3 {
  margin: 0 0 10px;
  font-size: .95rem;
  font-weight: 800;
}
.order-form-kv > div {
  align-items: flex-start;
}
.order-form-kv dd {
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 62%;
}
.order-form-kv a {
  color: var(--brand);
  font-weight: 800;
}
.order-ico {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}
.order-ico .ui-ico { width: 22px; height: 22px; }

.profile-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
}
.profile-avatar svg { width: 30px; height: 30px; }
.profile-info { display: grid; gap: 2px; }
.profile-info strong { font-size: 1.05rem; font-weight: 800; }
.profile-info span { color: var(--muted); font-size: .86rem; font-weight: 600; }
.phone-ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.user-badge {
  width: fit-content;
  margin-top: 4px;
  font-style: normal;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: .75rem;
  font-weight: 800;
}

.wallet-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #5B8CFF, #2F6BFF);
  color: #fff;
  box-shadow: 0 14px 28px rgba(47, 107, 255, 0.25);
}
.wallet-card span { opacity: .9; font-size: .86rem; font-weight: 600; }
.wallet-card strong { display: block; font-size: 1.45rem; font-weight: 800; margin-top: 4px; }
.wallet-card small { font-size: .85rem; font-weight: 700; }
.btn-wallet {
  width: fit-content;
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.wallet-ico {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255,255,255,.18);
  display: grid;
  place-items: center;
  color: #fff;
}
.wallet-ico .ui-ico { width: 24px; height: 24px; color: #fff; }

.pay-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  align-items: end;
  justify-items: center;
  pointer-events: none;
}
.pay-sheet[hidden] { display: none !important; }
.pay-sheet.is-open { pointer-events: auto; }
.pay-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  opacity: 0;
  transition: opacity .22s ease;
}
.pay-sheet.is-open .pay-sheet-backdrop { opacity: 1; }
.pay-sheet-panel {
  position: relative;
  width: min(100%, 430px);
  max-height: min(90vh, 680px);
  overflow: auto;
  margin: 0;
  padding: 10px 20px calc(28px + var(--safe-bottom));
  border-radius: 32px 32px 0 0;
  background: #ffffff;
  box-shadow: 0 -20px 48px rgba(15, 23, 42, 0.2);
  transform: translateY(110%);
  transition: transform .26s cubic-bezier(.2, .9, .2, 1);
}
.pay-sheet.is-open .pay-sheet-panel { transform: translateY(0); }
.pay-sheet-handle {
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: #D5DCE8;
  margin: 2px auto 16px;
}
.pay-sheet-head {
  position: relative;
  display: grid;
  justify-items: center;
  margin-bottom: 20px;
  min-height: 52px;
}
.pay-sheet-x {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1.5px solid #E6EAF2;
  background: #fff;
  color: #64748B;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.pay-sheet-titles {
  text-align: center;
  padding: 2px 48px 0;
}
.pay-sheet-titles h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.45;
}
.pay-sheet-titles p {
  margin: 8px 0 0;
  font-size: .86rem;
  font-weight: 500;
  color: #94A3B8;
  line-height: 1.55;
}
.pay-sheet-options {
  display: grid;
  gap: 14px;
}
.pay-option {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: right;
  padding: 18px 16px;
  border-radius: 20px;
  border: 1.5px solid #E8EDF5;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .12s ease;
}
.pay-option-ico {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #EAF1FF;
  color: #2F6BFF;
  flex: 0 0 auto;
}
.pay-option-ico svg {
  width: 28px;
  height: 28px;
  display: block;
}
.pay-option-body {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1;
}
.pay-option-body strong {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.35;
}
.pay-option-body em {
  font-style: normal;
  font-size: .86rem;
  font-weight: 600;
  color: #64748B;
  line-height: 1.45;
}
.pay-option-body small {
  font-size: .8rem;
  font-weight: 500;
  color: #94A3B8;
  line-height: 1.5;
}
.pay-option:hover:not(.is-locked) {
  border-color: #C5D6FF;
  background: #FAFCFF;
}
.pay-option:active:not(.is-locked) {
  transform: scale(.985);
}
.pay-option.is-active {
  border-color: #8FB0FF;
  background: #F5F8FF;
  box-shadow: 0 10px 24px rgba(47, 107, 255, 0.12);
}
.pay-option.is-locked,
.pay-option:disabled {
  opacity: .55;
  background: #F4F6F9;
  border-color: #E5E9F0;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  filter: grayscale(.35);
}
.pay-option.is-locked .pay-option-ico,
.pay-option:disabled .pay-option-ico {
  background: #E8ECF2;
  color: #94A3B8;
}
.pay-option.is-locked .pay-option-body strong,
.pay-option:disabled .pay-option-body strong {
  color: #64748B;
}
.pay-option.is-locked .pay-option-body small,
.pay-option:disabled .pay-option-body small {
  color: #EF4444;
  font-weight: 700;
}
.pay-sheet-note {
  margin: 16px 0 0;
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  color: #94A3B8;
}
.pay-sheet-note a {
  color: #2F6BFF;
  font-weight: 800;
}
body.pay-sheet-open {
  overflow: hidden;
}
body.pay-sheet-open .bottom-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}


.wallet-charge-panel .quick-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.wallet-charge-panel .quick-amount {
  padding: 8px 12px;
  font-size: .85rem;
}

.tx-list {
  display: grid;
  gap: 10px;
}
.tx-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.tx-row:last-child { border-bottom: 0; }
.tx-row strong { display: block; font-size: .95rem; }
.tx-row small { display: block; color: var(--muted); margin-top: 2px; }
.tx-row em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  color: var(--muted);
  font-size: .78rem;
}
.tx-amount {
  font-weight: 800;
  white-space: nowrap;
  text-align: left;
}
.tx-amount span {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
}
.tx-amount.credit { color: #15803d; }
.tx-amount.debit { color: #b91c1c; }

.hint-note {
  margin: 4px 2px 0;
  color: var(--muted);
  font-size: .78rem;
  text-align: center;
}

.faq-intro {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.7;
}
.faq-list {
  display: grid;
  gap: 10px;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr 28px;
  gap: 10px;
  align-items: center;
  padding: 14px 14px;
  font-weight: 800;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q { line-height: 1.5; font-size: .95rem; }
.faq-plus {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  position: relative;
}
.faq-plus::before,
.faq-plus::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  background: currentColor;
  border-radius: 2px;
  transform: translate(-50%, -50%);
}
.faq-plus::before { width: 12px; height: 2px; }
.faq-plus::after { width: 2px; height: 12px; }
.faq-item[open] .faq-plus::after { display: none; }
.faq-a {
  padding: 0 14px 14px;
  color: #5B6577;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.85;
}

.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-weight: 600;
}

.bottom-nav {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  pointer-events: none;
  padding: 0 10px calc(8px + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, rgba(232,236,243,.85) 35%, #E8ECF3);
}
.bottom-nav-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 410px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 6px;
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(28, 36, 48, 0.12);
  backdrop-filter: blur(14px);
}
.bottom-item {
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 16px;
  color: #9AA3B5;
  font-size: .7rem;
  font-weight: 700;
}
.bottom-item .bi {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}
.bottom-item .bi svg { width: 22px; height: 22px; display: block; }
.bottom-item.active {
  color: var(--brand);
  background: var(--brand-soft);
}

/* tones */
.tone-amber { background: #FFF4E5; color: #D97706; }
.tone-sky { background: #E8F5FF; color: #0284C7; }
.tone-teal { background: #E7F8F5; color: #0D9488; }
.tone-indigo { background: #EEF0FF; color: #4F46E5; }
.tone-green { background: #E9F9EF; color: #16A34A; }
.tone-mint { background: #E8FBF3; color: #059669; }
.tone-cyan { background: #E7F8FF; color: #0891B2; }
.tone-violet { background: #F4ECFF; color: #7C3AED; }
.tone-slate { background: #EEF2F7; color: #475569; }
.tone-sand { background: #FFF6E8; color: #B45309; }
.tone-rose { background: #FFEAF0; color: #E11D48; }
.tone-blue { background: #EAF0FF; color: #2F6BFF; }
.tone-gold { background: #FFF7DF; color: #CA8A04; }
.tone-steel { background: #EAF7F5; color: #0F766E; }
.tone-orange { background: #FFF1E7; color: #EA580C; }
.tone-aqua { background: #E8FBFF; color: #0891B2; }
.tone-flame { background: #FFEFE7; color: #C2410C; }
.tone-lime { background: #F3FCE8; color: #65A30D; }
.tone-purple { background: #F3ECFF; color: #7C3AED; }
.tone-brown { background: #F7EFE8; color: #9A3412; }
.tone-red { background: #FFECEC; color: #DC2626; }
.tone-ocean { background: #E8F4FF; color: #2563EB; }
.tone-yellow { background: #FFF9DB; color: #CA8A04; }
.tone-pink { background: #FFEAF5; color: #DB2777; }
.tone-navy { background: #EAF0FF; color: #1D4ED8; }
.tone-gray { background: #F1F5F9; color: #64748B; }
.tone-coral { background: #FFE9EC; color: #E11D48; }
.tone-maroon { background: #FFE8EE; color: #BE123C; }
.tone-forest { background: #EAF8EE; color: #15803D; }
.tone-neon { background: #E8FBFF; color: #0891B2; }
.tone-soft { background: #EAF7F5; color: #0F766E; }

/* service detail leftovers */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 10px; font-size: 1.05rem; }
.desc { color: var(--muted); white-space: pre-wrap; }
.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-weight: 700; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: #AFC3FF;
  box-shadow: 0 0 0 4px rgba(47,107,255,.12);
}
.submit-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--brand-soft);
  border: 1px solid #D6E2FF;
  margin-bottom: 10px;
}
.submit-price span { color: var(--muted); font-weight: 600; }
.submit-price strong { color: var(--brand); font-size: 1.1rem; font-weight: 800; }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 8px; }
.alert-ok { background: #E9F9EF; color: #166534; }
.alert-err { background: #FFECEC; color: #991B1B; }

.result-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 22px 18px;
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.result-card.ok { border-color: #BBF7D0; }
.result-card.err { border-color: #FECACA; }
.result-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
}
.result-card.ok .result-icon { background: #E9F9EF; color: #16A34A; }
.result-card.err .result-icon { background: #FFECEC; color: #DC2626; }
.result-card h2 { margin: 0; font-size: 1.15rem; }
.result-card > p { margin: 0; color: var(--muted); font-weight: 600; }
.result-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #F7F9FC;
  border: 1px solid var(--line);
  text-align: right;
}
.result-meta span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.result-meta strong { font-size: .92rem; }
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}
.chip {
  background: #F1F5F9;
  color: #475569;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: .75rem;
  font-weight: 700;
}
.info-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.service-layout { display: grid; gap: 14px; }
.jalali-picker { display: grid; gap: 8px; }
.jalali-controls { display: grid; grid-template-columns: 1fr 1.2fr 1fr auto; gap: 8px; }
.jalali-controls select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
}

.login-soft-card {
  display: grid;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.login-soft-card strong { font-size: 1rem; font-weight: 800; }
.login-soft-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.7;
}
.login-soft-card .btn { width: 100%; }

.auth-shell {
  display: grid;
  gap: 14px;
}
.auth-progress {
  display: grid;
  gap: 8px;
  padding: 2px 4px;
}
.auth-progress-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.auth-progress-track i {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: #D8DEEA;
  transition: background .25s ease, transform .25s ease;
}
.auth-progress-track i.on,
.auth-progress-track i.done { background: var(--brand); }
.auth-progress-track i.on { transform: scaleY(1.35); }
.auth-progress-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  text-align: center;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}
.auth-progress-labels .on { color: var(--brand); }

.auth-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px 16px 18px;
  box-shadow: var(--shadow);
  min-height: 340px;
}
.auth-step {
  display: grid;
  gap: 14px;
  animation: authIn .28s ease both;
}
.auth-step[hidden] { display: none !important; }
@keyframes authIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.auth-copy { display: grid; gap: 6px; }
.auth-copy h2 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.auth-copy p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.75;
}
.auth-field { display: grid; gap: 8px; }
.auth-field > span {
  font-weight: 800;
  font-size: .88rem;
  color: var(--ink);
}
.auth-field input {
  width: 100%;
  border: 1px solid var(--line);
  background: #F8FAFD;
  color: var(--ink);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  font-weight: 700;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.auth-field input:focus {
  background: #fff;
  border-color: #AFC3FF;
  box-shadow: 0 0 0 4px rgba(47,107,255,.12);
}
.auth-phone-input {
  font-size: 1.05rem !important;
  letter-spacing: 0.04em;
  text-align: left;
}
.auth-cta {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  font-size: 1rem;
  position: relative;
  margin-top: 4px;
}
.auth-cta.is-loading .btn-label { opacity: 0; }
.auth-cta .btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  position: absolute;
  inset: 0;
  margin: auto;
  animation: spin .7s linear infinite;
}
.auth-cta.is-loading .btn-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.otp-boxes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  direction: ltr;
  margin: 4px 0 2px;
}
.otp-digit {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  max-height: 58px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #F8FAFD;
  color: var(--ink);
  outline: none;
  caret-color: var(--brand);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.otp-digit:focus {
  background: #fff;
  border-color: #AFC3FF;
  box-shadow: 0 0 0 4px rgba(47,107,255,.12);
}
.auth-resend,
.auth-inline-link {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 800;
  font-size: .88rem;
  cursor: pointer;
  padding: 0;
}
.auth-resend {
  width: 100%;
  text-align: center;
  padding: 8px;
  color: var(--muted);
}
.auth-resend:disabled { opacity: .7; cursor: default; }
.auth-resend:not(:disabled) { color: var(--brand); }
.auth-inline-link { margin-right: 4px; }
.auth-alert {
  border-radius: 14px;
  padding: 11px 12px;
  font-size: .86rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.auth-alert.err { background: #FFECEC; color: #DC2626; }
.auth-alert.ok { background: #E9F9EF; color: #16A34A; }
.menu-row-danger strong { color: #DC2626; }

@media (min-width: 900px) {
  .phone-shell { padding: 24px 0; }
  .app {
    min-height: calc(100vh - 48px);
    border-radius: 28px;
    overflow: hidden;
  }
}
