/* The customer website's design system (docs/website/PLAN.md W2).
   One stylesheet, no framework, no build step. Tokens first (light + dark), then layout, then components.
   Desktop: a fixed sidebar. Phone: a top bar and a bottom tab bar with the safe-area inset. */

/* ------------------------------------------------------------------ tokens */
:root {
	color-scheme: light;
	--bg: #f5f6fb; --bg-2: #eef0f8;
	--surface: #ffffff; --raised: #ffffff; --sunken: #f1f3f9;
	--text: #0b1020; --text-2: #4a5468; --text-3: #7b8498;
	--line: #e5e8f1; --line-2: #d8dcea;
	--brand: #6a5af9; --brand-2: #8f5bf7; --brand-3: #22c3ee; --brand-ink: #ffffff;
	--brand-soft: rgba(106, 90, 249, .10); --brand-ring: rgba(106, 90, 249, .35);
	--good: #0f9f6e; --good-soft: rgba(15, 159, 110, .12);
	--live: #2563eb; --live-soft: rgba(37, 99, 235, .12);
	--warn: #b7791f; --warn-soft: rgba(183, 121, 31, .14);
	--bad: #d6336c; --bad-soft: rgba(214, 51, 108, .12);
	--shadow-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 1px rgba(16, 24, 40, .03);
	--shadow-2: 0 10px 30px -12px rgba(30, 27, 75, .18), 0 2px 6px rgba(16, 24, 40, .05);
	--shadow-3: 0 30px 60px -20px rgba(54, 37, 160, .35);
	--r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px;
	--side: 268px; --top: 68px; --tab: 66px;
	--font: "Inter var", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #080a12; --bg-2: #0c0f1a;
	--surface: #11141f; --raised: #161a27; --sunken: #0c0f18;
	--text: #eef1f8; --text-2: #aab2c5; --text-3: #7a8398;
	--line: #1f2434; --line-2: #2a3045;
	--brand: #8a7dff; --brand-2: #a97bff; --brand-3: #38d6f5; --brand-ink: #0a0b14;
	--brand-soft: rgba(138, 125, 255, .14); --brand-ring: rgba(138, 125, 255, .45);
	--good: #34d399; --good-soft: rgba(52, 211, 153, .14);
	--live: #60a5fa; --live-soft: rgba(96, 165, 250, .14);
	--warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .14);
	--bad: #fb7185; --bad-soft: rgba(251, 113, 133, .14);
	--shadow-1: 0 1px 0 rgba(255, 255, 255, .03) inset;
	--shadow-2: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 40px -24px rgba(0, 0, 0, .8);
	--shadow-3: 0 30px 70px -24px rgba(88, 70, 255, .45);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
	margin: 0; min-height: 100vh; min-height: 100dvh;
	font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text);
	background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
	font-feature-settings: "cv11", "ss01"; overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 17px; letter-spacing: -.01em; font-weight: 650; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg { display: block; flex: none; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.muted { color: var(--text-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--brand-soft); }

/* ------------------------------------------------------------------ app shell */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
	position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px;
	padding: 22px 16px 16px; background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 18px; font-weight: 750; font-size: 18px; letter-spacing: -.02em; }
.brand-mark {
	width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff;
	background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 55%, var(--brand-3) 130%); box-shadow: var(--shadow-3);
}
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-label { padding: 14px 12px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 650; }
.nav a {
	position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm);
	color: var(--text-2); font-weight: 560; transition: background .16s, color .16s;
}
.nav a:hover { background: var(--sunken); color: var(--text); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(var(--brand), var(--brand-2)); }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--raised); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.user-chip .who { min-width: 0; flex: 1; }
.user-chip .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .who span { font-size: 12px; color: var(--text-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
	position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 clamp(16px, 3vw, 32px);
	background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.topbar .brand { display: none; padding: 0; font-size: 17px; }
.topbar .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; box-shadow: var(--shadow-1); }
.pill small { font-weight: 500; color: var(--text-3); font-size: 12px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text-2); box-shadow: var(--shadow-1); transition: color .16s, border-color .16s, transform .16s; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn:active { transform: scale(.96); }
:root[data-theme="dark"] .only-light, :root:not([data-theme="dark"]) .only-dark { display: none; }
.content { width: 100%; max-width: 1180px; margin: 0 auto; padding: clamp(18px, 3vw, 34px) clamp(16px, 3vw, 32px) 40px; display: grid; gap: 22px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { color: var(--text-2); margin-top: 4px; }

.tabbar { display: none; }

/* ------------------------------------------------------------------ components */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.card-pad { padding: clamp(18px, 2.4vw, 26px); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px clamp(18px, 2.4vw, 26px); border-bottom: 1px solid var(--line); }
.link { color: var(--brand); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 640; cursor: pointer; transition: transform .16s, box-shadow .16s, background .16s, border-color .16s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); box-shadow: 0 10px 24px -10px var(--brand-ring), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:hover { box-shadow: 0 14px 30px -10px var(--brand-ring), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); box-shadow: var(--shadow-1); }
.btn-ghost:hover { border-color: var(--line-2); }
.btn-glass { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, .24); }
.btn-block { width: 100%; }
.btn-lg { height: 52px; border-radius: 14px; font-size: 16px; }

.grid { display: grid; gap: 18px; }
.grid-hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.balance {
	position: relative; overflow: hidden; isolation: isolate; color: #fff; border: 0; border-radius: var(--r-xl); padding: clamp(22px, 3vw, 32px);
	background: radial-gradient(120% 140% at 0% 0%, #7b6cff 0%, transparent 60%), radial-gradient(90% 120% at 100% 0%, #b06cff 0%, transparent 55%), radial-gradient(120% 120% at 100% 100%, #1fb7e6 0%, transparent 55%), linear-gradient(135deg, #4b3fe0, #6a3fd6);
	box-shadow: var(--shadow-3);
}
.balance::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 80% at 80% -10%, rgba(255, 255, 255, .28), transparent 60%); }
.balance .label { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; opacity: .82; font-weight: 600; }
.balance .amount { margin-top: 8px; font-size: clamp(38px, 6vw, 56px); line-height: 1; letter-spacing: -.03em; font-weight: 750; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.balance .amount small { font-size: 16px; font-weight: 560; opacity: .85; letter-spacing: 0; }
.balance .actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.balance .btn-white { background: #fff; color: #3b2fc9; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5); }

.stats { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
.stat { padding: 18px; display: grid; gap: 10px; }
.stat .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.stat .ico.good { background: var(--good-soft); color: var(--good); }
.stat .ico.live { background: var(--live-soft); color: var(--live); }
.stat .ico.warn { background: var(--warn-soft); color: var(--warn); }
.stat b { font-size: 24px; letter-spacing: -.02em; line-height: 1.1; }
.stat span { color: var(--text-2); font-size: 13px; }

.quick { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quick a { display: flex; align-items: center; gap: 14px; padding: 16px 18px; transition: transform .18s, border-color .18s, box-shadow .18s; }
.quick a:hover { transform: translateY(-2px); border-color: var(--brand-ring); }
.quick .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.quick b { display: block; }
.quick span { color: var(--text-2); font-size: 13px; }
.quick .go { margin-left: auto; color: var(--text-3); }

.badge { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 620; white-space: nowrap; background: var(--sunken); color: var(--text-2); }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.live { background: var(--live-soft); color: var(--live); }
.badge.live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.orders { list-style: none; margin: 0; padding: 0; }
/* fixed tracks for the state and the cost: every row is its own grid, and "auto" tracks would shift the number column row by row */
.orders li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) 180px 92px; align-items: center; gap: 16px; padding: 15px clamp(18px, 2.4vw, 26px); border-bottom: 1px solid var(--line); }
.orders .state { justify-self: end; }
.orders li:last-child { border-bottom: 0; }
.orders .svc { display: flex; align-items: center; gap: 12px; min-width: 0; }
.orders .flag { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--sunken); font-size: 20px; flex: none; }
.orders .svc .txt { min-width: 0; }
.orders .svc b { display: block; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orders .meta { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
/* a device without flag emoji (Windows) shows the ISO code in the tile instead - app.js sets .no-flags */
.f-code { display: none; font-size: 12px; font-weight: 750; letter-spacing: .06em; color: var(--text-2); }
.no-flags .f-emoji { display: none; }
.no-flags .f-code { display: inline; }
.orders .phone { font-family: var(--mono); font-size: 14px; color: var(--text); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orders .cost { font-weight: 650; text-align: right; white-space: nowrap; }
.orders .cost small { display: block; font-weight: 500; color: var(--text-3); font-size: 12px; }

.empty { padding: 44px 22px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.empty .ico { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty p { color: var(--text-2); max-width: 420px; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: var(--bad-soft); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }

/* ------------------------------------------------------------------ sign-in page */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-hero {
	position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
	background: radial-gradient(90% 70% at 10% 10%, #7d6dff 0%, transparent 60%), radial-gradient(70% 60% at 95% 15%, #b86bff 0%, transparent 60%), radial-gradient(80% 70% at 85% 100%, #17b4e4 0%, transparent 60%), linear-gradient(140deg, #2f26a8, #5a34c9 60%, #2a2391);
}
.auth-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(80% 80% at 50% 40%, #000 30%, transparent 85%); -webkit-mask-image: radial-gradient(80% 80% at 50% 40%, #000 30%, transparent 85%); }
.auth-hero .brand { padding: 0; color: #fff; }
.auth-hero .brand-mark { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); box-shadow: none; backdrop-filter: blur(6px); }
.auth-hero h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -.03em; max-width: 14ch; }
.auth-hero .lead { margin-top: 16px; font-size: 17px; opacity: .88; max-width: 46ch; }
.points { display: grid; gap: 14px; list-style: none; padding: 0; margin: 0; }
.points li { display: flex; gap: 12px; align-items: center; font-weight: 520; }
.points .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22); flex: none; }
.auth-panel { display: grid; place-items: center; padding: clamp(24px, 5vw, 56px); background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; display: grid; gap: 18px; }
.auth-card .top { display: flex; align-items: center; justify-content: space-between; }
.auth-card h2 { font-size: 26px; letter-spacing: -.02em; }
.auth-card .sub { color: var(--text-2); margin-top: -8px; }
.signin { display: grid; gap: 12px; padding: 22px; }
.tg-slot { display: grid; place-items: center; min-height: 48px; }
.btn-google { background: var(--surface); border-color: var(--line-2); color: var(--text); box-shadow: var(--shadow-1); }
.btn-google:hover { border-color: var(--text-3); }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; }
.or::before, .or::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.fineprint { color: var(--text-3); font-size: 12.5px; text-align: center; }
.brand-mobile { display: none; }

/* ------------------------------------------------------------------ message pages */
.center { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.center .card { max-width: 460px; width: 100%; text-align: center; display: grid; gap: 14px; justify-items: center; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) { .grid-hero { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1023px) {
	.shell { grid-template-columns: minmax(0, 1fr); }
	.sidebar { display: none; }
	.topbar .brand { display: flex; }
	.topbar .page-title { display: none; }
	.page-head .btn { display: none; } /* the raised Buy tab is the phone's primary action */
	.content { padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom, 0px) + 28px); }
	.tabbar {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
		height: calc(var(--tab) + env(safe-area-inset-bottom, 0px)); padding: 6px 6px env(safe-area-inset-bottom, 0px);
		background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
		border-top: 1px solid var(--line);
	}
	.tabbar a { display: grid; justify-items: center; align-content: center; gap: 3px; border-radius: 14px; font-size: 11px; font-weight: 600; color: var(--text-3); }
	.tabbar a[aria-current="page"] { color: var(--brand); }
	.tabbar a.fab span.ring { width: 46px; height: 46px; margin-top: -22px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 12px 24px -10px var(--brand-ring); border: 3px solid var(--bg); }
	.tabbar a.fab { color: var(--brand); }
}
@media (max-width: 760px) {
	.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.quick { grid-template-columns: 1fr; }
	.orders li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "svc cost" "phone badge"; row-gap: 10px; }
	.orders .svc { grid-area: svc; } .orders .cost { grid-area: cost; } .orders .phone { grid-area: phone; } .orders .state { grid-area: badge; justify-self: end; }
	.pill small { display: none; }
	.auth { grid-template-columns: 1fr; }
	.auth-hero { display: none; }
	.brand-mobile { display: flex; padding: 0; }
	.auth-panel { align-items: start; padding-top: 12vh; background: radial-gradient(120% 60% at 50% -10%, var(--brand-soft), transparent 60%), var(--bg); }
}
/* ================================================================== W3: buy + orders */
/* ---- stepper */
.steps { display: flex; gap: 8px; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px 0 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-3); font-weight: 600; font-size: 14px; cursor: default; }
.step i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12.5px; background: var(--sunken); color: var(--text-2); }
.step.on { color: var(--text); border-color: var(--brand-ring); background: var(--brand-soft); }
.step.on i { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.step.done { color: var(--text-2); cursor: pointer; }
.step.done i { background: var(--good-soft); color: var(--good); }
.step.done:hover { border-color: var(--line-2); }

/* ---- search field */
.field { position: relative; display: block; }
.field svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input { width: 100%; height: 52px; padding: 0 16px 0 46px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; box-shadow: var(--shadow-1); transition: border-color .16s, box-shadow .16s; }
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input.sm { height: 44px; font-size: 15px; }

/* ---- pick grids (services, countries) */
.pane { display: grid; gap: 16px; }
.pane[hidden] { display: none; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pane-head .ctx { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; }
.picks { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; text-align: left; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; box-shadow: var(--shadow-1); transition: transform .16s, border-color .16s, box-shadow .16s; }
.pick:hover { transform: translateY(-2px); border-color: var(--brand-ring); box-shadow: var(--shadow-2); }
.pick .glyph { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; font-weight: 750; font-size: 15px; color: var(--brand); background: var(--brand-soft); }
.pick .glyph.flagged { background: var(--sunken); font-size: 20px; color: var(--text-2); }
.pick .t { min-width: 0; flex: 1; }
.pick b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 620; }
.pick small { color: var(--text-3); font-size: 12.5px; }
.pick { position: relative; }
.pick small { white-space: nowrap; }
.crumbs { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ocards.single { grid-template-columns: minmax(0, 560px); }
.actions-end { display: flex; gap: 10px; flex-wrap: wrap; }
.pick .mine { position: absolute; top: -9px; right: 12px; box-shadow: 0 0 0 3px var(--bg); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); padding: 3px 8px; border-radius: 999px; }

/* ---- servers */
.servers { display: grid; gap: 10px; }
.server { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-1); }
.server .id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.server .id .glyph { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--sunken); color: var(--text-2); font-weight: 700; font-size: 13px; flex: none; }
.server .id b { display: block; }
.server .id small { color: var(--text-3); font-size: 12.5px; }
.server .price { text-align: right; font-weight: 700; font-size: 17px; white-space: nowrap; }
.server .price small { display: block; font-weight: 500; font-size: 12px; color: var(--text-3); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.server .note { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--line-2); color: var(--text-2); font-size: 14px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-sm { height: 38px; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- the order card */
.ocards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.ocard { position: relative; overflow: hidden; display: grid; gap: 16px; padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-2); }
.ocard.live { border-color: color-mix(in srgb, var(--live) 35%, var(--line)); }
.ocard.good { border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.ocard.good::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--good), var(--brand-3)); }
.ocard header { display: flex; align-items: center; gap: 12px; }
.ocard header .flag { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--sunken); font-size: 22px; flex: none; }
.ocard header .t { min-width: 0; flex: 1; }
.ocard header b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocard header small { color: var(--text-3); font-size: 12.5px; }
.copyrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--sunken); border: 1px solid var(--line); }
.copyrow .k { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 650; }
.copyrow .v { font-family: var(--mono); font-size: 18px; letter-spacing: .02em; font-weight: 600; word-break: break-all; }
.copyrow.code { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.copyrow.code .v { font-size: 30px; letter-spacing: .14em; color: var(--good); font-weight: 750; }
.copy { flex: none; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 620; font-size: 13px; color: var(--text-2); }
.copy:hover { color: var(--text); }
.copy.ok { color: var(--good); border-color: var(--good); }
.smstext { color: var(--text-2); font-size: 13.5px; line-height: 1.45; word-break: break-word; }
.waiting { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 14px; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: bounce 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
.ocard footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.clock { display: grid; gap: 6px; flex: 1; min-width: 0; font-size: 13px; color: var(--text-3); }
.bar { height: 5px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-3)); transition: width 1s linear; }
.ocard .msg { font-size: 13.5px; color: var(--text-2); }

/* ---- history + pager */
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.orders .code { margin-left: 10px; font-family: var(--mono); font-weight: 650; color: var(--good); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---- toast */
.toasts { position: fixed; z-index: 60; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 10px; width: min(92vw, 420px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 520; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55); animation: rise .22s ease-out; }
.toast.bad { background: var(--bad); color: #fff; }
.toast a { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 650; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.skeleton { border-radius: var(--r); background: linear-gradient(90deg, var(--sunken) 25%, var(--bg-2) 37%, var(--sunken) 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; height: 66px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (max-width: 1023px) { .toasts { bottom: calc(var(--tab) + env(safe-area-inset-bottom, 0px) + 16px); } }
@media (max-width: 760px) {
	.picks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.pick { padding: 11px 12px; gap: 10px; }
	.pick .glyph { width: 36px; height: 36px; }
	.server { grid-template-columns: minmax(0, 1fr) auto; }
	.server .buybtn { grid-column: 1 / -1; width: 100%; }
	.copyrow.code .v { font-size: 26px; }
	.step span { display: none; } .step { padding: 0 6px; } .step.on span { display: inline; } .step.on { padding-right: 14px; }
}

/* ================================================================== W4: wallet */
[hidden] { display: none !important; } /* a component's own display (flex, grid) must never beat the hidden attribute */
.grid-wallet { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.wallet-side { display: grid; gap: 18px; }
.card-head.flat { border-bottom: 0; padding-bottom: 0; }
.card-head.flat + .card-pad { padding-top: 16px; }
.secure { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--good); background: var(--good-soft); padding: 5px 10px; border-radius: 999px; }
.stack { display: grid; gap: 18px; }

/* ---- method switch */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: var(--sunken); border: 1px solid var(--line); }
.seg-btn { display: grid; gap: 1px; justify-items: center; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; color: var(--text-2); transition: background .18s, color .18s, box-shadow .18s; }
.seg-btn b { font-weight: 680; font-size: 15px; }
.seg-btn small { font-size: 12px; color: var(--text-3); }
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1), 0 6px 16px -10px rgba(16, 24, 40, .35); }
.seg-btn[aria-pressed="true"] b { color: var(--brand); }
[tabindex="-1"]:focus { outline: none; } /* headings that receive the focus on a pane change */
.field.grow { flex: 1; max-width: 340px; }
.muted.small { font-size: 13.5px; }

/* ---- the amount */
.amt { display: flex; align-items: center; gap: 10px; height: 78px; padding: 0 20px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow-1); cursor: text; transition: border-color .16s, box-shadow .16s; }
.amt:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.amt .cur { font-size: 28px; font-weight: 600; color: var(--text-3); }
.amt .unit { font-size: 14px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.amount-input { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 36px; font-weight: 720; letter-spacing: -.02em; padding: 0; }
.amount-input::placeholder { color: var(--line-2); }
.hint { margin-top: 8px; font-size: 13px; color: var(--text-3); min-height: 19px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-weight: 620; font-size: 14px; cursor: pointer; transition: border-color .16s, color .16s, background .16s, transform .16s; }
.chip:hover { border-color: var(--brand-ring); color: var(--text); }
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand-ring); color: var(--brand); }

/* ---- USDT network */
.networks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.net { display: flex; align-items: center; gap: 12px; padding: 13px 14px; text-align: left; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; transition: border-color .16s, box-shadow .16s, background .16s; }
.net i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; transition: border-color .16s, box-shadow .16s; }
.net b { display: block; font-weight: 660; }
.net small { color: var(--text-3); font-size: 12.5px; }
.net:hover { border-color: var(--brand-ring); }
.net[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
.net[aria-checked="true"] i { border-color: var(--brand); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 9px var(--brand); }
.warnline { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--warn); background: var(--warn-soft); padding: 10px 12px; border-radius: 12px; }
.warnline svg { margin-top: 1px; }
.pay .fineprint { text-align: left; }

/* ---- the payment screen */
.payscreen { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 24px; align-items: start; }
.qrbox { display: grid; gap: 10px; justify-items: center; }
.qrbox img { display: block; width: 100%; max-width: 264px; height: auto; aspect-ratio: 1; padding: 14px; border-radius: 22px; border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, var(--brand), var(--brand-3)) border-box; box-shadow: var(--shadow-2); image-rendering: pixelated; }
.qr-cap { font-size: 12.5px; color: var(--text-3); text-align: center; max-width: 240px; }
.paydetails { display: grid; gap: 14px; min-width: 0; }
.paydetails .copyrow .v { font-size: 22px; }
.paydetails .copyrow .v.addr { font-size: 14.5px; letter-spacing: 0; line-height: 1.4; }
.only-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .only-touch { display: inline-flex; } }
.ps-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--text-3); }
.ps-foot code { font-family: var(--mono); color: var(--text-2); }
button.link { background: none; border: 0; padding: 0; cursor: pointer; }
.empty .ico.good { background: var(--good-soft); color: var(--good); }
.empty .ico.warn { background: var(--warn-soft); color: var(--warn); }
.done h2 { font-size: 24px; letter-spacing: -.02em; }
.done .actions-end { justify-content: center; margin-top: 6px; }
.pop { animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- the side column */
.balance.compact { padding: 22px 24px; border-radius: var(--r-lg); }
.balance.compact .amount { font-size: clamp(32px, 4vw, 42px); }
.balance .sub { margin-top: 10px; font-size: 13px; opacity: .85; }
.how h2 { margin-bottom: 14px; }
.howlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.howlist li { display: flex; gap: 12px; align-items: flex-start; }
.howlist .ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.howlist .ico.good { background: var(--good-soft); color: var(--good); }
.howlist b { display: block; font-weight: 640; }
.howlist span { color: var(--text-2); font-size: 13.5px; }

/* ---- payments list */
.pays li { grid-template-columns: minmax(0, 1fr) 190px 130px; }
.ptile { font-size: 18px; font-weight: 700; }
.ptile.upi { background: var(--brand-soft); color: var(--brand); }
.ptile.usdt { background: var(--good-soft); color: var(--good); }
.pays .refno { font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.pays .meta { min-width: 0; }
.pays .cost.plus { color: var(--good); }

@media (max-width: 1100px) {
	.grid-wallet { grid-template-columns: minmax(0, 1fr); }
	.wallet-side { display: contents; }
	.wallet-side .balance { order: -1; }
	.wallet-side .how { order: 1; }
}
@media (max-width: 760px) {
	.payscreen { grid-template-columns: minmax(0, 1fr); }
	.payscreen .qrbox { order: 1; }
	.qrbox img { max-width: 220px; }
	/* the form is what this page is for: the balance shrinks to one line so the button stays within reach */
	.balance.compact { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
	.balance.compact .amount { margin-top: 0; font-size: 26px; gap: 6px; }
	.balance.compact .amount small { font-size: 13px; }
	.balance.compact .sub { display: none; }
	.page-head.tight p { display: none; }
	.chips { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
	.chip { padding: 0 4px; font-size: 13px; }
	.amt { height: 70px; padding: 0 16px; }
	.amount-input { font-size: 30px; }
	.networks { grid-template-columns: minmax(0, 1fr); }
	.pays li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "svc cost" "badge badge"; }
	.pays .state { grid-area: badge; justify-self: start; }
}

/* ================================================================== W5: account */
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: 14px; font-size: 14.5px; font-weight: 520; border: 1px solid transparent; }
.notice svg { margin-top: 1px; }
.notice.good { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.notice.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile .who { flex: 1; min-width: 0; }
.profile h2 { font-size: 22px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar.big { width: 64px; height: 64px; font-size: 22px; box-shadow: var(--shadow-3); flex: none; }
.inline-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; margin-top: 2px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 14px; padding: 16px clamp(18px, 2.4vw, 26px); border-bottom: 1px solid var(--line); min-height: 76px; }
.rows .tile { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--sunken); }
.rows .tile.tg { background: rgba(42, 171, 238, .14); color: #2aabee; }
.rows .txt { flex: 1; min-width: 0; }
.rows .txt b { display: block; font-weight: 640; }
.rows .txt small { display: block; color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.rows form { margin: 0; }
.rows .tg-slot { min-height: 0; }
.cardnote { padding: 14px clamp(18px, 2.4vw, 26px) 18px; font-size: 13px; color: var(--text-3); }
.selectwrap { position: relative; display: block; }
.selectwrap svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.select { width: 100%; height: 52px; padding: 0 44px 0 48px; border-radius: 14px; border: 1px solid var(--line-2); background-color: var(--surface); color: var(--text); font: inherit; font-size: 16px; box-shadow: var(--shadow-1); cursor: pointer; appearance: none; -webkit-appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 23px) 50%, calc(100% - 17px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; transition: border-color .16s, box-shadow .16s; }
.select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.select:disabled { opacity: .6; cursor: progress; }
.subhead { margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); font-weight: 650; }
.examples { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.examples li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--sunken); }
.examples .txt { min-width: 0; display: grid; gap: 2px; }
.examples b { font-size: 13px; font-weight: 640; }
.examples code { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.confirm { display: grid; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); color: var(--text); font-size: 14px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
	.profile form { width: 100%; }
	.profile form .btn { width: 100%; }
	.avatar.big { width: 54px; height: 54px; font-size: 19px; }
	.inline-meta { flex-direction: column; align-items: flex-start; gap: 0; }
	.inline-meta .dot { display: none; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
