/* XSHOP Роутеры — мини-апп в светлой теме (отличается от тёмного кабинета мобильного VPN) */
:root {
  --bg: #f4f7f2; --surface: #ffffff; --surface-2: #eef3ea; --line: rgba(20, 40, 10, .08);
  --text: #14200f; --muted: #6b7866; --accent: #70ff33; --accent-ink: #2a8a00; --accent-dim: rgba(112, 255, 51, .22);
  --red: #e03b3b; --red-dim: rgba(224, 59, 59, .10); --amber: #b07800; --amber-dim: rgba(255, 190, 40, .18);
  --r: 22px; --r-sm: 14px; --shadow: 0 6px 20px rgba(30, 60, 10, .08);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.45 Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; min-height: 100vh; }
[hidden] { display: none !important; }
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 45% at 50% -10%, rgba(112, 255, 51, .35), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66zm0 32L0 82V66l28 16 28-16v16L28 98z' fill='none' stroke='%232a8a00' stroke-opacity='0.07' stroke-width='1'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 70%); mask-image: linear-gradient(to bottom, black, transparent 70%); }
main { max-width: 560px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(96px + env(safe-area-inset-bottom, 0px)); }

.head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; min-height: 36px; }
.head .name { font-weight: 800; letter-spacing: .3px; }
.head .name span { color: var(--accent-ink); }
.head .title { font-weight: 800; font-size: 17px; }
.iconbtn { width: 36px; height: 36px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; border: 1px solid var(--line); color: var(--text); box-shadow: var(--shadow); cursor: pointer; flex: none; }
.hello { font-size: 22px; font-weight: 800; margin: 0 0 2px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card.click { cursor: pointer; }
.router-top { display: flex; align-items: center; gap: 12px; }
.ricon { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-dim); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.ricon.off { background: var(--red-dim); color: var(--red); }
.ricon.warn { background: var(--amber-dim); color: var(--amber); }
.rname { font-weight: 700; word-break: break-all; }
.rmac { color: var(--muted); font-size: 12px; }
.pill { margin-left: auto; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--accent-dim); color: var(--accent-ink); white-space: nowrap; }
.pill.off { background: var(--red-dim); color: var(--red); }
.pill.warn { background: var(--amber-dim); color: var(--amber); }
.pill.neutral { background: var(--surface-2); color: var(--muted); }
.meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.meta b { color: var(--text); }
.bar { height: 6px; border-radius: 6px; background: #e4ebe0; margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #3fcf00); border-radius: 6px; }
.note-red { margin-top: 12px; font-size: 13px; color: var(--red); }
.note { color: var(--muted); font-size: 12px; text-align: center; margin-top: 10px; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: var(--r-sm); padding: 14px; font: 700 15px Manrope, system-ui, sans-serif; cursor: pointer; color: var(--text); text-decoration: none; }
.btn.primary { background: var(--accent); color: #0d1a06; box-shadow: 0 8px 20px rgba(80, 200, 20, .30); }
.btn.ghost { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.btn.small { padding: 10px; font-size: 13px; margin-top: 12px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.actions { display: grid; gap: 10px; margin-bottom: 12px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; box-shadow: var(--shadow); cursor: pointer; }
.tile .t { font-weight: 700; font-size: 14px; margin-top: 8px; }
.tile .d { color: var(--muted); font-size: 12px; }
.ico { width: 34px; height: 34px; border-radius: 11px; background: var(--accent-dim); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.section { font-size: 12px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .6px; margin: 20px 4px 10px; }

.status-hero { text-align: center; padding: 22px 16px; }
.dot { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; background: radial-gradient(circle, rgba(112, 255, 51, .45), rgba(112, 255, 51, .08) 70%); }
.dot i { width: 22px; height: 22px; border-radius: 50%; background: #3fcf00; box-shadow: 0 0 18px rgba(63, 207, 0, .7); }
.dot.off { background: radial-gradient(circle, rgba(224, 59, 59, .25), rgba(224, 59, 59, .04) 70%); }
.dot.off i { background: var(--red); box-shadow: 0 0 14px rgba(224, 59, 59, .5); }
.dot.warn { background: radial-gradient(circle, rgba(255, 190, 40, .35), rgba(255, 190, 40, .05) 70%); }
.dot.warn i { background: #f0a500; box-shadow: 0 0 14px rgba(240, 165, 0, .5); }
.status-hero h2 { margin: 0 0 6px; font-size: 20px; }
.rows .row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rows .row:last-child { border-bottom: 0; }
.rows .row span { color: var(--muted); }
.rows .row b { text-align: right; word-break: break-all; }
.accent { color: var(--accent-ink); }

.plan { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); cursor: pointer; }
.plan.sel { border-color: #3fcf00; background: #f3ffe9; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #c3cdbd; flex: none; }
.plan.sel .radio { border-color: #3fcf00; box-shadow: inset 0 0 0 4px #fff; background: #3fcf00; }
.plan .pn { font-weight: 700; }
.plan .pd { color: var(--muted); font-size: 12px; }
.plan .pp { margin-left: auto; text-align: right; white-space: nowrap; }
.plan .pp b { font-size: 17px; }
.plan .pp s { display: block; color: var(--muted); font-size: 12px; }
.promo { display: flex; gap: 10px; align-items: center; background: var(--accent-dim); border-radius: var(--r-sm); padding: 12px 14px; font-size: 13px; margin-bottom: 14px; }
.field { display: block; margin-bottom: 14px; }
.field small { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px 4px; }
.field input { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px 14px; font: 500 15px Manrope, system-ui, sans-serif; color: var(--text); box-shadow: var(--shadow); }
.field input:focus { outline: 2px solid rgba(63, 207, 0, .45); }

.product img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); margin-bottom: 12px; }
.product .pt { font-weight: 800; font-size: 17px; }
.product .pr { margin: 6px 0 4px; font-size: 18px; font-weight: 800; }
.product .pr s { color: var(--muted); font-size: 14px; font-weight: 600; margin-left: 6px; }
.help h3 { margin: 0 0 8px; font-size: 16px; }
.help ol { margin: 0; padding-left: 20px; }
.help li { margin-bottom: 6px; }
.empty { text-align: center; padding: 30px 16px; }
.empty .big { font-size: 40px; margin-bottom: 8px; }

.nav { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .95); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; align-items: center; padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px)); backdrop-filter: blur(14px); z-index: 5; }
.nav a { display: grid; justify-items: center; gap: 3px; font-size: 11px; color: var(--muted); cursor: pointer; min-width: 64px; }
.nav a.on { color: var(--accent-ink); font-weight: 700; }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.loading { display: grid; place-items: center; min-height: 60vh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--accent-dim); border-top-color: #3fcf00; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); max-width: 528px; margin: 0 auto; background: #14200f; color: #fff;
  border-radius: var(--r-sm); padding: 12px 16px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); z-index: 10; }
.toast.err { background: var(--red); }
