/* Customer area: /login and /dashboard */
:root {
    --bg: #050507;
    --panel: #0b0b0f;
    --card: #101014;
    --inner: #0a0a0d;
    --line: rgba(255,255,255,.07);
    --line-2: rgba(255,255,255,.11);
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --dim: #71717a;
    --accent: #0014ff;
    --accent-2: #3b4cff;
    --accent-soft: #8f9aff;
    --ok: #4ade80;
    --warn: #e3b341;
    --bad: #f87171;
    --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
    min-height: 100vh;
    font-family: Geist, ui-sans-serif, system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(70% 50% at 50% -10%, rgba(0,20,255,.22), transparent 70%),
        radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 22px 22px,
        var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
svg { flex-shrink: 0; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 11px; font-size: 13px; font-weight: 500; color: #e4e4e7; background: rgba(255,255,255,.04); border: 1px solid var(--line-2); transition: background .2s, border-color .2s, color .2s, transform .15s, opacity .2s; white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.btn:active { transform: scale(.98); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { color: #fff; border-color: rgba(255,255,255,.14); background: linear-gradient(#2b3dff, #0014d6); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 24px -10px rgba(0,20,255,.8); }
.btn-primary:hover { background: linear-gradient(#3b4cff, #0a1de6); border-color: rgba(255,255,255,.22); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(255,255,255,.05); border-color: transparent; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,.02); transition: color .2s, background .2s, border-color .2s; }
.icon-btn:hover { color: #fff; background: rgba(255,255,255,.07); border-color: var(--line-2); }
.icon-btn svg { width: 15px; height: 15px; }
.spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* fields */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 500; color: #e4e4e7; }
.input { position: relative; }
.input input { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--inner); border: 1px solid rgba(255,255,255,.1); font-size: 14px; outline: none; transition: border-color .2s, background .2s, box-shadow .2s; }
.input input::placeholder { color: #52525b; }
.input input:focus { border-color: rgba(143,154,255,.45); box-shadow: 0 0 0 4px rgba(0,20,255,.12); background: #0c0c11; }
.input .eye { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--dim); }
.input .eye:hover { color: #fff; background: rgba(255,255,255,.05); }
.input .eye svg { width: 16px; height: 16px; }
.input input[type=password], .input.has-eye input { padding-right: 44px; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line-2); white-space: nowrap; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.2); }
.pill.warn { color: var(--warn); background: rgba(227,179,65,.08); border-color: rgba(227,179,65,.22); }
.pill.bad { color: var(--bad); background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.22); }
.pill.blue { color: var(--accent-soft); background: rgba(0,20,255,.12); border-color: rgba(91,110,255,.3); }

/* toast */
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; align-items: flex-start; gap: 10px; max-width: 360px; padding: 13px 15px; border-radius: 14px; background: rgba(20,20,26,.86); backdrop-filter: blur(14px); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -20px rgba(0,0,0,.8); transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform .35s var(--ease), opacity .35s; }
.toast.on { transform: none; opacity: 1; }
.toast .dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.toast.err .dot { background: var(--bad); }
.toast b { display: block; font-size: 13px; font-weight: 500; }
.toast small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }

/* ================= login ================= */
.auth-top { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 22px 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.auth-wrap { display: grid; place-items: center; padding: 30px 16px 60px; min-height: calc(100vh - 160px); }
.auth { width: min(430px, 100%); animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth-card { position: relative; padding: 30px; border-radius: 24px; background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)), rgba(11,11,15,.9); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -40px rgba(0,20,255,.45), inset 0 1px 0 rgba(255,255,255,.05); backdrop-filter: blur(10px); }
.auth-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(160deg, rgba(91,110,255,.55), transparent 35%, transparent 70%, rgba(91,110,255,.25)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.auth-logo { width: 52px; height: 52px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 15px; background: #14141a; border: 1px solid var(--line-2); box-shadow: 0 10px 30px -10px rgba(0,20,255,.6); }
.auth-logo img { width: 30px; height: 30px; object-fit: contain; }
.auth h1 { text-align: center; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.auth .sub { text-align: center; margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; margin: 24px 0 20px; padding: 4px; border-radius: 13px; background: var(--inner); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; height: 36px; border-radius: 9px; font-size: 13px; font-weight: 500; color: var(--dim); transition: color .25s; }
.seg button.on { color: #fff; }
.seg i { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 9px; background: #1d1d25; border: 1px solid var(--line-2); transition: transform .4s var(--ease); }
.seg.right i { transform: translateX(100%); }
.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth .confirm { display: grid; grid-template-rows: 0fr; opacity: 0; margin-top: -14px; transition: grid-template-rows .4s var(--ease), opacity .3s, margin .4s var(--ease); }
.auth .confirm > div { overflow: hidden; }
.auth.is-register .confirm { grid-template-rows: 1fr; opacity: 1; margin-top: 0; }
.auth .submit { height: 46px; margin-top: 4px; font-size: 14px; border-radius: 12px; }
.err { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--ease); }
.err > div { overflow: hidden; }
.err.on { grid-template-rows: 1fr; }
.err p { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 11px; font-size: 12.5px; color: #fca5a5; background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.2); }
.err svg { width: 15px; height: 15px; margin-top: 1px; }
.auth-note { margin-top: 18px; display: flex; gap: 10px; padding: 13px 14px; border-radius: 14px; font-size: 12.5px; line-height: 1.55; color: var(--muted); background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.auth-note svg { width: 16px; height: 16px; color: var(--accent-soft); margin-top: 2px; }
.auth-note b { color: #e4e4e7; font-weight: 500; }
.auth-legal { margin-top: 16px; text-align: center; font-size: 12px; color: var(--dim); }
.auth-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* ================= dashboard ================= */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; border-right: 1px solid var(--line); background: rgba(8,8,11,.75); backdrop-filter: blur(12px); }
.side .brand { padding: 4px 8px 18px; }
.nav-label { padding: 14px 10px 6px; font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #52525b; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 11px; border-radius: 10px; font-size: 13.5px; color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.035); }
.nav a.on { color: #fff; background: rgba(255,255,255,.06); }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-2); }
.nav a svg { width: 17px; height: 17px; }
.nav a .count { margin-left: auto; font-family: "Geist Mono", monospace; font-size: 11px; color: var(--dim); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.help { padding: 14px; border-radius: 16px; background: linear-gradient(160deg, rgba(0,20,255,.22), rgba(0,20,255,.04) 60%), var(--card); border: 1px solid rgba(91,110,255,.25); }
.help b { display: block; font-size: 13.5px; font-weight: 500; }
.help p { margin: 3px 0 11px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.help .btn { width: 100%; }
.me { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #3b4cff, #0014ff); flex-shrink: 0; }
.me div { flex: 1; min-width: 0; }
.me b { display: block; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { display: block; font-size: 11.5px; color: var(--dim); }

.main { min-width: 0; padding: 34px 40px 60px; }
.mtop { display: none; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.head h1 { font-size: 28px; font-weight: 600; letter-spacing: -.025em; }
.head p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.view { animation: rise .45s var(--ease) both; }
.view[hidden] { display: none; }
.stagger > * { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.stat small { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); }
.stat small svg { width: 15px; height: 15px; color: var(--accent-soft); }
.stat b { display: block; margin-top: 12px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.stat span { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cols { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.card { border-radius: 20px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.card-head svg { width: 16px; height: 16px; color: var(--accent-soft); }
.card-head .more { margin-left: auto; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.card-head .more:hover { color: #fff; }
.card-body { padding: 16px 18px; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* subscription */
.sub-card { padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: border-color .25s; }
.sub-card:hover { border-color: var(--line-2); }
.sub-card.expired { opacity: .72; }
.sub-top { display: flex; align-items: center; gap: 14px; }
.sub-top img { width: 52px; height: 52px; border-radius: 13px; object-fit: cover; border: 1px solid var(--line); }
.sub-top .t { flex: 1; min-width: 0; }
.sub-top h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.sub-top .t small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.time { margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--inner); border: 1px solid var(--line); }
.time-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.time-row b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.time-row b small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.time-row span { font-size: 12px; color: var(--dim); }
.bar { height: 6px; margin-top: 11px; border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: 6px; background: linear-gradient(90deg, #0014ff, #8f9aff); transform-origin: left; animation: grow 1s var(--ease) both .15s; }
.bar.warn i { background: linear-gradient(90deg, #b45309, #e3b341); }
.bar.bad i { background: #3f3f46; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.keys { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.key { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--inner); border: 1px solid var(--line); }
.key svg.k { width: 15px; height: 15px; color: var(--dim); }
.key code { flex: 1; min-width: 0; font-family: "Geist Mono", monospace; font-size: 12.5px; color: #e4e4e7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .02em; }
.key code.hide { color: var(--dim); letter-spacing: .12em; }
.sub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sub-note { margin-top: 12px; font-size: 12px; color: var(--dim); line-height: 1.5; }

.mini { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,.045); }
.mini:last-child { border-bottom: 0; }
.mini img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.mini .t { flex: 1; min-width: 0; }
.mini b { display: block; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini small { display: block; font-size: 12px; color: var(--dim); }
.mini .r { text-align: right; }
.mini .r b { font-size: 13px; }

.quick { display: grid; gap: 8px; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--inner); border: 1px solid var(--line); transition: border-color .2s, transform .2s var(--ease); }
.quick a:hover { border-color: var(--line-2); transform: translateY(-1px); }
.quick .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(0,20,255,.14); color: var(--accent-soft); }
.quick .ic svg { width: 16px; height: 16px; }
.quick b { display: block; font-size: 13px; font-weight: 500; }
.quick small { display: block; font-size: 12px; color: var(--dim); }
.quick .go { margin-left: auto; width: 15px; height: 15px; color: var(--dim); }

/* downloads */
.dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.045); }
.dl:last-child { border-bottom: 0; }
.dl-l { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dl-l img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); }
.dl-l b { display: block; font-size: 14px; font-weight: 500; }
.dl-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.dl-meta span { font-family: "Geist Mono", monospace; font-size: 11.5px; color: var(--muted); padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.hint { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 14px; font-size: 12.5px; color: var(--muted); background: rgba(255,255,255,.02); border: 1px solid var(--line); line-height: 1.55; }
.hint svg { width: 16px; height: 16px; color: var(--accent-soft); margin-top: 1px; }

/* guides */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.guide-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; text-align: left; background: var(--card); border: 1px solid var(--line); transition: border-color .25s, transform .25s var(--ease); }
.guide-card:hover { border-color: rgba(91,110,255,.35); transform: translateY(-2px); }
.guide-card .top { display: flex; align-items: center; gap: 12px; }
.guide-card img { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; border: 1px solid var(--line); }
.guide-card b { display: block; font-size: 14.5px; font-weight: 500; }
.guide-card small { font-size: 12px; color: var(--dim); }
.guide-card .prog { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.guide-card .prog .bar { flex: 1; margin: 0; }
.guide { max-width: 820px; }
.guide-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.guide-head img { width: 50px; height: 50px; border-radius: 13px; object-fit: cover; border: 1px solid var(--line); }
.guide-head .t { flex: 1; }
.guide-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.guide-head small { font-size: 12.5px; color: var(--dim); }
.guide-intro { padding: 16px 18px; border-radius: 16px; font-size: 13.5px; line-height: 1.65; color: var(--muted); background: linear-gradient(160deg, rgba(0,20,255,.1), transparent 60%), var(--card); border: 1px solid var(--line); }
.steps { position: relative; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.step { position: relative; display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); transition: border-color .25s, background .25s; }
.step.done { background: rgba(74,222,128,.03); border-color: rgba(74,222,128,.16); }
.step .num { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; font-family: "Geist Mono", monospace; font-size: 12.5px; color: var(--accent-soft); background: rgba(0,20,255,.12); border: 1px solid rgba(91,110,255,.25); transition: all .25s; }
.step.done .num { color: #052e16; background: var(--ok); border-color: var(--ok); }
.step .c { flex: 1; min-width: 0; }
.step h4 { font-size: 14.5px; font-weight: 500; }
.step p { margin-top: 5px; font-size: 13.5px; line-height: 1.65; color: var(--muted); white-space: pre-line; }
.step label { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12px; color: var(--dim); cursor: pointer; user-select: none; }
.step label input { accent-color: #22c55e; width: 14px; height: 14px; }

/* orders */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 12px 18px; font-size: 12px; font-weight: 500; color: var(--dim); border-bottom: 1px solid var(--line); }
.table td { padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.045); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td small { display: block; color: var(--dim); font-size: 12px; margin-top: 2px; }
.table .num { text-align: right; font-family: "Geist Mono", monospace; }

/* account */
.acc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.acc-row { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.045); font-size: 13.5px; }
.acc-row:last-child { border-bottom: 0; }
.acc-row span { color: var(--dim); }
.acc form { display: flex; flex-direction: column; gap: 14px; }

.empty { padding: 46px 24px; text-align: center; }
.empty .ic { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 15px; display: grid; place-items: center; background: rgba(0,20,255,.12); border: 1px solid rgba(91,110,255,.25); color: var(--accent-soft); }
.empty .ic svg { width: 22px; height: 22px; }
.empty b { display: block; font-size: 16px; font-weight: 500; }
.empty p { max-width: 420px; margin: 6px auto 18px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }

.skeleton { height: 120px; border-radius: 18px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.06), rgba(255,255,255,.03)) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1180px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols, .acc { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
    .app { grid-template-columns: 1fr; }
    .side { position: fixed; z-index: 50; left: 0; width: 270px; transform: translateX(-100%); transition: transform .35s var(--ease); background: #08080b; }
    .app.menu .side { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,.7); }
    .mtop { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 40; padding: 12px 16px; background: rgba(5,5,7,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
    .main { padding: 22px 16px 50px; }
    .head { flex-direction: column; align-items: flex-start; }
    .head h1 { font-size: 23px; }
    .dl { grid-template-columns: 1fr; }
    .table th:nth-child(2), .table td:nth-child(2) { display: none; }
}
@media (max-width: 520px) { .stats { grid-template-columns: 1fr 1fr; gap: 10px; } .stat { padding: 14px; } .stat b { font-size: 21px; } .auth-card { padding: 22px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.app > div { min-width: 0; }
.stat span, .mini b { max-width: 100%; }


/* ================= setup guides (v2) ================= */
.gd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.gd-card { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--line); transition: border-color .3s, transform .3s var(--ease), box-shadow .3s; }
.gd-card:hover { border-color: rgba(91,110,255,.4); transform: translateY(-3px); box-shadow: 0 24px 50px -28px rgba(0,20,255,.6); }
.gd-cover { position: relative; height: 128px; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.gd-cover::before { content: ""; position: absolute; inset: -20px; background: var(--img) center / cover; filter: blur(22px) saturate(1.3); opacity: .45; transform: scale(1.1); }
.gd-cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px) 0 0 / 14px 14px, linear-gradient(180deg, transparent, rgba(11,11,15,.85)); }
.gd-cover img { position: relative; z-index: 1; width: 68px; height: 68px; border-radius: 18px; object-fit: cover; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 14px 30px -10px rgba(0,0,0,.8); transition: transform .4s var(--ease); }
.gd-card:hover .gd-cover img { transform: scale(1.06) rotate(-2deg); }
.gd-cover .pill { position: absolute; z-index: 1; top: 12px; right: 12px; backdrop-filter: blur(8px); }
.gd-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.gd-body > small { font-size: 12px; color: var(--accent-soft); }
.gd-body > b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.gd-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2px; }
.gd-meta span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.gd-meta svg { width: 14px; height: 14px; color: var(--dim); }
.gd-prog { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.gd-prog .bar { flex: 1; margin: 0; }
.gd-prog em { font-style: normal; font-family: "Geist Mono", monospace; font-size: 11.5px; color: var(--dim); }
.gd-go { display: inline-flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 500; color: #e4e4e7; }
.gd-go svg { width: 15px; height: 15px; color: var(--dim); transition: transform .3s var(--ease), color .3s; }
.gd-card:hover .gd-go svg { transform: translateX(4px); color: var(--accent-soft); }

.gd-back { margin: -6px 0 14px -10px; }
.gd-hero { position: relative; display: flex; align-items: center; gap: 22px; padding: 26px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-2); background: var(--card); }
.gd-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.gd-hero-bg::before { content: ""; position: absolute; left: -10%; top: -40%; width: 60%; height: 180%; background: var(--img) center / cover; filter: blur(50px) saturate(1.4); opacity: .3; }
.gd-hero-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 18px 18px, linear-gradient(90deg, rgba(16,16,20,.2), rgba(16,16,20,.95) 55%); }
.gd-hero-img { position: relative; width: 96px; height: 96px; border-radius: 24px; object-fit: cover; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 20px 40px -14px rgba(0,20,255,.55); flex-shrink: 0; }
.gd-hero-t { position: relative; min-width: 0; }
.gd-hero-t h1 { margin-top: 10px; font-size: 26px; font-weight: 600; letter-spacing: -.025em; }
.gd-hero-t p { margin-top: 6px; max-width: 640px; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.gd-hero-t .gd-meta { margin-top: 14px; }

.gd-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 24px; }
.gd-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }
.gd-ring-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.gd-ring { --p: 0; position: relative; width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; display: grid; place-content: center; text-align: center; background: conic-gradient(var(--accent-2) calc(var(--p) * 1%), rgba(255,255,255,.07) 0); transition: background .5s; }
.gd-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--card); }
.gd-ring b, .gd-ring small { position: relative; line-height: 1; }
.gd-ring b { font-size: 17px; font-weight: 600; }
.gd-ring small { margin-top: 3px; font-size: 10.5px; color: var(--dim); }
.gd-ring-card > div:last-child b { display: block; font-size: 14px; font-weight: 500; }
.gd-ring-card > div:last-child small { font-size: 12px; color: var(--dim); }
.gd-toc { display: flex; flex-direction: column; padding: 8px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.gd-toc a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: var(--muted); transition: background .2s, color .2s; }
.gd-toc a:hover { background: rgba(255,255,255,.04); color: #fff; }
.gd-toc .n { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; border-radius: 7px; font-family: "Geist Mono", monospace; font-size: 11px; color: var(--dim); border: 1px solid var(--line-2); transition: all .3s; }
.gd-toc .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-toc a.current { color: #fff; background: rgba(0,20,255,.1); }
.gd-toc a.current .n { color: #fff; background: var(--accent); border-color: var(--accent); }
.gd-toc a.done { color: var(--dim); }
.gd-toc a.done .t { text-decoration: line-through; text-decoration-color: rgba(255,255,255,.2); }
.gd-toc a.done .n { color: #052e16; background: var(--ok); border-color: var(--ok); }
.gd-side-actions { display: flex; flex-direction: column; gap: 8px; }
.gd-side-actions .btn { width: 100%; }

.gd-steps { position: relative; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.gd-steps::before { content: ""; position: absolute; left: 19px; top: 24px; bottom: 24px; width: 2px; border-radius: 2px; background: linear-gradient(var(--line-2), rgba(255,255,255,.03)); }
.gd-step, .gd-finish { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.gd-num { position: relative; z-index: 1; width: 40px; height: 40px; margin-top: 14px; display: grid; place-items: center; border-radius: 12px; font-family: "Geist Mono", monospace; font-size: 13px; color: var(--muted); background: #121218; border: 1px solid var(--line-2); transition: all .35s var(--ease); }
.gd-num em { font-style: normal; }
.gd-num svg { display: none; width: 17px; height: 17px; }
.gd-step-card { padding: 18px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: border-color .35s, background .35s, box-shadow .35s; }
.gd-step-top small { font-family: "Geist Mono", monospace; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.gd-step-card h3 { margin-top: 4px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.gd-step-card p { margin-top: 8px; font-size: 13.5px; line-height: 1.7; color: var(--muted); white-space: pre-line; }
.gd-done { display: inline-flex; align-items: center; gap: 9px; margin-top: 14px; height: 34px; padding: 0 14px 0 8px; border-radius: 10px; font-size: 12.5px; font-weight: 500; color: var(--muted); background: rgba(255,255,255,.03); border: 1px solid var(--line-2); transition: all .25s; }
.gd-done:hover { color: #fff; border-color: rgba(255,255,255,.2); }
.gd-done .box { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.25); transition: all .25s var(--ease); }
.gd-done .box svg { width: 12px; height: 12px; opacity: 0; transform: scale(.4); transition: all .25s var(--ease); }
.gd-step.current .gd-num { color: #fff; background: var(--accent); border-color: rgba(143,154,255,.6); box-shadow: 0 0 0 5px rgba(0,20,255,.16), 0 10px 24px -8px rgba(0,20,255,.9); }
.gd-step.current .gd-step-card { border-color: rgba(91,110,255,.38); background: linear-gradient(160deg, rgba(0,20,255,.1), transparent 55%), var(--card); box-shadow: 0 24px 50px -30px rgba(0,20,255,.7); }
.gd-step.current .gd-done { color: #fff; background: linear-gradient(#2b3dff, #0014d6); border-color: rgba(255,255,255,.16); }
.gd-step.current .gd-done .box { border-color: rgba(255,255,255,.55); }
.gd-step.done .gd-num { color: #052e16; background: var(--ok); border-color: var(--ok); }
.gd-step.done .gd-num em { display: none; }
.gd-step.done .gd-num svg { display: block; }
.gd-step.done .gd-step-card { background: rgba(74,222,128,.025); border-color: rgba(74,222,128,.14); }
.gd-step.done .gd-step-card h3 { color: #d4d4d8; }
.gd-step.done .gd-done { color: var(--ok); border-color: rgba(74,222,128,.25); background: rgba(74,222,128,.06); }
.gd-step.done .gd-done .box { background: var(--ok); border-color: var(--ok); color: #052e16; }
.gd-step.done .gd-done .box svg { opacity: 1; transform: none; }
.gd-step.flash .gd-step-card { animation: flash 1s var(--ease); }
@keyframes flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 3px rgba(143,154,255,.45); } }
.gd-finish { display: none; }
.gd-finish.show { display: grid; }
.gd-finish .gd-num { color: #052e16; background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 5px rgba(74,222,128,.14); }
.gd-finish .gd-num svg { display: block; }
.gd-finish .gd-step-card { border-color: rgba(74,222,128,.25); background: linear-gradient(160deg, rgba(74,222,128,.08), transparent 60%), var(--card); }
.gd-finish .btn { margin-top: 14px; }

@media (max-width: 1100px) { .gd-layout { grid-template-columns: 1fr; } .gd-side { position: static; } .gd-toc { display: none; } .gd-side-actions { flex-direction: row; flex-wrap: wrap; } .gd-side-actions .btn { width: auto; } }
@media (max-width: 640px) { .gd-hero { flex-direction: column; align-items: flex-start; padding: 20px; } .gd-hero-img { width: 72px; height: 72px; } .gd-hero-t h1 { font-size: 22px; } .gd-step, .gd-finish { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; } .gd-num { width: 32px; height: 32px; border-radius: 10px; } .gd-steps::before { left: 15px; } }

/* ================= renewals ================= */
.btn .price { margin-left: 2px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.22); font-family: "Geist Mono", monospace; font-size: 11.5px; opacity: .9; }
.btn .spin { width: 13px; height: 13px; }
.renew-alert { position: relative; margin-bottom: 22px; padding: 18px; border-radius: 20px; overflow: hidden; border: 1px solid rgba(227,179,65,.3); background: linear-gradient(135deg, rgba(227,179,65,.12), rgba(227,179,65,.02) 55%), var(--card); animation: rise .5s var(--ease) both; }
.renew-alert.bad { border-color: rgba(248,113,113,.28); background: linear-gradient(135deg, rgba(248,113,113,.1), rgba(248,113,113,.02) 55%), var(--card); }
.renew-alert::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(rgba(227,179,65,.18), transparent 70%); pointer-events: none; }
.renew-alert.bad::after { background: radial-gradient(rgba(248,113,113,.16), transparent 70%); }
.renew-alert-head { display: flex; align-items: center; gap: 14px; }
.renew-alert-head .ic, .renew-box .ic { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; color: var(--warn); background: rgba(227,179,65,.12); border: 1px solid rgba(227,179,65,.28); }
.renew-alert.bad .renew-alert-head .ic, .renew-box.bad .ic { color: var(--bad); background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.28); }
.renew-alert-head .ic svg, .renew-box .ic svg { width: 18px; height: 18px; }
.renew-alert-head b { display: block; font-size: 15px; font-weight: 600; }
.renew-alert-head p { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.renew-alert-list { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.renew-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 14px; background: rgba(5,5,7,.55); border: 1px solid var(--line); }
.renew-row img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.renew-row .t { flex: 1; min-width: 0; }
.renew-row b { display: block; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.renew-row b span { font-weight: 400; color: var(--dim); }
.renew-row small { display: block; font-size: 12px; }
small.warn { color: var(--warn); }
small.bad { color: var(--bad); }

.group-label { display: flex; align-items: center; gap: 8px; margin: 26px 0 12px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.group-label:first-of-type { margin-top: 0; }
.group-label span { font-family: "Geist Mono", monospace; letter-spacing: 0; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 11px; }
.head + .group-label { margin-top: 0; }

.renew-box { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px; border-radius: 14px; border: 1px solid rgba(227,179,65,.28); background: linear-gradient(135deg, rgba(227,179,65,.1), transparent 70%); }
.renew-box.bad { border-color: rgba(248,113,113,.26); background: linear-gradient(135deg, rgba(248,113,113,.09), transparent 70%); }
.renew-box > div { flex: 1; min-width: 0; }
.renew-box b { display: block; font-size: 14px; font-weight: 600; }
.renew-box.warn b { color: #f5d27a; }
.renew-box.bad b { color: #fca5a5; }
.renew-box p { margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.sub-card.expiring { border-color: rgba(227,179,65,.3); box-shadow: 0 24px 60px -40px rgba(227,179,65,.6); }
.sub-card.expired.needs { opacity: 1; border-color: rgba(248,113,113,.22); }
.sub-card.expired.needs .keys, .sub-card.expired.needs .time { opacity: .6; }
.sub-card.queued { border-style: dashed; border-color: rgba(91,110,255,.3); }
.bar.queued i { background: repeating-linear-gradient(45deg, rgba(143,154,255,.35) 0 6px, rgba(143,154,255,.12) 6px 12px); }
@media (max-width: 640px) { .renew-box, .renew-row { flex-wrap: wrap; } .renew-box .btn, .renew-row .btn { width: 100%; } }

/* profile + mode switch */
.me-row { display: flex; align-items: center; gap: 10px; }
.me-row b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mgmt[hidden] { display: none; }
.acc form.un-form { flex-direction: row; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.un-form .field { flex: 1; margin: 0; }
.un-form .btn { height: 42px; }
/* ===== Sidebar: identical to the admin panel (nv-*) ===== */
.app { grid-template-columns: 236px minmax(0, 1fr); }
.side.nv-side { width: 236px; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 14px 12px 12px; border-right: 0; background: #09090b; backdrop-filter: none; }
.nv-side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px; }
.nv-logo { display: inline-flex; }
.nv-logo img { width: 24px; height: 24px; object-fit: contain; }
.nv-icon-btn { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 8px; cursor: pointer; color: #71717a; background: transparent; transition: background .15s, color .15s; }
.nv-icon-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.nv-icon-btn svg { width: 15px; height: 15px; }
.nv-store { border: 1px solid rgba(255,255,255,.07); border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)); overflow: hidden; }
.nv-store-row { display: flex; align-items: center; gap: 10px; padding: 10px; }
.nv-store-row > div { min-width: 0; }
.nv-avatar { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: #1c1c22; border: 1px solid rgba(255,255,255,.1); font-size: 12px; font-weight: 500; color: #d4d4d8; }
.nv-store-row b { display: block; font-size: 13.5px; font-weight: 600; color: #fff; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-store-row small { display: block; font-size: 11.5px; color: #71717a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-store-visit { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12px; color: #a1a1aa; transition: color .15s, background .15s; }
.nv-store-visit:hover { color: #fff; background: rgba(255,255,255,.03); }
.nv-store-visit svg { width: 12px; height: 12px; }
.nv-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.nv-nav #mgmt:not([hidden]) { display: flex; flex-direction: column; gap: 2px; }
.nv-label { padding: 12px 8px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #52525b; }
.nv-label:first-child { padding-top: 2px; }
.nav a.nv-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: #a1a1aa; text-align: left; transition: background .15s, color .15s; }
.nav a.nv-item svg { width: 16px; height: 16px; color: #52525b; flex-shrink: 0; transition: color .15s; }
.nav a.nv-item:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav a.nv-item:hover svg { color: #a1a1aa; }
.nav a.nv-item.on { color: #fff; background: #1f1f25; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.nav a.nv-item.on svg { color: #2b3dff; }
.nav a.nv-item.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(#5b6eff, #0014ff); box-shadow: 0 0 12px rgba(0,20,255,.8); }
.nv-side-foot { display: flex; align-items: center; gap: 8px; padding: 10px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12px; color: #a1a1aa; }
.nv-side-foot .dot { width: 7px; height: 7px; border-radius: 999px; background: #3ecf8e; box-shadow: 0 0 0 3px rgba(62,207,142,.15); }
.nv-side-foot .nv-logout { margin-left: auto; }
@media (max-width: 860px) {
    .app { grid-template-columns: 1fr; }
    .side.nv-side { position: fixed; z-index: 50; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .35s var(--ease); }
    .app.menu .side.nv-side { transform: none; box-shadow: 30px 0 80px rgba(0,0,0,.7); }
    .nav a.nv-item.on::before { left: -12px; }
}
