* { box-sizing: border-box; }
/* Form controls don't inherit font-family by default — force it so the bottom
   nav buttons, inputs, selects and textareas all use Yekan Bakh too. */
button, input, textarea, select { font-family: inherit; }

/* Self-hosted Yekan Bakh (served from /fonts, no external CDN — fontapi.ir was
   unreachable and fell back to an ugly system font). */
@font-face { font-family: 'YekanBakh'; font-weight: 300 500; font-style: normal; font-display: swap; src: url('fonts/YekanBakh-Regular.woff') format('woff'); }
@font-face { font-family: 'YekanBakh'; font-weight: 600 700; font-style: normal; font-display: swap; src: url('fonts/YekanBakh-Bold.woff') format('woff'); }
@font-face { font-family: 'YekanBakh'; font-weight: 800 900; font-style: normal; font-display: swap; src: url('fonts/YekanBakh-ExtraBold.woff') format('woff'); }

html, body { margin: 0; padding: 0; background: #05090a; }
body {
  font-family: 'YekanBakh', 'Vazirmatn', sans-serif;
  color: #d6ffe9;
  overscroll-behavior: none;
}

:root {
  --green: #2bffa6;
  --pink: #ff2e97;
  --cyan: #22e0ff;
  --dim: #6f8c81;
  --dim2: #8fd8bd;
  --ink: #eafff4;
  --bg: #05090a;
}

@keyframes bt-grid { 0% { background-position: 0 0; } 100% { background-position: 0 -40px; } }
@keyframes bt-pulse { 0%,100% { opacity: 0.5; box-shadow: 0 0 8px rgba(43,255,166,0.5); } 50% { opacity: 1; box-shadow: 0 0 16px rgba(43,255,166,0.9); } }
@keyframes bt-sheen { 0% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes bt-spin { to { transform: rotate(360deg); } }
@keyframes bt-flicker { 0%,100% { opacity: 1; } 92% { opacity: 1; } 94% { opacity: 0.55; } 96% { opacity: 1; } }

/* connection map camera + marker */
@keyframes bt-cam { 0% { transform: scale(1); } 18% { transform: scale(1); } 100% { transform: scale(2.9); } }
@keyframes bt-pin { 0% { transform: scale(0); opacity: 0; } 55% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.25); opacity: 1; } 82% { transform: scale(0.92); } 100% { transform: scale(1); opacity: 1; } }
@keyframes bt-ring { 0%,54% { transform: scale(0.3); opacity: 0; } 62% { opacity: 0.9; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes bt-chip { 0%,68% { opacity: 0; transform: translateX(-50%) translateY(6px); } 100% { opacity: 1; transform: translateX(-50%) translateY(0); } }

.conn-card { position: relative; overflow: hidden; border: 1px solid rgba(43,255,166,0.22); border-radius: 15px; background: rgba(6,14,11,0.75); margin-bottom: 16px; box-shadow: 0 0 18px rgba(43,255,166,0.1); }
.conn-map { position: relative; height: 150px; overflow: hidden; background: radial-gradient(120% 120% at 50% 50%, rgba(43,255,166,0.08), transparent 70%); }
.conn-mapimg { position: absolute; width: 420px; height: 196px; animation: bt-cam 4.6s cubic-bezier(.55,0,.2,1) forwards; }
.conn-marker { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); pointer-events: none; }
.conn-ring { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 1.5px solid var(--green); animation: bt-ring 4.6s ease-out infinite; }
.conn-pin { position: relative; animation: bt-pin 4.6s cubic-bezier(.5,1.6,.4,1) forwards; }
.conn-chip { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); animation: bt-chip 4.6s ease-out forwards; display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 20px; background: rgba(6,14,11,0.85); border: 1px solid rgba(43,255,166,0.4); backdrop-filter: blur(4px); box-shadow: 0 0 14px rgba(43,255,166,0.3); }
.conn-chip .c-country { font-size: 12px; font-weight: 800; color: var(--ink); }
.conn-chip .c-city { font-size: 10px; color: var(--dim); font-family: 'Orbitron'; }
.conn-locating { position: absolute; right: 12px; top: 11px; font-size: 9px; color: var(--green); letter-spacing: 1px; font-family: 'Orbitron'; opacity: 0.8; }
.conn-status { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-top: 1px solid rgba(43,255,166,0.14); }
.conn-status .s-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.conn-status .s-sub { text-align: right; font-size: 10.5px; color: var(--dim); letter-spacing: 0.5px; }
.conn-status .s-sub#conn-ip { font-family: 'Orbitron'; }
.conn-secure { font-size: 10px; color: var(--green); border: 1px solid rgba(43,255,166,0.3); border-radius: 20px; padding: 4px 10px; letter-spacing: 1px; white-space: nowrap; }

.boot {
  height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--ink); background: #05090a;
}
.boot-logo { font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 26px; letter-spacing: 1px; text-shadow: 0 0 14px rgba(43,255,166,0.6); color: var(--green); animation: bt-flicker 3s infinite; }
.boot-sub { font-size: 12px; color: var(--dim); }

.app-shell {
  width: 100%; max-width: 480px; margin: 0 auto; position: relative; overflow: hidden;
  /* Fixed to the viewport so only .content scrolls — the topbar and bottom-nav
     stay put. 100dvh tracks mobile browser chrome; 100vh is the fallback. */
  height: 100vh; height: 100dvh;
  background: #05090a; display: flex; flex-direction: column; isolation: isolate;
}
html, body { height: 100%; overflow: hidden; }
.bg-ambient { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 80% at 50% -10%, rgba(43,255,166,0.14), transparent 60%), radial-gradient(90% 60% at 90% 110%, rgba(34,224,255,0.10), transparent 55%), #05090a; }
.bg-grid { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(43,255,166,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(43,255,166,0.05) 1px, transparent 1px);
  background-size: 40px 40px; animation: bt-grid 6s linear infinite;
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent); }

.topbar { position: relative; z-index: 10; flex: 0 0 auto; padding: 14px 18px 12px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(43,255,166,0.16); background: linear-gradient(180deg, rgba(6,15,13,0.9), rgba(6,15,13,0.4)); backdrop-filter: blur(4px); }
.brand { display: flex; align-items: center; gap: 9px; }
.brand-logo { width: 26px; height: 26px; object-fit: contain; filter: brightness(0) invert(1) drop-shadow(0 0 6px rgba(43,255,166,0.9)); }
.brand-name { font-family: 'Orbitron', sans-serif; font-weight: 900; font-size: 19px; letter-spacing: 1px; color: var(--ink); text-shadow: 0 0 10px rgba(43,255,166,0.6); }
.wallet-chip { cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid rgba(43,255,166,0.3); border-radius: 20px; background: rgba(43,255,166,0.07); }
.wallet-chip b { font-weight: 800; font-size: 13px; color: var(--ink); }
.wallet-chip span.unit { font-size: 9px; color: var(--dim); }

.content { position: relative; z-index: 10; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding: 16px 16px 100px; }
.section-tag { font-size: 11px; color: var(--dim); letter-spacing: 2px; margin-bottom: 2px; }
.section-title { font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 16px; }

.wallet-hero { position: relative; overflow: hidden; border: 1px solid rgba(43,255,166,0.3); border-radius: 16px; padding: 18px;
  background: linear-gradient(135deg, rgba(43,255,166,0.12), rgba(34,224,255,0.05)); box-shadow: 0 0 22px rgba(43,255,166,0.18); margin-bottom: 14px; }
.wallet-hero .sheen { position: absolute; top: 0; bottom: 0; width: 60px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent); animation: bt-sheen 4s ease-in-out infinite; }
.wallet-hero-row { display: flex; justify-content: space-between; align-items: flex-start; }
.wallet-label { font-size: 11px; color: var(--dim2); letter-spacing: 1px; }
.wallet-amount { font-weight: 800; font-size: 30px; color: var(--green); text-shadow: 0 0 16px rgba(43,255,166,0.55); margin-top: 6px; }
.wallet-amount .unit { font-size: 13px; color: var(--dim2); font-weight: 500; margin-right: 6px; }
.icon-box { width: 44px; height: 44px; border: 1px solid rgba(43,255,166,0.35); border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.25); }
.btn-primary { cursor: pointer; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border-radius: 11px;
  background: var(--green); color: #03130d; font-weight: 800; font-size: 14px; box-shadow: 0 0 18px rgba(43,255,166,0.5); border: none; width: 100%; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline { cursor: pointer; text-align: center; padding: 10px; border-radius: 10px; background: rgba(43,255,166,0.1); border: 1px solid rgba(43,255,166,0.3); color: var(--green); font-weight: 800; font-size: 13px; }

.status-card { position: relative; overflow: hidden; border: 1px solid rgba(43,255,166,0.22); border-radius: 15px; background: rgba(6,14,11,0.75); margin-bottom: 16px; box-shadow: 0 0 18px rgba(43,255,166,0.1); }
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 15px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: bt-pulse 1.6s infinite; }
.status-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.status-sub { font-size: 10.5px; color: var(--dim); font-family: 'Orbitron'; letter-spacing: 0.5px; }
.status-empty { padding: 22px 15px; text-align: center; color: var(--dim); font-size: 12px; }

.row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.link-more { cursor: pointer; font-size: 11px; color: var(--green); }

.service-card { position: relative; overflow: hidden; border: 1px solid rgba(43,255,166,0.28); border-radius: 16px; padding: 16px;
  background: linear-gradient(135deg, rgba(43,255,166,0.08), rgba(10,20,17,0.7)); box-shadow: 0 0 18px rgba(43,255,166,0.14); margin-bottom: 14px; }
.service-card.usage { border-color: rgba(255,46,151,0.3); background: linear-gradient(135deg, rgba(255,46,151,0.08), rgba(10,20,17,0.7)); box-shadow: 0 0 18px rgba(255,46,151,0.12); }
.service-badge { position: absolute; top: 0; left: 0; font-size: 9.5px; font-weight: 800; letter-spacing: 0.5px; padding: 4px 12px; border-bottom-right-radius: 11px; background: rgba(43,255,166,0.9); color: #03130d; }
.service-card.usage .service-badge { background: rgba(255,46,151,0.9); }
.service-head { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.service-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.usage .service-dot { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.service-name { font-size: 15px; font-weight: 800; color: var(--ink); }
.service-loc { font-size: 10.5px; color: var(--dim); letter-spacing: 0.5px; margin-top: 4px; margin-right: 16px; }
.bar-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; font-size: 11px; color: var(--dim2); }
.bar-row b { color: var(--green); }
.bar-track { height: 9px; border-radius: 6px; background: rgba(43,255,166,0.1); overflow: hidden; border: 1px solid rgba(43,255,166,0.2); }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg,#2bffa6,#22e0ff); box-shadow: 0 0 10px rgba(43,255,166,0.7); }
.mini-note { font-size: 10.5px; color: var(--dim); margin-top: 6px; }
.stat-grid { display: flex; gap: 10px; margin-top: 12px; }
.stat-box { flex: 1; border: 1px solid rgba(43,255,166,0.18); border-radius: 10px; padding: 9px 11px; background: rgba(0,0,0,0.2); }
.usage .stat-box { border-color: rgba(255,46,151,0.22); }
.stat-box .l { font-size: 10px; color: var(--dim); }
.stat-box .v { font-size: 14px; font-weight: 800; color: var(--ink); margin-top: 2px; }
.stat-box .v.pink { color: var(--pink); }
.rate-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 9px 11px; border: 1px dashed rgba(255,46,151,0.3); border-radius: 10px; font-size: 11px; color: var(--dim2); }
.config-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 11px; border-radius: 10px; background: rgba(0,0,0,0.35); border: 1px solid rgba(43,255,166,0.15); }
.config-row span { flex: 1; font-family: 'Orbitron'; font-size: 10px; color: #8fa79b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; text-align: left; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.action-grid.two { grid-template-columns: 1fr 1fr; margin-top: 8px; }
.action-btn { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 10px; border-radius: 10px; border: 1px solid rgba(43,255,166,0.3);
  background: rgba(43,255,166,0.07); color: var(--green); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.action-btn.primary { background: var(--green); color: #03130d; font-weight: 800; box-shadow: 0 0 14px rgba(43,255,166,0.4); border: none; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 12px; padding: 16px; border-radius: 12px; background: rgba(0,0,0,0.4); border: 1px solid rgba(43,255,166,0.2); }
.qr-box img { width: 140px; height: 140px; border-radius: 10px; background: #e9fff5; padding: 8px; }

.tabs { display: flex; padding: 4px; background: rgba(10,20,17,0.8); border: 1px solid rgba(43,255,166,0.18); border-radius: 12px; margin-bottom: 16px; }
.tab { flex: 1; text-align: center; padding: 9px; border-radius: 9px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--dim2); }
.tab.active { background: var(--green); color: #03130d; box-shadow: 0 0 14px rgba(43,255,166,0.5); }

.plan-card { position: relative; overflow: hidden; border: 1px solid rgba(43,255,166,0.18); border-radius: 14px; padding: 16px; background: rgba(10,20,17,0.6); margin-bottom: 12px; }
.plan-card.popular { border-color: rgba(43,255,166,0.5); background: linear-gradient(135deg, rgba(43,255,166,0.12), rgba(34,224,255,0.04)); box-shadow: 0 0 20px rgba(43,255,166,0.2); }
.plan-popular-tag { position: absolute; top: 0; left: 0; background: var(--green); color: #03130d; font-size: 9.5px; font-weight: 800; padding: 3px 12px; border-bottom-right-radius: 10px; }
.plan-row { display: flex; justify-content: space-between; align-items: center; }
.plan-name { font-size: 16px; font-weight: 800; color: var(--ink); }
.plan-meta { display: flex; gap: 14px; margin-top: 8px; }
.plan-meta span { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--dim2); }
.plan-price { text-align: left; font-weight: 800; font-size: 19px; color: var(--green); text-shadow: 0 0 12px rgba(43,255,166,0.4); }
.plan-unit { font-size: 9.5px; color: var(--dim); text-align: left; }

.cat-label { font-size: 13px; font-weight: 800; color: var(--ink); margin: 22px 0 10px; padding-right: 10px; border-right: 3px solid var(--green); }

/* Location marquee — advertising only, not a picker. The track is rendered
   twice and translated by exactly half the pair's width, so the second copy
   lands where the first started and the loop is seamless. */
.loc-strip { margin-bottom: 18px; border: 1px solid rgba(43,255,166,0.18); border-radius: 14px; background: rgba(10,20,17,0.5); padding: 12px 0 13px; overflow: hidden; }
.loc-strip-head { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; color: var(--dim2); padding: 0 14px 11px; }
.loc-strip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: bt-pulse 1.8s ease-in-out infinite; }
.loc-marquee { display: flex; width: max-content; animation: bt-marquee 26s linear infinite; }
.loc-marquee-track { display: flex; gap: 9px; padding-right: 9px; }
.loc-strip:hover .loc-marquee, .loc-marquee:active { animation-play-state: paused; }
@keyframes bt-marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }
.loc-chip { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 20px; border: 1px solid rgba(43,255,166,0.25); background: rgba(43,255,166,0.06); color: var(--ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.loc-chip-flag { width: 22px; height: 15px; border-radius: 3px; object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.loc-flag-globe { font-size: 15px; line-height: 15px; width: auto; }

/* Free trial: a two-step card — pick a server, then claim. The steps are
   numbered so the order is instruction, not guesswork. */
.trial-card { position: relative; border: 1px solid rgba(43,255,166,0.4); border-radius: 16px;
  background: linear-gradient(155deg, rgba(43,255,166,0.09), rgba(18,209,255,0.04));
  padding: 26px 16px 16px; margin-bottom: 18px; }
.trial-badge { position: absolute; top: -11px; right: 14px; padding: 4px 12px; border-radius: 12px;
  background: linear-gradient(90deg, #2bffa6, #12d1ff); color: #04120c; font-size: 11px; font-weight: 800; }
.trial-intro { font-size: 12px; color: var(--dim2); line-height: 2; margin-bottom: 16px; }

.trial-step { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.trial-step-num { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: 800;
  background: var(--green); color: #04120c; }
.trial-step-num.off { background: rgba(255,255,255,0.12); color: var(--dim); }
.trial-step-num.done { background: rgba(43,255,166,0.35); color: #eafff5; }
.trial-step-label { font-size: 12.5px; font-weight: 700; color: var(--ink); }

.trial-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.trial-chip { padding: 9px 15px; border-radius: 20px; border: 1px solid rgba(43,255,166,0.25);
  background: rgba(43,255,166,0.06); color: var(--ink); font-size: 12.5px; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: background .12s, border-color .12s; }
.trial-chip.on { background: rgba(43,255,166,0.24); border-color: var(--green); color: #eafff5; }

.trial-claim-btn { margin-top: 10px; }
.trial-claim-btn.is-disabled { opacity: 0.45; filter: grayscale(0.5); cursor: not-allowed; }

/* Which countries a single plan covers. */
.plan-locs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.plan-loc { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; color: var(--dim2);
  border: 1px solid rgba(43,255,166,0.18); background: rgba(43,255,166,0.05); border-radius: 14px; padding: 3px 9px 3px 7px; }
.plan-loc-flag { width: 17px; height: 12px; border-radius: 2px; object-fit: cover; }

/* The marquee is decorative; honour a reduced-motion preference by letting the
   strip scroll manually instead of animating. */
@media (prefers-reduced-motion: reduce) {
  .loc-marquee { animation: none; }
  .loc-strip { overflow-x: auto; }
  .loc-strip-dot { animation: none; }
}

.plan-badge-pink { font-size: 10px; color: var(--pink); border: 1px solid rgba(255,46,151,0.4); border-radius: 20px; padding: 3px 10px; display: inline-block; margin-bottom: 10px; }
.plan-card.usage-plan { border-color: rgba(255,46,151,0.35); background: linear-gradient(135deg, rgba(255,46,151,0.12), rgba(34,224,255,0.05)); }
.usage-rate-box { display: flex; align-items: baseline; gap: 6px; margin-top: 14px; padding: 12px; border-radius: 12px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,46,151,0.25); }

.msg-img { display: block; max-width: 100%; margin-top: 6px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); }

.ticket-card { border: 1px solid rgba(43,255,166,0.18); border-radius: 13px; padding: 15px; background: rgba(10,20,17,0.6); cursor: pointer; margin-bottom: 12px; }
.ticket-top { display: flex; justify-content: space-between; align-items: flex-start; }
.ticket-subject { font-size: 14px; font-weight: 700; color: var(--ink); flex: 1; padding-left: 10px; }
.badge { font-size: 9.5px; font-weight: 700; padding: 4px 9px; border-radius: 20px; white-space: nowrap; border: 1px solid; }
.badge.open { background: rgba(255,196,43,0.12); color: #ffc42b; border-color: rgba(255,196,43,0.35); }
.badge.answered { background: rgba(43,255,166,0.12); color: var(--green); border-color: rgba(43,255,166,0.35); }
.badge.pending { background: rgba(255,196,43,0.12); color: #ffc42b; border-color: rgba(255,196,43,0.35); }
.badge.closed { background: rgba(111,140,129,0.12); color: #8fa79b; border-color: rgba(111,140,129,0.3); }
.ticket-last { font-size: 11.5px; color: var(--dim2); margin-top: 8px; }
.ticket-meta { display: flex; justify-content: space-between; margin-top: 11px; font-size: 10px; color: var(--dim); }

.msg-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; max-height: 50vh; overflow-y: auto; }
.msg { max-width: 82%; padding: 10px 13px; border-radius: 12px; font-size: 13px; line-height: 1.7; }
.msg.user { align-self: flex-end; background: rgba(43,255,166,0.15); border: 1px solid rgba(43,255,166,0.3); color: var(--ink); }
.msg.admin { align-self: flex-start; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--ink); }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--dim2); margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid rgba(43,255,166,0.25);
  background: rgba(0,0,0,0.3); color: var(--ink); font-family: 'YekanBakh'; font-size: 13px; }
.field textarea { min-height: 90px; resize: vertical; }
.field input[type=file] { padding: 9px; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

/* Segmented control — plan type switch in the admin plan editor. */
.seg { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,0.3); border: 1px solid rgba(43,255,166,0.2); margin-bottom: 14px; }
.seg-btn { flex: 1; padding: 9px 6px; border-radius: 9px; border: 0; background: transparent; color: var(--dim2); font-size: 12px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.seg-btn.on { background: rgba(43,255,166,0.16); color: var(--green); box-shadow: inset 0 0 0 1px rgba(43,255,166,0.35); }

/* Inbound multi-select in the plan editor. */
.ib-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; padding: 4px; border-radius: 10px; border: 1px solid rgba(43,255,166,0.15); background: rgba(0,0,0,0.25); }
.ib-row { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; transition: background .12s, border-color .12s; }
.ib-row.on { background: rgba(43,255,166,0.1); border-color: rgba(43,255,166,0.35); }
.ib-box { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid rgba(43,255,166,0.4); display: flex; align-items: center; justify-content: center; font-size: 11px; color: #03130d; }
.ib-row.on .ib-box { background: var(--green); border-color: var(--green); }
.ib-name { flex: 1; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.ib-proto { font-size: 10px; color: var(--dim); text-transform: uppercase; }

/* Small inline actions inside a list row (enable / delete). */
.chip-btn { padding: 4px 10px; border-radius: 12px; border: 1px solid rgba(43,255,166,0.3);
  background: rgba(43,255,166,0.07); color: var(--ink); font-family: inherit; font-size: 10.5px;
  font-weight: 700; cursor: pointer; }
.chip-btn.danger { border-color: rgba(255,72,88,0.35); background: rgba(255,72,88,0.08); }

/* Referral card on the account screen. */
.referral-card { border-color: rgba(255,46,151,0.3); background: linear-gradient(150deg, rgba(255,46,151,0.09), rgba(43,255,166,0.04)); }
.referral-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.referral-emoji { font-size: 26px; }
.referral-title { font-size: 14px; font-weight: 800; color: var(--ink); }
.referral-sub { font-size: 11px; color: var(--dim2); margin-top: 3px; line-height: 1.6; }
.referral-stats { display: flex; gap: 10px; margin-bottom: 12px; }
.referral-stats > div { flex: 1; text-align: center; padding: 10px 6px; border-radius: 10px; background: rgba(0,0,0,0.28); border: 1px solid rgba(255,46,151,0.18); }
.referral-n { font-size: 17px; font-weight: 800; color: var(--pink); }
.referral-l { font-size: 10px; color: var(--dim2); margin-top: 3px; }
.referral-link { font-size: 11px; color: var(--dim2); background: rgba(0,0,0,0.35); border: 1px solid rgba(43,255,166,0.2); border-radius: 9px; padding: 10px 11px; word-break: break-all; }

/* discount / first-purchase badges + struck original price */
.plan-first-tag { display: inline-block; font-size: 10px; font-weight: 800; color: var(--amber); border: 1px solid rgba(182,130,12,0.4); border-radius: 20px; padding: 2px 10px; margin-bottom: 8px; }
.plan-disc-tag { position: absolute; top: 12px; left: 12px; font-size: 10px; font-weight: 800; color: #03130d; background: var(--pink); border-radius: 20px; padding: 3px 9px; }
.plan-price-old { text-align: left; font-size: 12px; color: var(--dim); text-decoration: line-through; }
.plan-card { position: relative; }
:root[data-theme="light"] .plan-disc-tag, :root:not([data-theme="dark"]) .plan-disc-tag { color: #fff; }

/* custom-order range inputs */
input[type=range] { width: 100%; accent-color: var(--green); }

/* discount code box on the buy screen */
.disc-box { margin-bottom: 16px; }
.disc-row { display: flex; gap: 8px; }
.disc-row input { flex: 1; padding: 11px 13px; border-radius: 10px; border: 1px solid rgba(43,255,166,0.25); background: rgba(0,0,0,0.3); color: var(--ink); font-family: inherit; font-size: 13px; }
.disc-row input:disabled { opacity: 0.6; }

/* 15-day sales chart */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 80px; }
.chart-bar { flex: 1; min-width: 4px; background: linear-gradient(180deg, var(--green), rgba(43,255,166,0.3)); border-radius: 3px 3px 0 0; transition: height .3s; }

/* wheel of fortune card */
.wheel-card { text-align: center; border-color: rgba(255,196,43,0.35); background: linear-gradient(150deg, rgba(255,196,43,0.1), rgba(255,46,151,0.05)); }
.wheel-emoji { font-size: 40px; animation: bt-spin 8s linear infinite; }
.wheel-title { font-size: 15px; font-weight: 800; color: var(--ink); margin-top: 6px; }
.wheel-sub { font-size: 12px; color: var(--dim2); margin-top: 4px; line-height: 1.7; }
@media (prefers-reduced-motion: reduce) { .wheel-emoji { animation: none; } }

.user-card { display: flex; align-items: center; gap: 13px; border: 1px solid rgba(43,255,166,0.25); border-radius: 16px; padding: 16px;
  background: linear-gradient(135deg, rgba(43,255,166,0.1), rgba(34,224,255,0.04)); margin-bottom: 14px; box-shadow: 0 0 18px rgba(43,255,166,0.12); }
.avatar { width: 54px; height: 54px; border-radius: 14px; border: 1.5px solid var(--green); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px; color: var(--green); background: rgba(0,0,0,0.3); box-shadow: 0 0 14px rgba(43,255,166,0.35); }
.user-name { font-size: 16px; font-weight: 800; color: var(--ink); }
.user-username { font-size: 12px; color: var(--dim2); font-family: 'Orbitron'; letter-spacing: 0.5px; margin-top: 3px; }
.user-id { font-size: 10px; color: var(--dim); margin-top: 2px; }

.panel { border: 1px solid rgba(43,255,166,0.2); border-radius: 14px; padding: 16px; background: rgba(10,20,17,0.6); margin-bottom: 20px; }
.charge-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 14px; }
.charge-chip { text-align: center; padding: 9px; border-radius: 9px; border: 1px solid rgba(43,255,166,0.25); background: rgba(43,255,166,0.06); font-size: 12px; font-weight: 700; color: var(--ink); cursor: pointer; }
.charge-chip.active { background: var(--green); color: #03130d; }

.tx-list { display: flex; flex-direction: column; gap: 2px; border: 1px solid rgba(43,255,166,0.15); border-radius: 13px; overflow: hidden; background: rgba(10,20,17,0.6); }
.tx-row { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-bottom: 1px solid rgba(43,255,166,0.08); }
.tx-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: rgba(43,255,166,0.1); border: 1px solid rgba(43,255,166,0.3); font-weight: 800; color: var(--green); }
.tx-icon.neg { background: rgba(255,46,151,0.1); border-color: rgba(255,46,151,0.3); color: #ff6b8f; }
.tx-title { font-size: 13px; font-weight: 600; color: var(--ink); }
.tx-date { font-size: 10px; color: var(--dim); margin-top: 2px; }
.tx-amount { font-weight: 800; font-size: 13px; color: var(--green); }
.tx-amount.neg { color: #ff6b8f; }

.logout-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; padding: 12px; border: 1px solid rgba(255,46,151,0.3); border-radius: 12px; color: var(--pink); font-weight: 700; font-size: 13px; cursor: pointer; background: transparent; width: 100%; }

.bottom-nav { position: relative; z-index: 20; flex: 0 0 auto; display: flex; justify-content: space-around; align-items: center; padding: 9px 6px calc(env(safe-area-inset-bottom, 0px) + 10px);
  border-top: 1px solid rgba(43,255,166,0.2); background: linear-gradient(0deg, rgba(4,10,9,0.98), rgba(6,15,13,0.82)); backdrop-filter: blur(8px); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 4px 0; position: relative; color: var(--dim); background: none; border: none; }
.nav-item.active { color: var(--green); }
.nav-item span { font-size: 9.5px; font-weight: 500; }
.nav-item.active span { font-weight: 800; }
.nav-item.active::after { content: ''; position: absolute; top: -9px; width: 20px; height: 2px; border-radius: 2px; background: var(--green); box-shadow: 0 0 8px rgba(43,255,166,0.8); }
.nav-center { margin-top: -22px; }
.nav-center > svg { width: 54px; height: 54px; padding: 15px; border-radius: 50%; background: linear-gradient(160deg, #0c221c, #071310); border: 1.5px solid rgba(43,255,166,0.55); box-shadow: 0 0 18px rgba(43,255,166,0.45), 0 6px 14px rgba(0,0,0,0.5); color: var(--green); box-sizing: border-box; }
.nav-center span { font-size: 11px; font-weight: 800; color: var(--green); margin-top: 2px; }
.nav-center.active > svg { border-color: var(--green); box-shadow: 0 0 26px rgba(43,255,166,0.8), 0 6px 14px rgba(0,0,0,0.5); }
.nav-center.active::after { display: none; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--dim); font-size: 13px; }
.spinner { width: 22px; height: 22px; border: 2px solid rgba(43,255,166,0.2); border-top-color: var(--green); border-radius: 50%; animation: bt-spin 0.8s linear infinite; margin: 20px auto; }
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: rgba(10,20,17,0.95); border: 1px solid rgba(43,255,166,0.4);
  color: var(--ink); padding: 10px 18px; border-radius: 20px; font-size: 12.5px; z-index: 100; box-shadow: 0 0 20px rgba(43,255,166,0.3); max-width: 85%; text-align: center; }
.toast.error { border-color: rgba(255,46,151,0.5); color: #ffdce7; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.modal-sheet { width: 100%; max-width: 480px; background: #0a1512; border-top: 1px solid rgba(43,255,166,0.3); border-radius: 18px 18px 0 0; padding: 20px 18px calc(env(safe-area-inset-bottom, 0px) + 18px); max-height: 85vh; overflow-y: auto; }
.modal-title { font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.modal-close { position: absolute; left: 14px; top: 14px; color: var(--dim); cursor: pointer; font-size: 18px; }

.admin-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--pink); border: 1px solid rgba(255,46,151,0.4); border-radius: 20px; padding: 3px 10px; margin-bottom: 10px; }
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.stat-card { border: 1px solid rgba(43,255,166,0.2); border-radius: 12px; padding: 14px; background: rgba(10,20,17,0.6); }
.stat-card .n { font-size: 20px; font-weight: 800; color: var(--green); }
.stat-card .l { font-size: 11px; color: var(--dim); margin-top: 4px; }
.admin-list-row { border: 1px solid rgba(43,255,166,0.15); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: rgba(10,20,17,0.5); }
.admin-row-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--ink); font-weight: 700; }
.admin-row-sub { font-size: 11px; color: var(--dim); margin-top: 4px; }
.admin-actions { display: flex; gap: 8px; margin-top: 10px; }
.admin-actions button { flex: 1; padding: 8px; border-radius: 8px; border: none; font-size: 12px; font-weight: 700; cursor: pointer; }
.btn-approve { background: var(--green); color: #03130d; }
.btn-reject { background: rgba(255,46,151,0.15); color: var(--pink); border: 1px solid rgba(255,46,151,0.4) !important; }
.receipt-link { color: var(--cyan); font-size: 11px; text-decoration: underline; }
.switch-view { font-size: 11px; color: var(--dim2); text-decoration: underline; cursor: pointer; }
