/*
Kerix VTU — design tokens
Color   #12142B ink (surfaces, header, nav)  ·  #F6F3EC paper (page bg)
        #FFB020 marigold (primary action, balance, focus)  ·  #0E7C5A jade (success, discounts)
        #D64545 signal red (errors, debits)  ·  #6B6F87 muted ink (secondary text)
Type    Bricolage Grotesque (display: wordmark, balances, titles) / Instrument Sans (UI), both self-hosted
Layout  mobile-first single column, bottom tab bar, sheet/modal for purchase flows
*/

/* Declared explicitly so phones/browsers in dark mode don't "auto-dark" invert our own
   light-themed colors — without this, any element whose CSS sets a background but not an
   explicit text color (or vice versa) can silently render as invisible (e.g. white-on-white). */
/* Fully immersive: the WP admin bar (and the top-margin WordPress adds for it) never shows on
   these two pages, for anyone — staff included — since this is meant to feel like a standalone
   app, not a page on the site. Hiding it via CSS rather than the show_admin_bar filter, since
   that filter fires before the main query resolves and can't reliably detect these pages. */
html.wp-toolbar { margin-top: 0 !important; }
#wpadminbar { display: none !important; }

html { color-scheme: light; }

.kvtu-app-body,
.kvtu-auth-body {
	background: #F6F3EC;
	margin: 0;
	color-scheme: light;
}
.kvtu-app-body.kx-scroll-lock, .kvtu-auth-body.kx-scroll-lock { overflow: hidden; height: 100%; }

.kx-app, .kx-auth, .kx-sheet-backdrop, .kx-toast {
	--ink: #12142B;
	--ink-soft: #23253F;
	--paper: #F6F3EC;
	--card: #FFFFFF;
	--line: #E7E2D6;
	--muted: #6B6F87;
	--marigold: #FFB020;
	--marigold-ink: #7A4A00;
	--jade: #0E7C5A;
	--jade-tint: #E4F3EC;
	--red: #C1432E;
	--red-tint: #FBE9E4;
	--kx-font: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--kx-display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--radius-lg: 20px;
	--radius-md: 14px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(18,20,43,.04), 0 8px 24px rgba(18,20,43,.06);
	font-family: var(--kx-font);
	color: var(--ink);
	box-sizing: border-box;
}
.kx-app *, .kx-auth *, .kx-sheet-backdrop *, .kx-toast * { box-sizing: border-box; }

.kx-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--marigold);
	color: var(--ink);
	font-family: var(--kx-display);
	font-weight: 600;
	font-size: 18px;
}
.kx-brand-name {
	font-family: var(--kx-display);
	font-weight: 600;
	font-size: 19px;
	letter-spacing: -.01em;
}

/* ---------- Shared form controls (auth + purchase sheets) ---------- */
/* A class that sets display (flex) beats the browser's [hidden] rule, which is what used to show the
   sign-in AND create-account forms at once. These must always win. */
.kx-form[hidden], .kx-field[hidden], .kx-field-row[hidden], .kx-alert[hidden], .kx-auth [hidden] { display: none !important; }

.kx-form { display: flex; flex-direction: column; gap: 16px; }
.kx-field { display: flex; flex-direction: column; gap: 6px; }
.kx-field label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.kx-field small { color: var(--muted); font-size: 12px; }
.kx-field input, .kx-field select {
	font: inherit;
	font-size: 16px;
	padding: 13px 14px;
	border: 1.5px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--card);
	color: var(--ink);
}
.kx-field input:focus, .kx-field select:focus, .kx-btn:focus-visible, .kx-service:focus-visible, .kx-tabbar-btn:focus-visible {
	outline: 2px solid var(--marigold);
	outline-offset: 2px;
}
.kx-field input[readonly] { background: #F1EDE2; color: var(--muted); }
.kx-field-row { display: flex; gap: 12px; }
.kx-field-row .kx-field { flex: 1; min-width: 0; }
.kx-verify-row { display: flex; gap: 8px; }
.kx-verify-row input { flex: 1; min-width: 0; }
.kx-btn-sm { width: auto; padding: 0 16px; font-size: 13px; white-space: nowrap; }
.kx-ok { color: var(--jade); font-weight: 700; }
.kx-bad { color: var(--red); font-weight: 700; }

.kx-btn {
	font: inherit;
	font-weight: 700;
	font-size: 15px;
	border-radius: var(--radius-sm);
	padding: 14px 18px;
	border: 1.5px solid transparent;
	cursor: pointer;
	width: 100%;
}
.kx-btn-primary { background: var(--ink); color: #fff; }
.kx-btn-primary:hover { background: var(--ink-soft); }
.kx-btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.kx-btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.kx-btn-ghost { background: transparent; color: var(--ink-soft); border: 1.5px dashed var(--line); }

.kx-alert {
	font-size: 13px;
	padding: 10px 12px;
	border-radius: var(--radius-sm);
	background: var(--red-tint);
	color: var(--red);
	font-weight: 600;
}
.kx-alert.kx-alert-ok { background: var(--jade-tint); color: var(--jade); }

/* ---------- Auth (sign in / create account) ---------- */
/* Scoped resets so a site theme's generic button/input/label/heading styles cannot leak in. */
.kx-auth button, .kx-auth input, .kx-auth select, .kx-auth label, .kx-auth h1, .kx-auth p, .kx-auth ul {
	font-family: inherit; letter-spacing: normal; text-transform: none; text-shadow: none; text-indent: 0;
}
.kx-auth button, .kx-auth input, .kx-auth select { margin: 0; max-width: 100%; line-height: 1.3; min-height: 0; }
.kx-auth label { display: block; margin: 0; }
:where(.kx-auth) :is(h1, p, ul) { margin: 0; padding: 0; } /* zero specificity so our own margins below still apply */
.kx-auth { -webkit-font-smoothing: antialiased; font-optical-sizing: auto; }

/* ---------- App shell ---------- */
.kx-app { min-height: 100vh; padding-bottom: 84px; }

.kx-topbar {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; gap: 12px;
	background: var(--ink); color: #fff;
	padding: 14px 18px;
}
.kx-topbar-brand { display: flex; align-items: center; gap: 8px; }
.kx-topbar .kx-brand-name { color: #fff; font-size: 16px; }
.kx-topbar-wallet { margin-left: auto; text-align: right; }
.kx-wallet-label { display: block; font-size: 11px; color: rgba(255,255,255,.6); font-weight: 600; }
.kx-wallet-row { display: inline-flex; align-items: center; gap: 6px; }
.kx-wallet-amount { font-family: var(--kx-display); font-size: 21px; font-weight: 600; color: var(--marigold); transition: filter .15s ease; }
.kx-wallet-amount.is-hidden { filter: blur(7px); user-select: none; }
.kx-eye-btn {
	border: 0; background: none; color: rgba(255,255,255,.55); cursor: pointer; padding: 4px;
	display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
}
.kx-eye-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.kx-icon-btn {
	width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
	background: rgba(255,255,255,.06); color: #fff; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.kx-icon-btn:hover { background: rgba(255,255,255,.14); }

.kx-main { max-width: 640px; margin: 0 auto; padding: 22px 18px 8px; }
.kx-view-title { font-family: var(--kx-display); font-size: 24px; font-weight: 600; margin: 4px 0 18px; }

.kx-service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kx-service-groups { margin-bottom: 30px; }
.kx-service-group { margin-bottom: 20px; }
.kx-service-group:last-child { margin-bottom: 0; }
.kx-service-cat { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 2px; }
.kx-service {
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md);
	padding: 16px 6px; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--ink);
	box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
}
.kx-service:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(18,20,43,.1); }
.kx-service:active { transform: translateY(1px); box-shadow: none; }
.kx-service-ic {
	width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
}
.kx-ic-airtime { background: #FFF3DC; color: var(--marigold-ink); }
.kx-ic-data { background: #E4F3EC; color: var(--jade); }
.kx-ic-electricity { background: #FDE8D8; color: #B4530E; }
.kx-ic-cable { background: #EDE9FE; color: #6D4FC7; }
.kx-ic-a2c { background: #E0F2F7; color: #0E7490; }
.kx-ic-nin { background: #E4F3EC; color: var(--jade); }
.kx-ic-vcard { background: #EDE9FE; color: #6D4FC7; }
.kx-ic-esim { background: #FFF3DC; color: var(--marigold-ink); }
.kx-ic-pot { background: #FDE8EF; color: #BE185D; }
.kx-ic-crypto { background: #FDE8D8; color: #B4530E; }
.kx-tabbar-ic svg, .kx-service-ic svg { display: block; }

.kx-recent-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.kx-recent-head h2, .kx-support h2 { font-size: 16px; margin: 0; }
.kx-link { border: 0; background: none; color: var(--marigold-ink); font-weight: 700; font-size: 13px; cursor: pointer; }

.kx-order-list { display: flex; flex-direction: column; gap: 8px; }
.kx-order-row {
	display: flex; align-items: center; gap: 12px;
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md);
	padding: 12px 14px;
}
.kx-order-ic {
	width: 38px; height: 38px; border-radius: 10px; background: var(--paper);
	display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.kx-order-mid { flex: 1; min-width: 0; }
.kx-order-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kx-order-sub { font-size: 12.5px; color: var(--muted); }
.kx-order-amt { font-weight: 800; font-size: 14px; white-space: nowrap; }
.kx-order-amt.is-credit { color: var(--jade); }
.kx-order-amt.is-debit { color: var(--ink); }
.kx-status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; display: inline-block; margin-top: 2px; }
.kx-status-success { background: var(--jade-tint); color: var(--jade); }
.kx-status-pending, .kx-status-processing { background: #FFF3DC; color: var(--marigold-ink); }
.kx-status-failed { background: var(--red-tint); color: var(--red); }
.kx-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 30px 0; }

.kx-fund-card {
	background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: 24px; margin-bottom: 18px;
	position: relative; overflow: hidden;
}
.kx-fund-hint { color: rgba(255,255,255,.75); margin: 0; }
.kx-fund-bank { font-size: 13px; color: rgba(255,255,255,.65); font-weight: 700; margin: 0 0 4px; }
.kx-fund-number { font-family: var(--kx-display); font-size: 30px; letter-spacing: .02em; margin: 0 0 6px; }
.kx-fund-name { font-size: 14px; color: rgba(255,255,255,.85); margin: 0 0 18px; }
.kx-note { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.kx-copy-btn {
	background: var(--marigold); color: var(--ink); border: 0; border-radius: var(--radius-sm);
	padding: 11px 16px; font-weight: 800; font-size: 13.5px; cursor: pointer;
}
.kx-kyc-form { display: flex; flex-direction: column; gap: 12px; }

.kx-history-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.kx-chip {
	border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
	padding: 7px 16px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.kx-chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.kx-account-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); margin-bottom: 16px; overflow: hidden; }
.kx-account-row { display: flex; justify-content: space-between; padding: 13px 16px; font-size: 14px; border-bottom: 1px solid var(--line); }
.kx-account-row:last-child { border-bottom: 0; }
.kx-account-row span { color: var(--muted); }
.kx-support { margin-top: 26px; }
.kx-support p { color: var(--muted); font-size: 14px; line-height: 1.6; }

.kx-tabbar {
	position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
	display: flex; background: var(--card); border-top: 1px solid var(--line);
	max-width: 640px; margin: 0 auto; padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
}
.kx-tabbar-btn {
	flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
	background: none; border: 0; padding: 8px 4px; font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer;
}
.kx-tabbar-btn.is-active { color: var(--ink); }
.kx-tabbar-ic { font-size: 18px; }

/* ---------- Sheets / modals ---------- */
.kx-sheet-backdrop {
	position: fixed; inset: 0; z-index: 50; background: rgba(18,20,43,.5);
	display: flex; align-items: flex-end; justify-content: center;
}
.kx-sheet-backdrop[hidden] { display: none !important; }
@media (min-width: 640px) { .kx-sheet-backdrop { align-items: center; } }
.kx-sheet {
	background: var(--paper); width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
	border-radius: 22px 22px 0 0; padding: 18px 20px calc(24px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 640px) { .kx-sheet { border-radius: var(--radius-lg); max-height: 80vh; } }
.kx-sheet-sm { max-width: 380px; }
.kx-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.kx-sheet-head h2 { font-family: var(--kx-display); font-size: 19px; margin: 0; }
.kx-sheet-body { display: flex; flex-direction: column; gap: 14px; }

.kx-network-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.kx-network-pick {
	border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
	border-radius: var(--radius-sm); padding: 10px 4px; text-align: center; font-size: 12px; font-weight: 700; cursor: pointer;
}
.kx-network-pick.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.kx-exam-grid { grid-template-columns: repeat(3,1fr); }
.kx-exam-pick { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.kx-exam-price { font-size: 11px; font-weight: 600; opacity: .75; }

.kx-amount-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kx-amt-chip {
	border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
	border-radius: var(--radius-sm); padding: 9px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.kx-amt-chip.is-active { border-color: var(--marigold); background: #FFF3DC; color: var(--marigold-ink); }

.kx-plan-list { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.kx-verify-result { margin: -8px 0 0; font-size: 12.5px; font-weight: 700; }
.kx-verify-result.is-checking { color: var(--muted); }
.kx-verify-result.is-ok { color: var(--jade); }
.kx-verify-result.is-bad { color: var(--red); }
.kx-plan-row {
	display: flex; justify-content: space-between; align-items: center;
	border: 1.5px solid var(--line); background: var(--card); border-radius: var(--radius-sm);
	padding: 12px 14px; cursor: pointer; font-size: 13.5px;
}
.kx-plan-row.is-active { border-color: var(--ink); }
.kx-plan-row strong { font-size: 14px; }
.kx-plan-price { font-weight: 800; }

.kx-summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.kx-summary-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; }
.kx-summary-row.is-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; font-weight: 800; font-size: 15px; }

.kx-pin-dots { display: flex; gap: 14px; justify-content: center; margin: 6px 0 4px; }
.kx-pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); }
.kx-pin-dot.is-filled { background: var(--ink); border-color: var(--ink); }
.kx-pin-keys { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.kx-pin-key {
	border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: var(--radius-sm);
	padding: 16px 0; font-size: 18px; font-weight: 700; cursor: pointer;
}
.kx-pin-key.kx-pin-empty { border: 0; background: none; cursor: default; }

.kx-result { text-align: center; padding: 10px 0; }
.kx-result-ic { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.kx-result-ic.is-success { background: var(--jade-tint); color: var(--jade); }
.kx-result-ic.is-pending { background: #FFF3DC; color: var(--marigold-ink); }
.kx-result-ic.is-failed { background: var(--red-tint); color: var(--red); }
.kx-result h3 { font-family: var(--kx-display); font-size: 20px; margin: 0 0 6px; }
.kx-result p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.kx-result-amount { font-family: var(--kx-display); font-size: 30px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.kx-result .kx-btn { margin-bottom: 10px; }
.kx-processing { text-align: center; padding: 34px 10px 14px; }
.kx-processing p { margin: 0 0 6px; font-weight: 700; color: var(--ink); font-size: 14.5px; }
.kx-processing .kx-hint { font-weight: 400; margin: 0; }
.kx-spin-lg { width: 42px; height: 42px; border-width: 3px; border-color: var(--line); border-top-color: var(--jade); margin-bottom: 20px; }
.kx-token-box { background: var(--card); border: 1.5px dashed var(--line); border-radius: var(--radius-sm); padding: 14px; font-family: var(--kx-display); font-size: 18px; letter-spacing: .04em; margin-bottom: 18px; }

.kx-toast {
	position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
	background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px;
	font-size: 13.5px; font-weight: 700; z-index: 80; box-shadow: var(--shadow);
}

.kx-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: kx-spin .7s linear infinite; }
@keyframes kx-spin { to { transform: rotate(360deg); } }

/* ---------- View transitions ---------- */
.kx-view:not([hidden]) { animation: kx-fade-in .18s ease; }
@keyframes kx-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.kx-sheet-backdrop:not([hidden]) { animation: kx-backdrop-in .15s ease; }
@keyframes kx-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.kx-sheet-backdrop:not([hidden]) .kx-sheet { animation: kx-sheet-in .2s cubic-bezier(.2,.8,.2,1); }
@keyframes kx-sheet-in { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ---------- Recent numbers ---------- */
.kx-recent-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 2px; }
.kx-recent-chip {
	border: 1.5px dashed var(--line); background: transparent; border-radius: 999px;
	padding: 6px 12px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); cursor: pointer;
}
.kx-recent-chip:hover { border-style: solid; border-color: var(--ink); }
.kx-recent-label { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin: -6px 0 -2px; }

/* ---------- Data-plan group tabs ---------- */
.kx-group-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; margin: -2px 0 2px; }
.kx-group-tab {
	flex: 0 0 auto; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
	padding: 7px 14px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.kx-group-tab.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Skeleton loading ---------- */
.kx-skel-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card); }
.kx-skel { background: linear-gradient(90deg, var(--line) 25%, #EFEAE0 37%, var(--line) 63%); background-size: 400% 100%; animation: kx-shimmer 1.4s ease infinite; border-radius: 8px; }
.kx-skel-ic { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; }
.kx-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.kx-skel-line { height: 10px; width: 60%; }
.kx-skel-line.is-short { width: 34%; }
@keyframes kx-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- Buy-again ---------- */
.kx-order-again {
	border: 1.5px solid var(--line); background: var(--card); border-radius: var(--radius-sm);
	padding: 6px 10px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.kx-order-again:hover { border-color: var(--ink); color: var(--ink); }
.kx-order-row { align-items: center; }
.kx-tappable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.kx-tappable:active { background: var(--sand); }

@media (prefers-reduced-motion: reduce) {
	.kx-spin { animation-duration: 1.4s; }
	.kx-view:not([hidden]), .kx-sheet-backdrop:not([hidden]), .kx-sheet-backdrop:not([hidden]) .kx-sheet { animation: none; }
	.kx-skel { animation: none; }
}

/* ---------- Account popover ---------- */
.kx-account-menu { position: relative; margin-left: auto; }
.kx-avatar-btn {
	display: inline-flex; align-items: center; gap: 4px; width: auto; padding: 0 10px;
	height: 38px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
}
.kx-account-popover {
	position: absolute; top: 46px; right: 0; width: 220px; background: var(--paper); color: var(--ink);
	border-radius: var(--radius-md); box-shadow: 0 12px 32px rgba(18,20,43,.22); overflow: hidden; z-index: 30;
	border: 1px solid var(--line);
}
.kx-account-popover-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.kx-account-popover-head span { font-size: 11.5px; color: var(--muted); }
.kx-popover-item {
	width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 16px; border: 0; background: none;
	font-size: 13.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; text-align: left;
}
.kx-popover-item:hover { background: var(--sand); }
.kx-popover-danger { color: var(--red); }

/* ---------- Drawer ---------- */
.kx-drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(18,20,43,.5); display: flex; }
.kx-drawer-backdrop[hidden] { display: none !important; }
.kx-drawer-backdrop:not([hidden]) { animation: kx-backdrop-in .15s ease; }
.kx-drawer {
	width: 82%; max-width: 300px; height: 100%; background: var(--paper); overflow-y: auto;
	padding: 18px 10px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 2px;
	animation: kx-drawer-in .2s cubic-bezier(.2,.8,.2,1);
}
@keyframes kx-drawer-in { from { transform: translateX(-16px); opacity: .6; } to { transform: none; opacity: 1; } }
.kx-drawer-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 14px 12px 4px; }
.kx-drawer-item {
	display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--radius-sm); border: 0;
	background: none; color: var(--ink-soft); font-size: 14px; font-weight: 700; cursor: pointer; text-align: left;
}
.kx-drawer-item:hover { background: var(--sand); }
.kx-drawer-item.is-active { background: var(--jade-tint); color: var(--jade); }
.kx-drawer-top { font-size: 15px; }
.kx-drawer-spacer { flex: 1; }
.kx-drawer-exit { color: var(--red); }

/* ---------- Hero wallet card ---------- */
.kx-hero {
	background: linear-gradient(155deg, var(--ink) 0%, #1B3B2E 65%, var(--jade) 130%);
	border-radius: var(--radius-lg); padding: 22px 20px; color: #fff; margin-bottom: 22px;
}
.kx-hero-top { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.85); }
.kx-hero-balance-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.kx-hero-balance { font-family: var(--kx-display); font-size: 34px; font-weight: 600; }
.kx-eye-btn-light { color: rgba(255,255,255,.6); }
.kx-eye-btn-light:hover { color: #fff; }
.kx-hero-earning {
	display: inline-block; margin-top: 10px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
	background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.22); cursor: pointer;
}
.kx-hero-actions { display: flex; gap: 10px; margin-top: 18px; }
.kx-hero-btn {
	flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px; border-radius: var(--radius-sm);
	border: 0; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.kx-hero-btn-light { background: #fff; color: var(--ink); }
.kx-hero-btn-dark { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.22); }

/* ---------- Coming-soon service badge ---------- */
.kx-service[data-soon] { position: relative; }
.kx-service[data-soon]::after {
	content: 'Soon'; position: absolute; top: 6px; right: 6px; font-size: 9px; font-weight: 800; letter-spacing: .03em;
	background: var(--marigold); color: #fff; padding: 1px 6px; border-radius: 999px;
}

/* ---------- Generic feature-sheet content (referral / kyc / analytics / api / coming soon) ---------- */
.kx-hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.kx-sub-title { font-size: 14px; font-weight: 800; margin: 18px 0 8px; }
.kx-share-box {
	display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--sand);
	border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px;
}
.kx-share-box code { font-size: 12.5px; word-break: break-all; color: var(--ink); }
.kx-stat-row { display: flex; gap: 10px; margin-bottom: 14px; }
.kx-stat-row > div { flex: 1; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 6px; }
.kx-stat-row strong { display: block; font-family: var(--kx-display); font-size: 18px; }
.kx-stat-row span { font-size: 10.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.kx-soon { text-align: center; padding: 20px 6px; color: var(--ink-soft); }
.kx-soon svg { color: var(--marigold); margin-bottom: 10px; }
.kx-soon h3 { font-family: var(--kx-display); font-size: 18px; margin: 0 0 8px; }
.kx-soon p { font-size: 13.5px; color: var(--muted); margin: 0 0 16px; }
.kx-bar-chart { display: flex; flex-direction: column; gap: 12px; }
.kx-bar-row { display: grid; grid-template-columns: 78px 1fr auto; align-items: center; gap: 10px; }
.kx-bar-label { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.kx-bar-track { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.kx-bar-fill { display: block; height: 100%; background: var(--jade); border-radius: 999px; }
.kx-bar-value { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.kx-code-block { background: var(--ink); color: #D9F2E4; font-size: 11.5px; padding: 14px; border-radius: var(--radius-sm); overflow-x: auto; line-height: 1.7; margin-top: 16px; }
.kx-support-link {
	display: flex; align-items: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
	margin-bottom: 10px; font-weight: 700; color: var(--ink); text-decoration: none;
}
.kx-support-link:hover { border-color: var(--ink); }

/* ---------- Exam / recharge pin results ---------- */
.kx-pin-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.kx-pin-row { display: flex; align-items: center; gap: 10px; background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.kx-pin-idx { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.kx-pin-values { font-size: 12.5px; line-height: 1.6; }
.kx-pin-values strong { font-weight: 700; color: var(--muted); }

/* =====================================================================================================
   Dashboard polish (1.7.6): theme-proofing, tile grid, floating tab bar, floating motion
   ===================================================================================================== */

/* A site theme's generic button styles (min sizes, colours, upper-casing) must not leak into the app. */
.kx-app button, .kx-sheet-backdrop button {
	font-family: inherit; letter-spacing: normal; text-transform: none; text-shadow: none;
	margin: 0; min-width: 0; min-height: 0; -webkit-appearance: none; appearance: none;
}
.kx-app .kx-icon-btn { width: 40px; height: 40px; padding: 0; color: #fff; flex: none; }
.kx-app .kx-icon-btn svg, .kx-app .kx-icon-btn svg * { stroke: currentColor; }
.kx-app .kx-icon-btn svg { width: 18px; height: 18px; display: block; }
.kx-app .kx-eye-btn svg, .kx-app .kx-eye-btn svg * { stroke: currentColor; }

/* Wallet card */
.kx-hero { position: relative; overflow: hidden; isolation: isolate; box-shadow: 0 18px 36px -22px rgba(18,20,43,.7); }
.kx-hero > * { position: relative; z-index: 1; }
.kx-hero::before, .kx-hero::after { content: ""; position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; filter: blur(2px); }
.kx-hero::before { width: 190px; height: 190px; right: -50px; top: -70px; background: radial-gradient(closest-side, rgba(255,176,32,.34), transparent); animation: kx-drift-a 11s ease-in-out infinite; }
.kx-hero::after { width: 170px; height: 170px; left: -40px; bottom: -80px; background: radial-gradient(closest-side, rgba(255,255,255,.14), transparent); animation: kx-drift-b 13s ease-in-out infinite; }
.kx-hero-btn { white-space: nowrap; padding: 12px 10px; transition: transform .15s ease, background .15s ease; }
.kx-hero-btn:active { transform: scale(.97); }
.kx-hero-btn-light:hover { background: #FFF6E3; }

/* Service tiles: three across on phones so labels never wrap awkwardly or orphan a tile */
.kx-service-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (min-width: 560px) { .kx-service-grid { grid-template-columns: repeat(4, 1fr); } }
.kx-service { min-height: 106px; justify-content: center; padding: 14px 6px; text-align: center; line-height: 1.25; font-size: 13px; transition: transform .18s var(--kx-ease, ease), box-shadow .18s ease; -webkit-tap-highlight-color: transparent; }
.kx-service:hover { transform: translateY(-3px); box-shadow: 0 10px 22px -10px rgba(18,20,43,.28); }
.kx-service:active { transform: scale(.96); box-shadow: none; }
.kx-service-cat { font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--muted); margin: 0 0 10px 2px; }
.kx-service-ic { transition: transform .2s ease; }
.kx-service:hover .kx-service-ic { transform: scale(1.06); }

/* Floating tab bar */
.kx-app { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
.kx-tabbar {
	left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	max-width: 616px; margin: 0 auto; padding: 6px;
	border: 1px solid rgba(18,20,43,.08); border-radius: 24px;
	background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
	box-shadow: 0 16px 36px -10px rgba(18,20,43,.32), 0 2px 6px rgba(18,20,43,.06);
	animation: kx-dock-in .6s .15s var(--kx-ease, ease) backwards;
}
.kx-tabbar-btn { position: relative; border-radius: 18px; padding: 8px 4px; transition: color .2s ease, background .25s ease, transform .15s ease; -webkit-tap-highlight-color: transparent; }
.kx-tabbar-btn:active { transform: scale(.94); }
.kx-tabbar-btn.is-active { background: rgba(255,176,32,.2); color: var(--ink); }
.kx-tabbar-ic { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.kx-tabbar-btn.is-active .kx-tabbar-ic { transform: translateY(-2px) scale(1.08); }

/* Floating motion: slow, small, transform-only. Tile icons bob out of phase; the card's glow drifts. */
.kx-service-ic { animation: kx-float 6s ease-in-out infinite; }
.kx-service:nth-child(3n+2) .kx-service-ic { animation-delay: -2s; }
.kx-service:nth-child(3n) .kx-service-ic { animation-delay: -4s; }
.kx-service:nth-child(2n) .kx-service-ic { animation-duration: 7s; }
.kx-service:hover .kx-service-ic { animation-play-state: paused; }
.kx-main .kx-hero { animation: kx-rise .55s var(--kx-ease, ease) backwards; }
.kx-service { animation: kx-rise .5s var(--kx-ease, ease) backwards; }
.kx-service:nth-child(2) { animation-delay: .05s; } .kx-service:nth-child(3) { animation-delay: .1s; }
.kx-service:nth-child(4) { animation-delay: .15s; } .kx-service:nth-child(5) { animation-delay: .2s; } .kx-service:nth-child(n+6) { animation-delay: .25s; }
@keyframes kx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3.5px); } }
@keyframes kx-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes kx-dock-in { from { opacity: 0; transform: translateY(26px); } }
@keyframes kx-drift-a { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-26px, 22px); } }
@keyframes kx-drift-b { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, -18px); } }

@media (prefers-reduced-motion: reduce) {
	.kx-hero::before, .kx-hero::after, .kx-service-ic, .kx-service, .kx-tabbar, .kx-main .kx-hero { animation: none !important; }
	.kx-tabbar-btn, .kx-tabbar-ic, .kx-service, .kx-service-ic { transition: none !important; }
}

/* Icon tints that were missing (these tiles showed a bare icon with no coloured chip) */
.kx-ic-epin { background: #E0F2F7; color: #0E7490; }
.kx-ic-exam { background: #E4F3EC; color: var(--jade); }
.kx-ic-jamb { background: #FDE8EF; color: #BE185D; }
.kx-ic-betting { background: #FBE9E4; color: #C1432E; }

/* Section headings with no class of their own picked up a light default weight */
.kx-recent-head h2 { font-family: var(--kx-display); font-size: 20px; font-weight: 600; margin: 0; }
.kx-service[data-soon]::after { top: 5px; right: 5px; }

/* coupon box on the purchase summary */
.kx-coupon { margin: 14px 0 6px; }
.kx-coupon-row { display: flex; gap: 8px; }
.kx-coupon-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .5px; }
.kx-coupon-btn { width: auto; padding: 0 16px; flex: none; }
.kx-coupon-msg { margin: 6px 0 0; }
.kx-coupon-line span:last-child { color: #1a7f37; font-weight: 700; }

.kx-check { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 14px; }
.kx-check input { width: auto; }

.kxa-link { background: none; border: 0; padding: 0 4px; color: inherit; text-decoration: underline; font: inherit; font-weight: 700; cursor: pointer; }

.kx-coupon-msg.is-bad { color: var(--red); font-weight: 600; }
.kx-coupon-msg.is-good { color: var(--jade); font-weight: 600; }

/* ---------- Dashboard pop-ups ---------- */
.kx-sheet-backdrop.kx-pop-backdrop { z-index: 60; align-items: center; padding: 16px; }
.kx-pop { max-width: 400px; border-radius: var(--radius-lg); text-align: center; padding: 26px 22px 22px; animation: kx-pop-in .22s ease-out; }
.kx-pop-ic { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: #FFF3DC; color: var(--marigold-ink); }
.kx-pop-ic.is-info { background: var(--jade-tint); color: var(--jade); }
.kx-pop h2 { font-family: var(--kx-display); font-size: 20px; margin: 0 0 8px; }
.kx-pop p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); white-space: pre-line; overflow-wrap: anywhere; }
.kx-pop-count { display: inline-block; margin: 4px 0 6px; padding: 6px 12px; border-radius: 999px; background: var(--red-tint); color: var(--red); font-weight: 700; font-size: 13px; }
.kx-pop-step { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.kx-pop-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
@keyframes kx-pop-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .kx-pop { animation: none; } }

/* Withdrawal: the account name comes from the bank, never typed */
#kx-wd-name[readonly] { background: var(--paper, #f6f3ec); font-weight: 600; cursor: default; }
#kx-wd-name.is-verified { border-color: var(--jade, #1a7f4b); }
.kx-hint.kx-ok { color: var(--jade, #1a7f4b); font-weight: 600; }
.kx-hint.kx-bad { color: var(--red, #b32d2e); font-weight: 600; }

/* ---------- POS Agent upgrade ---------- */
.kx-agent-banner {
	display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0 6px; padding: 13px 14px;
	border: 1px solid #F3D9A0; border-radius: var(--radius-md); cursor: pointer; text-align: left;
	background: linear-gradient(135deg, #FFF6E3 0%, #FFFDF8 100%); color: var(--ink); font: inherit;
	box-shadow: 0 1px 2px rgba(18,20,43,.04);
}
.kx-agent-banner[hidden] { display: none; }
.kx-agent-banner:active { transform: scale(.99); }
.kx-agent-banner-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--marigold); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.kx-agent-banner-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kx-agent-banner-txt strong { font-family: var(--kx-display); font-size: 15px; font-weight: 600; }
.kx-agent-banner-txt span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.kx-agent-banner-go { flex: none; font-size: 22px; color: var(--marigold-ink); line-height: 1; }
.kx-agent-chip { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--marigold); color: var(--ink); font-size: 11.5px; font-weight: 800; vertical-align: middle; }
.kx-agent-chip[hidden] { display: none; }
.kx-agent-perks { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 6px 14px 10px; }
.kx-agent-group-t { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 0 2px; }
.kx-agent-perk { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr; gap: 8px; align-items: center; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.kx-agent-perk:last-child { border-bottom: 0; }
.kx-agent-perk-head { font-size: 11.5px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); }
.kx-agent-was { color: var(--muted); }
.kx-agent-now { color: var(--jade); font-weight: 800; }
.kx-agent-perk-head span:last-child { color: var(--jade); }
.kx-agent-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 10px; }
.kx-agent-bar span { display: block; height: 100%; background: var(--jade); border-radius: 999px; }

/* history tabs: room for add-on tabs (NIN, BVN, ...) */
.kx-history-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.kx-history-tabs::-webkit-scrollbar { display: none; }
.kx-history-tabs .kx-chip { flex: none; white-space: nowrap; }

/* ---------- Marketer hub ---------- */
.kx-mk-card { display: flex; align-items: center; gap: 12px; width: 100%; margin: 10px 0 6px; padding: 13px 14px; border: 1px solid #CFD3F2; border-radius: var(--radius-md); cursor: pointer; text-align: left; background: linear-gradient(135deg, #F1F2FF 0%, #FBFBFF 100%); color: var(--ink); font: inherit; box-shadow: 0 1px 2px rgba(18,20,43,.04); }
.kx-mk-card[hidden] { display: none; }
.kx-mk-card:active { transform: scale(.99); }
.kx-mk-card-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; background: #2B2F77; color: #fff; display: flex; align-items: center; justify-content: center; }
.kx-mk-card-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kx-mk-card-txt strong { font-family: var(--kx-display); font-size: 15px; font-weight: 600; }
.kx-mk-card-txt span { font-size: 12.5px; color: var(--muted); }
.kx-mk-card-amt { flex: none; font-weight: 800; color: var(--jade); font-size: 15px; }
.kx-mk-chip { background: #2B2F77; color: #fff; }
.kx-mk-hero { background: linear-gradient(135deg, #14163A 0%, #2B2F77 100%); color: #fff; border-radius: 18px; padding: 18px 18px 14px; margin-bottom: 12px; box-shadow: 0 8px 24px rgba(20,22,58,.22); }
.kx-mk-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; opacity: .92; }
.kx-mk-pill { background: rgba(255,255,255,.16); border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: 11.5px; }
.kx-mk-hero-amt { display: block; font-family: var(--kx-display); font-size: 34px; font-weight: 700; letter-spacing: -.5px; margin: 6px 0 12px; }
.kx-mk-hero-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid rgba(255,255,255,.16); padding-top: 10px; }
.kx-mk-hero-row small { display: block; font-size: 11px; opacity: .72; }
.kx-mk-hero-row b { font-size: 13.5px; font-weight: 700; }
.kx-mk-share { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; margin-bottom: 12px; }
.kx-mk-share-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.kx-mk-link { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; padding: 10px 12px; background: var(--bg, #F6F6FA); border: 1px dashed var(--line); border-radius: 10px; margin-bottom: 10px; user-select: all; }
.kx-mk-btns { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.kx-mk-btns .kx-btn { margin: 0; padding-left: 8px; padding-right: 8px; text-align: center; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.kx-mk-code { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.kx-mk-code b { font-size: 16px; letter-spacing: .08em; color: var(--ink); }
.kx-mk-code button { margin-left: auto; border: 0; background: transparent; color: var(--marigold-ink); font-weight: 800; cursor: pointer; font: inherit; }
.kx-mk-tabs { display: flex; gap: 8px; margin: 4px 0 12px; overflow-x: auto; scrollbar-width: none; }
.kx-mk-tabs .kx-chip { flex: none; }
.kx-mk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.kx-mk-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; }
.kx-mk-stat small { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.kx-mk-stat b { font-family: var(--kx-display); font-size: 18px; font-weight: 700; }
.kx-mk-card2 { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; margin-bottom: 12px; }
.kx-mk-card2-h { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.kx-mk-chart { display: block; width: 100%; height: auto; }
.kx-mk-rate { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line); }
.kx-mk-rate:last-of-type { border-bottom: 0; }
.kx-mk-rate b { color: var(--jade); }
.kx-mk-av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #E7E8FA; color: #2B2F77; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.kx-mk-rev { opacity: .55; }
.kx-mk-rev .kx-order-amt { text-decoration: line-through; }
.kx-ic-smm { background: #FFE9F3; color: #C2185B; }

/* ---------- Live TV ---------- */
.kx-ic-livetv { background: #FDE4E4; color: #C0392B; }

/* ---------- Exit buttons ---------- */
/* Pop-up windows: the X is always visible (dark on the light sheet) and stays at the top while the content scrolls. */
.kx-sheet-head { position: sticky; top: -18px; z-index: 5; margin: -18px -20px 12px; padding: 18px 20px 10px; background: inherit; }
.kx-sheet-backdrop .kx-sheet .kx-icon-btn { width: 40px; height: 40px; padding: 0; flex: none; color: var(--ink); background: var(--card, #fff); border: 1.5px solid var(--line, #D9DCE8); border-radius: 50%; }
.kx-sheet-backdrop .kx-sheet .kx-icon-btn:hover { background: var(--line, #ECEEF6); }
.kx-sheet-backdrop .kx-sheet .kx-icon-btn svg, .kx-sheet-backdrop .kx-sheet .kx-icon-btn svg * { stroke: currentColor; width: 16px; height: 16px; }
/* Full-page tabs (Fund, Transactions, Profile...): an X at the top right goes back to Home. */
.kx-view { position: relative; }
.kx-view-close { position: absolute; top: 2px; right: 0; z-index: 4; width: 40px; height: 40px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); background: var(--card, #fff); border: 1.5px solid var(--line, #D9DCE8); }
.kx-view-close:hover { background: var(--line, #ECEEF6); }
.kx-view-close svg, .kx-view-close svg * { stroke: currentColor; }
.kx-view > .kx-view-title { padding-right: 52px; }

/* ---------- Live TV ---------- */
.kx-ic-livetv { background: #FDE4E4; color: #C0392B; }
.kx-sheet.kx-sheet-tv { display: flex; flex-direction: column; height: 92vh; height: 92dvh; max-height: none; overflow: hidden; padding-bottom: 0; background: #0B0D14; color: #EEF1F8; }
@media (min-width: 640px) { .kx-sheet.kx-sheet-tv { height: min(86vh, 780px); } }
.kx-sheet-tv .kx-sheet-head { position: static; margin: 0 0 10px; padding: 0; background: transparent; flex: none; }
.kx-sheet-tv .kx-sheet-head h2 { color: #fff; }
.kx-sheet-backdrop .kx-sheet-tv .kx-icon-btn { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); }
.kx-sheet-backdrop .kx-sheet-tv .kx-icon-btn:hover { background: rgba(255,255,255,.18); }
.kx-sheet-tv .kx-sheet-body { flex: 1; min-height: 0; overflow: hidden; gap: 0; }
.kx-tv-wrap { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.kx-tv-screen { position: relative; flex: none; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; border: 3px solid #1B2030; box-shadow: 0 6px 24px rgba(0,0,0,.45); }
.kx-tv-stage { position: absolute; inset: 0; }
.kx-tv-stage iframe, .kx-tv-stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.kx-tv-idle { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; }
.kx-tv-idle[hidden], .kx-tv-osd[hidden], .kx-tv-hint[hidden] { display: none !important; }
.kx-tv-bars { position: absolute; inset: 0; opacity: .5; background: linear-gradient(90deg, #c8c8c8 0 14.28%, #c9c216 0 28.56%, #17c4c4 0 42.84%, #18c418 0 57.12%, #c418c4 0 71.4%, #c41818 0 85.68%, #1818c4 0 100%); }
.kx-tv-bars::after { content: ''; position: absolute; inset: 0; background: rgba(5,7,12,.55); }
.kx-tv-idle-msg { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 16px; }
.kx-tv-idle-msg strong { font-family: var(--kx-display); font-size: 22px; letter-spacing: .02em; color: #fff; }
.kx-tv-idle-msg > span { font-size: 12.5px; color: #C7CDDD; }
.kx-tv-start { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 18px; border: 0; border-radius: 999px; background: #E53935; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; max-width: 100%; }
.kx-tv-start span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kx-tv-osd { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; align-items: baseline; gap: 10px; pointer-events: none; text-shadow: 0 1px 6px rgba(0,0,0,.9); }
.kx-tv-osd b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 26px; font-weight: 800; color: #7CFF8A; letter-spacing: .04em; }
.kx-tv-osd span { font-size: 15px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kx-tv-bar { flex: none; display: flex; align-items: stretch; gap: 8px; }
.kx-tv-ctl { flex: none; width: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 6px 0; border: 1.5px solid #272E42; background: #151925; color: #fff; border-radius: 12px; cursor: pointer; }
.kx-tv-ctl small { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: #8D96AD; }
.kx-tv-ctl:active, .kx-tv-tool:active { background: #232A3E; }
.kx-tv-now { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 12px; background: #151925; border: 1.5px solid #272E42; }
.kx-tv-now-txt { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.kx-tv-now-txt b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; color: #7CFF8A; }
.kx-tv-now-txt strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.kx-tv-tools { flex: none; display: flex; align-items: center; gap: 8px; }
.kx-tv-tool { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1.5px solid #272E42; background: #151925; color: #fff; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
.kx-tv-tool.is-on { color: #FFC83D; border-color: #FFC83D; }
.kx-tv-goto { flex: 1; display: flex; gap: 6px; min-width: 0; }
.kx-tv-goto input { flex: 1; min-width: 0; width: 100%; min-height: 40px; border: 1.5px solid #272E42; background: #0F1320; color: #fff; border-radius: 10px; padding: 0 10px; font-size: 14px; }
.kx-tv-hint { flex: none; margin: 0; font-size: 12px; color: #8D96AD; }
.kx-tv-find { flex: none; display: flex; flex-direction: column; gap: 8px; }
.kx-tv-search { width: 100%; min-height: 40px; border: 1.5px solid #272E42; background: #0F1320; color: #fff; border-radius: 10px; padding: 0 12px; font-size: 14px; }
.kx-tv-search::placeholder, .kx-tv-goto input::placeholder { color: #6C7590; }
.kx-tv-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.kx-tv-cats::-webkit-scrollbar { display: none; }
.kx-tv-chip { flex: none; white-space: nowrap; padding: 7px 13px; border-radius: 999px; border: 1.5px solid #272E42; background: #151925; color: #C7CDDD; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.kx-tv-chip.is-active { background: #E53935; border-color: #E53935; color: #fff; }
.kx-tv-list { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px calc(18px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; }
.kx-tv-group { position: sticky; top: 0; z-index: 2; padding: 8px 4px 6px; background: #0B0D14; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8D96AD; }
.kx-tv-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 12px; cursor: pointer; border: 1.5px solid transparent; }
.kx-tv-row:hover { background: #151925; }
.kx-tv-row.is-active { background: #1A2036; border-color: #E53935; }
.kx-tv-no { flex: none; width: 36px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; color: #7CFF8A; }
.kx-tv-logo { flex: none; width: 36px; height: 36px; border-radius: 9px; background: #2A1517; color: #FF8A80; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; overflow: hidden; }
.kx-tv-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.kx-tv-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kx-tv-name { font-weight: 700; font-size: 14px; line-height: 1.25; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kx-tv-info small { font-size: 11.5px; color: #8D96AD; }
.kx-tv-star { flex: none; width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #3A4258; cursor: pointer; }
.kx-tv-star.is-on { color: #FFC83D; }
.kx-tv-star svg, .kx-tv-star svg * { stroke: currentColor; }
.kx-tv-empty { color: #8D96AD; text-align: center; padding: 24px 8px; }

/* Live dot: blinking red = on air, black = off air, grey = still checking. */
.kx-tv-live { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #8D96AD; box-shadow: 0 0 0 1.5px rgba(255,255,255,.4); flex: none; }
.kx-tv-live[data-st="off"] { background: #000; box-shadow: 0 0 0 1.5px rgba(255,255,255,.5); }
.kx-tv-live[data-st="live"] { background: #E53935; animation: kx-tv-blink 1.1s ease-in-out infinite; }
@keyframes kx-tv-blink { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(229,57,53,.55); } 50% { opacity: .25; box-shadow: 0 0 0 6px rgba(229,57,53,0); } }
@media (prefers-reduced-motion: reduce) { .kx-tv-live[data-st="live"] { animation: none; } }

.kx-tv-promo { display: flex; align-items: center; gap: 10px; margin: 2px 0 8px; padding: 12px; border-radius: 12px; background: #1A2036; border: 1.5px solid #2B3550; }
.kx-tv-promo > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kx-tv-promo strong { font-size: 13.5px; color: #fff; }
.kx-tv-promo span { font-size: 12px; color: #A9B2C8; line-height: 1.35; }
.kx-tv-promo .kx-tv-tool { flex: none; background: #E53935; border-color: #E53935; }
