/* 7Gs – design system. Dark default, light via [data-theme="light"]. */
:root{
  --bg:#000;--bg-2:#0a0a0b;--surface:#111113;--surface-2:#18181b;--surface-3:#222226;
  --border:#27272a;--border-2:#3a3a40;--text:#f4f4f5;--text-2:#a1a1aa;--text-3:#71717a;
  --red:#dc2626;--red-2:#ef4444;--red-soft:rgba(220,38,38,.14);
  --blue:#2563eb;--blue-2:#3b82f6;--green:#22c55e;--green-soft:rgba(34,197,94,.14);
  --amber:#f59e0b;--amber-soft:rgba(245,158,11,.14);--gold:#d4af37;--silver:#c0c0c8;--platinum:#9fb4c7;
  --shadow:0 8px 30px rgba(0,0,0,.45);--radius:12px;--radius-sm:8px;
  --sidebar-w:248px;--topbar-h:60px;
  --font:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;--font-brand:'Montserrat','Inter',sans-serif;
  color-scheme:dark;
}
:root[data-theme="light"]{
  --bg:#f5f5f6;--bg-2:#fff;--surface:#fff;--surface-2:#f4f4f5;--surface-3:#e9e9ec;
  --border:#e4e4e7;--border-2:#d1d1d6;--text:#111113;--text-2:#52525b;--text-3:#8a8a93;
  --red-soft:rgba(220,38,38,.09);--green-soft:rgba(22,163,74,.1);--amber-soft:rgba(217,119,6,.12);
  --shadow:0 8px 30px rgba(0,0,0,.08);color-scheme:light;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font:400 15px/1.55 var(--font);-webkit-font-smoothing:antialiased;min-height:100vh}
h1,h2,h3,h4{line-height:1.2;margin:0 0 .5em;font-weight:700;letter-spacing:-.01em}
h1{font-size:1.75rem}h2{font-size:1.25rem}h3{font-size:1.05rem}
p{margin:0 0 1em}a{color:var(--red-2);text-decoration:none}a:hover{text-decoration:underline}
img,svg{max-width:100%}
.muted{color:var(--text-2)}.small{font-size:.85rem}.center{text-align:center}.right{text-align:right}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;word-break:break-all}
.skip-link{position:absolute;left:-999px;top:0;background:var(--red);color:#fff;padding:8px 14px;z-index:999}
.skip-link:focus{left:8px;top:8px}
:focus-visible{outline:2px solid var(--blue-2);outline-offset:2px}
.hidden,[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.icon{width:20px;height:20px;flex:none;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* wordmark */
.wordmark{font:800 1.5rem var(--font-brand);letter-spacing:.04em}
.wm-a{color:var(--text)}.wm-b{color:var(--red)}.wm-sm{font-size:1.25rem}
.admin-tag{margin-left:8px;font:600 .65rem var(--font);letter-spacing:.1em;text-transform:uppercase;background:var(--red-soft);color:var(--red-2);padding:2px 6px;border-radius:4px;vertical-align:middle}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 20px;border-radius:var(--radius-sm);border:1px solid transparent;font:600 .95rem var(--font);cursor:pointer;transition:background .15s,border-color .15s,transform .1s,opacity .15s;text-decoration:none!important;min-height:44px}
.btn:active{transform:translateY(1px)}
.btn[disabled],.btn.is-disabled{opacity:.5;cursor:not-allowed}
.btn-primary{background:var(--red);color:#fff}.btn-primary:hover{background:var(--red-2)}
.btn-blue{background:var(--blue);color:#fff}.btn-blue:hover{background:var(--blue-2)}
.btn-outline{background:transparent;border-color:var(--border-2);color:var(--text)}.btn-outline:hover{border-color:var(--text-2);background:var(--surface-2)}
.btn-ghost{background:transparent;color:var(--text-2)}.btn-ghost:hover{color:var(--text);background:var(--surface-2)}
.btn-danger{background:transparent;border-color:var(--red);color:var(--red-2)}.btn-danger:hover{background:var(--red-soft)}
.btn-sm{padding:7px 14px;font-size:.85rem;min-height:36px}.btn-block{width:100%}.btn-lg{padding:14px 26px;font-size:1rem}
.icon-btn{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:50%;border:0;background:transparent;color:var(--text-2);cursor:pointer;transition:background .15s,color .15s}
.icon-btn:hover{background:var(--surface-2);color:var(--text)}
.theme-toggle .i-moon{display:none}:root[data-theme="light"] .theme-toggle .i-sun{display:none}:root[data-theme="light"] .theme-toggle .i-moon{display:block}

/* forms */
.field{margin-bottom:16px}
label,.label{display:block;font-weight:500;font-size:.85rem;color:var(--text-2);margin-bottom:6px}
.input,input[type=text],input[type=email],input[type=password],input[type=number],input[type=tel],input[type=date],input[type=url],select,textarea{
  width:100%;padding:12px 14px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font:inherit;min-height:46px;transition:border-color .15s,box-shadow .15s}
textarea{min-height:100px;resize:vertical}
.input:focus,input:focus,select:focus,textarea:focus{outline:0;border-color:var(--red);box-shadow:0 0 0 3px var(--red-soft)}
input::placeholder,textarea::placeholder{color:var(--text-3)}
select{appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--text-2) 50%),linear-gradient(135deg,var(--text-2) 50%,transparent 50%);background-position:calc(100% - 20px) 50%,calc(100% - 15px) 50%;background-size:5px 5px;background-repeat:no-repeat;padding-right:36px}
.input-wrap{position:relative}.input-wrap .input-action{position:absolute;right:10px;top:50%;transform:translateY(-50%);background:none;border:0;color:var(--text-2);font:600 .72rem var(--font);letter-spacing:.06em;cursor:pointer;padding:6px}
.input-wrap input{padding-right:64px}
.input-prefix{display:flex;align-items:center;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden}
.input-prefix span{padding:0 12px;color:var(--text-2)}.input-prefix input{border:0;background:transparent;box-shadow:none!important}
.field-error{color:var(--red-2);font-size:.82rem;margin:6px 0 0}.hint{color:var(--text-3);font-size:.8rem;margin-top:6px}
.row{display:grid;gap:16px;grid-template-columns:repeat(2,minmax(0,1fr))}.row-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.check{display:flex;gap:10px;align-items:flex-start;font-size:.9rem;color:var(--text-2);cursor:pointer}
.check input{width:18px;height:18px;min-height:0;margin-top:2px;accent-color:var(--red);flex:none}
.switch{position:relative;display:inline-block;width:44px;height:24px;flex:none}
.switch input{opacity:0;width:0;height:0;position:absolute}
.switch i{position:absolute;inset:0;background:var(--surface-3);border-radius:24px;transition:.2s;cursor:pointer}
.switch i:before{content:"";position:absolute;width:18px;height:18px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s}
.switch input:checked+i{background:var(--red)}.switch input:checked+i:before{transform:translateX(20px)}
.switch input:disabled+i{opacity:.5;cursor:not-allowed}
.switch input:focus-visible+i{outline:2px solid var(--blue-2);outline-offset:2px}

/* custom select */
.dd{position:relative}.dd-btn{display:flex;width:100%;align-items:center;justify-content:space-between;gap:8px;padding:12px 14px;min-height:46px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font:inherit;cursor:pointer;text-align:left}
.dd-btn .ph{color:var(--text-3)}.dd.is-open .dd-btn{border-color:var(--red)}
.dd-list{position:absolute;z-index:40;left:0;right:0;top:calc(100% + 4px);max-height:260px;overflow:auto;background:var(--surface);border:1px solid var(--border-2);border-radius:var(--radius-sm);box-shadow:var(--shadow);padding:4px}
.dd-opt{padding:9px 12px;border-radius:6px;cursor:pointer}.dd-opt:hover,.dd-opt.is-active{background:var(--surface-2)}.dd-opt[aria-selected=true]{color:var(--red-2);font-weight:600}
.dd-search{width:100%;margin-bottom:4px;min-height:38px}

/* alerts / flash */
.alert{padding:12px 16px;border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--surface);margin-bottom:16px;font-size:.92rem}
.alert-success{border-color:rgba(34,197,94,.4);background:var(--green-soft)}
.alert-error,.alert-danger{border-color:rgba(220,38,38,.45);background:var(--red-soft)}
.alert-warning{border-color:rgba(245,158,11,.45);background:var(--amber-soft)}
.alert-info{border-color:rgba(59,130,246,.4);background:rgba(59,130,246,.1)}
.banner{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:10px 20px;background:var(--amber-soft);border-bottom:1px solid rgba(245,158,11,.35);font-size:.9rem}
.banner form{margin-left:auto}

/* cards */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:24px;margin-bottom:20px}
.card-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.card-title h2,.card-title h3{margin:0}
.card-head{display:flex;gap:12px;align-items:center;margin-bottom:16px}
.grid{display:grid;gap:20px}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.stat{display:flex;flex-direction:column;gap:6px}.stat .k{color:var(--text-2);font-size:.82rem;display:flex;gap:8px;align-items:center}
.stat .v{font-size:1.6rem;font-weight:700;letter-spacing:-.02em}.stat .v.green{color:var(--green)}.stat .v.red{color:var(--red-2)}
.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:24px}
.page-head h1{margin:0}.page-head p{margin:4px 0 0;color:var(--text-2)}
.empty{text-align:center;padding:48px 16px;color:var(--text-2)}.empty .icon{width:40px;height:40px;margin-bottom:12px;color:var(--text-3)}
.pill-row{display:flex;gap:8px;flex-wrap:wrap}

/* badges */
.badge{display:inline-flex;align-items:center;gap:4px;padding:2px 10px;border-radius:99px;font-size:.75rem;font-weight:600;background:var(--surface-3);color:var(--text-2);white-space:nowrap}
.badge-success{background:var(--green-soft);color:var(--green)}.badge-danger{background:var(--red-soft);color:var(--red-2)}
.badge-warning{background:var(--amber-soft);color:var(--amber)}.badge-info{background:rgba(59,130,246,.14);color:var(--blue-2)}

/* tables */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--border);border-radius:var(--radius)}
table.table{width:100%;border-collapse:collapse;font-size:.9rem}
.table th{text-align:left;font-weight:600;color:var(--text-2);font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;padding:12px 16px;background:var(--surface-2);white-space:nowrap}
.table td{padding:14px 16px;border-top:1px solid var(--border);vertical-align:middle}
.table tbody tr:hover{background:var(--surface-2)}
.table .actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.filters input,.filters select{width:auto;min-width:150px}
.pagination{display:flex;gap:6px;justify-content:center;margin-top:20px;flex-wrap:wrap}
.pagination a,.pagination span{padding:8px 13px;border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font-size:.88rem;text-decoration:none}
.pagination .current{background:var(--red);border-color:var(--red);color:#fff}.pagination a:hover{background:var(--surface-2)}

/* modal */
.modal-back{position:fixed;inset:0;background:rgba(0,0,0,.65);display:grid;place-items:center;z-index:100;padding:16px;animation:fade .15s}
.modal{background:var(--surface);border:1px solid var(--border-2);border-radius:16px;padding:28px;width:100%;max-width:460px;max-height:92vh;overflow:auto;box-shadow:var(--shadow);animation:pop .18s}
.modal h2{margin-bottom:8px}.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px;flex-wrap:wrap}
@keyframes fade{from{opacity:0}}@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.98)}}

/* steps */
.steps{display:flex;align-items:center;gap:0;margin:0 0 28px;padding:0;list-style:none}
.steps li{flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;position:relative;font-size:.78rem;color:var(--text-3);text-align:center}
.steps li:before{content:attr(data-n);width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--surface-3);color:var(--text-2);font-weight:700;position:relative;z-index:1}
.steps li:after{content:"";position:absolute;top:15px;left:calc(50% + 16px);right:calc(-50% + 16px);height:2px;background:var(--border)}
.steps li:last-child:after{display:none}
.steps li.is-active{color:var(--text)}.steps li.is-active:before,.steps li.is-done:before{background:var(--red);color:#fff}.steps li.is-done:after{background:var(--red)}
.step-pane[hidden]{display:none}

/* upload */
.drop{border:2px dashed var(--border-2);border-radius:var(--radius);padding:28px 16px;text-align:center;color:var(--text-2);cursor:pointer;transition:border-color .15s,background .15s;display:block}
.drop:hover,.drop.is-over{border-color:var(--red);background:var(--red-soft)}.drop input{display:none}
.drop .icon{width:30px;height:30px;margin-bottom:8px}.drop img.preview{max-height:160px;border-radius:8px;margin-top:10px}

/* ===== app shell ===== */
.app{display:flex;min-height:100vh}
.sidebar{width:var(--sidebar-w);flex:none;background:var(--bg-2);border-right:1px solid var(--border);display:flex;flex-direction:column;position:sticky;top:0;height:100vh;z-index:60}
.sidebar-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;height:var(--topbar-h)}
.brand{display:inline-flex;align-items:center;text-decoration:none!important}.sidebar-close{display:none}
.sidebar-nav{flex:1;overflow-y:auto;padding:8px 12px}
.nav-link{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:var(--radius-sm);color:var(--text-2);font-weight:500;font-size:.92rem;text-decoration:none!important;transition:background .15s,color .15s;border:0;background:none;width:100%;cursor:pointer;font-family:inherit;text-align:left}
.nav-link:hover{background:var(--surface-2);color:var(--text)}
.nav-link.is-active{background:var(--red-soft);color:var(--red-2)}
.nav-group{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-3);padding:16px 12px 6px}
.sidebar-foot{padding:12px;border-top:1px solid var(--border)}.logout-form{margin:0}
.sidebar-backdrop{display:none}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{height:var(--topbar-h);display:flex;align-items:center;gap:12px;padding:0 20px;background:var(--bg-2);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:50}
.topbar-center{flex:1;display:flex;justify-content:center}.topbar-right{display:flex;align-items:center;gap:4px}
.menu-btn{display:none}.crumb{font-weight:600}
.avatar{width:36px;height:36px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center;font-weight:700;font-size:.8rem;text-decoration:none!important;margin-left:6px}
.seg{display:inline-flex;background:var(--surface-2);border:1px solid var(--border);border-radius:99px;padding:3px}
.seg-item{padding:7px 22px;border-radius:99px;color:var(--text-2);font-weight:600;font-size:.85rem;text-decoration:none!important;transition:.15s}
.seg-item.is-active{background:var(--red);color:#fff}
.content{padding:28px;max-width:1280px;width:100%;margin:0 auto}
.dropdown{position:relative}.dropdown-panel{position:absolute;right:0;top:calc(100% + 8px);width:320px;max-width:calc(100vw - 24px);background:var(--surface);border:1px solid var(--border-2);border-radius:var(--radius);box-shadow:var(--shadow);z-index:70;overflow:hidden}
.notif-head{padding:14px 16px;font-weight:600;border-bottom:1px solid var(--border)}.notif-body{max-height:300px;overflow:auto}
.notif-item{display:flex;flex-direction:column;gap:2px;padding:12px 16px;border-bottom:1px solid var(--border);font-size:.88rem}.notif-time{color:var(--text-3);font-size:.75rem}
.notif-empty{padding:32px 16px;text-align:center;color:var(--text-3)}.notif-empty p{margin:8px 0 0}
.notif-foot{display:block;text-align:center;padding:12px;font-size:.85rem;font-weight:600}

/* ticker */
.ticker{display:flex;align-items:center;background:var(--bg-2);border-bottom:1px solid var(--border);overflow:hidden;height:40px;font-size:.82rem}
.tk-label{display:flex;align-items:center;gap:8px;padding:0 16px;font-weight:600;white-space:nowrap;border-right:1px solid var(--border);height:100%;background:var(--bg-2);position:relative;z-index:1}
.live-dot{width:8px;height:8px;border-radius:50%;background:var(--green);animation:pulse 1.6s infinite}
@keyframes pulse{50%{opacity:.35}}
.tk-track{display:flex;overflow:hidden;flex:1}.tk-run{display:flex;gap:32px;padding:0 16px;flex:none;animation:marquee 40s linear infinite}
.ticker:hover .tk-run{animation-play-state:paused}
@keyframes marquee{to{transform:translateX(-100%)}}
.tk-item{display:inline-flex;gap:8px;align-items:center;white-space:nowrap}.tk-item b{font-weight:600}.tk-item>span:nth-child(2){color:var(--text-2)}
.tk-chg.up{color:var(--green)}.tk-chg.down{color:var(--red-2)}.tk-note{color:var(--text-3)}

/* dashboard bits */
.hero-balance{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;align-items:flex-end}
.hero-balance .amount{font-size:2.4rem;font-weight:800;letter-spacing:-.03em}
.chart-box{height:420px;border-radius:var(--radius);overflow:hidden;border:1px solid var(--border)}
.chart-box>div,.chart-box iframe{height:100%!important;width:100%}
.quick{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:14px}
.quick a{display:flex;flex-direction:column;gap:10px;align-items:flex-start;padding:18px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);color:var(--text);font-weight:600;text-decoration:none!important;transition:border-color .15s,transform .15s}
.quick a:hover{border-color:var(--red);transform:translateY(-2px)}.quick .icon{color:var(--red-2);width:26px;height:26px}
.plan-card{display:flex;flex-direction:column;gap:12px}.plan-card .roi{font-size:2rem;font-weight:800;color:var(--green)}
.plan-card ul{list-style:none;margin:0;padding:0;display:grid;gap:8px;font-size:.9rem;color:var(--text-2)}
.progress{height:8px;background:var(--surface-3);border-radius:99px;overflow:hidden}.progress>i{display:block;height:100%;background:var(--red);border-radius:99px}
.method-list{display:grid;gap:12px}
.method{display:flex;align-items:center;gap:14px;padding:16px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);cursor:pointer;transition:.15s;width:100%;text-align:left;color:var(--text);font:inherit}
.method:hover,.method.is-selected{border-color:var(--red);background:var(--red-soft)}
.method .m-ico{width:42px;height:42px;border-radius:50%;background:var(--surface-3);display:grid;place-items:center;font-weight:700}
.qr{background:#fff;padding:12px;border-radius:12px;display:inline-block}.qr canvas,.qr svg,.qr img{display:block}
.copy-row{display:flex;gap:8px;align-items:center;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:6px 6px 6px 14px}.copy-row .mono{flex:1;font-size:.85rem}

/* membership cards */
.tier{position:relative;overflow:hidden;border-radius:18px;padding:26px;min-height:200px;color:#111;display:flex;flex-direction:column;justify-content:space-between}
.tier-gold{background:linear-gradient(135deg,#f6e27a,#d4af37 55%,#a67c00)}.tier-silver{background:linear-gradient(135deg,#f4f4f7,#c0c0c8 55%,#8d8d97)}.tier-platinum{background:linear-gradient(135deg,#e5eef6,#9fb4c7 55%,#6a8399)}
.tier .t-name{font:800 1.3rem var(--font-brand);letter-spacing:.08em;text-transform:uppercase}

/* public pages */
.pub-header{position:sticky;top:0;z-index:50;background:color-mix(in srgb,var(--bg) 85%,transparent);backdrop-filter:blur(12px);border-bottom:1px solid var(--border)}
.pub-header-in{max-width:1180px;margin:0 auto;padding:14px 20px;display:flex;align-items:center;gap:24px}
.pub-brand{text-decoration:none!important}.pub-nav{display:flex;gap:26px;margin-left:24px;flex:1}.pub-nav a{color:var(--text-2);font-weight:500;font-size:.92rem}.pub-nav a:hover{color:var(--text);text-decoration:none}
.pub-actions{display:flex;align-items:center;gap:14px}.pub-login{color:var(--text);font-weight:600;font-size:.92rem}
.pub-footer{border-top:1px solid var(--border);margin-top:80px}.pub-footer-in{max-width:1180px;margin:0 auto;padding:28px 20px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:.85rem}
.hero{max-width:1180px;margin:0 auto;padding:90px 20px 60px;text-align:center}
.hero h1{font-size:clamp(2.2rem,6vw,4rem);font-weight:800;letter-spacing:-.03em;margin-bottom:18px}.hero h1 em{font-style:normal;color:var(--red)}
.hero p.lead{font-size:1.15rem;color:var(--text-2);max-width:640px;margin:0 auto 30px}
.hero .cta{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.section{max-width:1180px;margin:0 auto;padding:60px 20px}.section>h2{font-size:1.9rem;text-align:center;margin-bottom:8px}.section>p.sub{text-align:center;color:var(--text-2);margin-bottom:36px}
.feature .num{width:40px;height:40px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center;font-weight:700;margin-bottom:12px}

/* auth */
.auth-wrap{min-height:calc(100vh - 70px);display:grid;place-items:center;padding:32px 16px}
.auth-card{width:100%;max-width:440px;background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:34px}
.auth-card.wide{max-width:560px}.auth-card h1{font-size:1.6rem;margin-bottom:6px}.auth-card .sub{color:var(--text-2);margin-bottom:24px}
.auth-alt{text-align:center;margin-top:20px;color:var(--text-2);font-size:.9rem}

/* ===== responsive ===== */
@media (max-width:1100px){.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:900px){
  .sidebar{position:fixed;left:0;top:0;transform:translateX(-100%);transition:transform .22s ease;box-shadow:var(--shadow)}
  body.nav-open .sidebar{transform:none}.sidebar-close,.menu-btn{display:inline-grid}
  body.nav-open .sidebar-backdrop{display:block;position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:55}
  .content{padding:18px 16px}.topbar{padding:0 12px}.pub-nav{display:none}
  .grid-2,.grid-3{grid-template-columns:1fr}
}
@media (max-width:600px){
  .row,.row-3{grid-template-columns:1fr}.grid-4{grid-template-columns:1fr 1fr}.card{padding:18px}
  .hero-balance .amount{font-size:1.9rem}.seg-item{padding:7px 14px}.chart-box{height:320px}
  .auth-card{padding:24px 18px}.steps li{font-size:.68rem}.pub-actions .pub-login{display:none}
  .page-head .btn{width:100%}.filters input,.filters select{width:100%}
  .table th,.table td{padding:10px 12px}.modal{padding:20px}.pub-header-in{gap:10px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media print{.sidebar,.topbar,.ticker,.btn{display:none!important}}

/* ---- helper-class aliases (status_badge / pagination_html output) */
.badge-ok{background:var(--green-soft);color:var(--green)}.badge-warn{background:var(--amber-soft);color:var(--amber)}.badge-bad{background:var(--red-soft);color:var(--red-2)}.badge-muted{background:var(--surface-3);color:var(--text-2)}
.page-link{padding:8px 13px;border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font-size:.88rem;text-decoration:none}
a.page-link:hover{background:var(--surface-2);text-decoration:none}.page-link.is-current{background:var(--red);border-color:var(--red);color:#fff}.page-link.is-disabled{opacity:.45}

/* ---- mobile topbar fit */
@media (max-width:600px){
  .topbar{gap:4px;padding:0 8px}.topbar-center{min-width:0;justify-content:flex-start}.topbar-right{gap:0;flex:none}
  .seg-item{padding:6px 11px;font-size:.8rem}.icon-btn{width:36px;height:36px}.avatar{margin-left:2px;width:32px;height:32px}
  .grid-4{gap:12px}
}

/* ---- inputs without a type attribute behave as text */
input:not([type]),input[type=search]{width:100%;padding:12px 14px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font:inherit;min-height:46px;transition:border-color .15s,box-shadow .15s}
input:not([type]):focus,input[type=search]:focus{outline:0;border-color:var(--red);box-shadow:0 0 0 3px var(--red-soft)}
.actions input,.actions select{width:auto;min-width:120px}
.table .actions{align-items:center}
fieldset{border:0;padding:0;margin:0 0 16px;min-width:0}legend{padding:0}
pre{white-space:pre-wrap;word-break:break-word;background:var(--surface-2);padding:12px;border-radius:var(--radius-sm)}
.row .row{gap:8px}

.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
form.actions{margin:0 0 8px}
hr{border:0;border-top:1px solid var(--border);margin:16px 0}

/* ---- Update 3: security, growth, support, charts ---- */
.codes{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px;margin:12px 0}
.code-chip{background:var(--surface-2);border:1px dashed var(--border-2);border-radius:var(--radius-sm);padding:8px 10px;text-align:center;letter-spacing:.06em;font-weight:600}
.twofa-setup{display:flex;gap:20px;align-items:center;flex-wrap:wrap;margin:12px 0}
.key-box{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 12px;font-weight:600;letter-spacing:.08em}
.inline-form{display:inline-flex;gap:8px;align-items:center;margin:6px 10px 0 0;flex-wrap:wrap}
.inline-form input,.inline-form select{width:auto}
.kv{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:12px 0}.kv dt{color:var(--text-2)}.kv dd{margin:0;font-weight:600}
.share-row{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.tabs-seg{display:inline-flex;border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden}
.tabs-seg a{padding:8px 14px;color:var(--text-2);font-weight:600;font-size:.9rem}.tabs-seg a:hover{text-decoration:none;background:var(--surface-2)}
.tabs-seg a.on{background:var(--red);color:#fff}
.badges{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px;margin:12px 0}
.bdg{display:flex;flex-direction:column;gap:4px;align-items:flex-start;padding:16px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);opacity:.62}
.bdg.got{opacity:1;border-color:var(--gold)}
.bdg small{color:var(--text-2)}
.bdg-ico{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--surface-3);color:var(--text-2)}
.bdg.got .bdg-ico{background:rgba(212,175,55,.18);color:var(--gold)}.bdg-ico svg{width:20px;height:20px}
.board{list-style:none;margin:12px 0;padding:0;display:grid;gap:6px}
.board li{display:flex;gap:12px;align-items:center;padding:10px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface)}
.board li.me{border-color:var(--red);background:var(--red-soft)}.board .rank{font-weight:700;color:var(--text-2);min-width:1.6em}
.notice-list{display:grid;gap:8px}
.notice{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);color:var(--text)}
a.notice:hover{text-decoration:none;border-color:var(--border-2)}
.notice.is-unread{border-color:var(--blue-2);background:var(--surface-2)}
.notice-dot{width:8px;height:8px;border-radius:50%;background:transparent;margin-top:7px;flex:none}.is-unread .notice-dot{background:var(--blue-2)}
.notice-t{font-weight:600}
.bell-count{position:absolute;top:2px;right:2px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;background:var(--red);color:#fff;font-size:.68rem;font-weight:700;line-height:16px;text-align:center}
.notif-item.is-unread{background:var(--surface-2)}
.chart{width:100%;height:auto;display:block}
.chart .ch-t{fill:var(--text-2);font-family:var(--font)}.chart .ch-big{fill:var(--text);font-weight:700}
.chart .ch-g{stroke:var(--border);stroke-width:1}
.donut-wrap{display:flex;gap:24px;align-items:center;flex-wrap:wrap}.donut-wrap .chart{width:200px;flex:none}
.chart-legend{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px 16px;font-size:.88rem}
.chart-legend .sw{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px;background:var(--text-3)}
.thread{display:grid;gap:12px;margin:14px 0}
.msg{max-width:760px;padding:12px 16px;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface)}
.msg-me{justify-self:end;background:var(--surface-2)}.msg-staff{justify-self:start;border-color:var(--blue-2)}
.msg-meta{font-size:.8rem;color:var(--text-2);margin-bottom:4px}.msg-body{overflow-wrap:anywhere}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.stat .v.small{font-size:.95rem}
@media (max-width:640px){.kv{grid-template-columns:1fr}.donut-wrap{justify-content:center}}
@media print{.sidebar,.topbar,.filters,.page-head .actions,.btn{display:none!important}body{background:#fff;color:#000}}
.table .mono{word-break:normal;white-space:nowrap}
.nowrap{white-space:nowrap}
.receipt{max-width:720px}.receipt .kv{grid-template-columns:max-content 1fr}.receipt .actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
ul.plain{padding-left:20px;display:grid;gap:8px;margin:8px 0}
.att-list{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:8px}
.att{display:flex;gap:12px;align-items:center;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2)}
.att-dot{width:10px;height:10px;border-radius:50%;flex:none;background:var(--text-3)}.att-high .att-dot{background:var(--red-2)}.att-warn .att-dot{background:var(--amber)}.att-info .att-dot{background:var(--blue-2)}
.att-high{border-color:var(--red-2)}.att-main{flex:1;min-width:0}.att-n{font-weight:700;min-width:1.5em;text-align:right}
.attention{margin-bottom:20px}
.pref-form{display:inline-flex;align-items:center;margin:0}.pref-form select{width:auto;max-width:220px;padding:6px 28px 6px 10px;font-size:.85rem;height:36px}
@media (max-width:640px){.pref-form select{max-width:110px}}

.reminder-card{position:fixed;right:20px;bottom:20px;z-index:60;max-width:340px;background:var(--surface,#fff);color:var(--text);border:1px solid var(--border);border-radius:14px;box-shadow:0 12px 32px rgba(0,0,0,.22);padding:16px 40px 16px 16px}
.reminder-card[hidden]{display:none}
.reminder-card p{margin:.35rem 0 .8rem;color:var(--text-2);font-size:.9rem}
.reminder-card .actions{display:flex;gap:8px;flex-wrap:wrap}
.reminder-x{position:absolute;top:6px;right:8px;background:none;border:0;font-size:1.4rem;line-height:1;color:var(--text-2);cursor:pointer;padding:4px 8px}
.verify-gate .actions{display:flex;gap:10px;flex-wrap:wrap;margin:.8rem 0}
@media (max-width:640px){.reminder-card{left:12px;right:12px;bottom:12px;max-width:none}}

.inv-act{display:flex;flex-direction:column;gap:6px;min-width:200px}
.inv-act input[name=note]{width:100%;min-width:0}
.inv-act .btn-row{display:flex;gap:6px;flex-wrap:wrap}
td.inv-plan{min-width:170px}

.idflags{margin:.4rem 0;padding:0;list-style:none;font-size:.85rem}
.idflags li{padding:4px 8px;border-left:3px solid var(--border);margin:3px 0}
.idflags .idf-high{border-left-color:#dc2626}.idflags .idf-medium{border-left-color:#f59e0b}.idflags .idf-low{border-left-color:#9ca3af}
td.kyc-docs{min-width:340px}

.avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}.avatar{overflow:hidden}
.photo-card{margin-bottom:16px}.photo-row{display:flex;gap:18px;align-items:flex-start;flex-wrap:wrap}.photo-row .avatar-lg{width:72px;height:72px;margin-left:0;font-size:1.3rem;flex:none}.photo-form{flex:1;min-width:220px}

.face-step{border:1px solid var(--border-2);border-radius:var(--radius);padding:16px;margin:16px 0}.face-step h2{margin:0 0 6px;font-size:1.05rem}
.face-code{font-size:2rem;font-weight:800;letter-spacing:.35em;text-align:center;background:var(--red-soft);border-radius:var(--radius);padding:12px;margin:10px 0;font-variant-numeric:tabular-nums}
.selfie-box{margin:10px 0}.selfie-box video,.selfie-box img{max-width:100%;border-radius:var(--radius);background:#000;display:block;transform:scaleX(-1)}.selfie-box img{transform:none;max-width:240px}
.face-review{display:flex;gap:10px;align-items:flex-start;margin:8px 0}.face-review img{border-radius:8px;border:1px solid var(--border-2);display:block}.face-code-sm{font-weight:800;letter-spacing:.2em}
.kyc-docs{max-width:340px}.kyc-docs dl.kv{grid-template-columns:90px 1fr}
.guide{padding-left:20px;display:grid;gap:8px;margin:12px 0}.guide code{background:var(--surface-3);padding:1px 6px;border-radius:6px}.radio-row{display:grid;gap:10px;margin:10px 0}.inline-form{margin-top:10px}.card h3{margin:18px 0 6px;font-size:1rem}

.seg-item .icon{display:none;width:18px;height:18px}
@media (max-width:700px){.seg-item{display:inline-flex;align-items:center;justify-content:center;padding:7px 12px}.seg-item .icon{display:block}.seg-item .seg-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.topbar-settings{display:none}}
