:root {
  --bg: #1a1f2a;
  --bg-card: #232938;
  --border: #2f3644;
  --text: #f2f4f7;
  --muted: #7d8796;
  --muted-2: #8e98a6;
  --muted-3: #a8b0bc;
  --muted-4: #5c6573;
  --primary: #3d7ec4;
  --primary-400: #4f91d6;
  --primary-soft: #2a4060;
  --primary-50: #1e3554;
  --primary-text: #7eb6ef;
  --primary-icon: #4f91d6;
  --accent: #d97706;
  --accent-soft: #3d2a12;
  --accent-text: #f0b35a;
  --accent-600: #e08a2b;
  --secondary: #2d3440;
  --secondary-text: #9aa3b0;
  --secondary-900: #d5dae2;
  --wallet-1: #8eb8e8;
  --wallet-2: #6fa3de;
  --wallet-3: #4f91d6;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --tg-safe-b: 0px;
  --tg-safe-t: 72px;
  --tg-safe-l: 0px;
  --tg-safe-r: 0px;
  --tab-h: 64px;
  --max: 28rem;
  --page-pad: clamp(0.75rem, 3.5vw, 1rem);
  --gap: clamp(0.5rem, 2vw, 0.75rem);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  color: var(--text);
  background: var(--bg);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  margin: 0;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #1a1f2a !important;
  color: #f2f4f7 !important;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  width: 100%;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

button, input, textarea {
  font: inherit;
  color: inherit;
  max-width: 100%;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

.app {
  margin: 0 auto;
  width: 100%;
  max-width: var(--max);
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: max(var(--safe-t), var(--tg-safe-t), 72px);
  /* ÙÙ‚Ø· ÛŒÚ©â€ŒØ¨Ø§Ø± Ø¬Ø§ Ø¨Ø±Ø§ÛŒ ØªØ¨â€ŒØ¨Ø§Ø± Ø«Ø§Ø¨Øª â€” body Ø¯ÛŒÚ¯Ø± padding-bottom Ù†Ø¯Ø§Ø±Ø¯ */
  padding-bottom: calc(var(--tab-h) + max(var(--safe-b), var(--tg-safe-b)));
  padding-left: max(var(--safe-l), var(--tg-safe-l));
  padding-right: max(var(--safe-r), var(--tg-safe-r));
  background: var(--bg);
  overflow-x: hidden;
}

.page {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  animation: fadeIn 0.5s ease-out both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Shared page title row (matches wheel header) */
.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem var(--page-pad) 0;
}
.page-top-titles {
  min-width: 0;
  text-align: right;
}
.page-top-titles h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.page-top-titles p {
  margin: 0.15rem 0 0;
  font-size: 0.6875rem;
  color: var(--muted);
}
.page-top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.page-top-btn {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 1.125rem;
}
.page-top-btn:active {
  background: var(--secondary);
}
.page-top-btn--text {
  width: auto;
  height: 2.25rem;
  padding: 0 0.7rem;
  gap: 0.3rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-3);
}
.page-top-btn--text i {
  font-size: 0.875rem;
}

/* â€”â€”â€” Header â€”â€”â€” */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem var(--page-pad);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.page-header h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  min-width: 0;
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-header--svc h1 { text-align: center; }

.btn-add-sub {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.btn-add-sub i { font-size: 0.875rem; }
.btn-add-sub:active { background: var(--primary-400); }

.btn-refresh {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 0.5rem;
  background: rgba(47, 54, 68, 0.7);
  color: var(--muted-3);
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.btn-refresh i { font-size: 0.875rem; }

.header-spacer {
  width: 2.25rem;
  flex-shrink: 0;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  color: var(--muted-3);
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--border); }
.icon-btn i { font-size: 1.25rem; }

.plans-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem var(--page-pad) 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-text);
  transition: transform 0.15s;
}
.avatar:hover { transform: scale(1.05); }
.avatar i { font-size: 1.25rem; }
.avatar--lg {
  width: 5rem;
  height: 5rem;
}
.avatar--lg i { font-size: 2.25rem; }

.online-dot {
  position: absolute;
  bottom: -0.125rem;
  left: -0.125rem;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 999px;
  background: var(--primary);
  border: 2px solid var(--bg);
}
.avatar--lg .online-dot {
  bottom: 0.25rem;
  left: 0.25rem;
  width: 1rem;
  height: 1rem;
  border-color: var(--bg-card);
}

.user-chip .greet {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.user-chip h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.header-actions .icon-btn {
  border-radius: 999px;
  color: var(--muted);
}
.header-actions .icon-btn:hover { background: var(--bg-card); }

/* ——— Wallet card ——— */
.wallet-card {
  position: relative;
  overflow: hidden;
  margin: 1rem 1rem 0;
  padding: 1rem;
  border-radius: 1.5rem;
  background: linear-gradient(to bottom right, var(--wallet-1), var(--wallet-2), var(--wallet-3));
  color: #111827;
}
.wallet-card::before,
.wallet-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.22);
}
.wallet-card::before {
  top: -2.5rem;
  left: -2rem;
  width: 7rem;
  height: 7rem;
}
.wallet-card::after {
  bottom: -3rem;
  right: -1.5rem;
  width: 8rem;
  height: 8rem;
}

.wallet-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.wallet-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0;
  font-size: 0.75rem;
  color: #111827;
}
.wallet-amount {
  margin: 0.375rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #111827;
}
.wallet-amount small {
  margin-right: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1f2937;
}
.btn-charge {
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.btn-charge:hover {
  background: #f8fafc;
  color: var(--wallet-1);
}
.wallet-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(17, 24, 39, 0.15);
  font-size: 0.6875rem;
  color: #1f2937;
}

/* â€”â€”â€” Plans â€”â€”â€” */
.section {
  flex: 1;
  padding: var(--page-pad);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.section-head span {
  font-size: 0.6875rem;
  color: var(--muted);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.50rem;
  margin-top: 0.85rem;
  padding-top: 0.35rem;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.plan-badge {
  position: absolute;
  top: -0.625rem;
  left: 0.75rem;
  border-radius: 999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.625rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  z-index: 2;
}
.plan-card:nth-child(n+3) .plan-badge { top: -0.3rem; }
.plan-badge--muted {
  background: var(--secondary);
  color: var(--secondary-900);
}
.plan-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.plan-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: var(--primary);
  color: #fff;
}
.plan-icon i { font-size: 1.125rem; }
.plan-title-row h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plan-meta {
  margin: 0.625rem 0 0;
  font-size: 0.6875rem;
  color: var(--muted);
}
.plan-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.25rem;
  margin-top: 0.75rem;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}
.plan-price strong {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}
.plan-price span {
  font-size: 0.625rem;
  color: var(--muted);
}
.plan-old {
  font-size: 0.625rem;
  color: var(--muted-4);
  text-decoration: line-through;
}
.btn-buy {
  margin-top: 0.75rem;
  width: 100%;
  border-radius: 0.75rem;
  padding: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
}
.btn-buy:active {
  background: var(--primary-400);
}

.plan-info { min-width: 0; }
.plan-actions { margin-top: auto; }

.plan-card--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 1.3rem;
  padding-block: 0.75rem;
}
.plan-card--wide::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 2.5rem;
  transform: translate(-50%, -50%);
  background: var(--border);
  pointer-events: none;
}
.plan-card--wide .plan-icon { width: 1.875rem; height: 1.875rem; }
.plan-card--wide .plan-title-row h3 { white-space: normal; }
.plan-card--wide .plan-meta { margin-top: 0.3rem; }
.plan-card--wide .plan-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  margin-top: 0;
}
.plan-card--wide .plan-price-row {
  flex-direction: column;
  align-items: flex-start;
  margin-top: 0;
}
.plan-card--wide .plan-price { white-space: nowrap; }
.plan-card--wide .btn-buy {
  flex: 1 0 3.2rem;
  width: auto;
  margin-top: 0;
  padding-inline: 0.65rem;
}

/* Wheel promo on plans (Readdy style + Oxino dark) */
.wheel-promo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: calc(100% - 2rem);
  margin: 1rem 1rem 0;
  padding: 0.875rem;
  border-radius: 1rem;
  border: 1px solid rgba(224, 138, 43, 0.4);
  background: rgba(217, 119, 6, 0.14);
  color: inherit;
  text-align: right;
  cursor: pointer;
  transition: background 0.15s;
}
.wheel-promo:active {
  background: rgba(217, 119, 6, 0.22);
}
.wheel-promo-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--accent);
  color: #fff;
  font-size: 1.25rem;
}
.wheel-promo-text {
  flex: 1;
  min-width: 0;
}
.wheel-promo-text strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}
.wheel-promo-text span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.6875rem;
  color: var(--muted);
  line-height: 1.45;
}
.wheel-promo-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 999px;
  background: #fff;
  color: #b45309;
  padding: 0.375rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
}
.wheel-promo-cta i {
  font-size: 0.875rem;
}
.wheel-promo-cta time {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}
.wheel-promo-cta.is-timer {
  background: rgba(26, 31, 42, 0.55);
  color: var(--accent-text);
}
.page--services {
  flex: 1;
  min-height: 0;
}
.filters {
  padding: 0.75rem var(--page-pad) 0;
  flex-shrink: 0;
}
.search-wrap {
  position: relative;
}
.search-wrap i {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  color: var(--muted-4);
  pointer-events: none;
}
.search-wrap input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--bg-card);
  padding: 0.625rem 2.25rem 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
}
.search-wrap input:focus { border-color: var(--primary-400); }
.search-wrap input::placeholder { color: var(--muted); }

.filter-tabs {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--bg-card);
}
.filter-tabs button {
  flex: 1;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.375rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.filter-tabs button.is-active {
  background: var(--primary);
  color: #fff;
}

.services-count {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.services-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.75rem var(--page-pad) 0.5rem;
  overflow: hidden;
}
.services-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.svc-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: right;
  border-radius: 0.5rem;
  border: 1px solid var(--primary-soft);
  background: var(--bg-card);
  padding: 0.625rem;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}
.svc-tile:active { background: var(--border); }
.svc-tile.is-warn {
  border-color: var(--accent);
}
.svc-tile.is-expired {
  opacity: 0.72;
  border-color: var(--border);
}
.svc-tile-user {
  margin: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 700;
}
.svc-tile-title {
  margin: 0.125rem 0 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.625rem;
  color: var(--muted);
}
.svc-tile .badge {
  margin-top: 0.5rem;
  padding: 0.125rem 0.5rem;
  font-size: 0.5625rem;
}

.services-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  margin: 0.5rem 0 0.25rem;
  padding: 0.5rem 0 0.15rem;
  border-top: 1px solid var(--border);
}
.pager-btn {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  border-radius: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--muted-3);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.pager-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.pager-btn i { font-size: 1rem; }
.pager-info {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.badge {
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.25rem 0.625rem;
  font-size: 0.625rem;
  font-weight: 600;
}
.badge--active {
  background: var(--primary-soft);
  color: var(--primary-text);
}
.badge--warn {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.badge--expired {
  background: var(--secondary);
  color: var(--secondary-text);
}

.btn-more {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted-3);
  transition: background 0.15s;
}
.btn-more:hover { background: var(--border); }

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ——— Profile ——— */
.page--profile {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.page--profile .page-header { display: none; }
.profile-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem var(--page-pad) 1.25rem;
}
.pf-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Hero = wallet-card + black text */
.wallet-card.pf-hero {
  margin: 0;
  padding: 1rem;
  border-radius: 1.5rem;
  color: #111827;
}
.wallet-card.pf-hero .pf-hero-text h2,
.wallet-card.pf-hero .pf-hero-text > p,
.wallet-card.pf-hero .pf-stats strong,
.wallet-card.pf-hero .pf-stats span {
  color: #111827;
}
.pf-hero-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.pf-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(17, 24, 39, 0.08);
  color: #111827;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.pf-avatar.is-letter {
  background: #e08a2b;
  border-color: rgba(255, 255, 255, 0.35);
}
.pf-avatar-letter {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.pf-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pf-hero-text {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  text-align: right;
}
.pf-hero-text h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.35;
}
.pf-hero-text > p {
  margin: 0.125rem 0 0;
  font-size: 0.6875rem;
  color: #1f2937;
  direction: ltr;
  unicode-bidi: plaintext;
}
.pf-badge {
  margin-top: 0.375rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  background: #e08a2b;
  color: #fff;
  padding: 0.2rem 0.7rem;
  font-size: 0.625rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(224, 138, 43, 0.35);
}
.pf-badge:not(.is-partner) {
  background: rgba(17, 24, 39, 0.12);
  color: #111827;
  box-shadow: none;
}
.pf-badge i { font-size: 0.75rem; }
.pf-stats {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.28);
  padding: 0.75rem 0.25rem;
  text-align: center;
}
.pf-stats > div {
  padding: 0 0.25rem;
}
.pf-stats strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
}
.pf-stats span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.625rem;
  color: #1f2937;
}
.pf-stats-mid {
  border-inline: 1px solid rgba(17, 24, 39, 0.18);
}

/* Money cards — light pastel like reference */
.pf-money {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.pf-money-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  border-radius: 1rem;
  border: 1px solid transparent;
  padding: 0.875rem;
}
.pf-money-card.is-wallet {
  border-color: #f3d2a8;
  background: #ffe8cc;
}
.pf-money-card.is-gift {
  border-color: #bfd7f2;
  background: #dcecff;
}
.pf-money-card > i {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.pf-money-card.is-wallet > i { color: #c2410c; }
.pf-money-card.is-gift > i { color: #1d4ed8; }
.pf-money-card strong {
  font-size: 1.0625rem;
  font-weight: 800;
  color: #111827;
  line-height: 1;
  letter-spacing: -0.01em;
}
.pf-money-card span {
  margin-top: 0.35rem;
  font-size: 0.625rem;
  color: #374151;
  line-height: 1.3;
}

/* Action tiles — همان رنگ باکس سرویس‌ها */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.625rem;
}
.pf-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  border-radius: 1rem;
  border: 1px solid var(--primary-soft);
  background: var(--bg-card);
  padding: 0.75rem 0.4rem;
  text-align: center;
  min-height: 5.5rem;
  color: var(--text);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.pf-tile:active {
  transform: translateY(-1px);
  background: var(--border);
  border-color: var(--primary-400);
}
.pf-tile-ico {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}
.pf-tile-ico.is-accent {
  background: #ffe8cc;
  color: #c2410c;
}
.pf-tile-ico.is-primary {
  background: #dbeafe;
  color: #1d4ed8;
}
.pf-tile b {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.pf-tile small {
  font-size: 0.5625rem;
  color: var(--muted);
  line-height: 1.2;
}

/* Invite + logout — همان رنگ باکس سرویس‌ها */
.pf-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.pf-code {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 1rem;
  border: 1px solid var(--primary-soft);
  background: var(--bg-card);
  padding: 0.625rem 0.875rem;
  color: var(--text);
}
.pf-code > i {
  font-size: 1rem;
  color: var(--primary-icon);
  flex-shrink: 0;
}
.pf-code > div {
  flex: 1;
  min-width: 0;
  text-align: right;
}
.pf-code p {
  margin: 0;
  font-size: 0.625rem;
  color: var(--muted);
}
.pf-code strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-code button {
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 0.75rem;
  background: var(--primary);
  color: #fff;
  padding: 0.375rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
}
.pf-code button:active { background: var(--primary-400); }
.pf-out {
  width: 3.625rem;
  height: 3.625rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  border-radius: 1rem;
  border: 1px solid var(--primary-soft);
  background: var(--bg-card);
}
.pf-out i {
  font-size: 1.125rem;
  color: #ea580c;
}
.pf-out span {
  font-size: 0.625rem;
  font-weight: 600;
  color: #ea580c;
}
.pf-out:active { background: var(--border); }
.pf-meta {
  margin: 0;
  text-align: center;
  font-size: 0.625rem;
  color: var(--muted-4);
}

.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--accent-soft);
  color: var(--accent-text);
  flex-shrink: 0;
}
.icon-box i { font-size: 1.125rem; }
.icon-box--primary {
  background: var(--primary-soft);
  color: var(--primary-icon);
}
.icon-box--accent {
  background: var(--accent-soft);
  color: var(--accent-text);
}
.icon-box--muted {
  background: var(--secondary);
  color: var(--secondary-text);
}
.info-rows { margin-top: 0.25rem; }
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: 0; }
.info-row-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--muted-2);
}
.info-ico,
.info-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--muted-2);
  flex-shrink: 0;
}
.info-ico i,
.info-row-icon i { font-size: 1rem; }
.info-row-value {
  font-size: 0.875rem;
  font-weight: 600;
}
.info-row-value.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  direction: ltr;
}



/* â€”â€”â€” Tab bar â€”â€”â€” */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  /* ÙÙ‚Ø· ÙØ§ØµÙ„Ù‡ Ø³ÛŒØ³ØªÙ…/ØªÙ„Ú¯Ø±Ø§Ù…Ø› Ø§Ø±ØªÙØ§Ø¹ Ø¯Ú©Ù…Ù‡â€ŒÙ‡Ø§ Ø¬Ø¯Ø§ Ù†Ú¯Ù‡ Ø¯Ø§Ø´ØªÙ‡ Ù…ÛŒâ€ŒØ´ÙˆØ¯ ØªØ§ Ù„ÛŒØ¨Ù„ Ù†Ù¾Ø±Ø¯ */
  padding-bottom: max(var(--safe-b), var(--tg-safe-b));
  padding-left: max(var(--safe-l), var(--tg-safe-l));
  padding-right: max(var(--safe-r), var(--tg-safe-r));
  box-sizing: border-box;
}
.tabbar-inner,
.tabbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}
.tabbar button.tab,
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.15rem;
  padding: 0.4rem 0.15rem 0.45rem;
  min-height: var(--tab-h);
  height: auto;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--muted);
  transition: color 0.15s;
  overflow: visible;
  min-width: 0;
}
.tabbar button.tab > span:last-child,
.tab > span:last-child {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  white-space: nowrap;
  text-overflow: clip;
  text-align: center;
}
.tab-icon,
.tabbar button .tab-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 999px;
  transition: background 0.15s;
}
.tab-icon i { font-size: 1.125rem; }
.tab.is-active {
  color: var(--primary-icon);
}
.tab.is-active .tab-icon,
.tab.is-active .tab-ico {
  background: var(--primary-soft);
  color: var(--primary-icon);
}

/* â€”â€”â€” Toast â€”â€”â€” */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + max(var(--safe-b), var(--tg-safe-b)) + 1rem);
  transform: translateX(-50%) translateY(12px);
  z-index: 1000;
  max-width: calc(100% - 2rem);
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8125rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.spinner {
  width: 2rem;
  height: 2rem;
  margin: 0 auto;
  border: 2px solid var(--border);
  border-top-color: var(--primary-400);
  border-radius: 999px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Scrollbar */
.section::-webkit-scrollbar,
.profile-main::-webkit-scrollbar,
.invoice-main::-webkit-scrollbar {
  width: 4px;
}
.section::-webkit-scrollbar-thumb,
.profile-main::-webkit-scrollbar-thumb,
.invoice-main::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* ——— Invoice / پیش‌فاکتور ——— */
.page--invoice {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.invoice-main {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem var(--page-pad) 1rem;
}
.invoice-card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1.25rem;
}
.invoice-renew-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(61, 126, 196, 0.35);
  background: linear-gradient(145deg, var(--primary-50), var(--bg-card));
  padding: 0.875rem 1rem;
}
.invoice-renew-banner > i {
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 1.25rem;
  color: var(--primary-icon);
}
.invoice-renew-banner strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-text);
}
.invoice-renew-banner p {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--muted-3);
  line-height: 1.6;
}
.invoice-renew-banner .invoice-renew-user {
  direction: ltr;
  unicode-bidi: isolate;
  color: var(--text);
  font-weight: 600;
}
.invoice-plan-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.invoice-plan-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: var(--primary-soft);
  color: var(--primary-icon);
  font-size: 1.25rem;
  flex-shrink: 0;
}
.invoice-plan-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.invoice-plan-head p {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.invoice-features {
  list-style: none;
  margin: 1rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.invoice-features li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--muted-3);
}
.invoice-feat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  background: var(--primary-soft);
  color: var(--primary-icon);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.invoice-gift {
  margin-top: 1rem;
}
.invoice-gift label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-3);
}
.invoice-gift-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.invoice-gift-row input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--text);
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
}
.invoice-gift-row input:focus {
  border-color: var(--primary-400);
}
.invoice-gift-row input::placeholder {
  color: var(--muted);
}
.btn-apply {
  flex-shrink: 0;
  white-space: nowrap;
  border-radius: 0.5rem;
  background: #3a4454;
  color: #fff;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.btn-apply:active {
  opacity: 0.9;
}
.invoice-discount-note {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--primary-text);
}
.invoice-discount-note.is-error {
  color: var(--accent-text);
}
.invoice-paybar {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  padding: 0.75rem var(--page-pad);
}
.invoice-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
}
.invoice-pay-row > span:first-child {
  color: var(--muted);
}
.invoice-pay-amount {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}
.invoice-pay-amount small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  margin-right: 0.25rem;
}
.invoice-old-price {
  display: block;
  text-align: left;
  font-size: 0.6875rem;
  color: var(--muted-4);
  text-decoration: line-through;
  margin-top: 0.125rem;
}
.btn-confirm-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 100%;
  margin-top: 0.75rem;
  border-radius: 0.75rem;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.btn-confirm-buy:disabled {
  opacity: 0.6;
}
.btn-confirm-buy:active:not(:disabled) {
  background: var(--primary-400);
}

/* Service detail (Readdy subscription details) */
.service-detail {
  padding: 0.75rem var(--page-pad) 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.page--service {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.page--service .service-detail.section {
  padding-top: 0.75rem;
}

.svc-hero {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 1rem;
  background: linear-gradient(160deg, #9ec8f0 0%, #7eb6ef 42%, #5a9adf 100%);
  color: #16355a;
}
.svc-hero::before,
.svc-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}
.svc-hero::before {
  width: 8rem;
  height: 8rem;
  left: -2.5rem;
  top: -2.5rem;
  background: rgba(255, 255, 255, 0.22);
}
.svc-hero::after {
  width: 9rem;
  height: 9rem;
  right: -2rem;
  bottom: -3rem;
  background: rgba(255, 255, 255, 0.14);
}
.svc-hero-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.svc-hero-chip,
.svc-hero-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 999px;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  color: #16355a;
}
.svc-hero-chip {
  background: rgba(255, 255, 255, 0.42);
}
.svc-hero-chip i,
.svc-hero-status i {
  font-size: 0.75rem;
  color: #16355a;
}
.svc-hero-status {
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}
.svc-hero-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: #16355a;
}
.svc-hero-row > i {
  flex-shrink: 0;
  font-size: 0.95rem;
  color: #1a4068;
}
.svc-hero-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.svc-hero-user {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
}
.svc-hero-user > i { font-size: 1rem; }
.svc-hero-pass,
.svc-hero-use {
  font-size: 0.75rem;
  font-weight: 500;
  color: #1f4a72;
}
.svc-hero-pass > i,
.svc-hero-use > i,
.svc-hero-plan > i,
.svc-hero-bought > i {
  color: #1f4a72;
}

.svc-time-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.45rem 0.65rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.svc-time-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: rgba(22, 53, 90, 0.1);
  color: #16355a;
  margin-top: 0;
}
.svc-time-ico i { font-size: 0.95rem; }
.svc-time-body {
  min-width: 0;
  flex: 1;
  text-align: right;
}
.svc-time-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.svc-time-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 500;
  color: #2a5a86;
}
.svc-time-pct {
  font-size: 0.625rem;
  font-weight: 700;
  color: #16355a;
  flex-shrink: 0;
}
.svc-time-value {
  margin: 0.05rem 0 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #122c4a;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.svc-time-bar {
  margin-top: 0.3rem;
  height: 0.28rem;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(22, 53, 90, 0.14);
}
.svc-time-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1a5a96 0%, #3d7ec4 55%, #5a9adf 100%);
  transition: width 0.45s ease;
  min-width: 0;
}

.svc-panel {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1rem;
}
.svc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.svc-panel-head span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.svc-panel-head strong {
  color: var(--primary-400);
  font-size: 0.75rem;
}
.svc-progress {
  margin-top: 0.75rem;
  height: 0.5rem;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border);
}
.svc-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.4s ease;
  min-width: 0;
}
.svc-panel-hint {
  margin: 0.5rem 0 0;
  font-size: 0.6875rem;
  color: var(--muted);
}
.svc-note-title {
  font-size: 0.875rem !important;
  font-weight: 700;
  color: var(--text) !important;
}
.svc-note-title i { color: var(--primary-400); font-size: 1rem; }
.btn-note-edit {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 0.5rem;
  background: var(--primary);
  color: #fff;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.svc-note-text {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--muted);
}

.svc-conn-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.svc-conn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.625rem;
  background: var(--bg);
  padding: 0.75rem 0.875rem;
}
.svc-conn-info {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}
.svc-conn-info > i {
  flex-shrink: 0;
  font-size: 1.125rem;
  color: var(--muted-3);
}
.svc-conn-info > span {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.svc-conn-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  color: var(--muted-3);
  font-size: 1.125rem;
}
.svc-conn-copy:active {
  background: var(--border);
  color: var(--primary-text);
}

.svc-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}
.svc-act {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--bg-card), #1c2839);
  color: var(--text);
  min-height: 3.25rem;
  padding: 0.75rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.svc-act i { font-size: 1.25rem; color: var(--primary-text); }
.svc-act--wide { grid-column: 1 / -1; font-size: 0.875rem; }
.svc-act--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-3);
}
.svc-act--primary {
  background: linear-gradient(110deg, #238cf0, #328be3);
  border-color: #55a8f5;
  color: #fff;
  font-weight: 700;
  min-height: 3.5rem;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}
.svc-act--primary i { color: #fff; font-size: 1.5rem; }
.svc-act--primary:active { background: var(--primary-400); }

/* Service history */
.history-page {
  padding-bottom: 1.5rem;
}
.history-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 0.875rem 1rem;
}
.history-summary-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: var(--primary-soft);
  color: var(--primary-icon);
  flex-shrink: 0;
  font-size: 1.25rem;
}
.history-summary strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
}
.history-summary p {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.history-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.25rem;
  border-right: 2px solid var(--border);
}
.history-item {
  position: relative;
  display: flex;
  gap: 0.75rem;
  padding: 0 0.85rem 1rem 0;
}
.history-item:last-child { padding-bottom: 0; }
.history-dot {
  position: absolute;
  right: -1.05rem;
  top: 0.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--primary-icon);
  font-size: 0.95rem;
  z-index: 1;
}
.history-item--renew .history-dot {
  color: var(--accent-text);
  border-color: rgba(217, 119, 6, 0.35);
  background: var(--accent-soft);
}
.history-item--purchase .history-dot {
  color: var(--primary-text);
  border-color: rgba(61, 126, 196, 0.4);
  background: var(--primary-50);
}
.history-card {
  flex: 1;
  min-width: 0;
  margin-right: 1.1rem;
  border-radius: 0.875rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 0.75rem 0.875rem;
}
.history-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.history-card-top strong {
  font-size: 0.875rem;
  font-weight: 700;
}
.history-card-top time {
  flex-shrink: 0;
  font-size: 0.6875rem;
  color: var(--muted);
  direction: ltr;
  unicode-bidi: isolate;
}
.history-card-detail {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--muted-3);
  line-height: 1.6;
}

/* Bottom sheets (Readdy-style) */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 0;
}
.sheet-panel {
  width: 100%;
  max-width: var(--max);
  max-height: min(88vh, 88dvh);
  display: flex;
  flex-direction: column;
  border-radius: 1rem 1rem 0 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: 0;
  color: var(--text);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  animation: sheetUp 0.28s ease;
}
@keyframes sheetUp {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}
.sheet-handle {
  width: 3rem;
  height: 0.375rem;
  margin: 0.625rem auto 0;
  border-radius: 999px;
  background: var(--border);
  flex-shrink: 0;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem var(--page-pad) 0.25rem;
}
.sheet-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.sheet-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  color: var(--muted-3);
  font-size: 1.25rem;
}
.sheet-body {
  padding: 0.75rem var(--page-pad) calc(1rem + var(--safe-b));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sheet-textarea {
  width: 100%;
  min-height: 8rem;
  resize: vertical;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  outline: none;
  font-family: inherit;
}
.sheet-textarea:focus { border-color: var(--primary-400); }
.sheet-counter {
  margin-top: 0.5rem;
  text-align: left;
  font-size: 0.75rem;
  color: var(--muted);
  direction: ltr;
}
.sheet-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(47, 54, 68, 0.65);
  padding: 0.625rem 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.sheet-current strong {
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
}
.sheet-current-val {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 700;
}
.sheet-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-3);
}
.sheet-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  outline: none;
  text-align: left;
}
.sheet-input:focus { border-color: var(--primary-400); }
.sheet-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.btn-sheet-ghost,
.btn-sheet-primary {
  flex: 1;
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
.btn-sheet-ghost {
  border: 1px solid var(--border);
  color: var(--muted-3);
  background: transparent;
}
.btn-sheet-primary {
  background: var(--primary);
  color: #fff;
}
.sheet-section-title {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  font-weight: 700;
}
.sheet-hint {
  margin: 0.25rem 0 0;
  font-size: 0.6875rem;
  color: var(--muted);
}
.renew-plans {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.renew-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: right;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 0.75rem;
  color: var(--text);
}
.renew-plan.is-selected {
  border-color: var(--primary);
  background: var(--primary-50);
}
.renew-plan-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.renew-plan-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: rgba(47, 54, 68, 0.7);
  color: var(--primary-icon);
  flex-shrink: 0;
}
.renew-plan-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
}
.renew-plan-meta {
  margin: 0.125rem 0 0;
  font-size: 0.6875rem;
  color: var(--muted);
}
.renew-plan-side {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}
.renew-plan-side > i {
  font-size: 1.125rem;
  color: var(--muted-4);
}
.renew-plan.is-selected .renew-plan-side > i {
  color: var(--primary-400);
}
.renew-plan-price {
  white-space: nowrap;
  border-radius: 0.5rem;
  background: var(--primary-soft);
  color: var(--primary-text);
  padding: 0.375rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
}
.sheet-confirm-text {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--muted-3);
}
.sheet-confirm-card {
  border-radius: 0.75rem;
  background: rgba(47, 54, 68, 0.65);
  padding: 0.25rem 0.875rem;
  margin-bottom: 0.25rem;
}
.sheet-confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted);
}
.sheet-confirm-row:last-child { border-bottom: 0; }
.sheet-confirm-row strong {
  color: var(--text);
  font-weight: 700;
  text-align: left;
}
.sheet-confirm-warn {
  margin: 0 0 0.5rem;
  padding: 0 0.25rem;
  font-size: 0.75rem;
  color: #f0b35a;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  padding: var(--page-pad);
}
.modal-box {
  position: relative;
  width: 100%;
  max-width: min(22rem, 100%);
  background: var(--bg-card);
  border-radius: 1rem;
  padding: clamp(1rem, 4vw, 1.25rem);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.modal-box h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}
.modal-box label {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted-3);
  font-size: 0.875rem;
}
.modal-box input {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
}
.modal-box input:focus { border-color: var(--primary-400); }
.modal-close {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  color: var(--muted-3);
  font-size: 1.25rem;
}
.btn-modal-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
  border-radius: 0.75rem;
  background: var(--primary);
  color: #fff;
  padding: 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.btn-modal-primary:active { background: var(--primary-400); }
.modal-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 0.75rem 0 0.25rem;
}
.qr-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 12rem;
  width: min(220px, 70vw);
  color: var(--muted-3);
  font-size: 0.8125rem;
}
.qr-loading .spinner {
  width: 2rem;
  height: 2rem;
  border-width: 3px;
}
.modal-qr-wrap img {
  width: min(220px, 70vw);
  height: auto;
  aspect-ratio: 1;
  max-width: 100%;
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.5rem;
}
.modal-qr-hint {
  margin: 0.5rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

#sheetHost {
  position: relative;
  z-index: 200;
}

/* â€”â€”â€” Responsive â€”â€”â€” */
@media (max-width: 380px) {
  :root {
    --page-pad: 0.625rem;
    --gap: 0.5rem;
    --tab-h: 56px;
  }

  .page-header { gap: 0.35rem; }
  .page-header h1 { font-size: 0.9rem; }
  .btn-add-sub {
    padding: 0.3rem 0.55rem;
    font-size: 0.6875rem;
  }
  .btn-refresh {
    padding: 0.3rem 0.45rem;
    font-size: 0.6875rem;
  }
  .btn-refresh span,
  .btn-add-sub {
    max-width: 7.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .filter-tabs button {
    padding: 0.3rem 0.2rem;
    font-size: 0.6875rem;
  }

  .svc-hero { padding: 0.75rem; }
  .svc-hero-user { font-size: 0.8125rem; }
  .svc-time-value { font-size: 0.9rem; }
  .svc-time-box { padding: 0.625rem 0.75rem; gap: 0.5rem; }

  .svc-act {
    padding: 0.625rem 0.35rem;
    font-size: 0.6875rem;
    gap: 0.35rem;
  }
  .svc-act i { font-size: 0.9rem; }
  .svc-act--wide { font-size: 0.8125rem; }

  .renew-plan { padding: 0.625rem; gap: 0.35rem; }
  .renew-plan-price {
    padding: 0.3rem 0.45rem;
    font-size: 0.625rem;
  }
  .renew-plan-title { font-size: 0.8125rem; }

  .invoice-pay-amount { font-size: 1rem; }
  .btn-confirm-buy { font-size: 0.8125rem; padding: 0.75rem; }

  .tab { font-size: 0.6875rem; padding: 0.35rem 0; }
  .tab-ico, .tabbar button .tab-ico {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .plan-card { padding: 0.75rem; }
  .plan-card h3 { font-size: 0.8125rem; }
  .plan-price { font-size: 1rem; }

  .svc-conn-row { padding: 0.625rem 0.75rem; }
  .svc-conn-info > span { font-size: 0.8125rem; }

  .pf-hero { padding: 0.85rem; }
  .wallet-card.pf-hero { padding: 0.85rem; }
  .pf-avatar { width: 3.1rem; height: 3.1rem; }
  .pf-money-card strong { font-size: 0.95rem; }
  .pf-tile { min-height: 5.2rem; padding: 0.65rem 0.3rem; }
  .pf-tile b { font-size: 0.66rem; }
  .invoice-card { padding: 1rem; }
}

@media (max-width: 340px) {
  .plans-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }
  .svc-actions-grid {
    grid-template-columns: 1fr;
  }
  .svc-act--wide { grid-column: auto; }
  .pf-grid {
    grid-template-columns: 1fr;
  }
  .btn-add-sub {
    max-width: 6.5rem;
  }
  .svc-hero-chip,
  .svc-hero-status {
    padding: 0.2rem 0.45rem;
    font-size: 0.625rem;
  }
  .filter-tabs {
    border-radius: 0.75rem;
    flex-wrap: wrap;
  }
}

@media (min-width: 480px) {
  :root {
    --page-pad: 1.125rem;
    --gap: 0.875rem;
  }
  .services-grid {
    gap: 0.875rem;
  }
  .svc-hero { padding: 1.125rem; }
  .sheet-panel {
    border-radius: 1.25rem 1.25rem 0 0;
  }
}

@media (min-width: 640px) {
  :root {
    --max: 30rem;
  }
  .app {
    box-shadow: 0 0 0 1px var(--border);
  }
  .tabbar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--max);
    border-inline: 1px solid var(--border);
  }
  .sheet-overlay {
    align-items: flex-end;
  }
  .sheet-panel {
    margin: 0 auto;
  }
}

@media (min-width: 900px) {
  :root {
    --max: 32rem;
    --page-pad: 1.25rem;
  }
}

@media (orientation: landscape) and (max-height: 480px) {
  :root { --tab-h: 52px; }
  .page-header {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }
  .svc-hero { padding: 0.75rem; }
  .svc-time-box { margin-top: 0.75rem; }
  .sheet-panel {
    max-height: min(92vh, 92dvh);
  }
  .sheet-body {
    padding-top: 0.5rem;
    padding-bottom: calc(0.75rem + var(--safe-b));
  }
  .invoice-main {
    padding-bottom: 0.5rem;
  }
  .pf-invite-code { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .page,
  .sheet-panel,
  * {
    animation: none !important;
    transition: none !important;
  }
}

@supports (padding: max(0px)) {
  .app {
    padding-bottom: calc(var(--tab-h) + max(var(--safe-b), var(--tg-safe-b), 0px));
  }
  .sheet-body {
    padding-bottom: max(calc(1rem + var(--safe-b)), 1rem);
  }
}



/* Compact subscription actions */
.svc-actions-grid { gap: 0.5rem; }
.svc-actions-grid .svc-act {
  min-height: 2.75rem;
  padding: 0.625rem 0.375rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  gap: 0.375rem;
}
.svc-actions-grid .svc-act i { font-size: 1.125rem; }
.svc-actions-grid .svc-act--primary {
  min-height: 3rem;
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
}
.svc-actions-grid .svc-act--primary i { font-size: 1.25rem; }
.mp-form{display:grid;gap:14px;padding-bottom:24px}.mp-card{background:#232938;border:1px solid #354052;border-radius:18px;padding:18px}.mp-card h3{font-size:15px;margin:0 0 10px}.mp-card label{display:block;font-size:13px;margin-bottom:14px}.mp-card input:not([type=checkbox]):not([type=file]),.mp-card textarea{box-sizing:border-box;width:100%;border:1px solid #3c485c;background:#1a1f2a;color:#f2f4f7;font:inherit;border-radius:10px;padding:12px;margin-top:8px}.mp-card textarea{resize:vertical}.mp-card input:focus,.mp-card textarea:focus{outline:2px solid #7eb6ef;outline-offset:2px}.mp-toggle{display:flex!important;align-items:center;justify-content:space-between;gap:12px}.mp-toggle input{accent-color:#7eb6ef;width:19px;height:19px}.mp-channel{padding:12px 0;border-bottom:1px solid #354052}.mp-channel:last-child{border:0}.mp-channel .mp-toggle{margin:0}.mp-hint,.mp-card small{font-size:12px;color:#a6b2c4;line-height:1.9}.mp-photo{text-align:center}.mp-photo #mpAvatar{width:80px;height:80px;border-radius:50%;background:#1a1f2a;display:grid;place-items:center;overflow:hidden;margin:0 auto 16px;font-size:30px;color:#7eb6ef}.mp-photo img{width:100%;height:100%;object-fit:cover}.mp-photo-label{color:#7eb6ef;cursor:pointer}.mp-photo input[type=file]{display:block;max-width:100%;margin:12px auto;font-size:12px}.mp-actions{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0}.mp-actions a,.mp-actions button,.mp-photo button{border:1px solid #3c485c;background:#1a1f2a;color:#9bc8f4;padding:10px 14px;border-radius:10px;font:inherit;text-decoration:none;font-size:13px}.mp-save{background:#7eb6ef;color:#14253b;border:0;border-radius:12px;padding:14px;font:inherit;font-weight:700}.mp-save:disabled{opacity:.6}#mpMessage{font-size:13px;line-height:1.8;color:#9bc8f4;margin:0}.page--mypage{padding-bottom:30px}

.tabbar,.tabbar-inner{grid-template-columns:repeat(5,minmax(0,1fr));}

/* Five destinations remain on one row, including clients with an older cached stylesheet. */
#tabbar.tabbar{grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:auto!important;grid-auto-flow:column!important;align-items:start;gap:0}
#tabbar.tabbar>button.tab{grid-row:1;min-width:0;width:100%;padding:7px 1px 9px;font-size:10px;min-height:62px;box-sizing:border-box}
#tabbar.tabbar>button.tab>span:last-child{white-space:nowrap;font-size:10px;letter-spacing:-.3px}
#tabbar.tabbar .tab-ico{width:30px;height:30px;font-size:19px}
.page--mypage{padding:0 14px 18px}.page--mypage .page-top{padding:16px 2px 12px}.page--mypage .page-top h2{font-size:20px}.page--mypage .page-top p{font-size:12px;margin-top:5px}.mp-form{gap:12px}.mp-card{padding:15px;border-radius:16px;min-width:0}.mp-card input:not([type=checkbox]):not([type=file]),.mp-card textarea{padding:10px 12px;font-size:13px;line-height:1.7;border-radius:10px;margin-top:7px}.mp-card label{font-size:12px;margin-bottom:12px}.mp-card textarea{min-height:76px;max-height:180px}.mp-identity>label:last-child{margin-bottom:0}.mp-bio-label>span{float:left;color:#7f8b9f;font-size:10px}.mp-photo-row{display:flex;align-items:center;gap:12px;margin-bottom:17px;padding-bottom:15px;border-bottom:1px solid #354052}.mp-photo-row #mpAvatar{width:58px;height:58px;flex:0 0 58px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#1a1f2a;color:#7eb6ef;font-size:25px}.mp-photo-row #mpAvatar img{width:100%;height:100%;object-fit:cover}.mp-photo-controls{flex:1}.mp-photo-controls strong{font-size:12px;font-weight:500;display:block;margin-bottom:8px}.mp-photo-controls>div{display:flex;gap:12px;align-items:center}.mp-photo-controls label.mp-upload{display:inline-flex;gap:5px;align-items:center;cursor:pointer;margin:0;color:#9bc8f4;font-size:11px}.mp-photo-controls button{background:none;border:0;padding:2px 0;font:inherit;font-size:11px;color:#8b97aa}.mp-section-title{display:flex;align-items:center;justify-content:space-between}.mp-section-title h3{font-size:13px;margin:0}.mp-section-title>span{font-size:10px;color:#8c9ab0}.mp-hint{font-size:11px;line-height:1.9;margin:7px 0 12px}.mp-contact-item{border-top:1px solid #354052}.mp-contact-item summary{display:flex;align-items:center;gap:10px;padding:11px 0;list-style:none;cursor:pointer}.mp-contact-item summary::-webkit-details-marker,.mp-publish summary::-webkit-details-marker{display:none}.mp-channel-icon{width:32px;height:32px;border-radius:10px;background:#1a1f2a;display:grid;place-items:center;color:#8ab9eb;font-size:18px}.mp-channel-title{flex:1;min-width:0;font-size:12px}.mp-channel-title small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:190px;font-size:10px;color:#8390a4;line-height:1.7}.mp-indicator{font-size:9px;color:#80c5b0}.mp-indicator.is-on:before{content:'';display:inline-block;width:5px;height:5px;background:#80c5b0;border-radius:50%;margin-left:4px}.mp-chevron{color:#8390a4;font-size:16px;transition:transform .15s}.mp-contact-item[open] .mp-chevron,.mp-publish[open]>summary .mp-chevron{transform:rotate(180deg)}.mp-contact-body{padding:0 0 12px 0}.mp-contact-body .mp-toggle{margin:10px 0 0;font-size:11px}.mp-toggle input{width:17px;height:17px}.mp-publish>summary{display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;font-size:13px}.mp-publish>summary>i:first-child{color:#8ab9eb}.mp-publish>summary strong{font-weight:500;flex:1}.mp-publish-body{padding-top:15px}.mp-publish-body>.mp-hint{margin:0;font-size:10px}.mp-actions{gap:8px;margin:10px 0}.mp-actions>*{flex:1;text-align:center;font-size:11px!important;padding:9px!important}.mp-save{font-size:13px;padding:12px;display:flex;gap:6px;align-items:center;justify-content:center}.mp-card #mpUrl{font-size:12px}.mp-photo-row input[hidden]{display:none!important}

/* Supplied official Eitaa SVG */
i.ri-eitaa-line{display:inline-block;width:1em;height:1em;flex-shrink:0;vertical-align:-.1em}i.ri-eitaa-line::before{content:""!important;display:block;width:100%;height:100%;background-color:currentColor;-webkit-mask:url("/representative-assets/eitaa-icon-white.svg") center/contain no-repeat;mask:url("/representative-assets/eitaa-icon-white.svg") center/contain no-repeat}

/* Geometric Rubika icon based on supplied reference */
i.ri-rubika-line{display:inline-block;width:1em;height:1em;flex-shrink:0;vertical-align:-.1em}i.ri-rubika-line::before{content:""!important;display:block;width:100%;height:100%;background-color:currentColor;-webkit-mask:url("/representative-assets/rubika-icon-white.svg") center/contain no-repeat;mask:url("/representative-assets/rubika-icon-white.svg") center/contain no-repeat}


.mp-completion-reminder{display:flex;align-items:center;gap:10px;width:100%;box-sizing:border-box;margin:12px 0;padding:11px 12px;border:1px solid #3e5874;border-radius:14px;background:#223246;color:#e5f0fc;text-align:right;font:inherit;cursor:pointer}.mp-reminder-icon{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:9px;background:#304b69;color:#99c8f4;font-size:18px}.mp-reminder-text{flex:1;min-width:0}.mp-reminder-text strong{display:block;font-size:12px;font-weight:600;line-height:1.6}.mp-reminder-text small{display:block;font-size:10px;line-height:1.7;color:#9aadc3;margin-top:2px}.mp-reminder-cta{display:flex;align-items:center;gap:2px;flex-shrink:0;font-size:11px;color:#a5d1fa}.mp-completion-reminder:focus-visible{outline:2px solid #9bc8f4;outline-offset:3px}.mp-completion-reminder:hover{background:#293e55}

/* Compact home banners and spacing */
.page--plans .plans-header{padding-top:8px}.page--plans .wallet-card{margin-top:12px;padding:14px}.page--plans .wallet-foot{margin-top:12px;padding-top:9px}.page--plans .mp-completion-reminder{width:calc(100% - 2rem);margin:8px 1rem 0;padding:8px 10px;gap:8px;border-radius:12px}.page--plans .mp-reminder-icon{width:28px;height:28px;flex-basis:28px;font-size:17px;border-radius:8px}.page--plans .mp-reminder-text strong{font-size:11px;line-height:1.6}.page--plans .mp-reminder-text small{font-size:9px;margin-top:1px;line-height:1.6}.page--plans .mp-reminder-cta{font-size:10px}.page--plans .wheel-promo{margin-top:8px;padding:9px 11px;gap:9px;border-radius:13px}.page--plans .wheel-promo-ico{width:34px;height:34px;font-size:20px;border-radius:10px}.page--plans .wheel-promo-text strong{font-size:12px;line-height:1.6}.page--plans .wheel-promo-text span{font-size:10px;line-height:1.5;margin-top:1px}.page--plans .wheel-promo-cta{font-size:10px;padding:5px 9px;gap:3px}.page--plans .wheel-promo-cta i{font-size:13px}.page--plans>.section{padding-top:12px}.page--plans .plans-grid{margin-top:10px}

/* Unified credentials card, using the existing mini-app palette. */
.svc-credentials { padding: 0.625rem; }
.svc-credentials .svc-conn-list {
  gap: 0;
  margin-top: 0;
  overflow: hidden;
  border-radius: 0.875rem;
  background: var(--bg);
}
.svc-credentials .svc-conn-row {
  direction: ltr;
  min-height: 3.125rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0;
  background: transparent;
}
.svc-credentials .svc-conn-row + .svc-conn-row { position: relative; }
.svc-credentials .svc-conn-row + .svc-conn-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0.875rem;
  right: 0.875rem;
  height: 1px;
  background: var(--border);
}
.svc-credentials .svc-conn-info { direction: ltr; flex: 1; }
.svc-credentials .svc-conn-info > span { font-size: 0.9375rem; text-align: left; }
.svc-credentials .svc-conn-info > i { font-size: 1.25rem; }
.svc-credentials .svc-conn-copy { width: 2.25rem; height: 2.25rem; font-size: 1.25rem; }

/* Representative sales on the profile */
.pf-sales {
  position: relative;
  padding: 0.75rem;
  border: 1px solid #9560ca;
  border-radius: 1rem;
  background: linear-gradient(155deg, #2c2746 0%, #212438 55%, #211c35 100%);
}
.pf-sales h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  min-height: 1.85rem;
  font-size: 0.95rem;
}
.pf-sales h3 i { color: #bc8bff; font-size: 1.2rem; }
.pf-sales-details summary {
  position: absolute;
  inset-inline-end: 0.75rem;
  top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: #4d356d;
  color: #e2ccff;
  padding: 0.23rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}
.pf-sales-details summary::-webkit-details-marker { display: none; }
.pf-sales-details[open] summary i { transform: rotate(-90deg); }
.pf-sales-details p {
  margin: 0 0 0.65rem;
  color: #d7c6e9;
  font-size: 0.68rem;
  line-height: 1.8;
}
.pf-sales-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: clamp(0.64rem, 2.75vw, 0.83rem);
  color: #f7f1ff;
}
.pf-sales-period { width: 29%; }
.pf-sales-count { width: 22%; }
.pf-sales-table th, .pf-sales-table td { padding: 0.35rem 0.3rem; text-align: center; }
.pf-sales-table tr > :first-child { text-align: start; padding-inline-start: 0.48rem; }
.pf-sales-table thead th { background: #3a3454; color: #e2d4f6; font-weight: 600; }
.pf-sales-table thead small { font-size: 0.85em; }
.pf-sales-table tbody tr:not(:last-child) > * { border-bottom: 1px solid #3a344e; }
.pf-sales-table tbody th i { color: #bc9ce8; margin-inline-end: 0.22rem; }
.pf-sales-table tbody td { font-weight: 700; }
.pf-sales-table .pf-sales-total > * { background: #543381; }
.pf-sales-table .pf-sales-total th i { color: inherit; }
.pf-sales-table :is(thead,.pf-sales-total) tr > :first-child,
.pf-sales-table .pf-sales-total > :first-child { border-radius: 0 0.55rem 0.55rem 0; }
.pf-sales-table :is(thead,.pf-sales-total) tr > :last-child,
.pf-sales-table .pf-sales-total > :last-child { border-radius: 0.55rem 0 0 0.55rem; }
.pf-sales-value { display: flex; align-items: center; justify-content: center; gap: 0.25rem; flex-wrap: wrap; }
.pf-sale-trend {
  padding: 0.05rem 0.27rem;
  border-radius: 999px;
  background: #284738;
  color: #a8f2bc;
  font-size: 0.8em;
}
.pf-sale-trend.is-down { color: #ffb6b6; background: #593446; }
