:root {
  --bg: #111827;
  --card: #1f2937;
  --card2: #263243;
  --line: rgba(255,255,255,0.07);
  --tx: #f3f4f6;
  --mut: #9ca3af;
  --mut2: #6b7280;
  --blue: #4c9bff;
  --blue2: #3b82f6;
  --violet: #7c6cff;
  --green: #22c55e;
  --orange: #f59e0b;
  --red: #ef4444;
  --pink: #d946ef;
  --gold1: #fcd56b;
  --gold2: #e4a52c;
  --shadow: 0 8px 24px rgba(0,0,0,0.25);
}
:root[data-theme="light"] {
  --bg: #eef1f6;
  --card: #ffffff;
  --card2: #f3f5f9;
  --line: rgba(15,23,42,0.08);
  --tx: #0f172a;
  --mut: #64748b;
  --mut2: #94a3b8;
  --shadow: 0 6px 18px rgba(15,23,42,0.08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font: 15px/1.35 Inter, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: var(--tx); }
#app { padding: 14px 14px 120px; max-width: 560px; margin: 0 auto; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.sec-title { font-size: 12.5px; font-weight: 800; letter-spacing: 1.2px; color: var(--mut); text-transform: uppercase; margin: 22px 4px 10px; }
.label { font-size: 15px; font-weight: 700; color: var(--mut); margin: 18px 4px 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--mut); }
.icon-box { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-box svg { width: 22px; height: 22px; }
.round { border-radius: 50%; }

.hello { padding: 16px; display: flex; align-items: center; gap: 14px; }
.avatar { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; background: #374151; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; color: #cbd5e1; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.ring { box-shadow: 0 0 0 3px #7c6cff; }
.hello h1 { margin: 0; font-size: 22px; font-weight: 800; }
.hello h1 b { color: var(--blue); }
.support { width: 44px; height: 44px; border-radius: 12px; background: rgba(20,184,166,0.15); border: 1px solid rgba(20,184,166,0.4); color: #2dd4bf; display: flex; align-items: center; justify-content: center; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { padding: 16px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--c); display: flex; align-items: center; gap: 12px; }
.stat .icon-box { background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.stat small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .8px; color: var(--mut); }
.stat b { display: block; font-size: 30px; font-weight: 800; color: var(--c); line-height: 1.1; }

.list { overflow: hidden; }
.item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px; text-align: left; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .t { font-weight: 800; font-size: 16.5px; }
.item .d { color: var(--mut); font-size: 14px; margin-top: 2px; }
.chev { color: var(--mut2); flex-shrink: 0; }

.seg { display: flex; padding: 6px; gap: 6px; background: var(--card2); border-radius: 14px; }
.seg button { flex: 1; padding: 11px 6px; border-radius: 10px; color: var(--mut); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--card); color: var(--blue); box-shadow: inset 0 0 0 1px var(--line); }
.hint { text-align: center; color: var(--mut); font-size: 13.5px; margin-top: 12px; }

.nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); width: min(540px, calc(100% - 16px)); height: 80px; background: rgba(17,24,39,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.08); border-radius: 30px; display: flex; align-items: center; justify-content: space-around; padding: 0 4px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,0.45); }
:root[data-theme="light"] .nav { background: rgba(255,255,255,0.94); border-color: rgba(15,23,42,0.08); }
.nav button { flex: 1; height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--mut2); border-radius: 26px; transition: background .2s, color .2s; min-width: 0; }
.nav button svg { width: 24px; height: 24px; }
.nav button.on { background: var(--blue2); color: #fff; box-shadow: 0 6px 20px rgba(59,130,246,0.5); flex: 1.15; }
.nav.alt button.on { background: linear-gradient(135deg, #4f8cff, #8b5cf6); }

.head-card { padding: 20px; display: flex; align-items: center; gap: 12px; }
.head-card h2 { margin: 0; font-size: 28px; font-weight: 800; }
.head-card.sm h2 { font-size: 20px; }
.pill { padding: 12px 20px; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 800; box-shadow: 0 6px 18px rgba(76,155,255,0.45); white-space: nowrap; }
.pill.violet { background: rgba(124,108,255,0.18); color: #b6abff; border: 1px solid rgba(124,108,255,0.45); box-shadow: none; }
.back-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--card2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.empty { padding: 34px 16px; text-align: center; }
.empty .icon-box { margin: 0 auto 14px; width: 64px; height: 64px; border-radius: 18px; background: rgba(20,184,166,0.15); color: #2fb5b5; }
.empty b { display: block; font-size: 16.5px; }
.empty span { color: #2fb5c8; font-size: 14px; }
.empty span.m { color: var(--mut); }

.gcard { padding: 16px; margin-bottom: 12px; }
.gav { width: 54px; height: 54px; border-radius: 50%; background: #e14b2c; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; overflow: hidden; flex-shrink: 0; }
.gav img { width: 100%; height: 100%; object-fit: cover; }
.gcard .t { font-weight: 800; font-size: 17px; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--mut); font-size: 13.5px; font-weight: 600; margin-top: 3px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--mut2); display: inline-block; }
.status.ok i { background: var(--green); }
.status.ok { color: var(--green); }
.chip-row { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--card2); display: flex; align-items: center; gap: 10px; color: var(--mut); font-weight: 700; }
.chip-row b { margin-left: auto; color: var(--orange); }
.wide-btn { margin-top: 14px; width: 100%; padding: 14px; border-radius: 12px; background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.35); color: var(--blue); font-weight: 800; }

.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--mut); font-weight: 700; padding: 8px 2px; margin-bottom: 8px; }
.toggle { width: 58px; height: 34px; border-radius: 17px; background: #374151; position: relative; flex-shrink: 0; transition: background .2s; }
.toggle::after { content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #9ca3af; transition: transform .2s, background .2s; }
.toggle.on { background: var(--violet); box-shadow: 0 0 14px rgba(124,108,255,0.5); }
.toggle.on::after { transform: translateX(24px); background: #fff; }
.toggle:disabled { opacity: .4; }
.frow { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.frow:last-child { border-bottom: 0; }
.ficon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ficon svg { width: 17px; height: 17px; }
.frow .t { font-weight: 800; font-size: 16.5px; }
.frow .d { color: var(--mut); font-size: 13.5px; }
.box { padding: 16px; margin-bottom: 14px; }
.box-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.inner { margin-top: 12px; padding: 14px; border-radius: 14px; background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.25); display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.flabel { font-size: 12.5px; font-weight: 800; letter-spacing: 1px; color: var(--mut); margin: 16px 0 8px; text-transform: uppercase; }
textarea.inp, input.inp { width: 100%; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; outline: none; }
textarea.inp { min-height: 150px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 10px 16px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-weight: 700; color: var(--mut); }
.chips button.on { background: var(--violet); color: #fff; border-color: var(--violet); }
.btn { width: 100%; padding: 15px; border-radius: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.btn.violet { background: var(--violet); color: #fff; }
.btn.blue { background: linear-gradient(135deg, #4f8cff, #8b5cf6); color: #fff; box-shadow: 0 8px 20px rgba(99,102,241,0.4); }
.btn.danger { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); color: #f87171; }
.btn.gold { background: linear-gradient(100deg, #fde29a, #f3c34e 50%, #d99a2b); color: #1f1300; box-shadow: 0 8px 22px rgba(228,165,44,0.35); font-size: 17px; }
.btn:disabled { opacity: .5; }
.warn { color: #f87171; font-weight: 800; }

.big-num { font-size: 44px; font-weight: 800; line-height: 1.1; }
.bar { height: 8px; border-radius: 4px; background: var(--card2); overflow: hidden; margin: 10px 0 14px; }
.bar i { display: block; height: 100%; background: var(--violet); }
.kv { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 12px; background: var(--card2); margin-top: 10px; font-weight: 700; color: var(--mut); }
.kv b { color: var(--tx); }
.info-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--card2); color: var(--mut); display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }

.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 100; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--card); border-radius: 26px 26px 0 0; padding: 12px 18px calc(24px + env(safe-area-inset-bottom)); animation: up .25s cubic-bezier(.2,.8,.2,1); }
.sheet .handle { width: 42px; height: 5px; border-radius: 3px; background: var(--mut2); opacity: .5; margin: 2px auto 14px; }
.sheet h3 { margin: 0; font-size: 21px; font-weight: 800; }
.x { width: 38px; height: 38px; border-radius: 50%; background: var(--card2); display: flex; align-items: center; justify-content: center; color: var(--mut); flex-shrink: 0; }
.opt { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; margin-top: 12px; text-align: left; }
.opt.g { background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.35); }
.opt.b { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.35); }
.opt .t { font-weight: 800; }
.opt .d { color: var(--mut); font-size: 13.5px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .5; } }

#toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); background: #111; color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 600; z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90%; text-align: center; }
#toast.show { opacity: .95; }

.hero-gold { border-radius: 22px; padding: 26px 18px 20px; text-align: center; color: #fff; background: radial-gradient(circle at 70% 20%, rgba(255,255,255,0.25), transparent 40%), linear-gradient(160deg, #f6c85a, #e6a634); position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(230,166,52,0.3); }
.hero-gold .crown { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,0.22); margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; }
.hero-gold h3 { font-size: 24px; margin: 0 0 6px; }
.hero-gold .badge { display: inline-block; margin-top: 12px; padding: 7px 14px; border-radius: 999px; background: rgba(40,25,0,0.7); font-weight: 800; font-size: 13.5px; }
.ben { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--card2); border: 1px solid var(--line); margin-top: 10px; }
.ben .t { font-weight: 800; }
.ben .d { color: var(--mut); font-size: 13.5px; }
.ok-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-left: auto; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.plan { position: relative; padding: 16px 6px 12px; border-radius: 16px; background: var(--card2); border: 1.5px solid var(--line); text-align: center; }
.plan.on { border-color: #e9b949; background: rgba(233,185,73,0.08); box-shadow: 0 0 22px rgba(233,185,73,0.25); }
.plan .radio { position: absolute; top: 10px; left: 10px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--mut2); }
.plan.on .radio { border-color: #e9b949; background: radial-gradient(circle, #e9b949 45%, transparent 50%); }
.plan .dd { font-size: 28px; font-weight: 800; }
.plan .dd small { font-size: 14px; color: var(--mut); font-weight: 600; }
.plan .pr { color: #f2c14e; font-weight: 800; font-size: 15px; }
.plan .pd { color: var(--mut); font-size: 11.5px; }
.plan .disc { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: rgba(34,197,94,0.15); color: var(--green); font-weight: 800; font-size: 12px; }
.plan .best { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; background: #f2c14e; color: #2a1a00; font-size: 11px; font-weight: 800; white-space: nowrap; }
.stepper { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--card2); margin-top: 12px; }
.stepper button { width: 40px; height: 40px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 22px; font-weight: 700; }
.paytabs { display: flex; gap: 8px; padding: 6px; background: var(--card2); border-radius: 16px; margin-top: 12px; }
.paytabs button { flex: 1; padding: 13px; border-radius: 12px; font-weight: 800; color: var(--mut); }
.paytabs button.on { background: linear-gradient(135deg, #6a7bff, #7c5cff); color: #fff; }
.paytabs button:disabled { opacity: .35; }
.sum { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.sum b { font-size: 22px; }
.refcard { margin-top: 18px; padding: 16px; border-radius: 16px; border: 1.5px dashed rgba(242,193,78,0.4); background: rgba(242,193,78,0.06); display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.cardbox { border-radius: 16px; background: var(--card2); border: 1px solid var(--line); padding: 4px 14px; margin-top: 14px; }
.cardbox .r { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cardbox .r:last-child { border-bottom: 0; }
.cardbox .r b { font-size: 16px; display: flex; align-items: center; gap: 10px; }
.copy { color: var(--mut); display: flex; }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 16px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cmp td, .cmp th { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: center; font-weight: 700; }
.cmp td:first-child, .cmp th:first-child { text-align: left; color: var(--mut); }
.cmp td:last-child, .cmp th:last-child { background: rgba(242,193,78,0.08); color: #f2c14e; border-left: 1px solid rgba(242,193,78,0.3); }
.cmp tr:last-child td { border-bottom: 0; }
.no { color: #ef4444; }

.prof { padding: 14px 16px; display: flex; align-items: center; gap: 12px; border-radius: 26px; }
.free { padding: 11px 18px; border-radius: 999px; background: linear-gradient(135deg, #4f8cff, #8b5cf6); color: #fff; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.free.pro { background: linear-gradient(135deg, #fcd56b, #e4a52c); color: #2a1a00; }
.tarif-btn { display: flex; margin: 14px auto; padding: 11px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 700; align-items: center; gap: 8px; }
.ah { padding: 18px 16px; border-radius: 22px; }
.ah-head { display: flex; align-items: center; justify-content: space-between; font-weight: 800; letter-spacing: 1px; color: var(--mut); }
.ah-badge { padding: 7px 12px; border-radius: 999px; background: var(--card2); font-size: 13px; color: var(--mut); letter-spacing: 0; }
.ah-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 16px; text-align: center; }
.ah-grid div + div { border-left: 1px solid var(--line); }
.ah-grid b { font-size: 26px; display: block; }
.ah-grid span { font-size: 12px; color: var(--mut); }
.dashed { width: 100%; margin-top: 14px; padding: 20px; border-radius: 22px; border: 1.5px dashed rgba(76,155,255,0.45); color: var(--blue); font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(76,155,255,0.04); }
.feat { width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-radius: 22px; margin-top: 14px; text-align: left; }
.feat .icon-box { border-radius: 50%; width: 52px; height: 52px; background: rgba(59,130,246,0.15); color: var(--blue); }
.feat .t { font-weight: 800; font-size: 18px; }
.feat .d { color: var(--mut); font-size: 13.5px; margin-top: 2px; }
.new { padding: 5px 10px; border-radius: 999px; background: rgba(34,197,94,0.15); color: var(--green); font-weight: 800; font-size: 12px; }
.tabs3 { display: flex; gap: 6px; padding: 6px; background: var(--card); border-radius: 16px; border: 1px solid var(--line); }
.tabs3 button { flex: 1; padding: 12px; border-radius: 12px; font-weight: 800; color: var(--mut); display: flex; align-items: center; justify-content: center; gap: 6px; }
.tabs3 button.on { background: var(--blue2); color: #fff; }
.acc { width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-radius: 22px; margin-top: 14px; text-align: left; }
.adm input { margin-top: 6px; }
.adm .fl { font-size: 13px; color: var(--mut); font-weight: 700; margin-top: 12px; display: block; }
.ptable { width: 100%; font-size: 13px; border-collapse: collapse; }
.ptable td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
