:root { color-scheme: light dark; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #e96518; color: #160b06; font-size: 18.40px; }
main, .tab-sheet, .devices-page, .balance-page, .plans-page, .referrals-page { max-width: 560px; min-height: auto; margin: auto; padding: 28px 20px 96px; }
header { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brand-dot { width: 14px; height: 14px; border-radius: 50%; background: #13100e; box-shadow: 0 0 28px #13100e; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 27.60px; margin-bottom: 0; }
.brand-title { color: #160b06; font-size: clamp(33.35px, 8vw, 48.30px); font-weight: 900; letter-spacing: -.045em; line-height: .95; text-shadow: 2px 2px 0 #ffcc69; }
.cabinet-label { margin: 7px 0 0; color: #6e2c0b; font-size: 16.10px; font-weight: 700; }
h2 { font-size: 28.75px; line-height: 1.15; margin-bottom: 10px; }
.eyebrow { color: #8d3b12; font-size: 13.80px; letter-spacing: .11em; font-weight: 800; margin-bottom: 9px; }
.hero, .card, .help { border: 2px solid #160b06; border-radius: 22px; padding: 22px; background: #ffad39; margin-bottom: 14px; box-shadow: 5px 5px 0 #160b06; }
.hero { background: linear-gradient(140deg, #ffcc69, #f58220 68%); }
.hero > p:not(.eyebrow), .connect-card > p, .help p { color: #41200e; line-height: 1.45; margin-bottom: 18px; }
.status { display: inline-flex; gap: 8px; align-items: center; color: #160b06; font-size: 16.10px; font-weight: 700; }
.status span { width: 9px; height: 9px; background: #160b06; border-radius: 50%; }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid #b84b14; color: #5d260b; }
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row strong { color: #160b06; text-align: right; }
.servers-row strong { display: grid; gap: 6px; }
.servers-row strong span { display: block; }
.button { display: block; width: 100%; border-radius: 14px; padding: 15px 16px; text-align: center; font: inherit; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; margin-top: 10px; }
.button.disabled, .button:disabled { cursor: wait; opacity: .55; pointer-events: none; }
.device-create-actions { display: grid; gap: 8px; }
.device-create-actions .button { margin-top: 0; }
.device-create-actions .button:first-child { margin-top: 10px; }
.cancel-pending-device { border: 1px solid rgba(128, 48, 13, .38); color: #6e2c0b; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-button, .app-choice { border: 2px solid #160b06; border-radius: 16px; background: #ffd27a; color: #160b06; cursor: pointer; font: inherit; font-weight: 800; }
.choice-button { min-height: 78px; font-size: 19.55px; }
.app-choices { display: grid; gap: 10px; }
.app-choice { display: grid; grid-template-columns: 42px 1fr; text-align: left; align-items: center; padding: 15px; }
.app-choice span { grid-row: 1 / 3; font-size: 29.90px; }
.app-choice strong { font-size: 19.55px; }
.app-choice small { color: #6e2c0b; margin-top: 3px; }
.text-button { display: block; margin: 14px auto 0; background: none; border: 0; color: #542109; cursor: pointer; font: inherit; font-weight: 700; }
.tab-sheet { display: grid; place-content: center; text-align: center; gap: 12px; }
.tab-sheet span { font-size: 59.80px; }
.tab-sheet h2 { margin: 0; color: #160b06; }
.tab-sheet p { color: #542109; line-height: 1.45; }
.bottom-nav { position: fixed !important; z-index: 80; inset: auto 0 0; box-sizing: border-box; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; width: 100%; height: calc(78px + env(safe-area-inset-bottom)); margin: 0; padding: 9px 6px calc(9px + env(safe-area-inset-bottom)); background: #160b06; border-top: 2px solid #ffbd4c; transform: translate3d(0, 0, 0); transition: opacity .16s ease, transform .16s ease; contain: layout paint; will-change: transform; }
.bottom-nav.has-admin { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.nav-item { min-width: 0; border: 0; background: transparent; color: #c97944; font: inherit; font-size: 11.50px; line-height: 1.15; cursor: pointer; padding: 5px 1px; }
.nav-icon { display: block; box-sizing: content-box; width: 22px; height: 22px; margin: -2px auto 2px; border-radius: 11px; padding: 5px; fill: currentColor; transition: color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.nav-item.active .nav-icon { background: #ffad67; box-shadow: 0 5px 16px rgba(245,130,32,.25); color: #24140c; transform: translateY(-2px); }
.nav-item.active { color: #ffbd4c; font-weight: 800; }
.primary { background: #160b06; color: #ffbd4c; }
.secondary { background: transparent; color: #160b06; border: 2px solid #160b06; }
.notice { min-height: 20px; margin: 14px 0 0; color: #542109; font-size: 16.10px; font-weight: 600; }
.help { background: #f58220; }
.help h2 { font-size: 19.55px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats div { padding: 8px; border-radius: 14px; background: #ffd27a; }
.stats span, .client-row small { display: block; color: #5d260b; font-size: 13.80px; margin-top: 4px; }
.stats strong { display: block; font-size: 32.20px; margin-top: 4px; }
.client-row { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid #b84b14; }
.client-row:last-child { border-bottom: 0; }
.client-row > div:last-child { text-align: right; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 8px; background: #5d260b; color: #ffe3a3; font-size: 13.80px; }
.badge.ok { background: #160b06; color: #ffbd4c; }
.client-row button { margin-top: 9px; border: 1px solid #160b06; border-radius: 9px; padding: 6px 8px; background: #160b06; color: #ffbd4c; cursor: pointer; font: inherit; font-size: 13.80px; }
.client-row button.quiet { opacity: .72; }
.device-list { margin: 14px 0 4px; }
.device-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid #b84b14; }
.device-row:last-child { border-bottom: 0; }
.device-row strong, .device-row small { display: block; }
.device-info { min-width: 0; }
.device-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.device-client-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px 3px 4px; border: 1px solid #ead7c5; border-radius: 999px; background: #fffaf5; color: #4d382d; font-size: 12.65px; font-weight: 800; line-height: 1; }
.device-client-badge img { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; }
.device-info p { margin: 8px 0 0; color: #3f2d24; font-size: 14.95px; line-height: 1.35; overflow-wrap: anywhere; }
.device-info p span { color: #9a8679; }
.device-row small { color: #6e2c0b; margin-top: 4px; font-size: 13.80px; }
.device-row .device-expiry { margin-top: 7px; color: #bd4b19; font-weight: 700; }
.copy-device { border: 1px solid #160b06; border-radius: 9px; background: transparent; color: #160b06; padding: 7px 9px; font: inherit; font-size: 13.80px; font-weight: 700; cursor: pointer; }
.device-actions { display: grid; gap: 6px; justify-items: end; }
.comment-device, .delete-device { border: 0; background: transparent; color: #6e2c0b; padding: 3px; font: inherit; font-size: 13.80px; font-weight: 700; cursor: pointer; }
.delete-device { color: #a52f20; }
.empty-devices { color: #6e2c0b; }
.device-form { margin-top: 14px; }
.device-form:not([hidden]) { position: fixed; z-index: 50; top: max(14px, env(safe-area-inset-top)); left: 50%; width: min(88vw, 430px); max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); margin: 0; padding: 20px; overflow-y: auto; overscroll-behavior: contain; transform: translateX(-50%); border: 1px solid #ead7c5; border-radius: 20px; background: rgba(255, 250, 245, .98); box-shadow: 0 24px 70px rgba(35, 20, 12, .34); backdrop-filter: blur(20px); }
.device-form-open { overflow: hidden; }
.device-keyboard-open .bottom-nav, .balance-keyboard-open .bottom-nav { opacity: 0; pointer-events: none; transform: translateY(110%); }
.page-back { position: sticky; z-index: 25; top: max(10px, env(safe-area-inset-top)); display: grid; place-items: center; width: 44px; height: 44px; margin: 0 0 14px; padding: 0; border: 1px solid rgba(229, 198, 168, .9); border-radius: 14px; background: rgba(255, 251, 246, .94); color: #17120f; font: inherit; font-size: 29px; font-weight: 800; line-height: 1; cursor: pointer; box-shadow: 0 8px 20px rgba(79, 39, 18, .1); backdrop-filter: blur(14px); }
.page-back:active { transform: scale(.94); background: #fff0df; }
.tab-sheet .page-back { position: absolute; top: max(18px, env(safe-area-inset-top)); left: 20px; margin: 0; }
.device-form label { display: block; font-weight: 800; margin-bottom: 8px; }
.device-form input { width: 100%; border: 2px solid #160b06; border-radius: 12px; padding: 13px; background: #fff0c6; color: #160b06; font: inherit; }
.home-device-card { background: #ffd27a; }
.active-empty, .active-live { display: flex; align-items: center; gap: 14px; min-height: 70px; }
.active-empty strong, .active-live strong, .active-empty small, .active-live small { display: block; }
.active-empty strong, .active-live strong { font-size: 20.70px; }
.active-empty small, .active-live small { color: #6e2c0b; margin-top: 5px; line-height: 1.3; }
.wifi-off, .active-live > span { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border: 2px solid #160b06; border-radius: 14px; background: #ffad39; color: #160b06; font-size: 34.50px; font-weight: 900; }
.wifi-off { position: relative; transform: rotate(-18deg); }
.wifi-off::after { content: ''; position: absolute; width: 54px; height: 3px; background: #160b06; transform: rotate(18deg); }
.quick-actions { margin: 24px 0 14px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-action { min-height: 98px; border: 2px solid #160b06; border-radius: 18px; padding: 14px 12px; background: #ffcc69; color: #160b06; text-align: left; font: inherit; font-size: 16.10px; font-weight: 800; cursor: pointer; box-shadow: 3px 3px 0 #160b06; }
.quick-action span { display: block; margin-bottom: 8px; color: #e45d16; font-size: 28.75px; line-height: 1; }
#refresh-subscription .refresh-icon { display: grid; place-items: center; width: 29px; height: 29px; margin: 0 0 8px; }
#refresh-subscription .refresh-icon svg { display: block; width: 27px; height: 27px; overflow: visible; }
#refresh-subscription .refresh-icon path { fill: none; stroke: currentColor; stroke-width: 2.15; stroke-linecap: round; stroke-linejoin: round; }

/* Fox tail: warm white, black and natural orange — no neon. */
:root { color-scheme: light; }
html, body { background: #fff5e7 !important; }
body { position: relative; min-height: 100vh; overflow-x: hidden; background: linear-gradient(155deg, #fffefd 0%, #fff9f1 42%, #fff0dd 100%) !important; color: #17120f; }
body::before { content: ''; position: fixed; z-index: 0; pointer-events: none; width: min(980px, 155vw); height: min(820px, 132vw); right: -440px; bottom: -340px; border-radius: 62% 38% 48% 52%; background: radial-gradient(ellipse at 14% 18%, #fffdf7 0 12%, #ffe8cc 13% 23%, transparent 24%), radial-gradient(ellipse at 29% 30%, #fff7eb 0 18%, transparent 19%), linear-gradient(142deg, #ffd49e 0%, #ffb55e 19%, #f17422 49%, #dc4f14 67%, #8d260c 84%, #22130d 100%); box-shadow: -32px -30px 60px rgba(246, 126, 34, .18); transform: rotate(-18deg); }
main, .tab-sheet, .devices-page, .balance-page, .plans-page { position: relative; z-index: 1; }

/* Actual Foxxxy tail artwork, with readable frosted-glass panels above it. */
html, body { background: #fff6e8 !important; }
body { background: #fff6e8 var(--foxxxy-tail-background) center bottom / cover fixed no-repeat !important; }
body::before { display: none; }
.hero, .card, .help { background: rgba(255, 253, 249, .48); border-color: rgba(255, 255, 255, .78); box-shadow: 0 12px 28px rgba(95, 45, 16, .12); backdrop-filter: blur(15px) saturate(118%); }
.hero { background: rgba(255, 252, 246, .42); }
.home-device-card, .help { background: rgba(255, 253, 249, .44); }
.quick-action { background: rgba(255, 253, 249, .48); border-color: rgba(255, 255, 255, .8); backdrop-filter: blur(12px) saturate(115%); }
header { margin-bottom: 30px; }
.brand-dot { width: 15px; height: 15px; background: #17120f; box-shadow: none; }
.brand-title { color: #17120f; text-shadow: none; letter-spacing: -.06em; }
.cabinet-label { color: #775e51; }
.eyebrow { color: #bd4b19; }
.hero, .card, .help { border: 1px solid rgba(229, 198, 168, .72); border-radius: 24px; background: rgba(255, 251, 244, .53); box-shadow: 0 12px 30px rgba(79, 39, 18, .07); backdrop-filter: blur(4px); }
.hero { overflow: hidden; position: relative; background: rgba(255, 251, 244, .42); }
.hero::after { content: ''; position: absolute; width: 175px; height: 175px; right: -70px; bottom: -92px; border: 28px solid rgba(236, 103, 25, .18); border-radius: 50%; }
.hero > *, .hero::after { isolation: isolate; }
.hero > p:not(.eyebrow), .connect-card > p, .help p { color: #765f50; }
.status { color: #211711; }
.status span { background: #ee691d; }
.row { border-color: #f0e1d4; color: #856e5e; }
.row strong { color: #17120f; }
.choice-button, .app-choice { border-color: #ead7c5; background: #fffaf5; color: #17120f; }
.app-choice small, .device-row small, .active-empty small, .active-live small { color: #856e5e; }
.primary { background: #17120f; color: #fffaf5; box-shadow: 0 7px 16px rgba(23, 18, 15, .17); }
.secondary { color: #17120f; border-color: #17120f; background: #fffaf5; }
.notice, .text-button, .tab-sheet p { color: #856e5e; }
.help { background: rgba(255, 246, 235, .56); }
.home-device-card { background: rgba(255, 251, 244, .48); }
.wifi-off, .active-live > span { border-color: #f0dfd0; background: linear-gradient(145deg, #fffaf4, #ffe7cd); color: #e65b18; }
.wifi-off::after { background: #17120f; }
.quick-action { border: 1px solid rgba(234, 215, 197, .86); background: rgba(255, 253, 249, .54); color: #17120f; box-shadow: 0 8px 18px rgba(79, 39, 18, .06); }
.quick-action span { color: #e65b18; }
.bottom-nav { background: rgba(23, 18, 15, .96); border-top: 1px solid #3c2c24; }
.nav-item { color: #b8a69b; }
.nav-item.active { color: #ffb15e; }
.device-row { border-color: #f0e1d4; }
.copy-device { border-color: #d8c2b1; background: #fffaf5; color: #17120f; }
.comment-device { color: #c6521d; }
.device-form input { border-color: #ead7c5; background: #fffaf5; color: #17120f; }
.device-connection { box-sizing: border-box; width: min(calc(100vw - 32px), 430px); max-width: 430px; max-height: min(calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 650px); margin: auto; padding: clamp(19px, 5vw, 25px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #ead7c5; border-radius: 22px; background: #fffaf5; color: #17120f; box-shadow: 0 24px 70px rgba(35, 20, 12, .36); }
.device-connection.quick-connect-dialog { width: min(calc(100vw - 24px), 520px); max-width: 520px; max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: clamp(20px, 5vw, 30px); }
.device-connection::backdrop { background: rgba(23, 18, 15, .72); backdrop-filter: blur(5px); }
.device-connection.dialog-fallback-open { position: fixed; z-index: 90; inset: 50% auto auto 50%; display: block; transform: translate(-50%, -50%); }
.device-connection strong, .device-connection label { display: block; color: #17120f; }
.device-connection > strong { max-width: 100%; font-size: 20.70px; line-height: 1.24; overflow-wrap: anywhere; }
.device-connection p { max-width: 100%; margin: 10px 0 16px; color: #856e5e; font-size: 16.10px; line-height: 1.48; overflow-wrap: anywhere; }
.device-connection label { margin-bottom: 6px; font-size: 14.95px; }
.device-connection input { box-sizing: border-box; width: 100%; padding: 11px; border: 1px solid #ead7c5; border-radius: 11px; background: #fff; color: #4d382d; font: inherit; font-size: 14.95px; }
.device-connection-actions { display: grid; min-width: 0; gap: 11px; margin-top: 14px; }
.device-connection-actions .button { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 50px; margin: 0; padding: 12px 11px; font-size: 14.95px; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.device-client-actions { display: grid; grid-template-columns: 1fr; gap: 12px; }
.detected-platform { display: inline-flex !important; width: auto; margin: 0 0 4px !important; padding: 7px 11px; border-radius: 999px; background: #e7f7ec; color: #237b4b !important; font-size: 13.80px !important; font-weight: 800; }
.quick-client-card { min-width: 0; padding: 14px; border: 1px solid #ead7c5; border-radius: 16px; background: #fff; }
.quick-client-card > div { display: grid; grid-template-columns: 42px 1fr; align-items: center; column-gap: 9px; margin-bottom: 8px; }
.quick-client-card img { grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }
.quick-client-card strong { font-size: 16.10px; }
.quick-client-card small { color: #856e5e; font-size: 12.65px; }
.quick-client-card .button { min-height: 46px; padding: 10px 12px; font-size: 14.95px; }
html[data-theme="dark"] .quick-client-card { border-color: rgba(255,183,112,.17); background: rgba(255,255,255,.045); }
html[data-theme="dark"] .quick-client-card strong { color: #fff4e8; }
html[data-theme="dark"] .quick-client-card small { color: #c9a78e; }
html[data-theme="dark"] .detected-platform { background: rgba(76,190,120,.15); color: #8ee0ad !important; }
.device-qr-dialog { width: min(88vw, 360px); margin: auto; padding: 22px; border: 1px solid #ead7c5; border-radius: 22px; background: #fffaf5; color: #17120f; text-align: center; box-shadow: 0 24px 70px rgba(35, 20, 12, .36); }
.device-qr-dialog::backdrop { background: rgba(23, 18, 15, .72); backdrop-filter: blur(5px); }
.device-qr-dialog h2 { margin-bottom: 15px; }
.device-qr-dialog canvas { display: block; width: min(248px, 100%); height: auto; margin: 0 auto; border-radius: 8px; image-rendering: pixelated; }
.device-qr-dialog p { margin: 13px 0 16px; color: #765f50; line-height: 1.4; }
.device-qr-dialog .button { margin: 0; }
.device-qr-dialog.dialog-fallback-open { position: fixed; z-index: 100; inset: 50% auto auto 50%; display: block; transform: translate(-50%, -50%); }
.device-connection .device-install-hint { margin: 17px 0 0; color: #765f50; font-size: 14.95px; line-height: 1.48; }
.device-connection > .device-connection-close { display: flex; justify-content: center; width: 100%; margin-top: 22px; padding-top: 17px; border-top: 1px solid rgba(216, 194, 177, .72); }
.device-connection > .device-connection-close .button { width: min(210px, 100%); min-height: 50px; margin: 0; }
.devices-page > .page-back { position: relative; top: auto; }

@media (max-width: 380px) {
  .device-connection { width: calc(100vw - 22px); padding: 18px 16px; border-radius: 19px; }
  .device-client-actions { grid-template-columns: 1fr; }
  .device-connection-actions .button { min-height: 48px; }
}

/* Bright, tactile actions used across the customer cabinet. */
.button { border: 1px solid rgba(255,255,255,.72); border-radius: 16px; background: linear-gradient(135deg,#ff9b45,#ed5c19); color: #fffaf5; box-shadow: 0 9px 20px rgba(211,79,20,.18); transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.button:hover { transform: translateY(-1px); filter: saturate(1.08); box-shadow: 0 12px 25px rgba(211,79,20,.24); }
.button:active, .page-back:active { transform: translateY(1px) scale(.98); }
.button.secondary { border: 1px solid #e8b58f; background: linear-gradient(135deg,#fffaf5,#ffe8d4); color: #9d431e; box-shadow: 0 7px 16px rgba(120,58,22,.08); }
.page-back { border-color: #efb17e; background: linear-gradient(135deg,#fffaf5,#ffd9b5); color: #c34d18; box-shadow: 0 9px 20px rgba(120,58,22,.13); }
html[data-theme="dark"] .button.secondary { border-color: #9e6242; background: linear-gradient(135deg,#3a241b,#251812); color: #ffc18c; }
html[data-theme="dark"] .page-back { border-color: #9e6242; background: linear-gradient(135deg,#3a241b,#251812); color: #ffc18c; }

.status.inactive { color: #8b5a3c; }
.status.inactive span { background: #d8915f; }
.trial-not-active #home .quick-actions { display: none; }
html[data-theme="dark"] .welcome-card .status.inactive { color: #d9bca6; }
html[data-theme="dark"] .welcome-card .status.inactive span { background: #d8915f; }

/* Primary home-screen connection gateway. */
.connect-vpn-gateway { margin: 0 0 18px; }
.connect-vpn-toggle { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr) 24px; align-items: center; gap: 12px; width: 100%; min-height: 82px; overflow: hidden; border: 1px solid rgba(255,255,255,.74); border-radius: 23px; padding: 15px 18px; background: linear-gradient(110deg, #e74d15 0%, #ff9b3d 24%, #ffcf72 45%, #f16b22 67%, #d84213 100%); background-size: 260% 100%; box-shadow: 0 14px 32px rgba(196,68,13,.3); color: #fff; font: inherit; text-align: left; cursor: pointer; animation: connect-vpn-shimmer 4.8s ease-in-out infinite; isolation: isolate; }
.connect-vpn-toggle::before { content: ""; position: absolute; z-index: -1; inset: -70% -25%; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.42) 48%, transparent 61%); transform: translateX(-55%) rotate(4deg); animation: connect-vpn-glint 3.2s ease-in-out infinite; }
.connect-vpn-toggle strong { font-size: clamp(20px, 5.7vw, 27px); line-height: 1.05; text-align: center; text-shadow: 0 1px 2px rgba(91,28,4,.28); }
.connect-vpn-shield { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.5); border-radius: 14px; background: rgba(255,255,255,.18); font-size: 23px; box-shadow: inset 0 1px 0 rgba(255,255,255,.28); }
.connect-vpn-arrow { justify-self: end; font-size: 39px; font-weight: 300; line-height: 1; transition: transform .22s ease; }
.connect-vpn-toggle.open .connect-vpn-arrow { transform: rotate(90deg); }
.connect-vpn-toggle:active { transform: scale(.985); }
.connect-vpn-toggle.connected { background-image: linear-gradient(110deg, #177a55 0%, #35b77b 25%, #7ee2a9 46%, #269867 68%, #126746 100%); box-shadow: 0 14px 32px rgba(20,119,79,.25); cursor: default; }
.connect-vpn-toggle.expired { background-image: linear-gradient(110deg, #7f0d18 0%, #d92738 24%, #ff6a62 45%, #c9182d 68%, #690914 100%); background-size: 260% 100%; box-shadow: 0 14px 34px rgba(145,12,29,.38); }
.connect-vpn-toggle.expired .connect-vpn-shield { background: rgba(66,0,9,.2); }
.connect-vpn-toggle.awaiting-trial strong { font-size: clamp(16px, 4.8vw, 22px); line-height: 1.12; }
.connect-vpn-toggle.connected .connect-vpn-arrow { visibility: hidden; }
.connect-vpn-toggle:disabled { opacity: 1; }
.connect-vpn-options { margin: 12px 0 0; padding: 20px; }
.connect-vpn-options[hidden], .connect-vpn-flow[hidden] { display: none; }
.connect-vpn-options > .eyebrow { font-size: 13px; }
.connect-vpn-choice-grid { display: grid; gap: 11px; margin-top: 12px; }
.connect-vpn-choice { display: grid; grid-template-columns: 47px minmax(0, 1fr); column-gap: 13px; width: 100%; min-height: 86px; border: 1px solid rgba(190,119,73,.26); border-radius: 19px; padding: 14px; background: rgba(255,255,255,.68); color: #21150f; font: inherit; text-align: left; cursor: pointer; }
.connect-vpn-choice > span { grid-row: 1 / 3; display: grid; place-items: center; width: 47px; height: 47px; border-radius: 14px; background: rgba(237,101,29,.12); color: #d95517; font-size: 26px; font-weight: 900; }
.connect-vpn-choice strong { align-self: end; font-size: 17px; line-height: 1.25; }
.connect-vpn-choice small { align-self: start; margin-top: 4px; color: #765f50; font-size: 13px; line-height: 1.3; }
.connect-vpn-choice.selected { border-color: #e96820; background: rgba(244,112,34,.1); box-shadow: inset 0 0 0 1px rgba(233,104,32,.15); }
.connect-vpn-flow { margin-top: 18px; border-top: 1px solid rgba(190,119,73,.2); padding-top: 18px; }
.connect-vpn-flow h3 { margin: 0 0 13px; color: #21150f; font-size: 20px; }
.connect-vpn-flow .client-install { margin-top: 0; }
.connect-import-flow > p { margin: -3px 0 14px; color: #765f50; font-size: 14px; line-height: 1.45; }
.connect-subscription-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-bottom: 10px; }
.connect-subscription-link input { min-width: 0; border: 1px solid #ddc6b4; border-radius: 13px; padding: 12px; background: rgba(255,255,255,.72); color: #684c3b; font: inherit; font-size: 12px; }
.connect-subscription-link button { border: 0; border-radius: 13px; padding: 10px 13px; background: #2a1b13; color: #fff; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.connect-import-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.connect-import-buttons .button { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 58px; margin: 0; padding: 12px 10px; font-size: 14px; }
.connect-import-buttons img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
@keyframes connect-vpn-shimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes connect-vpn-glint { 0%,22% { transform: translateX(-70%) rotate(4deg); opacity: 0; } 42% { opacity: 1; } 65%,100% { transform: translateX(70%) rotate(4deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .connect-vpn-toggle, .connect-vpn-toggle::before { animation: none; } }
html[data-theme="dark"] .connect-vpn-options { border-color: rgba(255,183,112,.15); background: rgba(34,22,16,.82); }
html[data-theme="dark"] .connect-vpn-choice { border-color: rgba(255,183,112,.16); background: rgba(255,255,255,.055); color: #fff4e8; }
html[data-theme="dark"] .connect-vpn-choice small, html[data-theme="dark"] .connect-import-flow > p { color: #c9a78e; }
html[data-theme="dark"] .connect-vpn-choice.selected { border-color: #f18a4d; background: rgba(244,112,34,.14); }
html[data-theme="dark"] .connect-vpn-flow { border-color: rgba(255,183,112,.14); }
html[data-theme="dark"] .connect-vpn-flow h3 { color: #fff4e8; }
html[data-theme="dark"] .connect-subscription-link input { border-color: rgba(255,183,112,.16); background: rgba(255,255,255,.06); color: #e8cdb9; }

.admin-surveys-page { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.admin-surveys-header p:last-child { max-width: 620px; color: #74513c; font-size: 12px; line-height: 1.45; }
.admin-survey-form { display: grid; gap: 8px; margin-top: 14px; padding: 16px; }
.admin-survey-form label { margin-top: 4px; color: #5c3521; font-size: 11px; font-weight: 850; }
.admin-survey-form input,
.admin-survey-form select,
.admin-survey-form textarea { width: 100%; box-sizing: border-box; border: 1px solid rgba(126,82,49,.24); border-radius: 12px; padding: 10px 11px; background: rgba(255,255,255,.68); color: #281a12; font: inherit; font-size: 12px; }
.admin-survey-form textarea { resize: vertical; line-height: 1.4; }
.admin-survey-audience { margin: 2px 0 4px; border-radius: 10px; padding: 9px 11px; background: rgba(232,104,36,.1); color: #a64416; font-size: 11px; font-weight: 850; }
.admin-survey-history { margin-top: 20px; }
.admin-survey-history > h3 { margin: 0 0 10px; }
#admin-survey-list { display: grid; gap: 10px; }
.admin-survey-result { padding: 14px; }
.admin-survey-result h4 { margin: 0; font-size: 14px; }
.admin-survey-result > small { display: block; margin-top: 4px; color: #886a56; line-height: 1.35; }
.admin-survey-result > p { margin: 10px 0; font-size: 12px; line-height: 1.4; }
.admin-survey-metrics { border-radius: 10px; padding: 8px; background: rgba(43,30,21,.07); color: #5c4233; font-size: 10.5px; font-weight: 750; line-height: 1.4; }
.admin-survey-answers { display: grid; gap: 6px; margin-top: 10px; }
.admin-survey-answers > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(126,82,49,.12); padding: 5px 1px; font-size: 11px; }
.admin-survey-answers b { flex: 0 0 auto; color: #b54d18; }
html[data-theme="dark"] .admin-surveys-header p:last-child,
html[data-theme="dark"] .admin-survey-result > small { color: #c9a78e; }
html[data-theme="dark"] .admin-survey-form label { color: #f1d5bf; }
html[data-theme="dark"] .admin-survey-form input,
html[data-theme="dark"] .admin-survey-form select,
html[data-theme="dark"] .admin-survey-form textarea { border-color: rgba(255,183,112,.16); background: rgba(255,255,255,.06); color: #fff4e8; }
html[data-theme="dark"] .admin-survey-metrics { background: rgba(255,255,255,.07); color: #e2c5af; }
html[data-theme="dark"] .admin-survey-answers > div { border-color: rgba(255,183,112,.14); }

/* Compact header and text menu matching the approved mockup. */
.topbar { position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 58px; margin: 0 0 16px; padding: 11px 14px 11px 17px; border: 1px solid rgba(255, 255, 255, .78); border-radius: 20px; background: rgba(255, 253, 249, .46); box-shadow: 0 9px 22px rgba(79, 39, 18, .08); backdrop-filter: blur(15px) saturate(118%); }
.topbar .brand-title { margin: 0; font-family: "Arial Rounded MT Bold", "Trebuchet MS", -apple-system, BlinkMacSystemFont, sans-serif; font-size: clamp(26px, 6.8vw, 33px); font-style: italic; font-weight: 900; letter-spacing: -.045em; line-height: 1; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.header-theme-toggle { display: grid; width: 42px; height: 42px; place-items: center; padding: 0; border: 0; border-radius: 13px; background: rgba(255, 255, 255, .38); color: #17120f; font: inherit; cursor: pointer; }
.header-theme-toggle span { font-size: 21px; line-height: 1; }
.header-theme-toggle:active { transform: scale(.94); }
.menu-toggle { display: grid; align-content: center; justify-items: center; gap: 5px; width: 42px; height: 42px; border: 0; border-radius: 13px; background: rgba(255, 255, 255, .38); cursor: pointer; }
.menu-toggle span { display: block; width: 23px; height: 2px; border-radius: 99px; background: #17120f; }
.top-menu { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; width: min(286px, calc(100vw - 40px)); overflow: hidden; border: 1px solid rgba(255, 255, 255, .92); border-radius: 19px; background: rgba(255, 251, 245, .94); box-shadow: 0 16px 35px rgba(54, 26, 12, .22); backdrop-filter: blur(22px) saturate(115%); }
.top-menu button { display: block; width: 100%; border: 0; padding: 15px 18px; background: transparent; color: #17120f; text-align: left; font: inherit; font-size: 19.55px; font-weight: 650; cursor: pointer; }
.top-menu button + button { border-top: 1px solid rgba(231, 211, 194, .6); }
.top-menu button:active { background: rgba(243, 117, 29, .12); }

/* Dashboard structure: the compact layout approved in the left-hand mockup. */
.welcome-card { display: flex; align-items: center; gap: 17px; min-height: 150px; padding: 22px; margin-bottom: 18px; }
.welcome-card::after { display: none; }
.welcome-card h2 { margin: 0 0 8px; font-size: clamp(28.75px, 7vw, 39.10px); letter-spacing: -.035em; }
.welcome-card p { margin: 0 0 13px !important; font-size: 17.25px; }
.fox-avatar { display: grid; place-items: center; flex: 0 0 90px; width: 90px; height: 90px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .9); border-radius: 50%; background: rgba(255, 244, 230, .48); box-shadow: 0 8px 16px rgba(115, 50, 12, .11); font-size: 57.50px; }
.fox-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.fox-avatar img[hidden], .fox-avatar span[hidden] { display: none; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.overview-card { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; min-height: 146px; padding: 20px; margin: 0; }
.overview-card > div { min-width: 0; }
.overview-card > div > span, .connection-card > div > span { display: block; color: #4d382d; font-size: 14.95px; }
.overview-card strong, .connection-card strong { display: block; margin-top: 7px; color: #17120f; font-size: 25.30px; line-height: 1.1; }
.overview-icon { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid rgba(255, 255, 255, .9); border-radius: 50%; background: rgba(255, 248, 239, .45); color: #17120f; font-size: 31.05px; font-weight: 700; }
.devices-overview { position: relative; padding-bottom: 34px; }
.devices-overview i { position: absolute; right: 20px; bottom: 20px; left: 20px; height: 6px; overflow: hidden; border-radius: 99px; background: rgba(92, 62, 42, .16); }
.devices-overview i b { display: block; height: 100%; border-radius: inherit; background: #f37220; }
.plan-overview { position: relative; }
.plan-overview { cursor: pointer; }
.plan-overview:active { filter: brightness(.88); }
.plan-overview::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: -2px;
  padding: 4px;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(110deg, var(--subscription-frame) 4%, var(--subscription-frame) 34%, #fff 50%, var(--subscription-frame) 66%, var(--subscription-frame) 96%) 0 50% / 260% 100%;
  filter: drop-shadow(0 0 5px var(--subscription-frame));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.plan-overview.subscription-good { --subscription-frame: #27b968; }
.plan-overview.subscription-warning { --subscription-frame: #e8b51b; }
.plan-overview.subscription-critical { --subscription-frame: #e04444; }
.plan-overview.subscription-good::before,
.plan-overview.subscription-warning::before,
.plan-overview.subscription-critical::before {
  opacity: 1;
  animation: subscription-frame-shimmer 2.4s ease-in-out infinite;
}
@keyframes subscription-frame-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.plan-overview strong { max-width: 100%; overflow-wrap: anywhere; word-break: normal; }
.plan-overview small { display: inline-block; max-width: 100%; margin-top: 9px; padding: 5px 9px; border-radius: 12px; background: rgba(255, 237, 214, .68); color: #4d382d; font-size: 13.80px; line-height: 1.25; overflow-wrap: anywhere; }
.connection-card { display: grid; grid-template-columns: 52px 1fr; align-items: center; min-height: 104px; padding: 20px; }
.connection-arrow { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .85); border-radius: 14px; background: rgba(255, 248, 239, .38); color: #17120f; font-size: 41.40px; line-height: 1; }
@media (max-width: 370px) {
  .welcome-card { gap: 12px; padding: 16px; }
  .fox-avatar { flex-basis: 72px; width: 72px; height: 72px; font-size: 46.00px; }
  .overview-card { grid-template-columns: 43px 1fr; padding: 15px; }
  .overview-card strong { font-size: 21.85px; }
}

/* Main dashboard: compact type hierarchy for a calmer first screen. */
#home .topbar .brand-title { font-size: clamp(26px, 6.8vw, 33px); }
#home .welcome-card { min-height: 126px; padding: 17px; gap: 14px; }
#home .welcome-card h2 { font-size: clamp(24.15px, 6.2vw, 31.05px); line-height: 1.08; }
#home .welcome-card p { font-size: 16.10px; }
#home .welcome-card .status { font-size: 14.95px; }
#home .fox-avatar { flex-basis: 76px; width: 76px; height: 76px; font-size: 48.30px; }
#home .overview-card { min-height: 124px; padding: 16px; grid-template-columns: 44px minmax(0, 1fr); }
#home .overview-card > div > span, #home .connection-card > div > span { font-size: 13.80px; }
#home .overview-card strong, #home .connection-card strong { margin-top: 5px; font-size: 20.70px; }
#home .overview-icon { width: 37px; height: 37px; font-size: 25.30px; }
#home .devices-overview i { right: 16px; bottom: 16px; left: 16px; }
#home .plan-overview strong { font-size: clamp(16.10px, 4.8vw, 20.70px); line-height: 1.16; }
#home .plan-overview small { font-size: 12.65px; }
#home .overview-grid-secondary { margin-bottom: 14px; }
#home .balance-overview, #home .renew-overview { min-height: 124px; }
#home .balance-overview { cursor: pointer; }
#home .balance-overview:active { filter: brightness(.88); }
#home .balance-overview #balance { margin-top: 4px; font-size: clamp(25px, 6vw, 29px); letter-spacing: -.025em; }
#home .balance-topup-label { display: block; margin-top: 8px; color: #d95718; font-size: 16.1px; font-weight: 800; line-height: 1.1; }
.renew-overview { cursor: pointer; }
.renew-overview:active { filter: brightness(.88); }
.renew-overview .renew-title { display: block; max-width: 100%; margin: 0; color: #17120f; font-size: 18.40px; font-weight: 800; line-height: 1.18; overflow-wrap: anywhere; }
.renew-overview .renew-expiry { display: block; max-width: 100%; margin-top: 8px; color: #4d382d; font-size: 13.80px; font-weight: 400; line-height: 1.3; overflow-wrap: anywhere; }
#home .connection-arrow { width: 34px; height: 34px; font-size: 34.50px; }
#home .home-device-card { padding: 18px; }
#home .quick-grid { grid-template-columns: 1fr; gap: 10px; }
#home .quick-action {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 13px 16px;
  overflow: hidden;
  border-color: rgba(221, 87, 20, .38);
  box-shadow: 0 8px 18px rgba(79, 39, 18, .06), 0 0 13px rgba(229, 91, 24, .11);
  text-align: left;
}
#home .quick-action > * { position: relative; z-index: 1; }
#home .quick-action .quick-action-icon { display: grid; place-items: center; width: 38px; height: 38px; margin: 0; border-radius: 13px; background: rgba(255, 229, 200, .72); color: #d95718; font-size: 25px; line-height: 1; }
#home .quick-action strong { color: inherit; font-size: 16.1px; line-height: 1.2; }
#home .quick-action .quick-action-arrow { margin: 0; color: #8b7262; text-align: right; font-size: 30px; line-height: 1; }
#home .quick-action::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(108deg, transparent 20%, rgba(240, 112, 37, .12) 38%, rgba(255, 209, 158, .42) 48%, rgba(255, 255, 255, .52) 52%, rgba(240, 112, 37, .11) 64%, transparent 82%) -220% 0 / 280% 100% no-repeat;
  animation: quick-action-soft-shimmer 9s ease-in-out infinite;
}
#home .quick-action::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  border: 1px solid rgba(230, 91, 24, .34);
  border-radius: inherit;
  box-shadow: inset 0 0 10px rgba(230, 91, 24, .06), 0 0 10px rgba(230, 91, 24, .08);
  pointer-events: none;
  animation: quick-action-outline-glow 9s ease-in-out infinite;
}
#home .quick-action:nth-child(2)::before,
#home .quick-action:nth-child(2)::after { animation-delay: 2.2s; }
@keyframes quick-action-soft-shimmer {
  0%, 42% { background-position: -220% 0; }
  78%, 100% { background-position: 220% 0; }
}
@keyframes quick-action-outline-glow {
  0%, 100% { opacity: .52; box-shadow: inset 0 0 8px rgba(230, 91, 24, .04), 0 0 8px rgba(230, 91, 24, .06); }
  54% { opacity: .92; box-shadow: inset 0 0 13px rgba(230, 91, 24, .09), 0 0 14px rgba(230, 91, 24, .13); }
}
.traffic-card { position: relative; padding-bottom: 34px; }
.traffic-card > div { min-width: 0; }
.traffic-card span, .traffic-card small { display: block; color: #4d382d; font-size: 13.80px; }
.traffic-card strong { color: #17120f; font-size: 20.70px; }
.traffic-card small { margin-top: 5px; white-space: nowrap; }
.traffic-card i { position: absolute; right: 16px; bottom: 16px; left: 16px; display: block; height: 6px; overflow: hidden; border-radius: 99px; background: rgba(92, 62, 42, .16); }
.traffic-card i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f57923, #dc4f14); transition: width .35s ease; }

.device-form label span { color: #856e5e; font-weight: 500; }
.client-install { margin-top: 22px; }
.client-install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.client-install-link { display: grid; place-items: center; min-height: 127px; padding: 17px; border: 1px solid rgba(234, 215, 197, .9); border-radius: 23px; background: rgba(255, 253, 249, .8); box-shadow: 0 8px 18px rgba(79, 39, 18, .06); color: #17120f; font: inherit; text-decoration: none; cursor: pointer; }
.client-install-link.selected { border-color: rgba(23, 18, 15, .7); background: rgba(23, 18, 15, .22); box-shadow: inset 0 0 0 2px rgba(23, 18, 15, .12); filter: brightness(.78); }
.client-install-link img { display: block; width: 55px; height: 55px; margin-bottom: 8px; border-radius: 16px; object-fit: cover; box-shadow: 0 3px 8px rgba(23, 18, 15, .16); }
.client-install-link strong { font-size: 19px; }
.client-platform-picker { margin-top: 14px; padding: 17px; border: 1px solid rgba(234, 215, 197, .9); border-radius: 21px; background: rgba(255, 253, 249, .84); }
.client-platform-picker p { margin: 0 0 13px; color: #4d382d; font-size: 18px; }
.client-platform-picker p strong { color: #17120f; }
.client-platform-picker > div { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.client-platform-picker.has-huawei > div { grid-template-columns: repeat(3, 1fr); }
.client-platform-picker button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 55px; border: 1px solid #17120f; border-radius: 14px; background: #17120f; color: #fffaf5; font: inherit; font-size: 19px; font-weight: 700; cursor: pointer; }
.client-platform-picker button[hidden] { display: none; }
.client-platform-picker button span { font-size: 28px; line-height: 1; }
.client-platform-picker button img { width: 28px; height: 28px; object-fit: contain; }

.balance-page { display: grid; gap: 14px; }
.balance-page[hidden] { display: none; }
.balance-card, .balance-history-card { margin: 0; padding: 22px; }
.balance-card h2, .balance-history-card h2 { margin: 0 0 16px; color: #17120f; }
.balance-current { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 11px; padding: 14px 16px; border: 1px solid #ead7c5; border-radius: 16px; background: rgba(255, 248, 239, .72); }
.balance-current span { display: flex; align-items: center; gap: 9px; color: #765f50; font-size: 18px; font-weight: 800; }
.balance-current span i { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 9px; background: #ffe3c5; color: #dc591b; font-style: normal; font-weight: 900; }
.balance-current strong { color: #17120f; font-size: 28.75px; }
.zero-commission-note { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 12px; margin: 0 0 18px; padding: 11px 13px; border: 1px solid #f0a05d; border-radius: 16px; background: linear-gradient(135deg, #fff1dc, #ffd39f); box-shadow: 0 8px 20px rgba(220,89,27,.12); }
@property --zero-border-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.zero-commission-note > b { display: grid; width: 54px; height: 54px; place-items: center; box-sizing: border-box; border: 2px solid transparent; border-radius: 17px; background: linear-gradient(145deg, #ffad58, #ef762c) padding-box, conic-gradient(from var(--zero-border-angle), rgba(255,125,37,.22) 0 68%, #ffe7ad 77%, #ff7b25 85%, rgba(255,125,37,.22) 100%) border-box; color: #21130c; font-size: 23px; font-weight: 950; box-shadow: 0 6px 16px rgba(225,99,31,.22); animation: zero-commission-border 4.2s linear infinite; }
@keyframes zero-commission-border { to { --zero-border-angle: 360deg; } }
.zero-commission-note strong, .zero-commission-note span { display: block; }
.zero-commission-note strong { color: #3a1c0c; font-size: 18px; font-weight: 900; }
.zero-commission-note span { margin-top: 4px; color: #7a3b16; font-size: 14px; font-weight: 800; line-height: 1.3; }
#balance-topup-form label { display: block; margin-bottom: 8px; color: #4d382d; font-size: 18px; font-weight: 850; }
.balance-input-wrap { position: relative; }
.balance-input-wrap input { box-sizing: border-box; width: 100%; min-height: 54px; padding: 13px 48px 13px 14px; border: 2px solid #17120f; border-radius: 14px; background: #fff; color: #17120f; font: inherit; font-size: 20.70px; font-weight: 750; }
.balance-input-wrap > span { position: absolute; top: 50%; right: 17px; color: #765f50; font-size: 20.70px; font-weight: 800; transform: translateY(-50%); }
.balance-quick-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 11px 0 17px; }
.balance-quick-amounts button { position: relative; min-width: 0; min-height: 58px; padding: 0 5px; overflow: hidden; border: 1.5px solid #dec6b4; border-radius: 14px; background: linear-gradient(155deg, #fffdf9, #fff1e4); color: #2f1b11; font: inherit; font-size: 20px; font-weight: 950; letter-spacing: -.25px; cursor: pointer; box-shadow: 0 6px 14px rgba(78,38,17,.07); transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease; }
.balance-quick-amounts button::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.55) 48%, transparent 70%); transform: translateX(-130%); transition: transform .45s ease; }
.balance-quick-amounts button:hover::before { transform: translateX(130%); }
.balance-quick-amounts button span { display: inline-block; color: #b45a25; font-family: Arial, sans-serif; font-size: 23px; font-weight: 900; line-height: 1; vertical-align: -1px; }
.balance-quick-amounts button.selected { border-color: #f07a2e; background: linear-gradient(135deg, #ffad5d, #ef712c); color: #24140d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.36), 0 8px 18px rgba(230,101,31,.25); transform: translateY(-2px); }
.balance-quick-amounts button.selected span { color: #542711; }
.balance-quick-amounts button:active { transform: scale(.96); }
.payment-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; padding: 0; border: 0; }
.payment-methods legend { grid-column: 1 / -1; margin-bottom: 4px; color: #4d382d; font-size: 16.1px; font-weight: 850; }
#balance-topup-form .payment-method-option { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 118px; margin: 0; padding: 13px 8px 12px; overflow: hidden; border: 2px solid #dfc5b1; border-radius: 17px; background: linear-gradient(155deg, #fffdf9, #fff4e8); color: #2f1b11; text-align: center; cursor: pointer; box-shadow: 0 7px 18px rgba(71,34,14,.07); transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.payment-method-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.payment-method-icon { display: grid; width: 55px; height: 55px; margin-bottom: 7px; place-items: center; border-radius: 17px; background: #fff; box-shadow: 0 5px 14px rgba(61,31,15,.12); }
.payment-method-icon svg { width: 43px; height: 43px; }
.payment-method-option > strong { color: #2f1b11; font-size: 16px; font-weight: 950; line-height: 1.1; }
.payment-method-option > small { margin-top: 5px; padding: 4px 8px; border-radius: 999px; background: #e8f8ec; color: #16713a; font-size: 10.5px; font-weight: 950; white-space: nowrap; }
.payment-method-option > i { position: absolute; top: 8px; right: 8px; display: none; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #e96318; color: #fff; font-style: normal; font-size: 13px; font-weight: 950; box-shadow: 0 4px 10px rgba(224,91,20,.25); }
.payment-method-option:has(input:checked) { border-color: #e96318; background: linear-gradient(155deg, #fff8ee, #ffe3c2); box-shadow: inset 0 0 0 1px #e96318, 0 10px 22px rgba(224,91,20,.17); transform: translateY(-2px); }
.payment-method-option:has(input:checked) > i { display: grid; }
.payment-method-option:active { transform: scale(.98); }
#balance-topup-submit { min-height: 54px; box-shadow: 0 10px 22px rgba(226,85,9,.25); }
.balance-card .button { margin-top: 0; }
.balance-history { display: grid; }
.balance-history > p { margin: 0; color: #856e5e; }
.balance-history article { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid #f0e1d4; }
.balance-history article:last-child { border-bottom: 0; }
.balance-history article strong, .balance-history article small { display: block; }
.balance-history article strong { color: #17120f; font-size: 14.95px; }
.balance-history article small { margin-top: 4px; color: #856e5e; font-size: 12.65px; }
.balance-history article b { white-space: nowrap; font-size: 16.10px; }
.balance-history article b.credit { color: #238449; }
.balance-history article b.debit { color: #bd4b19; }
.balance-page > .button { margin: 0; }

.plans-page { display: grid; gap: 14px; }
.plans-page[hidden] { display: none; }
.plans-card { margin: 0; padding: 22px; }
.plans-card h2 { margin: 0 0 16px; color: #17120f; }
.plans-balance { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 14px 16px; border: 1px solid #ead7c5; border-radius: 15px; background: #fff8ef; }
.plans-topup { min-height: 52px; margin: 0 0 14px; font-size: 16px; font-weight: 900; }
.plans-title { color: #17120f; font-size: clamp(28px, 7vw, 38px); font-weight: 950; letter-spacing: -.035em; line-height: 1.08; text-shadow: 0 1px 0 rgba(255,255,255,.55); }
html[data-theme="dark"] .plans-title { color: #fff4e8; text-shadow: 0 2px 12px rgba(255,126,49,.2); }
.plans-balance span { color: #765f50; font-weight: 700; }
.plans-balance strong { color: #17120f; font-size: 21.85px; }
.plan-list { display: grid; gap: 11px; }
.plan-option { position: relative; display: block; padding: 17px; border: 1px solid #ead7c5; border-radius: 17px; background: rgba(255, 253, 249, .88); }
.plan-option.featured { border: 2px solid #17120f; }
.plan-option > small { position: absolute; top: -10px; right: 14px; padding: 4px 9px; border-radius: 20px; background: #17120f; color: #fffaf5; font-size: 10.35px; font-weight: 900; }
.plan-option > div:first-of-type strong, .plan-option > div:first-of-type span { display: block; }
.plan-option > div:first-of-type strong { color: #17120f; font-size: 18.40px; }
.plan-option > div:first-of-type span { margin-top: 3px; color: #765f50; font-size: 13.80px; }
.plan-option > b { display: block; margin-top: 8px; color: #17120f; font-size: 19.55px; }
.plan-option .button { grid-column: 1 / -1; margin: 5px 0 0; }
.plan-duration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.plan-duration-grid[hidden], .max-upgrade-offer[hidden] { display: none; }
.plan-duration-grid button { min-height: 54px; padding: 8px; border: 1px solid #ffd3a8; border-radius: 12px; background: linear-gradient(135deg, #ffb66d, #f47732); color: #2c170d; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 15px rgba(181,72,21,.18); font: inherit; cursor: pointer; transition: transform .18s ease, filter .18s ease, box-shadow .18s ease; }
.plan-duration-grid button:hover { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 8px 19px rgba(181,72,21,.25); }
.plan-duration-grid button:active { transform: scale(.97); filter: brightness(.92); }
.plan-duration-grid button:focus-visible { outline: 3px solid #9e461d; outline-offset: 2px; }
.plan-duration-grid button:disabled { opacity: .58; cursor: wait; }
.plan-duration-grid button strong, .plan-duration-grid button span { display: block; }
.plan-duration-grid button strong { font-size: 14.95px; }
.plan-duration-grid button span { margin-top: 2px; font-size: 13.80px; font-weight: 750; }
.plan-duration-grid button span s { opacity: .58; margin-right: 5px; }
.max-upgrade-offer { margin-top: 14px; padding: 15px; border: 1px solid #ee9f67; border-radius: 14px; background: linear-gradient(135deg, #fff2e3, #ffe3cb); }
.max-upgrade-offer > strong { display: block; color: #7c300c; font-size: 17px; }
.max-upgrade-offer > p { margin: 6px 0 13px; color: #765345; font-size: 13px; line-height: 1.4; }
.max-upgrade-price { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-bottom: 9px; color: #765345; font-size: 13px; }
.max-upgrade-price b { color: #221711; font-size: 24px; }
.max-upgrade-offer .button { width: 100%; min-height: 52px; }
.max-upgrade-dialog { box-sizing: border-box; width: min(90vw, 380px); max-width: none; padding: 21px; border: 1px solid #e8c6aa; border-radius: 22px; background: #fffaf5; color: #211711; box-shadow: 0 24px 65px rgba(30, 18, 10, .32); }
.max-upgrade-dialog::backdrop { background: rgba(20, 12, 7, .58); backdrop-filter: blur(3px); }
.max-upgrade-dialog h2 { margin: 0 0 8px; font-size: 23px; }
.max-upgrade-dialog > p { color: #765345; font-size: 14px; line-height: 1.4; }
.max-upgrade-breakdown { margin: 14px 0; padding: 12px 14px; border-radius: 13px; background: #fff0df; }
.max-upgrade-breakdown > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; }
.max-upgrade-breakdown > div + div { border-top: 1px solid #eac9ad; }
.max-upgrade-breakdown .max-upgrade-total { color: #a94713; font-size: 16px; font-weight: 900; }
.max-upgrade-dialog .button { width: 100%; min-height: 47px; margin-top: 9px; }
.max-upgrade-dialog-expiry { margin: 0 0 8px; }
html[data-theme="dark"] .max-upgrade-offer { border-color: #9b5a34; background: linear-gradient(135deg, #3a241a, #512b1a); }
html[data-theme="dark"] .max-upgrade-offer > strong { color: #ffbd8d; }
html[data-theme="dark"] .max-upgrade-offer > p, html[data-theme="dark"] .max-upgrade-price { color: #d4b4a1; }
html[data-theme="dark"] .max-upgrade-price b { color: #fff2e4; }
html[data-theme="dark"] .max-upgrade-dialog { border-color: #82553a; background: #2b1e18; color: #fff2e7; }
html[data-theme="dark"] .max-upgrade-dialog > p { color: #d1af9a; }
html[data-theme="dark"] .max-upgrade-breakdown { background: #41291d; }
html[data-theme="dark"] .max-upgrade-breakdown > div + div { border-color: #76503a; }
html[data-theme="dark"] .max-upgrade-breakdown .max-upgrade-total { color: #ffaf78; }
.plans-discount-offer { margin: 12px 0; padding: 13px 15px; border: 2px solid #ff7a00; border-radius: 15px; background: linear-gradient(135deg, #fff1dc, #ffd09b); color: #7c2d00; box-shadow: 0 8px 20px rgba(255, 112, 0, .18); }
.plans-discount-offer strong, .plans-discount-offer span { display: block; }
.plans-discount-offer strong { font-size: 17px; font-weight: 900; }
.plans-discount-offer span { margin-top: 3px; font-size: 13px; font-weight: 750; }
.renewal-device-checklist, .bundle-device-list { display: grid; gap: 7px; margin-top: 13px; }
.renewal-device-checklist > p, .bundle-device-list > p { margin: 0; color: #765f50; font-size: 13.80px; }
.renewal-device-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 9px 11px; border: 1px solid #ead7c5; border-radius: 12px; background: #fffaf5; cursor: pointer; }
.renewal-device-row.bundle { cursor: default; }
.renewal-device-row input { flex: 0 0 auto; width: 21px; height: 21px; accent-color: #17120f; }
.renewal-device-row > span { min-width: 0; }
.renewal-device-row strong, .renewal-device-row small { display: block; }
.renewal-device-row strong { overflow: hidden; color: #17120f; font-size: 14.95px; text-overflow: ellipsis; white-space: nowrap; }
.renewal-device-row small { margin-top: 3px; color: #765f50; font-size: 11.50px; }
.plan-option.current { box-shadow: inset 0 0 0 2px #e8863d; }
.plans-page > .button { margin: 0; }
.device-limit-dialog > .button { width: 100%; margin: 0 0 9px; }
.device-limit-dialog .device-limit-close { display: block; width: 100%; margin: 3px 0 0; }
.device-limit-dialog .device-limit-close .button { width: 100%; min-height: 48px; margin: 0; }

/* Compact the whole Mini App workspace by exactly 25%. The fixed bottom
   navigation deliberately stays at 100% so its touch targets remain large. */
main, .devices-page, .tab-sheet, .balance-page, .plans-page {
  zoom: .75;
  max-width: 746.667px;
}

/* Compact modal used for device-limit warnings. It stays outside the scaled
   workspace so it remains centered in the Telegram viewport. */
.warning-dialog {
  box-sizing: border-box;
  width: min(78vw, 310px);
  margin: auto;
  padding: 22px 20px 18px;
  border: 1px solid rgba(229, 198, 168, .9);
  border-radius: 22px;
  background: rgba(255, 251, 246, .97);
  color: #17120f;
  text-align: center;
  box-shadow: 0 22px 60px rgba(35, 20, 12, .28);
  backdrop-filter: blur(18px) saturate(118%);
}
.warning-dialog::backdrop {
  background: rgba(23, 18, 15, .48);
  backdrop-filter: blur(3px);
}
.warning-dialog-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 11px;
  border-radius: 50%;
  background: #fff0df;
  color: #d95718;
  font-size: 26.45px;
  font-weight: 900;
}
.warning-dialog h2 { margin: 0 0 8px; font-size: 20.70px; line-height: 1.2; }
.warning-dialog p { margin: 0 0 18px; color: #765f50; font-size: 16.10px; line-height: 1.42; }
.warning-dialog form { margin: 0; }
.warning-dialog .button { width: 100%; margin: 0; padding: 11px 16px; font-size: 16.10px; }

/* Information screen */
.information-page { position: relative; z-index: 1; max-width: 560px; min-height: auto; margin: auto; padding: 28px 20px 96px; }
.information-header { display: block; margin: 0 0 16px; }
.information-header h2 { margin: 0; }
.information-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0 0 14px; padding: 5px; border: 1px solid rgba(255, 255, 255, .8); border-radius: 16px; background: rgba(255, 253, 249, .60); backdrop-filter: blur(12px); }
.information-tabs button { min-width: 0; border: 0; border-radius: 11px; padding: 9px 4px; background: transparent; color: #6e2c0b; font: inherit; font-size: 12.65px; font-weight: 800; line-height: 1.15; cursor: pointer; }
.information-tabs button span { display: block; margin-bottom: 4px; font-size: 20.7px; }
.information-tabs button[aria-selected="true"] { background: #17120f; color: #ffcc69; box-shadow: 0 3px 9px rgba(45, 21, 10, .18); }
.information-card { min-height: 0; }
.information-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 15px; border-radius: 17px; background: #ffcc69; font-size: 30px; }
.information-card h3 { margin: 0 0 9px; font-size: 23px; }
.information-card p { color: #41200e; line-height: 1.45; }
.information-list { display: grid; gap: 10px; margin: 15px 0 0; color: #542109; line-height: 1.5; }
.information-list-item { position: relative; margin: 0; padding-left: 18px; }
.information-list-item::before { content: '•'; position: absolute; left: 3px; color: #e55d16; font-weight: 900; }
.information-policy-section { padding: 12px 0; border-top: 1px solid rgba(184, 75, 20, .25); }
.information-policy-section:first-child { padding-top: 0; border-top: 0; }
.information-policy-section h4 { margin: 0 0 7px; color: #17120f; font-size: 16.1px; line-height: 1.3; }
.information-policy-section p { margin: 7px 0 0; font-size: 14.95px; }

/* Owner and assigned administrators only. */
.admin-page { position: relative; z-index: 1; max-width: 560px; min-height: auto; margin: auto; padding: 28px 20px 96px; }

/* Only the Home and Devices pages end directly under their last card. */
main, .devices-page { padding-bottom: 20px; }
.admin-header { display: block; margin: 0 0 16px; }
.admin-header h2 { margin: 0; }
.admin-header h2 span { display: inline-block; margin-left: 6px; color: #278e55; font-size: 13.8px; font-weight: 800; vertical-align: middle; }
.admin-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.admin-stats .card { display: flex; flex-direction: column; min-width: 0; min-height: 102px; margin: 0; padding: 11px 9px; border-radius: 16px; }
.admin-stats span, .admin-row small { display: block; color: #6e2c0b; font-size: clamp(10px, 3vw, 13px); line-height: 1.18; overflow-wrap: anywhere; }
.admin-stats strong { display: block; margin-top: auto; padding-top: 8px; font-size: clamp(15px, 4.5vw, 22px); line-height: 1.08; overflow-wrap: anywhere; }
#admin-revenue-7d { font-size: clamp(14px, 4vw, 20px); }
.admin-user-statistics { margin: 0 0 14px; padding: 14px; border: 1px solid rgba(255,255,255,.78); border-radius: 18px; background: rgba(255,252,247,.42); box-shadow: 0 10px 28px rgba(91,42,14,.09); }
.admin-sales-funnel { margin: 0 0 14px; padding: 14px; border: 1px solid rgba(255,255,255,.78); border-radius: 18px; background: rgba(255,252,247,.42); box-shadow: 0 10px 28px rgba(91,42,14,.09); }
.admin-sales-funnel-list { display: grid; gap: 8px; }
.admin-sales-funnel-stage { position: relative; padding: 11px 12px; border: 1px solid rgba(234,215,197,.8); border-radius: 14px; background: rgba(255,250,245,.76); }
.admin-sales-funnel-stage-heading { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 8px; }
.admin-sales-funnel-number { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 8px; background: #27170f; color: #fff4e8; font-size: 10px; font-weight: 900; }
.admin-sales-funnel-stage-heading strong { min-width: 0; color: #291a13; font-size: 13px; line-height: 1.2; }
.admin-sales-funnel-stage-heading b { color: #17120f; font-size: 22px; line-height: 1; }
.admin-sales-funnel-track { height: 6px; margin: 9px 0 7px 31px; overflow: hidden; border-radius: 999px; background: rgba(105,56,27,.1); }
.admin-sales-funnel-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#f37220,#ffad4d); transition: width .25s ease; }
.admin-sales-funnel-stage small { display: block; margin-left: 31px; color: #856e5e; font-size: 10.5px; line-height: 1.3; }
.admin-statistics-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.admin-statistics-heading .eyebrow { margin: 0 0 3px; font-size: 10px; }
.admin-statistics-heading h3 { margin: 0; font-size: 18px; }
.admin-statistics-periods { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(105,56,27,.08); }
.admin-statistics-periods button { min-height: 31px; border: 0; border-radius: 9px; padding: 5px 8px; background: transparent; color: #6e3b20; font: inherit; font-size: 10.5px; font-weight: 850; cursor: pointer; }
.admin-statistics-periods button[aria-pressed="true"] { background: #27170f; color: #fff4e8; box-shadow: 0 3px 9px rgba(39,23,15,.18); }
.admin-statistics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.admin-statistics-grid .card { min-width: 0; margin: 0; padding: 12px; border-radius: 14px; }
.admin-statistics-grid span { display: block; min-height: 31px; color: #6e2c0b; font-size: 12px; line-height: 1.25; }
.admin-statistics-grid strong { display: block; margin-top: 4px; color: #1f1814; font-size: 25px; line-height: 1; }
.admin-statistics-note { margin: 9px 1px 0; color: #856e5e; font-size: 10.5px; }
html[data-theme="dark"] .admin-user-statistics { border-color: rgba(255,183,112,.17); background: rgba(20,15,13,.82); box-shadow: 0 12px 28px rgba(0,0,0,.23); }
html[data-theme="dark"] .admin-sales-funnel { border-color: rgba(255,183,112,.17); background: rgba(20,15,13,.82); box-shadow: 0 12px 28px rgba(0,0,0,.23); }
html[data-theme="dark"] .admin-sales-funnel-stage { border-color: rgba(255,183,112,.13); background: rgba(255,255,255,.035); }
html[data-theme="dark"] .admin-sales-funnel-stage-heading strong, html[data-theme="dark"] .admin-sales-funnel-stage-heading b { color: #fff4e8; }
html[data-theme="dark"] .admin-sales-funnel-number { background: #fff0df; color: #211610; }
html[data-theme="dark"] .admin-sales-funnel-track { background: rgba(255,255,255,.09); }
html[data-theme="dark"] .admin-sales-funnel-stage small { color: #c9a78e; }
html[data-theme="dark"] .admin-statistics-periods { background: rgba(255,255,255,.07); }
html[data-theme="dark"] .admin-statistics-periods button { color: #d9b99f; }
html[data-theme="dark"] .admin-statistics-periods button[aria-pressed="true"] { background: #fff0df; color: #211610; }
html[data-theme="dark"] .admin-statistics-grid span, html[data-theme="dark"] .admin-statistics-note { color: #c9a78e; }
html[data-theme="dark"] .admin-statistics-grid strong { color: #fff4e8; }
@media (max-width: 420px) {
  .admin-statistics-heading { align-items: stretch; flex-direction: column; }
  .admin-statistics-periods button { flex: 1; }
}

/* Internal statistics use a dedicated administrator page. */
.admin-page.statistics-page-open > *:not(#admin-statistics-view) { display: none !important; }
.admin-growth-panel, .admin-income-panel { margin: 0 0 14px; padding: 17px; border: 1px solid rgba(184,75,20,.19); border-radius: 20px; background: rgba(255,251,246,.74); box-shadow: 0 10px 30px rgba(74,32,12,.08); }
.admin-growth-heading, .admin-income-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.admin-growth-heading h3, .admin-income-heading h3 { margin: 0 0 2px; font-size: 18px; line-height: 1.2; }
.admin-growth-heading small, .admin-income-heading small { color: #8e6c58; font-size: 11px; }
.admin-growth-icon, .admin-income-icon { display: grid; flex: 0 0 38px; place-items: center; height: 38px; border-radius: 12px; background: #f5dfc8; color: #a44c1c; font-size: 24px; font-weight: 900; }
.admin-growth-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.admin-growth-counts div { min-width: 0; padding: 11px 9px; border-radius: 13px; background: rgba(91,50,27,.055); }
.admin-growth-counts span { display: block; color: #826b5b; font-size: 11px; }
.admin-growth-counts strong { display: block; margin-top: 6px; font-size: 23px; line-height: 1.1; }
.admin-growth-conversion { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding: 14px; border: 1px solid rgba(236,108,35,.4); border-radius: 13px; background: rgba(235,105,30,.08); }
.admin-growth-conversion span { display: block; font-size: 12px; font-weight: 800; }
.admin-growth-conversion small { display: block; margin-top: 4px; color: #856e5e; font-size: 10px; }
.admin-growth-conversion strong { flex: 0 0 auto; color: #d9611f; font-size: 26px; line-height: 1; }
.admin-income-days { display: grid; gap: 12px; }
.admin-income-day { display: grid; gap: 5px; }
.admin-income-day-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.admin-income-day-head strong { font-size: 12px; white-space: nowrap; }
.admin-income-track { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(104,65,40,.13); }
.admin-income-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#e76a1b,#ff9b50); }
.admin-income-total { display: flex; justify-content: space-between; gap: 10px; margin-top: 15px; padding-top: 12px; border-top: 1px solid rgba(126,82,49,.2); font-size: 12px; font-weight: 800; }
.admin-income-total strong { font-size: 15px; }
html[data-theme="dark"] .admin-growth-panel, html[data-theme="dark"] .admin-income-panel { border-color: rgba(255,183,112,.17); background: rgba(20,15,13,.86); color: #fff4e8; box-shadow: 0 12px 28px rgba(0,0,0,.23); }
html[data-theme="dark"] .admin-growth-heading small, html[data-theme="dark"] .admin-income-heading small, html[data-theme="dark"] .admin-growth-counts span, html[data-theme="dark"] .admin-growth-conversion small { color: #c9a78e; }
html[data-theme="dark"] .admin-growth-icon, html[data-theme="dark"] .admin-income-icon { background: rgba(236,139,61,.17); color: #ffc48d; }
html[data-theme="dark"] .admin-growth-counts div { background: rgba(0,0,0,.18); }
html[data-theme="dark"] .admin-growth-conversion { border-color: rgba(241,106,24,.42); background: rgba(139,62,19,.24); }
html[data-theme="dark"] .admin-growth-conversion strong { color: #ff9856; }
html[data-theme="dark"] .admin-income-track { background: rgba(151,101,68,.2); }
html[data-theme="dark"] .admin-income-total { border-color: rgba(255,183,112,.17); }
.admin-more-tools { margin: 16px 0 0; }
.admin-more-tools summary { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 10px 14px; border: 1px solid rgba(184,75,20,.18); border-radius: 14px; background: rgba(255,255,255,.54); color: #432716; font-size: 13px; font-weight: 850; cursor: pointer; list-style: none; }
.admin-more-tools summary::-webkit-details-marker { display: none; }
.admin-more-tools summary span { font-size: 20px; transition: transform .18s ease; }
.admin-more-tools[open] summary span { transform: rotate(90deg); }
.admin-more-tools .admin-menu-grid { margin-top: 10px; }
.admin-page.extra-page-open > *:not(.admin-extra-page) { display: none !important; }
.admin-extra-page[hidden] { display: none !important; }
.admin-extra-page { min-height: calc(100dvh - 150px); position: relative; padding-top: 1px; }
.admin-extra-page > .admin-header { margin-left: 44px; }
.admin-extra-page > .admin-header h2 { font-size: 22px; }
.admin-extra-select { width: 100%; margin: 8px 0; padding: 12px; border: 1px solid rgba(126,82,49,.24); border-radius: 12px; background: rgba(255,255,255,.7); color: inherit; font: inherit; }
.admin-extra-form { display: grid; gap: 12px; margin: 14px 0 20px; padding: 16px; }
.admin-extra-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 800; }
.admin-extra-form input, .admin-extra-form select, .admin-extra-form textarea { width: 100%; box-sizing: border-box; padding: 11px; border: 1px solid rgba(126,82,49,.24); border-radius: 12px; background: rgba(255,255,255,.68); color: inherit; font: inherit; font-weight: 500; }
.admin-extra-form textarea { resize: vertical; }
.admin-extra-form [hidden], .admin-menu-card [hidden] { display: none !important; }
.admin-broadcast-preview { padding: 12px; border: 1px solid rgba(184,75,20,.18); border-radius: 14px; background: rgba(255,255,255,.45); }
.admin-broadcast-preview small { font-size: 10px; font-weight: 850; color: #a75d2b; }
.admin-broadcast-preview p { margin: 8px 0 0; white-space: pre-wrap; font-size: 12px; }
.admin-extra-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-extra-list { display: grid; gap: 9px; margin: 12px 0; }
.admin-extra-row { display: grid; gap: 6px; padding: 14px; border: 1px solid rgba(184,75,20,.18); border-radius: 15px; background: rgba(255,255,255,.5); overflow-wrap: anywhere; }
.admin-extra-row strong { font-size: 14px; }
.admin-extra-row small { color: #856e5e; font-size: 11px; }
.admin-extra-row p { margin: 4px 0; white-space: pre-wrap; font-size: 12px; }
.admin-extra-row .button { justify-self: start; }
.admin-insights { margin-top: 15px; padding: 15px; }
.admin-insights-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
.admin-insights-tabs button { min-height: 34px; padding: 7px 4px; border: 1px solid rgba(184,75,20,.18); border-radius: 10px; background: rgba(255,255,255,.65); color: #6e3b20; font: inherit; font-size: 10.5px; font-weight: 850; cursor: pointer; }
.admin-insights-tabs button[aria-pressed="true"] { border-color: #e66c22; background: #fff0df; color: #9f4518; }
.admin-insights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.admin-metric { min-width: 0; padding: 12px; border-radius: 13px; background: rgba(224,105,35,.08); }
.admin-metric span, .admin-metric small { display: block; font-size: 10.5px; color: #6e3b20; }
.admin-metric strong { display: block; margin: 5px 0 3px; font-size: 20px; overflow-wrap: anywhere; }
html[data-theme="dark"] .admin-extra-row { border-color: rgba(255,183,112,.16); background: rgba(255,255,255,.055); }
html[data-theme="dark"] .admin-extra-row small, html[data-theme="dark"] .admin-metric span, html[data-theme="dark"] .admin-metric small { color: #c9a78e; }
html[data-theme="dark"] .admin-extra-form input, html[data-theme="dark"] .admin-extra-form select, html[data-theme="dark"] .admin-extra-form textarea, html[data-theme="dark"] .admin-extra-select { background: rgba(255,255,255,.06); border-color: rgba(255,183,112,.16); color: #fff4e8; }
html[data-theme="dark"] .admin-metric { background: rgba(255,173,103,.075); }
html[data-theme="dark"] .admin-insights-tabs button { border-color: rgba(255,183,112,.16); background: rgba(255,255,255,.055); color: #f7dfcc; }
html[data-theme="dark"] .admin-insights-tabs button[aria-pressed="true"] { border-color: #ffaf54; background: rgba(255,173,103,.16); color: #ffca9a; }
.admin-page.referrals-page-open > *:not(#admin-referrals-view) { display: none !important; }
.admin-referrals-page[hidden] { display: none !important; }
.admin-referrals-page { position: relative; min-height: calc(100dvh - 150px); padding-top: 1px; }
.admin-referrals-header { margin: 4px 0 14px 44px; }
.admin-referrals-header h2 { font-size: 22px; }
.admin-referrals-list { display: grid; gap: 9px; }
.admin-referrer-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 13px; border: 1px solid rgba(184,75,20,.18); border-radius: 16px; background: rgba(255,255,255,.52); box-shadow: 0 8px 24px rgba(104,52,20,.07); }
.admin-referrer-rank { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg,#ffcf6a,#ed742b); color: #32180b; font-size: 13px; font-weight: 900; }
.admin-referrer-identity { min-width: 0; }
.admin-referrer-identity strong { display: block; overflow: hidden; color: #24150e; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.admin-referrer-identity small { display: block; margin-top: 4px; overflow-wrap: anywhere; color: #856e5e; font-size: 10.5px; }
.admin-referrer-metrics { display: grid; grid-template-columns: repeat(2, minmax(78px, auto)); gap: 7px; }
.admin-referrer-metrics span { padding: 8px 9px; border-radius: 12px; background: rgba(224,105,35,.08); text-align: right; }
.admin-referrer-metrics small, .admin-referrer-metrics strong { display: block; }
.admin-referrer-metrics small { color: #856e5e; font-size: 9.5px; }
.admin-referrer-metrics strong { margin-top: 3px; color: #2a1810; font-size: 12px; white-space: nowrap; }
.admin-referrals-back { width: 100%; margin: 14px 0 0; }
.admin-referrals-empty { padding: 20px 0; text-align: center; }
html[data-theme="dark"] .admin-referrer-card { border-color: rgba(255,183,112,.16); background: rgba(255,255,255,.055); box-shadow: 0 10px 26px rgba(0,0,0,.2); }
html[data-theme="dark"] .admin-referrer-identity strong,
html[data-theme="dark"] .admin-referrer-metrics strong { color: #fff4e8; }
html[data-theme="dark"] .admin-referrer-identity small,
html[data-theme="dark"] .admin-referrer-metrics small { color: #c9a78e; }
html[data-theme="dark"] .admin-referrer-metrics span { background: rgba(255,173,103,.075); }
@media (max-width: 560px) {
  .admin-referrals-header { margin-left: 42px; }
  .admin-referrer-card { grid-template-columns: 34px minmax(0, 1fr); }
  .admin-referrer-metrics { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .admin-referrer-metrics span { text-align: center; }
}
.admin-statistics-page[hidden] { display: none !important; }
.admin-statistics-page { position: relative; min-height: calc(100dvh - 150px); padding-top: 1px; }
.admin-statistics-page-header { margin: 4px 0 14px 44px; }
.admin-statistics-page-header h2 { font-size: 22px; }
@media (max-width: 560px) {
  .admin-statistics-page-header { margin-left: 42px; }
}
.admin-subscription-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.admin-subscription-stats .card { min-width: 0; min-height: 88px; margin: 0; padding: 11px 9px; border-radius: 16px; }
.admin-subscription-stats button.card { border: 1px solid rgba(255,255,255,.76); color: inherit; text-align: left; font: inherit; cursor: pointer; transition: transform .14s ease, filter .14s ease; }
.admin-subscription-stats button.card:active { transform: scale(.96); filter: brightness(.92); }
.admin-subscription-stats span { display: block; min-height: 30px; color: #6e2c0b; font-size: clamp(10px, 3vw, 13px); line-height: 1.18; overflow-wrap: anywhere; }
.admin-subscription-stats strong { display: block; margin-top: 7px; font-size: clamp(20px, 6vw, 27px); line-height: 1; }
.admin-subscription-stats .paid strong { color: #24844f; }
.admin-subscription-stats .trial strong { color: #dc681d; }
.admin-subscription-stats .inactive strong { color: #7d6b60; }
.admin-paid-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 3px 0 14px; }
.admin-paid-filters button { min-width: 0; min-height: 42px; padding: 8px 6px; border: 1px solid rgba(126,82,49,.3); border-radius: 11px; background: rgba(255,255,255,.6); color: #4d382d; font: inherit; font-size: 12.65px; font-weight: 800; line-height: 1.15; cursor: pointer; }
.admin-paid-filters button[aria-pressed="true"] { border-color: #17120f; background: #17120f; color: #fff4e8; }
html[data-theme="dark"] .admin-paid-filters button { border-color: rgba(255,221,190,.2); background: rgba(255,255,255,.06); color: #fff4e8; }
html[data-theme="dark"] .admin-paid-filters button[aria-pressed="true"] { border-color: #fff0df; background: #fff0df; color: #211610; }
.admin-subscriptions-dialog { box-sizing: border-box; width: min(92vw, 520px); max-height: min(84dvh, 720px); margin: auto; padding: 20px; overflow: hidden; border: 1px solid rgba(229,198,168,.9); border-radius: 22px; background: rgba(255,251,246,.98); color: #17120f; box-shadow: 0 24px 70px rgba(35,20,12,.34); }
.admin-subscriptions-dialog::backdrop { background: rgba(23,18,15,.64); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.admin-subscriptions-dialog.dialog-fallback-open { position: fixed; z-index: 110; inset: 50% auto auto 50%; display: block; transform: translate(-50%, -50%); }
.admin-subscriptions-dialog h3 { margin: 0; font-size: 21.85px; }
.admin-subscriptions-dialog .admin-paid-filters { margin-top: 16px; }
.admin-subscriptions-dialog .admin-description { margin-bottom: 10px; }
.admin-subscriptions-dialog .admin-list { max-height: min(50dvh, 440px); padding-right: 3px; overflow-y: auto; overscroll-behavior: contain; }
.admin-subscriptions-dialog form { margin: 16px 0 0; }
.admin-subscriptions-dialog form .button { width: 100%; margin: 0; }
html[data-theme="dark"] .admin-subscriptions-dialog { border-color: #4a3024; background: rgba(20,15,13,.98); color: #fff4e8; }
.notification-templates-dialog { box-sizing: border-box; width: min(94vw, 620px); max-height: min(88dvh, 780px); margin: auto; padding: 20px; overflow: hidden; border: 1px solid rgba(229,198,168,.9); border-radius: 22px; background: rgba(255,251,246,.98); color: #17120f; box-shadow: 0 24px 70px rgba(35,20,12,.34); }
.notification-templates-dialog::backdrop { background: rgba(23,18,15,.68); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.notification-templates-dialog.dialog-fallback-open { position: fixed; z-index: 115; inset: 50% auto auto 50%; display: block; transform: translate(-50%, -50%); }
.notification-templates-dialog h3 { margin: 0; font-size: 21.85px; }
.notification-templates-list { display: grid; gap: 11px; max-height: min(61dvh, 560px); padding-right: 3px; overflow-y: auto; overscroll-behavior: contain; }
.notification-template-card { padding: 14px; border: 1px solid rgba(184,75,20,.22); border-radius: 16px; background: rgba(255,255,255,.48); }
.notification-template-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.notification-template-heading strong { font-size: 15.53px; line-height: 1.25; }
.notification-template-heading span { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: #fff0df; color: #a64416; font-size: 11.5px; font-weight: 800; }
.notification-template-enabled { display: flex; align-items: center; gap: 5px; margin: 10px 0; color: #542109; font-size: 13.8px; font-weight: 750; }
.notification-template-enabled input { width: 18px; height: 18px; accent-color: #e96d25; }
.notification-template-card textarea { box-sizing: border-box; width: 100%; min-height: 142px; resize: vertical; border: 1px solid rgba(126,82,49,.3); border-radius: 12px; padding: 11px; background: rgba(255,255,255,.72); color: #17120f; font: inherit; font-size: 13.8px; line-height: 1.4; }
.notification-template-variables { display: block; margin-top: 7px; color: #765f50; font-size: 11.5px; line-height: 1.35; overflow-wrap: anywhere; }
.notification-template-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.notification-template-actions .button { min-height: 42px; margin: 0; padding: 9px; font-size: 13.8px; }
.notification-delivery-preview { display: grid; gap: 9px; margin-top: 12px; padding: 12px; border-radius: 15px; background: #15100e; color: #fff7ef; }
.notification-delivery-preview > strong { font-size: 14px; }
.notification-delivery-preview > span { color: #d6bba9; font-size: 11px; line-height: 1.35; }
.notification-preview-images { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.notification-preview-images img { display: block; width: 100%; border: 1px solid rgba(255,151,75,.28); border-radius: 10px; }
.notification-preview-image-single { grid-template-columns: 1fr; }
.notification-preview-image-single img { max-height: 430px; object-fit: contain; background: #0f0a08; }
.notification-preview-message { padding: 10px 11px; border-radius: 12px 12px 4px 12px; background: #2b201b; color: #fff7ef; font-size: 11.5px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
.notification-preview-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.notification-preview-buttons-single { grid-template-columns: 1fr; }
.notification-preview-buttons span { display: grid; min-height: 35px; place-items: center; border-radius: 9px; background: #403029; color: #ffad67; font-size: 11px; font-weight: 800; text-align: center; }
.notification-dialog-close { margin: 14px 0 0; }
.notification-dialog-close .button { width: 100%; margin: 0; }
html[data-theme="dark"] .notification-templates-dialog { border-color: #4a3024; background: rgba(20,15,13,.98); color: #fff4e8; }
html[data-theme="dark"] .notification-template-card { border-color: rgba(255,183,112,.17); background: rgba(255,255,255,.045); }
html[data-theme="dark"] .notification-template-heading span { background: rgba(255,167,80,.12); color: #ffb96f; }
html[data-theme="dark"] .notification-template-enabled { color: #f1d7c2; }
html[data-theme="dark"] .notification-template-card textarea { border-color: rgba(255,183,112,.2); background: rgba(255,255,255,.06); color: #fff4e8; }
html[data-theme="dark"] .notification-template-variables { color: #c9a78e; }
.admin-page h3 { margin: 0 0 8px; font-size: 21.85px; }
.admin-menu-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.admin-menu-card { overflow: hidden; border: 1px solid rgba(255,255,255,.78); border-radius: 18px; background: rgba(255,252,247,.42); box-shadow: 0 10px 28px rgba(91,42,14,.09), inset 0 1px 0 rgba(255,255,255,.6); -webkit-backdrop-filter: blur(15px) saturate(112%); backdrop-filter: blur(15px) saturate(112%); }
.admin-menu-card h3 { display: flex; align-items: center; gap: 9px; margin: 0; padding: 14px; color: #25140c; font-size: 17.25px; }
.admin-menu-card h3 span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #ffcd65, #f16a20); font-size: 16px; }
.admin-menu-card button { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; width: 100%; border: 0; border-top: 1px solid rgba(151,80,35,.12); padding: 12px 14px; background: transparent; color: #4d2a18; text-align: left; font: inherit; font-size: 14.95px; font-weight: 700; cursor: pointer; }
.admin-menu-card button > span { color: #e66c22; font-size: 18px; }
.admin-menu-card button b { color: #a86843; font-size: 21px; font-weight: 500; line-height: .7; }
.admin-menu-card button:active { background: rgba(255,142,62,.13); }
html[data-theme="dark"] .admin-menu-card { border-color: rgba(255,183,112,.17); background: rgba(20,15,13,.82); box-shadow: 0 12px 28px rgba(0,0,0,.23), inset 0 1px 0 rgba(255,255,255,.035); }
html[data-theme="dark"] .admin-menu-card h3 { color: #fff7ed; }
html[data-theme="dark"] .admin-menu-card button { border-top-color: rgba(255,242,227,.09); color: rgba(255,247,237,.83); }
html[data-theme="dark"] .admin-menu-card button > span { color: #ffaf54; }
html[data-theme="dark"] .admin-menu-card button b { color: #b98969; }
html[data-theme="dark"] .admin-menu-card button:active { background: rgba(255,176,84,.13); }
.admin-management { margin-top: 14px; }
.admin-management-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-management-heading .eyebrow { margin-bottom: 4px; }
.admin-management-heading button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(23, 18, 15, .09); color: #17120f; font: inherit; font-size: 27px; cursor: pointer; }
.admin-description { margin: 0 0 14px; color: #542109; line-height: 1.4; }
.admin-list { display: grid; gap: 8px; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(184, 75, 20, .25); }
.admin-row strong { display: block; font-size: 16.1px; }
.admin-remove { border: 1px solid #a52f20; border-radius: 10px; padding: 7px 9px; background: transparent; color: #a52f20; font: inherit; font-size: 13.8px; font-weight: 800; cursor: pointer; }
.admin-add-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(184, 75, 20, .25); }
.admin-add-form label { display: block; margin-bottom: 8px; font-size: 14.95px; font-weight: 800; }
.admin-add-form input { width: 100%; border: 1px solid rgba(126, 82, 49, .35); border-radius: 12px; padding: 13px; background: rgba(255,255,255,.72); color: #17120f; font: inherit; }

@media (min-width: 760px) {
  .admin-page { max-width: 1180px; padding-left: 28px; padding-right: 28px; }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
  .admin-stats strong { font-size: 27px; }
  #admin-revenue-7d { font-size: 24px; }
  .admin-menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .admin-menu-card { min-height: 156px; }
}


/* FOXXXY tail glass design v1
   Stable artwork layer for Telegram WebView and older iOS versions. */
html,
body {
  min-height: 100%;
  background: #fff7ed !important;
}

body {
  isolation: isolate;
  background: linear-gradient(180deg, #fffaf4 0%, #fff5e9 58%, #ffe8d1 100%) !important;
}

body::before {
  content: '';
  position: fixed;
  z-index: 0;
  inset: 0;
  display: block;
  width: auto;
  height: auto;
  pointer-events: none;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, .12) 0%, rgba(255, 248, 239, .03) 48%, rgba(255, 239, 220, .08) 100%),
    var(--foxxxy-tail-background) center bottom / cover no-repeat;
  box-shadow: none;
  opacity: 1;
  transform: none;
}

main,
.tab-sheet,
.devices-page,
.balance-page,
.plans-page,
.information-page,
.admin-page {
  position: relative;
  z-index: 1;
}

.topbar,
.hero,
.card,
.help,
.quick-action,
.information-tabs {
  border-color: rgba(255, 255, 255, .78);
  background: rgba(255, 253, 249, .62);
  box-shadow: 0 12px 30px rgba(78, 37, 14, .09);
  -webkit-backdrop-filter: blur(15px) saturate(120%);
  backdrop-filter: blur(15px) saturate(120%);
}

.welcome-card,
.home-device-card {
  background: rgba(255, 252, 247, .56);
}

.overview-card,
.connection-card,
.client-install-link {
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.overview-card:active,
.connection-card:active,
.client-install-link:active,
.quick-action:active {
  transform: scale(.975);
  filter: brightness(.97);
}

@media (max-width: 560px) {
  body::before {
    background-position: 54% 100%;
  }

  .topbar,
  .hero,
  .card,
  .help,
  .quick-action {
    background: rgba(255, 253, 249, .66);
    -webkit-backdrop-filter: blur(12px) saturate(118%);
    backdrop-filter: blur(12px) saturate(118%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .overview-card,
  .connection-card,
  .client-install-link,
  .quick-action {
    transition: none;
  }
  .plan-overview::before { animation: none !important; background-position: 50% 50%; }
  #home .quick-action::before { animation: none !important; background-position: 50% 0; }
  #home .quick-action::after { animation: none !important; opacity: .72; }
  .zero-commission-note > b { animation: none !important; }
}

/* FOXXXY automatic light/dark appearance v1 */
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

.profile-page {
  position: relative;
  z-index: 1;
  max-width: 746.667px;
  min-height: auto;
  margin: auto;
  padding: 28px 20px 96px;
  zoom: .75;
}
.profile-header { display: block; margin: 0 0 16px; }
.profile-header h2 { margin: 0; }
.profile-settings-card { padding: 20px; }
.profile-menu-row { display: grid; grid-template-columns: 48px 1fr 28px; align-items: center; width: 100%; min-height: 70px; padding: 8px 5px; border: 0; background: transparent; color: #17120f; text-align: left; font: inherit; cursor: pointer; }
.profile-menu-row h3 { margin: 0 0 5px; font-size: 19.55px; }
.profile-menu-row p { margin: 0; color: #765f50; font-size: 14.95px; }
.profile-menu-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: #ffe5c8; color: #dc591b; font-size: 24px; }
.profile-menu-arrow { color: #8b7262; text-align: right; font-size: 31px; line-height: 1; }
.profile-menu-row:active { transform: scale(.985); }
.profile-menu-row + .profile-menu-row { margin-top: 5px; padding-top: 13px; border-top: 1px solid rgba(184,75,20,.16); }
.theme-dialog { box-sizing: border-box; width: min(88vw, 430px); max-height: min(82dvh, 650px); margin: auto; padding: 22px; overflow-y: auto; border: 1px solid #ead7c5; border-radius: 22px; background: rgba(255,251,246,.98); color: #17120f; box-shadow: 0 24px 70px rgba(35,20,12,.34); }
.theme-dialog::backdrop { background: rgba(23,18,15,.64); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.theme-dialog.dialog-fallback-open { position: fixed; z-index: 100; inset: 50% auto auto 50%; display: block; transform: translate(-50%, -50%); }
.theme-dialog .profile-setting-heading { margin-bottom: 16px; }
.theme-dialog .profile-setting-heading h2 { margin: 0 0 4px; font-size: 23px; }
.theme-dialog .button { margin: 14px 0 0; }
.profile-setting-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.profile-setting-heading > span { display: grid; flex: 0 0 46px; width: 46px; height: 46px; place-items: center; border-radius: 15px; background: #ffe5c8; color: #dc591b; font-size: 27px; }
.profile-setting-heading h3 { margin: 0 0 4px; font-size: 21.85px; }
.profile-setting-heading p { margin: 0; color: #765f50; font-size: 14.95px; }
.theme-options { display: grid; gap: 9px; }
.theme-options button { display: grid; grid-template-columns: 42px 1fr 28px; align-items: center; min-height: 58px; padding: 10px 12px; border: 1px solid #ead7c5; border-radius: 15px; background: rgba(255,253,249,.76); color: #17120f; text-align: left; font: inherit; cursor: pointer; transition: transform .14s ease, background .14s ease, color .14s ease, border-color .14s ease; }
.theme-options button > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: #fff0df; color: #df5c1b; font-size: 20px; }
.theme-options button strong { font-size: 16.1px; }
.theme-options button i { grid-column: 3; display: none; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #17120f; color: #fff6eb; font-style: normal; font-size: 13px; }
.theme-options button[aria-pressed="true"] { border-color: #17120f; box-shadow: inset 0 0 0 1px #17120f; }
.theme-options button[aria-pressed="true"] i { display: grid; }
.theme-options button:active { transform: scale(.98); }
.theme-notice { min-height: 19px; margin: 12px 2px 0; color: #856e5e; font-size: 13.8px; font-weight: 700; }

body::before {
  content: '';
  position: fixed;
  z-index: 0;
  inset: 0 0 0 auto;
  display: block;
  width: min(78vw, 500px);
  height: auto;
  pointer-events: none;
  border-radius: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: none;
  opacity: .52;
  transform: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.38) 18%, #000 46%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.38) 18%, #000 46%);
}
html[data-theme="light"] body {
  background: linear-gradient(155deg, #fffdf9 0%, #fff7ed 54%, #ffe7cf 100%) !important;
  color: #17120f;
}
html[data-theme="light"] body::before { background-image: var(--foxxxy-tail-spiral); }

html[data-theme="dark"] body {
  background: radial-gradient(circle at 86% 4%, #5a2a15 0%, #24150f 32%, #100d0c 74%) fixed !important;
  color: #fff4e8;
}
html[data-theme="dark"] body::before {
  width: min(82vw, 520px);
  background-image: var(--foxxxy-tail-spiral);
  opacity: .58;
  filter: saturate(1.08) contrast(1.08);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .card,
html[data-theme="dark"] .help,
html[data-theme="dark"] .quick-action,
html[data-theme="dark"] .information-tabs,
html[data-theme="dark"] .client-install-link,
html[data-theme="dark"] .client-platform-picker,
html[data-theme="dark"] .balance-current,
html[data-theme="dark"] .plans-balance,
html[data-theme="dark"] .plan-option,
html[data-theme="dark"] .renewal-device-row,
html[data-theme="dark"] .device-client-badge {
  border-color: rgba(255, 183, 112, .17);
  background: rgba(25, 18, 15, .84);
  color: #fff4e8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 12px 28px rgba(0,0,0,.23);
  -webkit-backdrop-filter: blur(16px) saturate(112%);
  backdrop-filter: blur(16px) saturate(112%);
}
html[data-theme="dark"] .top-menu,
html[data-theme="dark"] .device-form:not([hidden]),
html[data-theme="dark"] .device-connection,
html[data-theme="dark"] .device-qr-dialog,
html[data-theme="dark"] .warning-dialog {
  border-color: #4a3024;
  background: rgba(20, 15, 13, .98);
  color: #fff4e8;
}
html[data-theme="dark"] .header-theme-toggle,
html[data-theme="dark"] .menu-toggle { background: rgba(255,255,255,.07); color: #fff4e8; }
html[data-theme="dark"] .menu-toggle span { background: #fff4e8; }
html[data-theme="dark"] .top-menu button,
html[data-theme="dark"] .brand-title,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .welcome-card .status,
html[data-theme="dark"] .row strong,
html[data-theme="dark"] .overview-card strong,
html[data-theme="dark"] .connection-card strong,
html[data-theme="dark"] .device-info p,
html[data-theme="dark"] .device-connection strong,
html[data-theme="dark"] .device-connection label,
html[data-theme="dark"] .renewal-device-row strong,
html[data-theme="dark"] .information-policy-section h4 {
  color: #fff4e8;
}
html[data-theme="dark"] .welcome-card .status span { background: #69d68c; }
html[data-theme="dark"] .cabinet-label,
html[data-theme="dark"] .hero > p:not(.eyebrow),
html[data-theme="dark"] .connect-card > p,
html[data-theme="dark"] .help p,
html[data-theme="dark"] .row,
html[data-theme="dark"] .notice,
html[data-theme="dark"] .tab-sheet p,
html[data-theme="dark"] .device-row small,
html[data-theme="dark"] .active-empty small,
html[data-theme="dark"] .active-live small,
html[data-theme="dark"] .overview-card > div > span,
html[data-theme="dark"] .connection-card > div > span,
html[data-theme="dark"] .profile-setting-heading p,
html[data-theme="dark"] .theme-notice,
html[data-theme="dark"] .information-card p,
html[data-theme="dark"] .information-list,
html[data-theme="dark"] .renewal-device-row small {
  color: #baa398;
}
html[data-theme="dark"] .row,
html[data-theme="dark"] .device-row,
html[data-theme="dark"] .top-menu button + button,
html[data-theme="dark"] .information-policy-section { border-color: rgba(255, 190, 133, .13); }
html[data-theme="dark"] .overview-icon,
html[data-theme="dark"] .fox-avatar,
html[data-theme="dark"] .wifi-off,
html[data-theme="dark"] .active-live > span,
html[data-theme="dark"] .profile-setting-heading > span {
  border-color: #4b3023;
  background: #2d1b14;
  color: #ff9946;
}
html[data-theme="dark"] .choice-button,
html[data-theme="dark"] .app-choice,
html[data-theme="dark"] .copy-device,
html[data-theme="dark"] .secondary,
html[data-theme="dark"] .balance-quick-amounts button,
html[data-theme="dark"] input {
  border-color: #5a3a2a;
  background: #211713;
  color: #fff4e8;
}
html[data-theme="dark"] .primary {
  background: linear-gradient(135deg, #ffac59, #ec6a27);
  color: #21130c;
  box-shadow: 0 8px 20px rgba(238, 99, 30, .22);
}
html[data-theme="dark"] .balance-quick-amounts button { border-color: #5b3a2a; background: linear-gradient(155deg, #251914, #1d1411); color: #fff4e8; box-shadow: 0 6px 14px rgba(0,0,0,.2); }
html[data-theme="dark"] .balance-quick-amounts button span { color: #d88b58; }
html[data-theme="dark"] .balance-quick-amounts button.selected { border-color: #ff9144; background: linear-gradient(135deg, #ffad5d, #e96b29); color: #21130c; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 8px 20px rgba(233,107,41,.24); }
html[data-theme="dark"] .balance-quick-amounts button.selected span { color: #542711; }
html[data-theme="dark"] .plan-overview small,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .information-icon { background: #4c2818; color: #ffc286; }
html[data-theme="dark"] .balance-current strong,
html[data-theme="dark"] .plans-balance strong { color: #fff4e8; }
html[data-theme="dark"] .balance-current span,
html[data-theme="dark"] .plans-balance span { color: #d1ad96; }
html[data-theme="dark"] .balance-current span i { background: #3b2419; color: #ff9b4b; }
html[data-theme="dark"] .zero-commission-note { border-color: rgba(255,146,68,.48); background: linear-gradient(135deg, #3c2115, #562b14); box-shadow: 0 10px 24px rgba(0,0,0,.2); }
html[data-theme="dark"] .zero-commission-note > b { color: #21130c; }
html[data-theme="dark"] .zero-commission-note strong { color: #fff4e8; }
html[data-theme="dark"] .zero-commission-note span { color: #dfb595; }
html[data-theme="dark"] .payment-methods legend { color: #e3c2aa; }
html[data-theme="dark"] #balance-topup-form .payment-method-option { border-color: #593829; background: linear-gradient(155deg, #211713, #18110f); box-shadow: 0 8px 18px rgba(0,0,0,.2); }
html[data-theme="dark"] #balance-topup-form .payment-method-option:has(input:checked) { border-color: #ff9144; background: linear-gradient(155deg, #3a2418, #281812); box-shadow: inset 0 0 0 1px #ff9144, 0 10px 24px rgba(0,0,0,.28); }
html[data-theme="dark"] .payment-method-icon { background: #fff9f2; }
html[data-theme="dark"] .payment-method-option > strong { color: #fff4e8; }
html[data-theme="dark"] .payment-method-option > small { background: #183c28; color: #83e5a5; }
html[data-theme="dark"] .payment-method-option > i { background: #ff9144; color: #21130c; }
html[data-theme="dark"] .plan-option > div:first-of-type strong,
html[data-theme="dark"] .plan-option > b { color: #fff4e8; }
html[data-theme="dark"] .plan-option > div:first-of-type span,
html[data-theme="dark"] .plan-duration-grid button span { color: #512411; }
html[data-theme="dark"] .plan-duration-grid button { border-color: #ffc08a; background: linear-gradient(135deg, #ffac59, #ec6a27); color: #21130c; box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 8px 20px rgba(238,99,30,.22); }
html[data-theme="dark"] .plan-duration-grid button strong { color: #21130c; }
html[data-theme="dark"] .plan-option .button:disabled { border-color: #65402e; background: #281b16; color: #d7b29a; opacity: 1; }
html[data-theme="dark"] .plans-discount-offer {
  border-color: #ff8a24;
  background: linear-gradient(135deg, #3b2115, #5a2d12);
  color: #ffd0a6;
}
html[data-theme="dark"] .device-form input,
html[data-theme="dark"] .device-connection input,
html[data-theme="dark"] .balance-input-wrap input,
html[data-theme="dark"] .admin-add-form input { background: #17110f; color: #fff4e8; border-color: #523326; }
html[data-theme="dark"] .page-back { border-color: #4c3024; background: rgba(24,18,15,.94); color: #fff4e8; }
html[data-theme="dark"] .bottom-nav { background: rgba(10,8,7,.98); border-color: #4a2a1b; }
html[data-theme="dark"] .nav-item { color: #aa958a; }
html[data-theme="dark"] .nav-item.active { color: #ff9e4c; }

html[data-theme="dark"] .theme-options button {
  border-color: #4a3024;
  background: rgba(26,19,16,.9);
  color: #fff4e8;
}
html[data-theme="dark"] .profile-menu-row { color: #fff4e8; }
html[data-theme="dark"] .profile-menu-row p { color: #baa398; }
html[data-theme="dark"] #home .balance-topup-label { color: #ff9a52; }
html[data-theme="dark"] #home .quick-action .quick-action-icon { background: rgba(126, 62, 27, .34); color: #ff9a52; }
html[data-theme="dark"] #home .quick-action .quick-action-arrow { color: #baa398; }
html[data-theme="dark"] #home .quick-action { border-color: rgba(255, 142, 70, .45); box-shadow: 0 8px 18px rgba(0, 0, 0, .2), 0 0 14px rgba(255, 122, 45, .12); }
html[data-theme="dark"] .profile-menu-icon { background: #392219; color: #ffa154; }
html[data-theme="dark"] .profile-menu-arrow { color: #b99c8b; }
html[data-theme="dark"] .profile-menu-row + .profile-menu-row { border-top-color: rgba(255,183,112,.13); }
html[data-theme="dark"] .theme-dialog { border-color: #4a3024; background: rgba(20,15,13,.98); color: #fff4e8; }
html[data-theme="dark"] .theme-options button > span { background: #392219; color: #ffa154; }
html[data-theme="dark"] .theme-options button[aria-pressed="true"] {
  border-color: #fff0df;
  background: #fff0df;
  color: #211610;
  box-shadow: 0 0 0 2px rgba(255,184,119,.42), 0 8px 22px rgba(255,129,42,.18);
}
html[data-theme="dark"] .theme-options button[aria-pressed="true"] i { background: #211610; color: #fff0df; }

html[data-theme="dark"] button:active,
html[data-theme="dark"] a:active {
  border-color: #fff0df !important;
  background: #fff0df !important;
  color: #211610 !important;
  box-shadow: 0 0 0 2px rgba(255,190,129,.52), 0 7px 20px rgba(255,135,48,.2) !important;
  filter: none !important;
}
html[data-theme="dark"] button:active *,
html[data-theme="dark"] a:active * { color: inherit !important; }

@media (max-width: 560px) {
  body::before { width: min(82vw, 410px); background-position: center; }
  html[data-theme="dark"] body::before { width: min(88vw, 430px); }
}

/* Use real image elements: Telegram WebView may drop a fixed body pseudo-layer. */
body::before { display: none !important; }
.theme-tail-art {
  position: fixed;
  z-index: 0;
  inset: 0 0 0 auto;
  display: block;
  width: min(82vw, 500px);
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.42) 17%, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.42) 17%, #000 42%);
}
.theme-tail-art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.theme-tail-dark { display: none !important; }
html[data-theme="light"] .theme-tail-light { display: block; opacity: .82; }
html[data-theme="dark"] .theme-tail-light { display: none; }
html[data-theme="dark"] .theme-tail-dark {
  display: block !important;
  opacity: .78;
  filter: brightness(.46) saturate(1.18) contrast(1.18);
}
main,
.tab-sheet,
.devices-page,
.balance-page,
.plans-page,
.referrals-page,
.profile-page,
.information-page,
.admin-page,
.bottom-nav { position: relative; z-index: 1; }
.bottom-nav { position: fixed !important; }
@media (max-width: 560px) {
  .theme-tail-art { width: min(88vw, 430px); }
}

/* Light appearance: clearer fox artwork under lighter frosted panels. */
html[data-theme="light"] body {
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 156, 65, .25), transparent 38%),
    linear-gradient(155deg, #fffdf8 0%, #fff4e5 50%, #ffd8ae 100%) !important;
}
html[data-theme="light"] .theme-tail-art {
  width: min(94vw, 560px);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.62) 12%, #000 31%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.62) 12%, #000 31%);
}
html[data-theme="light"] .theme-tail-light {
  display: block;
  opacity: .98;
  object-position: 58% center;
  filter: saturate(1.2) contrast(1.08);
  mix-blend-mode: multiply;
}
html[data-theme="light"] .topbar,
html[data-theme="light"] .hero,
html[data-theme="light"] .card,
html[data-theme="light"] .help,
html[data-theme="light"] .quick-action,
html[data-theme="light"] .information-tabs {
  border-color: rgba(255,255,255,.7);
  background: rgba(255, 252, 247, .39);
  box-shadow: 0 10px 28px rgba(91, 42, 14, .09);
  -webkit-backdrop-filter: blur(11px) saturate(112%);
  backdrop-filter: blur(11px) saturate(112%);
}
html[data-theme="light"] .welcome-card,
html[data-theme="light"] .home-device-card,
html[data-theme="light"] .client-install-link,
html[data-theme="light"] .client-platform-picker,
html[data-theme="light"] .plan-option,
html[data-theme="light"] .balance-current,
html[data-theme="light"] .plans-balance,
html[data-theme="light"] .renewal-device-row {
  background: rgba(255, 253, 249, .44);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  backdrop-filter: blur(10px) saturate(110%);
}
html[data-theme="light"] .brand-title,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] .overview-card strong,
html[data-theme="light"] .connection-card strong {
  color: #17100c;
  text-shadow: 0 1px 0 rgba(255,255,255,.48);
}
html[data-theme="light"] .balance-card,
html[data-theme="light"] .balance-history-card {
  border-color: rgba(255,255,255,.86);
  background: rgba(255,252,247,.84);
  box-shadow: 0 12px 32px rgba(91,42,14,.12);
}
html[data-theme="light"] .balance-input-wrap input {
  border-color: #5b3625;
  background: rgba(255,255,255,.9);
  color: #21130c;
}
html[data-theme="light"] .balance-quick-amounts button {
  border-color: #dfc1aa;
  background: linear-gradient(155deg, rgba(255,255,255,.96), rgba(255,244,232,.96));
  color: #2b190f;
}
html[data-theme="light"] .balance-quick-amounts button.selected {
  border-color: #df671e;
  background: linear-gradient(135deg, #ffb766, #ee742d);
  color: #21130c;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.46), 0 8px 18px rgba(203,79,16,.28);
}
html[data-theme="light"] #balance-topup-form .payment-method-option {
  border-color: #dfbea5;
  background: linear-gradient(155deg, rgba(255,255,255,.97), rgba(255,245,235,.97));
  box-shadow: 0 8px 20px rgba(91,42,14,.1);
}
html[data-theme="light"] #balance-topup-form .payment-method-option:has(input:checked) {
  border-color: #e56d24;
  background: linear-gradient(155deg, #fff9ef, #ffe2bf);
  box-shadow: inset 0 0 0 1px #e56d24, 0 10px 22px rgba(203,79,16,.18);
}
@media (max-width: 560px) {
  html[data-theme="light"] .theme-tail-art { width: min(98vw, 470px); }
  html[data-theme="light"] .topbar,
  html[data-theme="light"] .hero,
  html[data-theme="light"] .card,
  html[data-theme="light"] .help,
  html[data-theme="light"] .quick-action { background: rgba(255, 252, 247, .43); }
}

.app-toast {
  position: fixed;
  z-index: 220;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  max-width: min(82vw, 360px);
  box-sizing: border-box;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 999px;
  background: rgba(255, 250, 244, .88);
  color: #3f210f;
  box-shadow: 0 12px 34px rgba(69, 34, 15, .2);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  backdrop-filter: blur(16px) saturate(135%);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px) scale(.96);
  transition: opacity .2s ease, transform .24s cubic-bezier(.2, .8, .2, 1);
}
.app-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
html[data-theme="dark"] .app-toast {
  border-color: rgba(255, 190, 125, .22);
  background: rgba(28, 20, 16, .9);
  color: #fff3e7;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .42);
}

/* Full connection page: app choice is an explicit step, never a modal. */
.device-connection-page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top, 0px)) 16px max(10px, env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
}
.connection-page-open { overflow: hidden !important; }
.connection-page-open .bottom-nav { display: none !important; }
.device-connection-page > .page-back {
  position: relative;
  top: auto;
  width: 40px;
  height: 40px;
  margin-bottom: clamp(3px, 1vh, 8px);
  font-size: 25px;
}
.device-connection-header {
  display: block;
  margin: 0 0 clamp(8px, 1.6vh, 14px);
  text-align: center;
}
.device-connection-header .eyebrow { margin-bottom: 4px; font-size: clamp(10px, 1.6vh, 12px); }
.device-connection-header h2 {
  margin: 0 0 clamp(4px, .8vh, 8px);
  font-size: clamp(28px, 5.2vh, 38px);
  letter-spacing: -.035em;
}
.device-connection-header > p:last-child {
  max-width: 520px;
  margin: 0 auto;
  color: #765f50;
  font-size: clamp(14px, 2.15vh, 17px);
  line-height: 1.3;
}
.device-connection-page .device-client-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(8px, 1.5vh, 13px);
}
.device-connection-page .quick-client-card {
  padding: clamp(10px, 1.7vh, 15px);
  border: 1px solid rgba(229,198,168,.84);
  border-radius: 20px;
  background: rgba(255,252,247,.76);
  box-shadow: 0 12px 30px rgba(79,39,18,.09);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  backdrop-filter: blur(14px) saturate(115%);
}
.device-connection-page .quick-client-card > .quick-client-heading {
  display: grid;
  grid-template-columns: clamp(42px, 6.8vh, 54px) minmax(0, 1fr);
  align-items: center;
  column-gap: 11px;
  margin: 0 0 clamp(7px, 1.2vh, 11px);
}
.device-connection-page .quick-client-heading img {
  grid-row: 1 / 3;
  width: clamp(42px, 6.8vh, 54px);
  height: clamp(42px, 6.8vh, 54px);
  border-radius: 14px;
}
.device-connection-page .quick-client-heading strong {
  font-size: clamp(20px, 3.2vh, 24px);
  line-height: 1.05;
}
.device-connection-page .quick-client-heading small {
  margin-top: 2px;
  color: #856e5e;
  font-size: clamp(12px, 1.9vh, 14px);
}
.device-connection-page .quick-client-card > .quick-client-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.device-connection-page .quick-client-buttons .button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(45px, 6.7vh, 54px);
  margin: 0;
  padding: 9px 8px;
  border-radius: 14px;
  font-size: clamp(14px, 2.15vh, 16px);
  line-height: 1.18;
  white-space: normal;
}
.device-connection-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: clamp(8px, 1.4vh, 13px);
}
.device-connection-tools .button {
  min-height: clamp(43px, 6vh, 49px);
  margin: 0;
  font-size: clamp(13px, 1.9vh, 15px);
}
.device-connection-page .device-install-hint {
  margin: clamp(7px, 1.2vh, 12px) 2px 0;
  color: #765f50;
  font-size: clamp(12px, 1.8vh, 14px);
  line-height: 1.3;
}
.device-import-recovery {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(230, 108, 32, .4);
  border-radius: 16px;
  background: rgba(255, 143, 63, .1);
}
.device-import-recovery strong { display: block; font-size: 16px; }
.device-import-recovery p { margin: 5px 0 0; font-size: 13px; line-height: 1.35; }
.device-import-recovery-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}
.device-import-recovery .button { width: 100%; margin: 0; }
.device-connection-page > .cancel-pending-device {
  width: min(360px, 100%);
  margin: clamp(9px, 1.4vh, 13px) auto 0;
}
.device-connection-bottom {
  display: none;
}
.device-connection-page .detected-platform[hidden] { display: none !important; }
.device-download-picker { min-width: 0; }
.device-download-picker > .eyebrow { margin: 0 0 4px; font-size: clamp(10px, 1.6vh, 12px); }
.device-download-picker > h3 {
  margin: 0 0 clamp(9px, 1.5vh, 14px);
  font-size: clamp(18px, 2.8vh, 22px);
  line-height: 1.2;
}
.device-platform-list { display: grid; gap: clamp(8px, 1.4vh, 12px); }
.device-platform-list > button {
  display: grid;
  grid-template-columns: clamp(42px, 6.8vh, 52px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: clamp(68px, 10vh, 82px);
  border: 1px solid rgba(229,198,168,.9);
  border-radius: 19px;
  padding: 10px 13px;
  background: rgba(255,252,247,.78);
  color: #17120f;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(79,39,18,.08);
}
.platform-logo {
  display: grid;
  place-items: center;
  width: clamp(42px, 6.8vh, 52px);
  height: clamp(42px, 6.8vh, 52px);
  border-radius: 14px;
  background: #fff;
}
.apple-logo { background: #111; color: #fff; font-size: clamp(27px, 4.5vh, 35px); line-height: 1; }
.google-play-logo svg { width: 29px; height: 33px; }
.huawei-logo img { width: 34px; height: 34px; object-fit: contain; }
.device-platform-list strong,
.device-platform-list small { display: block; }
.device-platform-list strong { font-size: clamp(17px, 2.6vh, 21px); line-height: 1.15; }
.device-platform-list small { margin-top: 4px; color: #856e5e; font-size: clamp(12px, 1.8vh, 14px); line-height: 1.2; }
.device-platform-list b { color: #b84b14; font-size: 29px; line-height: 1; }
.device-download-back { min-height: clamp(44px, 6.5vh, 52px); margin-top: clamp(10px, 1.7vh, 15px); font-size: 15px; }
html[data-theme="dark"] .device-download-picker > h3 { color: #fff4e8; }
html[data-theme="dark"] .device-platform-list > button {
  border-color: rgba(255,183,112,.17);
  background: rgba(25,18,15,.84);
  color: #fff4e8;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
}
html[data-theme="dark"] .platform-logo { background: #fff; }
html[data-theme="dark"] .apple-logo { background: #050505; color: #fff; }
html[data-theme="dark"] .device-platform-list small { color: #c9a78e; }
html[data-theme="dark"] .device-connection-page { color: #fff4e8; }
html[data-theme="dark"] .device-import-recovery { background: rgba(255, 143, 63, .12); }
html[data-theme="dark"] .device-connection-header > p:last-child,
html[data-theme="dark"] .device-connection-page .device-install-hint,
html[data-theme="dark"] .device-connection-page .quick-client-heading small { color: #c9a78e; }
html[data-theme="dark"] .device-connection-page .quick-client-card {
  border-color: rgba(255,183,112,.17);
  background: rgba(25,18,15,.84);
  box-shadow: 0 12px 30px rgba(0,0,0,.24);
}
@media (max-width: 370px) {
  .device-connection-page { padding-inline: 12px; }
  .device-connection-page .quick-client-buttons .button { padding-inline: 6px; font-size: 13.5px; }
}
@media (max-height: 610px) {
  .device-connection-page > .page-back { width: 36px; height: 36px; margin-bottom: 2px; }
  .device-connection-header .eyebrow { display: none; }
  .device-connection-page .quick-client-card { padding-block: 9px; }
  .device-connection-page .device-install-hint { display: none; }
  .device-platform-list > button { min-height: 61px; padding-block: 7px; }
  .device-download-back { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-toast { transition: opacity .01s linear; }
}

/* Telegram Desktop/macOS must scroll the document, not clip it to WebView's
   initial viewport. Keep enough room for the fixed navigation at the end. */
html {
  height: auto !important;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto !important;
}
body {
  height: auto !important;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: visible !important;
}
main,
.tab-sheet,
.devices-page,
.balance-page,
.plans-page,
.referrals-page,
.profile-page,
.information-page,
.admin-page {
  padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}

.referrals-page { position: relative; z-index: 1; }
.referrals-lead { margin-bottom: 16px; color: #765f50; line-height: 1.45; }
.referral-reward { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 18px; }
.referral-reward div { padding: 14px 11px; border: 1px solid rgba(229,198,168,.84); border-radius: 16px; background: rgba(255,253,249,.53); text-align: center; }
.referral-reward strong, .referral-reward span { display: block; }
.referral-reward strong { color: #dc591b; font-size: 21px; }
.referral-reward span { margin-top: 4px; color: #765f50; font-size: 12.65px; line-height: 1.25; }
.referral-link-label { display: block; margin-bottom: 8px; color: #4d382d; font-size: 14.95px; font-weight: 800; }
.referral-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.referral-link-row input { min-width: 0; padding: 12px; border: 1px solid #d8c2b1; border-radius: 12px; background: rgba(255,255,255,.72); color: #4d382d; font: inherit; font-size: 12.65px; }
.referral-link-row button { padding: 0 12px; border: 0; border-radius: 12px; background: #17120f; color: #fff4e8; font: inherit; font-size: 12.65px; font-weight: 800; cursor: pointer; }
.referral-rule { margin: 14px 0 0; color: #856e5e; font-size: 12.65px; line-height: 1.45; }
.referral-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 18px; }
.referral-stats div { min-width: 0; padding: 11px 7px; border-radius: 14px; background: rgba(255,239,220,.72); text-align: center; }
.referral-stats span, .referral-stats strong { display: block; }
.referral-stats span { color: #765f50; font-size: 11.5px; }
.referral-stats strong { margin-top: 5px; overflow-wrap: anywhere; font-size: 18.4px; }
.referral-list { display: grid; gap: 8px; }
.referral-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid rgba(184,75,20,.18); }
.referral-list article:last-child { border-bottom: 0; }
.referral-list strong, .referral-list small { display: block; }
.referral-list small { margin-top: 3px; color: #856e5e; font-size: 11.5px; }
.referral-list article > span { max-width: 150px; color: #856e5e; font-size: 11.5px; font-weight: 750; line-height: 1.3; text-align: right; }
.referral-list article > span.rewarded { color: #238449; }
html[data-theme="dark"] .referral-reward div,
html[data-theme="dark"] .referral-stats div { border-color: rgba(255,183,112,.16); background: rgba(255,255,255,.055); }
html[data-theme="dark"] .referral-link-row input { border-color: rgba(255,183,112,.2); background: rgba(255,255,255,.07); color: #fff4e8; }
html[data-theme="dark"] .referral-link-row button { background: #fff0df; color: #211610; }
html[data-theme="dark"] .referral-reward strong { color: #ffad67; }
html[data-theme="dark"] .referral-reward span,
html[data-theme="dark"] .referral-rule,
html[data-theme="dark"] .referral-stats span,
html[data-theme="dark"] .referral-list small,
html[data-theme="dark"] .referral-list article > span { color: #c9a78e; }
html[data-theme="dark"] .referral-list article > span.rewarded { color: #7ed79d; }
@media (max-width: 380px) {
  .referral-link-row { grid-template-columns: 1fr; }
  .referral-link-row button { min-height: 42px; }
  .referral-stats { grid-template-columns: 1fr; }
  .referral-stats div { display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .referral-stats strong { margin: 0; }
}


/* Remnawave clients use a real page inside the administrator section. */
.admin-page.users-page-open > *:not(#admin-users-view):not(#admin-user-editor):not(#admin-user-message) { display: none !important; }
.admin-users-page[hidden] { display: none !important; }
.admin-users-search { display: grid; gap: 8px; margin: 12px 0 16px; font-size: 13px; }
.admin-users-search input { width: 100%; min-width: 0; min-height: 46px; box-sizing: border-box; padding: 12px 14px; border: 1px solid currentColor; border-radius: 14px; color: inherit; background: transparent; font: inherit; font-size: 16px; }
.admin-users-search input::placeholder { color: inherit; opacity: .65; }
.admin-users-page { position: relative; min-height: calc(100dvh - 150px); padding-top: 1px; }
.admin-users-page-header { margin: 4px 0 14px 44px; }
.admin-users-page-header h2 { font-size: 22px; }
.admin-users-page .admin-list { overflow: visible; }
.admin-users-page .admin-user-row { gap: 9px; padding: 10px 0; }
.admin-user-row > div:first-child { min-width: 0; flex: 1 1 auto; }
.admin-users-page .admin-user-row strong { font-size: 13px; line-height: 1.25; }
.admin-users-page .admin-user-row small { margin-top: 3px; font-size: 11px; line-height: 1.35; }
.admin-user-row-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.admin-users-page .admin-user-row-actions button { min-height: 34px; border-radius: 9px; padding: 6px 9px; font-size: 11px; line-height: 1.1; }
.admin-user-edit { border: 1px solid #df6e28; border-radius: 10px; padding: 7px 10px; background: #df6e28; color: #fff8f1; font: inherit; font-size: 13.8px; font-weight: 800; cursor: pointer; }
.admin-user-edit:disabled { opacity: .45; cursor: not-allowed; }
.admin-user-editor-dialog { width: min(92vw, 480px); overflow-y: auto; }
.admin-user-edit-form { display: grid; gap: 9px; }
.admin-user-edit-form label { margin-top: 4px; color: #4d2a18; font-size: 14.95px; font-weight: 850; }
.admin-user-edit-form select,
.admin-user-edit-form input[type="text"] { box-sizing: border-box; width: 100%; min-height: 50px; border: 1px solid rgba(126,82,49,.34); border-radius: 13px; padding: 11px 12px; background: rgba(255,255,255,.72); color: #17120f; font: inherit; font-weight: 700; }
.admin-user-edit-hint { margin: 4px 0 0; color: #765f50; font-size: 12.65px; line-height: 1.4; }
.admin-user-edit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 6px; }
.admin-user-edit-actions .button { width: 100%; margin: 0; }
html[data-theme="dark"] .admin-user-edit { border-color: #ffad67; background: #ffad67; color: #24140c; }
html[data-theme="dark"] .admin-user-edit-form label { color: #f4d8c3; }
html[data-theme="dark"] .admin-user-edit-form select,
html[data-theme="dark"] .admin-user-edit-form input[type="text"] { border-color: rgba(255,183,112,.2); background: rgba(255,255,255,.07); color: #fff4e8; }
html[data-theme="dark"] .admin-user-edit-hint { color: #c9a78e; }
@media (max-width: 560px) {
  .admin-users-page-header { margin-left: 42px; }
  .admin-user-row { align-items: flex-start; flex-direction: column; }
  .admin-user-row-actions { width: 100%; }
  .admin-user-row-actions button { flex: 1 1 0; min-height: 38px; }
}

/* Live VPN nodes use a dedicated administrator page. */
.admin-page.nodes-page-open > *:not(#admin-nodes-view) { display: none !important; }
.admin-page.surveys-page-open > *:not(#admin-surveys-view) { display: none !important; }
.admin-nodes-page[hidden] { display: none !important; }
.admin-nodes-page { position: relative; min-height: calc(100dvh - 150px); padding-top: 1px; }
.admin-nodes-page-header { margin: 4px 0 14px 44px; }
.admin-nodes-page-header h2 { font-size: 22px; }
.admin-nodes-page .admin-description { margin-bottom: 3px; }
.admin-nodes-updated { margin: 0 0 13px; color: #856e5e; font-size: 10.5px; }
.admin-nodes-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.admin-node-card { padding: 14px; border: 1px solid rgba(184,75,20,.18); border-radius: 17px; background: rgba(255,255,255,.52); box-shadow: 0 8px 24px rgba(104,52,20,.07); }
.admin-node-card.is-warning { border-color: rgba(210,143,24,.48); }
.admin-node-card.is-critical { border-color: rgba(190,48,37,.58); box-shadow: 0 8px 24px rgba(160,35,27,.1); }
.admin-node-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.admin-node-heading > div { min-width: 0; }
.admin-node-heading strong { display: block; color: #21150f; font-size: 15px; line-height: 1.25; }
.admin-node-heading small { display: block; margin-top: 4px; color: #856e5e; font-size: 11px; overflow-wrap: anywhere; }
.admin-node-status { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: rgba(39,142,85,.11); color: #237b4b; font-size: 10.5px; font-weight: 850; }
.admin-node-status.is-warning { background: rgba(210,143,24,.13); color: #9a650b; }
.admin-node-status.is-critical { background: rgba(190,48,37,.11); color: #a52f27; }
.admin-node-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.admin-node-metrics div { min-width: 0; padding: 10px; border-radius: 13px; background: rgba(224,105,35,.08); }
.admin-node-metrics span { display: block; min-height: 29px; color: #765f50; font-size: 10.5px; font-weight: 750; line-height: 1.3; }
.admin-node-metrics strong { display: block; margin-top: 4px; color: #27170f; font-size: 17px; line-height: 1.1; overflow-wrap: anywhere; }
.admin-node-resources { display: grid; gap: 9px; margin-top: 12px; }
.admin-node-resources p { display: flex; align-items: center; justify-content: space-between; margin: 0 1px 5px; color: #765f50; font-size: 10.5px; }
.admin-node-resources p strong { color: #35241b; font-size: 11px; }
.admin-node-resource-track { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(105,56,27,.1); }
.admin-node-resource-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#36a564,#63c88b); }
.admin-node-card.is-warning .admin-node-resource-track i { background: linear-gradient(90deg,#e0a323,#f2c45d); }
.admin-node-card.is-critical .admin-node-resource-track i { background: linear-gradient(90deg,#c23d32,#eb746b); }
.admin-node-core { margin: 10px 1px 0; color: #856e5e; font-size: 10.5px; font-weight: 750; }
.admin-node-core.is-healthy { color: #237b4b; }
.admin-node-core.is-warning { color: #9a650b; }
.admin-node-core.is-critical { color: #a52f27; }
.admin-nodes-empty { margin: 18px 0; color: #765f50; text-align: center; }
.admin-nodes-close { width: 100%; margin: 14px 0 0; }
html[data-theme="dark"] .admin-node-card { border-color: rgba(255,183,112,.16); background: rgba(255,255,255,.055); box-shadow: 0 10px 26px rgba(0,0,0,.2); }
html[data-theme="dark"] .admin-node-card.is-warning { border-color: rgba(242,196,93,.48); }
html[data-theme="dark"] .admin-node-card.is-critical { border-color: rgba(235,116,107,.55); }
html[data-theme="dark"] .admin-node-heading strong,
html[data-theme="dark"] .admin-node-metrics strong,
html[data-theme="dark"] .admin-node-resources p strong { color: #fff4e8; }
html[data-theme="dark"] .admin-node-heading small,
html[data-theme="dark"] .admin-node-metrics span,
html[data-theme="dark"] .admin-node-resources p,
html[data-theme="dark"] .admin-node-core,
html[data-theme="dark"] .admin-nodes-empty,
html[data-theme="dark"] .admin-nodes-updated { color: #c9a78e; }
html[data-theme="dark"] .admin-node-status,
html[data-theme="dark"] .admin-node-core.is-healthy { color: #7ed79d; }
html[data-theme="dark"] .admin-node-status.is-warning { color: #f2c45d; }
html[data-theme="dark"] .admin-node-status.is-critical { color: #ff8a82; }
html[data-theme="dark"] .admin-node-core.is-warning { color: #f2c45d; }
html[data-theme="dark"] .admin-node-core.is-critical { color: #ff8a82; }
html[data-theme="dark"] .admin-node-metrics div { background: rgba(255,173,103,.075); }
html[data-theme="dark"] .admin-node-resource-track { background: rgba(255,255,255,.09); }
@media (min-width: 760px) {
  .admin-nodes-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .admin-nodes-page-header { margin-left: 42px; }
}

.admin-node-rkn { margin: 8px 0 0; padding: 7px 10px; border-radius: 11px; background: rgba(210,143,24,.14); color: #8a5a08; font-size: 11px; font-weight: 800; line-height: 1.35; }
html[data-theme="dark"] .admin-node-rkn { background: rgba(242,196,93,.12); color: #f2c45d; }

/* Owner's manual block check on the «Ноды» page (21.11.2026). */
.admin-block-check { margin: 0 0 14px; padding: 14px; border: 1px solid rgba(184,75,20,.18); border-radius: 17px; background: rgba(255,255,255,.52); }
.admin-block-check-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-block-check-head h3 { margin: 0; color: #21150f; font-size: 15px; }
.admin-block-check-head small { display: block; margin-top: 3px; color: #856e5e; font-size: 11px; }
.admin-block-check-head > div { min-width: 0; }
.admin-page .admin-block-check-head .button { flex: 0 0 auto; width: auto; height: 38px; min-height: 38px; margin: 0; padding: 0 16px; font-size: 13px; }
.admin-block-check-head .button:disabled { opacity: .6; cursor: progress; }
.admin-block-check-status { margin: 10px 0 0; color: #765f50; font-size: 11.5px; line-height: 1.45; }
.admin-block-check-list { display: grid; gap: 6px; margin-top: 10px; }
.admin-block-check-list:empty { display: none; }
.admin-block-check-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(224,105,35,.07); }
.admin-block-check-row.freeze { background: rgba(210,143,24,.13); }
.admin-block-check-row.reset, .admin-block-check-row.blocked { background: rgba(190,48,37,.1); }
.admin-block-check-icon { font-size: 13px; line-height: 1; }
.admin-block-check-row strong { display: block; color: #27170f; font-size: 12.5px; line-height: 1.25; overflow-wrap: anywhere; }
.admin-block-check-row small { display: block; margin-top: 2px; color: #765f50; font-size: 10.5px; line-height: 1.3; }
.admin-block-check-row em { color: #856e5e; font-size: 10.5px; font-style: normal; font-variant-numeric: tabular-nums; white-space: nowrap; }
html[data-theme="dark"] .admin-block-check { border-color: rgba(255,183,112,.16); background: rgba(255,255,255,.055); }
html[data-theme="dark"] .admin-block-check-head h3,
html[data-theme="dark"] .admin-block-check-row strong { color: #fff4e8; }
html[data-theme="dark"] .admin-block-check-head small,
html[data-theme="dark"] .admin-block-check-status,
html[data-theme="dark"] .admin-block-check-row small,
html[data-theme="dark"] .admin-block-check-row em { color: #c9a78e; }
html[data-theme="dark"] .admin-block-check-row { background: rgba(255,173,103,.075); }
html[data-theme="dark"] .admin-block-check-row.freeze { background: rgba(242,196,93,.12); }
html[data-theme="dark"] .admin-block-check-row.reset,
html[data-theme="dark"] .admin-block-check-row.blocked { background: rgba(235,116,107,.12); }


/* Subscription groups inside the Remnawave users window. */
.admin-user-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0 0 14px; }
.admin-user-filters button { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-width: 0; min-height: 40px; border: 1px solid rgba(126,82,49,.26); border-radius: 11px; padding: 7px 10px; background: rgba(255,255,255,.54); color: #4d2a18; font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer; }
.admin-user-filters button:first-child { grid-column: 1 / -1; }
.admin-user-filters button b { display: grid; flex: 0 0 auto; place-items: center; min-width: 24px; height: 24px; border-radius: 999px; background: rgba(224,105,35,.12); color: #b34f18; font-size: 11px; }
.admin-user-filters button[aria-pressed="true"] { border-color: #17120f; background: #17120f; color: #fff4e8; }
.admin-user-filters button[aria-pressed="true"] b { background: rgba(255,255,255,.16); color: #fff4e8; }
.admin-users-empty { padding: 18px 0; text-align: center; }
html[data-theme="dark"] .admin-user-filters button { border-color: rgba(255,183,112,.18); background: rgba(255,255,255,.055); color: #f7dfcc; }
html[data-theme="dark"] .admin-user-filters button b { background: rgba(255,173,103,.12); color: #ffb77b; }
html[data-theme="dark"] .admin-user-filters button[aria-pressed="true"] { border-color: #fff0df; background: #fff0df; color: #211610; }
html[data-theme="dark"] .admin-user-filters button[aria-pressed="true"] b { background: rgba(33,22,16,.12); color: #211610; }


/* Direct administrator message for clients without a public Telegram username. */
.admin-user-message-dialog { width: min(92vw, 480px); overflow-y: auto; }
.admin-user-message-form { display: grid; gap: 9px; }
.admin-user-message-form label { color: #4d2a18; font-size: 13px; font-weight: 850; }
.admin-user-message-form textarea { box-sizing: border-box; width: 100%; min-height: 132px; resize: vertical; border: 1px solid rgba(126,82,49,.34); border-radius: 13px; padding: 11px 12px; background: rgba(255,255,255,.72); color: #17120f; font: inherit; font-size: 13px; line-height: 1.4; }
html[data-theme="dark"] .admin-user-message-form label { color: #f4d8c3; }
html[data-theme="dark"] .admin-user-message-form textarea { border-color: rgba(255,183,112,.2); background: rgba(255,255,255,.07); color: #fff4e8; }

/* One-time contextual tour for new Mini App users. */
.onboarding-overlay[hidden] { display: none !important; }
.onboarding-overlay { position: fixed; z-index: 180; inset: 0; pointer-events: auto; }
body.onboarding-open { overflow: hidden; }
.onboarding-highlight { position: fixed; z-index: 0; border: 3px solid #ffad73; border-radius: 22px; background: rgba(255,141,70,.055); box-shadow: 0 0 0 200vmax rgba(20,12,8,.58), 0 0 0 6px rgba(255,141,70,.14), 0 0 28px rgba(255,121,43,.68), inset 0 0 16px rgba(255,255,255,.08); pointer-events: none; transition: left .42s cubic-bezier(.16,1,.3,1), top .42s cubic-bezier(.16,1,.3,1), width .42s cubic-bezier(.16,1,.3,1), height .42s cubic-bezier(.16,1,.3,1), border-radius .42s cubic-bezier(.16,1,.3,1); }
.onboarding-popover { position: fixed; z-index: 1; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 10px 12px; width: min(calc(100vw - 36px), 350px); padding: 13px 14px 12px; border: 3px solid transparent; border-radius: 21px; background: linear-gradient(145deg,rgba(255,255,255,.99),rgba(255,246,239,.98)) padding-box, linear-gradient(115deg,#ff5a18,#ff9f43,#ffd07a,#f36a20,#ffb34f,#ff5a18) border-box; background-size: 100% 100%,260% 260%; color: #26160f; box-shadow: 0 18px 46px rgba(0,0,0,.3),0 0 24px rgba(242,105,32,.2),inset 0 1px 0 rgba(255,255,255,.94); animation: onboarding-border-flow 4.5s ease-in-out infinite; }
.onboarding-popover::before { content: ""; position: absolute; left: var(--onboarding-arrow-left,45px); width: 13px; height: 13px; border: 2px solid #ff9844; background: #fffaf6; transform: rotate(45deg); }
.onboarding-popover[data-position="below"]::before { top: -9px; border-right: 0; border-bottom: 0; }
.onboarding-popover[data-position="above"]::before { bottom: -9px; border-left: 0; border-top: 0; }
.onboarding-popover.is-entering { animation: onboarding-arrive .48s cubic-bezier(.16,1,.3,1), onboarding-border-flow 4.5s ease-in-out infinite; }
.onboarding-progress { grid-column: 1 / 3; display: grid; grid-template-columns: repeat(5,1fr); gap: 5px; height: 3px; margin: 0 2px 2px; }
.onboarding-progress i { display: block; overflow: hidden; border-radius: 99px; background: #eadbd1; }
.onboarding-progress i::after { content: ""; display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ff9b55,#e95f22); transition: width .35s ease; }
.onboarding-progress i.is-complete::after { width: 100%; }
.onboarding-icon { display: grid; place-items: center; align-self: start; width: 40px; height: 40px; border-radius: 13px; background: linear-gradient(145deg,#fff0e5,#ffe0c9); box-shadow: inset 0 1px 0 rgba(255,255,255,.34),0 5px 14px rgba(232,92,24,.14); font-size: 24px; }
.onboarding-copy { display: grid; gap: 4px; padding-top: 1px; }
.onboarding-copy h2 { margin: 0; color: #26160f; font-size: 17px; font-weight: 850; line-height: 1.2; letter-spacing: -.012em; }
.onboarding-copy p { margin: 0; color: #5f4031; font-size: 13px; font-weight: 700; line-height: 1.42; }
.onboarding-actions { grid-column: 1 / 3; display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 2px; }
.onboarding-actions button { min-height: 38px; border: 0; border-radius: 12px; padding: 8px 13px; font: inherit; font-size: 13px; font-weight: 850; cursor: pointer; }
#onboarding-skip { background: transparent; color: #715244; }
#onboarding-next { background: linear-gradient(135deg,#ff873e,#db5018); color: #fff; box-shadow: 0 6px 15px rgba(217,80,24,.26),inset 0 1px 0 rgba(255,255,255,.25); }
#onboarding-counter { color: #8e674f; font-size: 11px; font-weight: 800; white-space: nowrap; }
@keyframes onboarding-arrive { 0% { opacity: 0; transform: translateY(13px) scale(.965); } 65% { opacity: 1; transform: translateY(-2px) scale(1.005); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes onboarding-border-flow { 0%,100% { background-position: 0 0,0% 50%; } 50% { background-position: 0 0,100% 50%; } }
html[data-theme="dark"] .onboarding-popover { background: linear-gradient(145deg,rgba(52,34,26,.99),rgba(35,22,17,.99)) padding-box, linear-gradient(115deg,#ff5a18,#ff9f43,#ffd07a,#f36a20,#ffb34f,#ff5a18) border-box; background-size: 100% 100%,260% 260%; color: #fff4e8; box-shadow: 0 18px 46px rgba(0,0,0,.48),0 0 25px rgba(242,105,32,.2),inset 0 1px 0 rgba(255,255,255,.06); }
html[data-theme="dark"] .onboarding-popover::before { background: #34221a; }
html[data-theme="dark"] .onboarding-progress i { background: #594035; }
html[data-theme="dark"] .onboarding-icon { background: linear-gradient(145deg,#503023,#382219); }
html[data-theme="dark"] .onboarding-copy h2 { color: #fff4e8; }
html[data-theme="dark"] .onboarding-copy p { color: #ead2c1; }
html[data-theme="dark"] #onboarding-skip { color: #d4b7a4; }
html[data-theme="dark"] #onboarding-counter { color: #d0ae97; }
@media (max-width: 380px) { .onboarding-popover { width: calc(100vw - 24px); padding-inline: 12px; } }
@media (prefers-reduced-motion: reduce) { .onboarding-highlight,.onboarding-popover,.onboarding-progress i::after { transition: none; animation: none; } }

/* Filterable immutable audit journal. */
.admin-page.audit-page-open > *:not(#admin-audit-view) { display: none !important; }
.admin-audit-page[hidden] { display: none !important; }
.admin-audit-page { position: relative; min-height: calc(100dvh - 150px); padding-top: 1px; }
.admin-audit-header { margin: 4px 0 14px 44px; }
.admin-audit-header h2 { font-size: 22px; }
.admin-audit-toolbar { display: grid; gap: 9px; margin-bottom: 10px; }
.admin-audit-toolbar label > span { display: block; margin: 0 0 5px; color: #765f50; font-size: 11px; font-weight: 800; }
.admin-audit-search input,
.admin-audit-selects select { box-sizing: border-box; width: 100%; min-height: 40px; border: 1px solid rgba(126,82,49,.25); border-radius: 11px; padding: 8px 10px; background: rgba(255,255,255,.58); color: #271a13; font: inherit; font-size: 12px; }
.admin-audit-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.admin-audit-categories { display: flex; gap: 6px; margin: 0 -2px 12px; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.admin-audit-categories::-webkit-scrollbar { display: none; }
.admin-audit-categories button { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; min-height: 34px; border: 1px solid rgba(126,82,49,.22); border-radius: 999px; padding: 6px 9px; background: rgba(255,255,255,.52); color: #57321f; font: inherit; font-size: 10.5px; font-weight: 800; cursor: pointer; }
.admin-audit-categories button b { min-width: 18px; color: #b64d17; font-size: 10px; }
.admin-audit-categories button[aria-pressed="true"] { border-color: #24170f; background: #24170f; color: #fff4e8; }
.admin-audit-categories button[aria-pressed="true"] b { color: #ffbb82; }
.admin-audit-list { display: grid; gap: 9px; }
.admin-audit-event { padding: 12px; border: 1px solid rgba(184,75,20,.18); border-radius: 15px; background: rgba(255,255,255,.48); box-shadow: 0 7px 24px rgba(104,52,20,.06); }
.admin-audit-event-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.admin-audit-event-heading strong { font-size: 13px; line-height: 1.25; }
.admin-audit-event-heading time { flex: 0 0 auto; color: #856e5e; font-size: 9.5px; line-height: 1.3; text-align: right; }
.admin-audit-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.admin-audit-badges span { padding: 3px 7px; border-radius: 999px; background: rgba(223,110,40,.1); color: #9e4216; font-size: 9.5px; font-weight: 850; }
.admin-audit-badges .actor-client { background: rgba(39,142,85,.11); color: #237b4b; }
.admin-audit-badges .actor-admin { background: rgba(113,83,201,.12); color: #6547b8; }
.admin-audit-badges .actor-system { background: rgba(77,102,127,.12); color: #425d76; }
.admin-audit-target { margin: 8px 0 0; color: #5e3926; font-size: 10.5px; font-weight: 750; overflow-wrap: anywhere; }
.admin-audit-event-summary { margin: 5px 0 0; color: #271a13; font-size: 11.5px; line-height: 1.4; }
.admin-audit-event details { margin-top: 8px; border-top: 1px solid rgba(184,75,20,.13); padding-top: 7px; }
.admin-audit-event summary { color: #b14c19; font-size: 10.5px; font-weight: 800; cursor: pointer; }
.admin-audit-event dl { display: grid; grid-template-columns: minmax(105px, .8fr) minmax(0, 1.2fr); gap: 5px 9px; margin: 8px 0 0; }
.admin-audit-event dt { color: #856e5e; font-size: 9.5px; }
.admin-audit-event dd { margin: 0; color: #35241b; font-size: 9.5px; font-weight: 700; overflow-wrap: anywhere; }
.admin-audit-more { width: 100%; min-height: 40px; margin: 12px 0 0; font-size: 12px; }
html[data-theme="dark"] .admin-audit-toolbar label > span,
html[data-theme="dark"] .admin-audit-event-heading time,
html[data-theme="dark"] .admin-audit-event dt { color: #c9a78e; }
html[data-theme="dark"] .admin-audit-search input,
html[data-theme="dark"] .admin-audit-selects select,
html[data-theme="dark"] .admin-audit-categories button,
html[data-theme="dark"] .admin-audit-event { border-color: rgba(255,183,112,.16); background: rgba(255,255,255,.055); color: #fff4e8; }
html[data-theme="dark"] .admin-audit-categories button[aria-pressed="true"] { border-color: #fff0df; background: #fff0df; color: #211610; }
html[data-theme="dark"] .admin-audit-target { color: #e0bfa7; }
html[data-theme="dark"] .admin-audit-event-summary,
html[data-theme="dark"] .admin-audit-event dd { color: #fff4e8; }
html[data-theme="dark"] .admin-audit-event details { border-color: rgba(255,183,112,.14); }
@media (max-width: 380px) {
  .admin-audit-selects { grid-template-columns: 1fr; }
  .admin-audit-event-heading { display: block; }
  .admin-audit-event-heading time { display: block; margin-top: 3px; text-align: left; }
}

/* Animated FOXXXY brand selected for the main header. */
.topbar .brand-title-animated {
  display: flex;
  min-width: 0;
  align-items: center;
  flex: 1 1 auto;
  overflow: visible;
  font-style: normal;
  text-shadow: none;
}
.brand-fx-frame {
  position: relative;
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  margin-right: 9px;
  place-items: center;
  border-radius: 16px;
  background: #ead8ca;
  box-shadow: 0 7px 18px rgba(26, 13, 7, .09);
  animation: brand-green-pulse 4s ease-in-out infinite;
}
.brand-fx-mark {
  display: grid;
  width: 51px;
  height: 51px;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 250, 245, .96);
}
.brand-fx-mark svg { display: block; width: 44px; height: 39px; }
.brand-fx-mark path:first-child { fill: #21150f; }
.brand-fx-mark path:last-child { fill: #ed681a; }
.brand-copy { display: block; min-width: 0; }
.topbar .brand-word {
  --brand-letter-base: #17100c;
  --brand-letter-highlight: #ed681a;
  --brand-letter-glow: 0 0 10px rgba(237, 104, 26, .42);
  display: block;
  color: var(--brand-letter-base);
  background: none;
  -webkit-text-fill-color: currentColor;
  font-family: "Arial Black", "Arial Rounded MT Bold", sans-serif;
  font-size: clamp(30px, 8.2vw, 43px);
  font-weight: 950;
  line-height: .86;
  letter-spacing: -.065em;
  white-space: nowrap;
}
.brand-letter {
  display: inline-block;
  color: var(--brand-letter-base);
  -webkit-text-fill-color: currentColor;
  animation: brand-letter-flow 4.8s ease-in-out infinite;
}
.brand-letter:nth-child(2) { animation-delay: .14s; }
.brand-letter:nth-child(3) { animation-delay: .28s; }
.brand-letter:nth-child(4) { animation-delay: .42s; }
.brand-letter:nth-child(5) { animation-delay: .56s; }
.brand-letter:nth-child(6) { animation-delay: .70s; }
.brand-vpn {
  position: relative;
  display: inline-block;
  margin-left: 5px;
  padding: 3px 5px;
  overflow: hidden;
  border-radius: 6px;
  background: #ed681a;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .34em;
  font-weight: 900;
  letter-spacing: .08em;
  vertical-align: middle;
}
.brand-vpn::after {
  content: '';
  position: absolute;
  inset: -8px auto -8px -18px;
  width: 10px;
  background: rgba(255,255,255,.62);
  transform: skewX(-24deg);
  animation: brand-vpn-shine 4.8s ease-in-out infinite;
}
.brand-subtitle {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  color: #876a5a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 8.5px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .14em;
  white-space: nowrap;
}
.brand-paw {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #ed681a;
  filter: drop-shadow(0 3px 5px rgba(223, 85, 31, .2));
  transform: rotate(-15deg);
  animation: brand-paw-step 4s ease-in-out infinite;
}
.brand-paw svg { display: block; width: 20px; height: 20px; fill: currentColor; }
html[data-theme="dark"] .brand-fx-frame { background: #51372b; }
html[data-theme="dark"] .brand-fx-mark { background: rgba(25, 17, 14, .96); }
html[data-theme="dark"] .brand-fx-mark path:first-child { fill: #fff6ef; }
html[data-theme="dark"] .topbar .brand-word {
  --brand-letter-base: #fff4e8;
  --brand-letter-highlight: #ff7625;
  --brand-letter-glow: 0 0 10px rgba(255, 118, 37, .46);
}
html[data-theme="dark"] .brand-subtitle { color: #cfad98; }
@keyframes brand-green-pulse {
  0%, 18%, 100% { background: #ead8ca; box-shadow: 0 7px 18px rgba(26, 13, 7, .09); }
  48%, 62% { background: #31d278; box-shadow: 0 0 0 2px rgba(49, 210, 120, .26), 0 0 24px rgba(36, 204, 112, .43), 0 8px 22px rgba(22, 152, 85, .26); }
}
html[data-theme="dark"] .brand-fx-frame { animation-name: brand-green-pulse-dark; }
@keyframes brand-green-pulse-dark {
  0%, 18%, 100% { background: #51372b; box-shadow: 0 7px 18px rgba(0, 0, 0, .22); }
  48%, 62% { background: #31d278; box-shadow: 0 0 0 2px rgba(49, 210, 120, .26), 0 0 24px rgba(36, 204, 112, .48), 0 8px 22px rgba(22, 152, 85, .3); }
}
@keyframes brand-word-flow {
  0%, 14% { background-position: 115% 0; }
  68%, 100% { background-position: -15% 0; }
}
@keyframes brand-letter-flow {
  0%, 9%, 38%, 100% {
    color: var(--brand-letter-base);
    transform: translateY(0);
    text-shadow: none;
  }
  18%, 27% {
    color: var(--brand-letter-highlight);
    transform: translateY(0);
    text-shadow: var(--brand-letter-glow);
  }
}
@keyframes brand-vpn-shine {
  0%, 58% { left: -18px; }
  72%, 100% { left: 120%; }
}
@keyframes brand-paw-step {
  0%, 62%, 100% { opacity: .58; transform: rotate(-15deg) scale(.9); }
  72%, 84% { opacity: 1; transform: rotate(-10deg) scale(1.12); }
}
@media (max-width: 370px) {
  .topbar { padding-inline: 9px; }
  .brand-fx-frame { flex-basis: 48px; width: 48px; height: 48px; margin-right: 6px; border-radius: 13px; }
  .brand-fx-mark { width: 42px; height: 42px; border-radius: 10px; }
  .brand-fx-mark svg { width: 37px; height: 32px; }
  .topbar .brand-word { font-size: clamp(28px, 8.2vw, 33px); }
  .brand-subtitle { gap: 4px; font-size: 6.5px; letter-spacing: .08em; }
  .brand-paw, .brand-paw svg { width: 17px; height: 17px; }
  .topbar-actions { gap: 4px; }
  .header-theme-toggle, .menu-toggle { width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-fx-frame, .brand-word, .brand-letter, .brand-vpn::after, .brand-paw { animation: none !important; }
}

/* Solid orange letters remain visible even without background-clip support. */
html[data-theme="light"] .topbar .brand-word {
  --brand-letter-base: #d94d0c;
  --brand-letter-highlight: #f58a32;
  --brand-letter-glow: 0 0 5px rgba(255, 173, 91, .24);
  color: #d94d0c;
  background: none;
  -webkit-text-fill-color: #d94d0c;
  filter: drop-shadow(0 1px 0 rgba(126, 45, 7, .18));
}
html[data-theme="light"] .topbar .brand-vpn {
  -webkit-text-fill-color: #fff;
}

.payment-method-crypto-icon { background: #fff6e8; }
.payment-methods .payment-method-crypto { grid-column: 1 / -1; flex-direction: row; min-height: 86px; gap: 12px; }
.payment-methods .payment-method-crypto .payment-method-icon { flex: 0 0 55px; margin: 0; }
.payment-method-option > small.payment-method-fee { background: #fff0d9; color: #a34b13; }
html[data-theme="dark"] .payment-method-option > small.payment-method-fee { background: #4a2b18; color: #ffc38c; }
/* In-app setup guide shown when a personal device link is ready. */
.device-guide-platforms { margin: 13px 0 19px; }
.device-guide-platforms h3, .device-guide-step, .device-guide-finish h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; color: #2b190f; font-size: 18px; line-height: 1.25; }
.device-guide-platforms h3 span, .device-guide-step span, .device-guide-finish h3 span { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; background: #ff9c52; color: #271409; font-size: 15px; font-weight: 900; }
.device-guide-platforms > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.device-guide-platforms button { min-width: 0; min-height: 49px; padding: 8px 4px; border: 1px solid #e6b693; border-radius: 13px; background: rgba(255,250,245,.85); color: #57331f; font: inherit; font-size: 12px; font-weight: 850; cursor: pointer; }
.device-guide-platforms button.selected { border: 2px solid #eb7227; background: #ffe1c5; color: #351a0e; box-shadow: 0 0 0 2px rgba(239,116,42,.16); }
.device-connection-page .device-guide-note { margin: 0 0 11px; color: #805b45; font-size: 13px; }
.device-guide-finish { margin: 14px 0 4px; padding: 14px; border: 1px solid rgba(228,154,105,.65); border-radius: 16px; background: rgba(255,220,183,.35); }
.device-connection-page .device-guide-finish p { margin: 0; color: #66442f; font-size: 13px; line-height: 1.45; }
html[data-theme="dark"] .device-guide-platforms h3, html[data-theme="dark"] .device-guide-step, html[data-theme="dark"] .device-guide-finish h3 { color: #fff4e8; }
html[data-theme="dark"] .device-guide-platforms button { border-color: #69422c; background: #291c16; color: #edd2be; }
html[data-theme="dark"] .device-guide-platforms button.selected { border-color: #ff9d4b; background: #59301c; color: #fff2e6; }
html[data-theme="dark"] .device-connection-page .device-guide-note, html[data-theme="dark"] .device-connection-page .device-guide-finish p { color: #d5b49d; }
html[data-theme="dark"] .device-guide-finish { border-color: #6c4229; background: rgba(85,45,23,.34); }

/* Full connection guide mirrors the personal subscription page inside Mini App. */
.device-connection-page {
  max-width: 800px;
  background: radial-gradient(circle at 78% -8%, #71351f 0, transparent 32%), radial-gradient(circle at 3% 57%, #402316 0, transparent 40%), #140f0d;
  color: #fff7f0;
  padding: max(18px, env(safe-area-inset-top, 0px)) 18px max(35px, env(safe-area-inset-bottom, 0px));
}
.device-connection-page > .page-back { border: 1px solid #684630; background: #241a15; color: #fff7f0; }
.device-connection-page .device-connection-header { margin: 4px 0 22px; text-align: left; }
.device-connection-page .device-connection-header .eyebrow { display: block; margin: 0 0 6px; color: #ffa055; font-size: 13px; font-weight: 900; letter-spacing: .16em; }
.device-connection-page .device-connection-header h2 { margin: 0 0 5px; color: #fff7f0; font-size: clamp(28px, 6vw, 41px); }
.device-connection-page .device-connection-header > p:last-child { margin: 0; color: #c9ac9b; font-size: 15px; }
.device-guide-ready { display: flex; flex-direction: column; gap: 3px; margin: 0 0 23px; padding: 17px 19px; border: 1px solid #89502f; border-radius: 18px; background: #422719; }
.device-guide-ready strong { color: #fff7f0; font-size: 17px; }
.device-guide-ready span { color: #ddbeaa; font-size: 13px; }
.device-connection-page .device-guide-platforms h3, .device-connection-page .device-guide-step { color: #fff7f0; font-size: 19px; }
.device-connection-page .device-guide-platforms h3 span, .device-connection-page .device-guide-step span { background: #ffa253; }
.device-connection-page .device-guide-platforms > div { gap: 8px; }
.device-connection-page .device-guide-platforms button { min-height: 51px; border: 1px solid #6a4533; background: #2a201c; color: #e1cabb; font-size: 12px; }
.device-connection-page .device-guide-platforms button.selected { border: 2px solid #ffa45a; background: #653418; color: #fff7f0; box-shadow: 0 0 0 2px rgba(251,141,57,.17); }
.device-connection-page .device-guide-note { margin: 0 0 13px; color: #d4baaa; font-size: 13px; }
.device-connection-page .device-client-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; margin: 0 0 27px; }
.device-connection-page .quick-client-card { display: flex; align-items: center; min-width: 0; min-height: 76px; padding: 12px; border: 1px solid #63412e; border-radius: 18px; background: #231a17; color: #f9eee8; text-align: left; box-shadow: none; cursor: pointer; }
.device-connection-page .quick-client-card.selected { border-color: #ff9d4b; background: #382117; box-shadow: 0 0 0 2px #d96728, 0 8px 24px #ea682024; }
.device-connection-page .quick-client-card:disabled { opacity: .48; cursor: not-allowed; }
.device-connection-page .quick-client-card > .quick-client-heading { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 0 9px; align-items: center; margin: 0; min-width: 0; }
.device-connection-page .quick-client-heading img { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 12px; }
.device-connection-page .quick-client-heading strong { display: block; color: #fff7f0; font-size: 18px; }
.device-connection-page .quick-client-heading small { display: block; color: #c8a899; font-size: 11px; }
.device-guide-check { display: none; margin-left: auto; width: 23px; height: 23px; flex: none; border-radius: 50%; background: #ff9f4c; color: #21130c; text-align: center; line-height: 23px; font-weight: 900; }
.device-connection-page .quick-client-card.selected .device-guide-check { display: block; }
.device-connection-page .device-guide-step { margin-bottom: 13px; }
.device-guide-selected { display: grid; gap: 11px; }
.device-guide-action { display: grid; grid-template-columns: 39px minmax(0,1fr); gap: 13px; padding: 17px; border: 1px solid #62402d; border-radius: 18px; background: #241a16; }
.device-guide-number { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: #ffa253; color: #2a150b; font-size: 20px; font-weight: 900; }
.device-guide-action h4 { margin: 1px 0 5px; color: #fff7f0; font-size: 18px; }
.device-connection-page .device-guide-action p { margin: 0; color: #d2b9a8; font-size: 13px; line-height: 1.48; }
.device-guide-action .button { min-height: 46px; margin: 14px 0 0; padding: 10px 16px; border: 1px solid #ffb376; border-radius: 13px; background: linear-gradient(120deg,#ffad5b,#f0702f); color: #2b170d; font-size: 14px; font-weight: 900; }
.device-guide-fallback { margin: 18px 0 0; padding: 18px; border: 1px dashed #8c583b; border-radius: 18px; background: #2c201a; }
.device-guide-fallback > strong { color: #fff7f0; font-size: 16px; }
.device-connection-page .device-guide-fallback .device-install-hint { display: block; margin: 7px 0 11px; color: #cbb2a2; font-size: 13px; }
.device-connection-page .device-connection-tools { margin: 0; }
.device-connection-page .device-connection-tools .button, .device-connection-page #device-connection-help, .device-connection-page .cancel-pending-device, .device-connection-page .device-connection-bottom { border: 1px solid #9b5a33; background: #38251c; color: #ffd1a8; box-shadow: none; }
.device-connection-page #device-connection-help { margin-top: 16px; }
.device-connection-page .device-import-recovery { border-color: #a75327; background: #402418; color: #fff7f0; }
.device-connection-page .device-import-recovery strong { color: #fff7f0; }
.device-connection-page .device-import-recovery p { color: #d2b9a8; }
.device-connection-page .device-guide-legacy-actions[hidden], .device-connection-page .quick-client-card[hidden] { display: none !important; }
@media (max-width: 410px) {
  .device-connection-page { padding-inline: 13px; }
  .device-connection-page .device-guide-platforms button { font-size: 11px; padding-inline: 2px; }
  .device-connection-page .quick-client-card { padding: 9px; }
  .device-connection-page .quick-client-card > .quick-client-heading { grid-template-columns: 37px minmax(0,1fr); gap: 0 6px; }
  .device-connection-page .quick-client-heading img { width: 37px; height: 37px; }
  .device-connection-page .quick-client-heading strong { font-size: 16px; }
}
.device-guide-url { margin: 0 0 12px; padding: 11px 13px; overflow: hidden; border-radius: 10px; background: #1b1512; color: #f6bd91; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="dark"] .device-connection-page .quick-client-card { border-color: #63412e; background: #231a17; box-shadow: none; }
html[data-theme="dark"] .device-connection-page .quick-client-card.selected { border-color: #ff9d4b; background: #382117; box-shadow: 0 0 0 2px #d96728, 0 8px 24px #ea682024; }
html[data-theme="dark"] .device-connection-page .device-guide-platforms button { border-color: #6a4533; background: #2a201c; color: #e1cabb; }
html[data-theme="dark"] .device-connection-page .device-guide-platforms button.selected { border-color: #ffa45a; background: #653418; color: #fff7f0; }

/* Device platform tiles: branded option 3. */
.device-connection-page .device-guide-platforms > .device-platform-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 104px));
  justify-content: center;
  gap: 10px;
}
html[data-theme] .device-connection-page .device-guide-platforms .device-platform-tiles > button,
.device-connection-page .device-guide-platforms .device-platform-tiles > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  padding: 8px 4px;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 17px;
  color: #fff7f0;
  font-size: 12px;
  line-height: 1.12;
  box-shadow: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
html[data-theme] .device-connection-page .device-guide-platforms .device-platform-tiles > button[data-guide-platform="ios"],
.device-connection-page .device-guide-platforms .device-platform-tiles > button[data-guide-platform="ios"] { background: #333639; }
html[data-theme] .device-connection-page .device-guide-platforms .device-platform-tiles > button[data-guide-platform="android"],
.device-connection-page .device-guide-platforms .device-platform-tiles > button[data-guide-platform="android"] { background: #253f20; }
html[data-theme] .device-connection-page .device-guide-platforms .device-platform-tiles > button[data-guide-platform="huawei"],
.device-connection-page .device-guide-platforms .device-platform-tiles > button[data-guide-platform="huawei"] { background: #4c2228; }
html[data-theme] .device-connection-page .device-guide-platforms .device-platform-tiles > button.selected,
.device-connection-page .device-guide-platforms .device-platform-tiles > button.selected {
  border-color: #ffae6c;
  box-shadow: 0 0 0 2px rgba(255,151,75,.4), 0 9px 25px rgba(255,134,66,.25);
}
.device-connection-page .device-platform-tiles > button:active { transform: scale(.96); }
.device-connection-page .device-platform-tiles > button:focus-visible { outline: 3px solid #ffd3ad; outline-offset: 4px; }
.device-platform-logo { display: grid; place-items: center; flex: none; width: 46px; height: 46px; }
html[data-theme="dark"] .device-platform-logo.apple-logo, .device-platform-logo.apple-logo { background: transparent; color: #fff; font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 52px; line-height: 1; }
.device-platform-logo.android-logo { color: #a4d975; }
.device-platform-logo.android-logo svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.device-platform-logo.huawei-logo { padding: 5px; border-radius: 9px; background: #fff; }
.device-platform-logo.huawei-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.device-platform-label { display: block; max-width: 100%; color: #fff7f0; font-weight: 850; text-align: center; }
@media (max-width: 360px) {
  .device-connection-page .device-guide-platforms > .device-platform-tiles { gap: 7px; }
  .device-platform-logo { width: 40px; height: 40px; }
  .device-platform-logo.apple-logo { font-size: 46px; }
  .device-connection-page .device-guide-platforms .device-platform-tiles > button { font-size: 11px; }
}


/* Tariff headers and device selection. */
.plan-option[hidden] { display: none; }
.plan-option > div.plan-heading:first-of-type > .plan-eyebrow {
  display: block; margin-bottom: 5px; color: #bd5a23; font-size: 10.5px;
  font-weight: 900; letter-spacing: .14em;
}
.plan-option > div.plan-heading:first-of-type > .plan-heading-title > strong {
  display: block; color: #2b170d; font-size: clamp(22px, 5vw, 26px);
  font-weight: 950; letter-spacing: -.035em; line-height: 1.1;
}
.plan-option.featured > div.plan-heading:first-of-type > .plan-heading-title > strong { color: #af4815; }
.plan-heading-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 11px; }
.plan-option .plan-heading-title .plan-current-badge,
.plans-current-trial {
  border: 1px solid #5dc98b; border-radius: 999px;
  background: #e9fff0; color: #12643d;
  font-size: 11px; font-weight: 850; letter-spacing: .01em;
}
.plan-option .plan-heading-title .plan-current-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px;
  line-height: 1.1; white-space: nowrap;
}
.plan-current-badge::before, .plans-current-trial::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #22bc67; box-shadow: 0 0 7px rgba(34,188,103,.55);
}
.plan-current-badge[hidden], .plans-current-trial[hidden] { display: none !important; }
.plans-current-trial {
  display: flex; align-items: center; gap: 7px; width: fit-content;
  margin: 0 0 13px; padding: 8px 11px; border-radius: 12px;
}
.plans-current-trial strong { color: inherit; font-size: 12px; }
.plan-option > div.plan-heading:first-of-type > .plan-description {
  display: block; margin-top: 8px; color: #654535; font-size: 14px;
  font-weight: 680; line-height: 1.45;
}
.max-device-summary {
  display: grid; place-items: center; min-height: 54px;
  margin-top: 14px; padding: 10px 14px;
  border: 1px solid #63d990; border-radius: 13px;
  background: linear-gradient(120deg, #e6fff0, #f3fff7);
  color: #116436; text-align: center;
}
.max-device-summary > span { font-size: 16px; font-weight: 950; letter-spacing: .01em; }
.max-device-summary > small { margin-top: 4px; color: inherit; font-size: 12px; font-weight: 650; line-height: 1.4; }
.max-device-summary.has-saved-devices {
  animation: foxxxy-max-count-glow 4.8s ease-in-out infinite;
}
@keyframes foxxxy-max-count-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(42, 205, 105, .24), 0 0 10px rgba(42, 205, 105, .12); }
  50% { box-shadow: 0 0 0 2px rgba(42, 224, 112, .72), 0 0 22px rgba(42, 224, 112, .5); }
}
.renewal-device-checklist .renewal-device-row {
  border-color: #9ccfb0; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.renewal-device-checklist .renewal-device-row:has(input:checked) {
  border-color: #2dd779; background: linear-gradient(115deg, #e6fff0, #f3fff6);
  box-shadow: 0 0 0 1px rgba(39, 203, 106, .4), 0 0 18px rgba(39, 203, 106, .22);
}
.renewal-device-checklist .renewal-open-slot {
  border-style: dashed; border-color: #e68d57; background: #fff2e8;
  cursor: default;
}
.renewal-open-slot-icon {
  display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px;
  border-radius: 7px; background: #ffac65; color: #532308; font-size: 22px; font-weight: 850;
}
.renewal-device-checklist .renewal-open-slot strong { color: #9c4523; }
.renewal-device-checklist .renewal-open-slot small { white-space: normal; }
.renewal-buy-slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 100%; min-height: 66px; margin: 12px 0 0; padding: 10px 14px;
  border: 2px solid #ec8b4b; border-radius: 14px;
  background: linear-gradient(130deg, #fff0df, #ffd4af); color: #713316;
  box-shadow: 0 6px 16px rgba(224,105,42,.13); cursor: pointer;
}
.renewal-buy-slot[hidden] { display: none; }
.renewal-buy-slot strong { font-size: 15px; font-weight: 950; }
.renewal-buy-slot span { font-size: 12px; font-weight: 720; }
.renewal-buy-slot:active { transform: translateY(1px); }
.renewal-buy-slot:focus-visible { outline: 3px solid #e56827; outline-offset: 3px; }
.renewal-buy-slot:disabled { opacity: .6; cursor: wait; }
.renewal-device-checklist .renewal-device-row input {
  appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 24px;
  width: 24px; height: 24px; margin: 0; border: 2px solid #30bc6e;
  border-radius: 7px; background: #f6fff8; cursor: pointer;
}
.renewal-device-checklist .renewal-device-row input:checked {
  border-color: #1aac5e; background: linear-gradient(140deg, #84f2a3, #20c66f);
  box-shadow: 0 0 0 2px rgba(49, 221, 112, .2), 0 0 13px rgba(32, 198, 111, .65);
  animation: foxxxy-green-check-glow 2.2s ease-in-out infinite;
}
.renewal-device-checklist .renewal-device-row input:checked::after {
  content: '✓'; position: absolute; inset: -3px 0 0; color: #093e22;
  font-size: 20px; font-weight: 950; text-align: center;
}
.renewal-device-checklist .renewal-device-row input:focus-visible {
  outline: 3px solid #087b44; outline-offset: 3px;
}
@keyframes foxxxy-green-check-glow {
  50% { box-shadow: 0 0 0 3px rgba(49, 221, 112, .3), 0 0 22px rgba(32, 198, 111, .9); }
}
html[data-theme="dark"] .plan-option > div.plan-heading:first-of-type > .plan-eyebrow { color: #ffb17b; }
html[data-theme="dark"] .plan-option > div.plan-heading:first-of-type > .plan-heading-title > strong { color: #fff5eb; }
html[data-theme="dark"] .plan-option.featured > div.plan-heading:first-of-type > .plan-heading-title > strong { color: #ffad70; }
html[data-theme="dark"] .plan-option .plan-heading-title .plan-current-badge,
html[data-theme="dark"] .plans-current-trial {
  border-color: #438d62; background: #193523; color: #a4efbc;
}
html[data-theme="dark"] .plan-option > div.plan-heading:first-of-type > .plan-description { color: #ead1be; }
html[data-theme="dark"] .max-device-summary {
  border-color: #4bd981; background: linear-gradient(120deg, #173c29, #153322);
  color: #a7f7c5;
}
html[data-theme="dark"] .renewal-device-checklist .renewal-device-row { border-color: #327a51; }
html[data-theme="dark"] .renewal-device-checklist .renewal-open-slot {
  border-color: #a65f3b; background: #33241d;
}
html[data-theme="dark"] .renewal-device-checklist .renewal-open-slot strong { color: #ffc49e; }
html[data-theme="dark"] .renewal-buy-slot {
  border-color: #fa9b59; background: linear-gradient(130deg, #43291b, #5a311e);
  color: #ffe0c7; box-shadow: 0 6px 18px rgba(0,0,0,.22);
}
html[data-theme="dark"] .renewal-device-checklist .renewal-device-row:has(input:checked) {
  border-color: #39e485; background: linear-gradient(115deg, #173d2a, #1d3025);
  box-shadow: 0 0 0 1px rgba(49, 221, 112, .5), 0 0 20px rgba(49, 221, 112, .28);
}
html[data-theme="dark"] .renewal-device-checklist .renewal-device-row input { border-color: #5ada91; background: #183022; }
html[data-theme="dark"] .renewal-device-checklist .renewal-device-row input:checked { border-color: #65eca0; background: linear-gradient(140deg, #84f2a3, #20c66f); }
@media (prefers-reduced-motion: reduce) {
  .renewal-device-checklist .renewal-device-row input:checked { animation: none; }
}


/* Branded confirmations and text input replace browser-native prompts. */
.foxxxy-action-dialog {
  box-sizing: border-box; width: min(90vw, 390px); max-width: none;
  margin: auto; padding: 24px 22px 20px; border: 1px solid #efc8a8;
  border-radius: 24px; background: linear-gradient(155deg, #fffdf8, #fff0df);
  color: #21130c; text-align: center;
  box-shadow: 0 24px 70px rgba(36, 19, 8, .32);
}
.foxxxy-action-dialog::backdrop { background: rgba(28, 16, 10, .64); backdrop-filter: blur(5px); }
.foxxxy-action-fox {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 11px;
  border: 1px solid #ffbd7b; border-radius: 17px;
  background: linear-gradient(135deg, #ffb76c, #f06e2b);
  box-shadow: 0 8px 20px rgba(224, 100, 32, .25); font-size: 28px;
}
.foxxxy-action-eyebrow { display: block; color: #b34b17; font-size: 10px; font-weight: 950; letter-spacing: .16em; }
.foxxxy-action-dialog h2 { margin: 7px 0 9px; font-size: clamp(22px, 6vw, 27px); font-weight: 950; line-height: 1.12; }
.foxxxy-action-dialog p { margin: 0 0 15px; color: #6c4a37; font-size: 14px; line-height: 1.48; }
.foxxxy-action-highlight {
  margin: 0 0 17px; padding: 13px 14px; border: 1px solid #f2c39b;
  border-radius: 14px; background: #fff6ec; color: #7b3715;
  font-size: 14px; font-weight: 800; line-height: 1.45; white-space: pre-line;
}
.foxxxy-action-highlight[hidden] { display: none; }
.foxxxy-action-buttons { display: grid; gap: 9px; }
.foxxxy-action-buttons .button { width: 100%; min-height: 50px; margin: 0; font-size: 15px; font-weight: 900; }
.foxxxy-action-input {
  box-sizing: border-box; width: 100%; min-height: 48px; margin: 0 0 6px;
  padding: 10px 13px; border: 1px solid #d9aa86; border-radius: 12px;
  background: #fffdfa; color: #21130c; font: inherit; font-size: 16px;
}
.foxxxy-action-input:focus-visible { outline: 3px solid #ff9c52; outline-offset: 2px; }
html[data-theme="dark"] .foxxxy-action-dialog {
  border-color: #885237; background: linear-gradient(155deg, #2e201a, #211712);
  color: #fff3e8; box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
}
html[data-theme="dark"] .foxxxy-action-eyebrow { color: #ffae76; }
html[data-theme="dark"] .foxxxy-action-dialog p { color: #e4c6b1; }
html[data-theme="dark"] .foxxxy-action-highlight { border-color: #955737; background: #41281c; color: #ffd1ab; }
html[data-theme="dark"] .foxxxy-action-input { border-color: #865139; background: #211610; color: #fff3e8; }

@media (prefers-reduced-motion: reduce) {
  .max-device-summary.has-saved-devices { animation: none; box-shadow: 0 0 0 2px rgba(42, 205, 105, .5); }
}
.device-open-slot {
  display: flex; align-items: center; gap: 11px; margin: 12px 0; padding: 12px;
  border: 1.5px dashed #e89259; border-radius: 15px;
  background: linear-gradient(120deg, #fff8f0, #ffead8);
}
.device-open-slot-icon {
  display: grid; place-items: center; flex: 0 0 35px; width: 35px; height: 35px;
  border-radius: 11px; background: #ffac65; color: #59250d;
  font-size: 25px; font-weight: 750; line-height: 1;
}
.device-open-slot-info { display: grid; gap: 3px; min-width: 0; flex: 1; }
.device-open-slot-info strong { color: #472316; font-size: 14px; line-height: 1.2; }
.device-open-slot-info span { color: #8b5b40; font-size: 12px; line-height: 1.25; }
.connect-paid-slot {
  flex: 0 0 auto; min-height: 36px; padding: 7px 10px; border: 1px solid #e98345;
  border-radius: 10px; background: #fff8f0; color: #9a481e;
  font: inherit; font-size: 12px; font-weight: 850; cursor: pointer;
}
.connect-paid-slot:active { transform: translateY(1px); }
.connect-paid-slot:focus-visible { outline: 3px solid #ee8848; outline-offset: 2px; }
html[data-theme="dark"] .device-open-slot { border-color: #a85e32; background: linear-gradient(120deg, #271d18, #38251a); }
html[data-theme="dark"] .device-open-slot-info strong { color: #fff1e5; }
html[data-theme="dark"] .device-open-slot-info span { color: #caa78f; }
html[data-theme="dark"] .connect-paid-slot { border-color: #a85e32; background: #342219; color: #ffbf91; }

/* FOXXXY ULTRA follows the existing tariff cards. */
.ultra-plan { background: linear-gradient(145deg, #fff7e6, #ffe5c9); }
.ultra-plan .plan-heading-title > strong { letter-spacing: -.04em; }
.ultra-duration-grid { grid-template-columns: 1fr; }
.ultra-term-note { margin: 12px 0 0; font-size: 12px; line-height: 1.5; opacity: .75; }
html[data-theme="dark"] .ultra-plan { background: linear-gradient(145deg, #33291d, #3d291d); }

.buy-ultra-entry { width: 100%; margin: 10px 0 0; font-size: 14px; }

/* Keep the first action visible and easy to tap on narrow phone screens. */
.onboarding-trial .onboarding-actions { flex-wrap: wrap; }
.onboarding-trial #onboarding-next { order: -1; flex: 0 0 100%; min-height: 46px; font-size: 15px; }

/* Renewal customer counts on the main administrator screen. */
.admin-renewal-list { display: grid; gap: 7px; }
.admin-renewal-row { display: flex; align-items: center; gap: 11px; padding: 13px 12px; border-radius: 12px; background: rgba(91,50,27,.045); }
.admin-renewal-row > div { flex: 1; min-width: 0; }
.admin-renewal-row div > span { display: block; font-size: 12px; font-weight: 700; line-height: 1.4; }
.admin-renewal-row small { display: block; margin-top: 3px; font-size: 10px; line-height: 1.4; color: #8e6c58; }
.admin-renewal-row strong { flex: 0 0 auto; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.7px; }
.admin-renewal-dot { flex: 0 0 7px; height: 7px; border-radius: 50%; background: #db752f; }
.admin-renewal-row.repeat .admin-renewal-dot { background: #4f996b; }
.admin-renewal-row.lost .admin-renewal-dot { background: #9b9188; }
.admin-renewal-val { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.admin-renewal-val em { font-style: normal; font-size: 12px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: #b4553f; }
.admin-renewal-val em:empty { display: none; }
.admin-renewal-note { margin: 12px 2px 0; font-size: 10px; line-height: 1.5; color: #8e6c58; }
html[data-theme="dark"] .admin-renewal-row { background: rgba(0,0,0,.18); }
html[data-theme="dark"] .admin-renewal-row small, html[data-theme="dark"] .admin-renewal-note { color: #c9a78e; }
/* Owner, 22.10: devices and places can be removed so the next renewal skips them. */
.renewal-together-note { margin: 0 0 8px; font-size: 12px; line-height: 1.3; color: #8b5b40; }
.renewal-remove, .release-paid-slot {
  flex: 0 0 auto; margin-left: auto; min-height: 32px; padding: 5px 9px; border: 1px solid #d9b8a3;
  border-radius: 9px; background: transparent; color: #9a481e;
  font: inherit; font-size: 12px; font-weight: 750; cursor: pointer;
}
.release-paid-slot { margin-left: 6px; }
.renewal-remove:active, .release-paid-slot:active { transform: translateY(1px); }
html[data-theme="dark"] .renewal-together-note { color: #e8c9b4; }
html[data-theme="dark"] .renewal-remove, html[data-theme="dark"] .release-paid-slot { border-color: #7a4a30; color: #ffb98c; }

.admin-bot-blocked { display: block; color: var(--warning, #b45309); font-size: 0.8rem; line-height: 1.3; }
