/* FX Commission · product UI kit for the case page (works/commission.html).
   Mirrors the Figma file "FX Commission Platform": tokens, components and screens are drawn at 1440 px
   and scaled into the page by .cx-fit. Light / dark come from the same tokens (data-theme on .cx). */
.cx {
  --canvas:#F3F5F9; --surface:#FFFFFF; --raised:#FFFFFF; --subtle:#F7F9FC; --muted:#ECEFF5; --hover:#F1F4F9;
  --b1:#E3E7EE; --b2:#CDD4DF; --focus:#0F2C52;
  --t1:#0B1B33; --t2:#4A5468; --t3:#7C8699;
  --brand:#0F2C52; --brand-h:#1A3C6C; --on:#FFFFFF; --bsub:#E8EEF7; --bsub2:#D3DFF0; --btext:#1E4C8A;
  --nav:#0F2C52; --navpill:#1D3E69; --navt:#FFFFFF; --navm:#9FB3D1; --navb:#24456F;
  --ok:#0E9F6E; --okS:#E6F6EF; --okT:#0B7A55; --warn:#D98A0B; --warnS:#FDF3E1; --warnT:#9A5E00;
  --bad:#D93A3A; --badS:#FCEBEB; --badT:#B42323; --info:#0E8FA3; --infoS:#E3F5F8; --infoT:#0B6F80;
  --c1:#0F2C52; --c2:#3E7BFA; --c3:#14B8A6; --c4:#7DB8F0; --c5:#C5CCD8; --scrim:rgba(11,27,51,.45);
  --sh-sm:0 1px 2px rgba(13,28,51,.06); --sh-md:0 2px 6px rgba(13,28,51,.06),0 12px 28px -6px rgba(13,28,51,.08); --sh-lg:0 8px 24px -4px rgba(8,18,38,.14),0 32px 64px -12px rgba(8,18,38,.22);
  font-family:"Geist",system-ui,sans-serif; font-size:13px; line-height:18px; color:var(--t1); background:var(--canvas);
  -webkit-font-smoothing:antialiased; letter-spacing:0; text-align:left;
}
.cx[data-theme="dark"] {
  --canvas:#070C16; --surface:#0D1525; --raised:#121C30; --subtle:#101A2C; --muted:#18243A; --hover:#16223A;
  --b1:#1E2A42; --b2:#2B3A57; --focus:#5B95FF;
  --t1:#E8EDF6; --t2:#9AA6BC; --t3:#66738C;
  --brand:#5B95FF; --brand-h:#78A9FF; --on:#06142A; --bsub:#12264A; --bsub2:#1A3360; --btext:#8DB6FF;
  --nav:#0A1222; --navpill:#16233A; --navt:#E8EDF6; --navm:#7E8BA3; --navb:#1B2740;
  --ok:#34D399; --okS:#0D2A22; --okT:#5EE3B0; --warn:#F5B544; --warnS:#2E230E; --warnT:#F7C66B;
  --bad:#F87171; --badS:#2E1418; --badT:#FF9B9B; --info:#22D3EE; --infoS:#0B2A31; --infoT:#67E8F9;
  --c1:#5B95FF; --c2:#3460B5; --c3:#2DD4BF; --c4:#38BDF8; --c5:#3A4A68; --scrim:rgba(0,0,0,.55);
  --sh-sm:0 1px 2px rgba(0,0,0,.3); --sh-md:0 2px 6px rgba(0,0,0,.3),0 12px 28px -6px rgba(0,0,0,.35); --sh-lg:0 8px 24px -4px rgba(0,0,0,.45),0 32px 64px -12px rgba(0,0,0,.6);
}
.cx *, .cx *::before, .cx *::after { box-sizing:border-box; }
.cx, .cx * { transition-property:background-color,border-color,color,box-shadow,opacity,transform,width,flex-grow; transition-duration:0s; }
.cx.cx-anim, .cx.cx-anim * { transition-duration:.45s; transition-timing-function:cubic-bezier(.2,.8,.2,1); }
.cx svg { display:inline-block; flex:none; fill:currentColor; }
.cx b, .cx strong { font-weight:500; }
.cx .mono, .cx .num { font-family:"Geist Mono",ui-monospace,monospace; font-weight:500; font-size:12.5px; letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
.cx .r { display:flex; align-items:center; gap:8px; min-width:0; }
.cx .c { display:flex; flex-direction:column; gap:4px; min-width:0; }
.cx .g { flex:1 1 0; min-width:0; }
.cx .t2 { color:var(--t2); } .cx .t3 { color:var(--t3); } .cx .bt { color:var(--btext); }
.cx .h1 { font-size:24px; line-height:32px; font-weight:500; letter-spacing:-.012em; }
.cx .h2 { font-size:18px; line-height:26px; font-weight:500; letter-spacing:-.006em; }
.cx .h3 { font-size:14px; line-height:20px; font-weight:600; }
.cx .cap { font-size:12px; line-height:16px; }
.cx .ovl { font-size:11px; line-height:14px; font-weight:500; letter-spacing:.04em; text-transform:uppercase; color:var(--t3); }
.cx .bigN { font-size:36px; line-height:40px; font-weight:400; letter-spacing:-.034em; }
.cx .midN { font-size:24px; line-height:30px; font-weight:400; letter-spacing:-.02em; }
.cx .disp { font-size:40px; line-height:44px; font-weight:400; letter-spacing:-.04em; }
.cx .trunc { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cx .strike { text-decoration:line-through; }

/* top bar */
.cx-top { display:flex; align-items:center; gap:20px; height:60px; padding:0 24px; background:var(--nav); border-bottom:1px solid var(--navb); color:var(--navt); }
.cx-logo { display:flex; align-items:center; gap:9px; font-size:16px; font-weight:500; letter-spacing:-.015em; color:var(--navt); white-space:nowrap; }
.cx-logo b { font-weight:600; }
.cx-vr { width:1px; height:20px; background:var(--navb); }
.cx-region { display:flex; align-items:center; gap:8px; height:32px; padding:0 10px 0 8px; border:1px solid var(--navb); border-radius:8px; color:var(--navm); font-size:12px; cursor:pointer; }
.cx-region b { color:var(--navt); font-size:13px; }
.cx-region.is-open { background:var(--navpill); }
.cx-mods { display:flex; gap:2px; flex:1; padding-left:12px; }
.cx-mod { display:flex; align-items:center; gap:6px; height:34px; padding:0 14px; border-radius:99px; color:var(--navm); font-weight:500; }
.cx-mod.on { background:var(--navpill); color:var(--navt); }
.cx-mod i { font-style:normal; background:#F5B544; color:#0B1B33; border-radius:99px; padding:1px 6px; font-size:11px; line-height:16px; }
.cx-search { display:flex; align-items:center; gap:8px; width:260px; height:34px; padding:0 6px 0 12px; border-radius:99px; background:var(--navpill); color:var(--navm); font-size:12px; cursor:pointer; }
.cx-search span { flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cx-search .cx-kbd { flex:none; }
.cx-kbd { border:1px solid var(--navb); border-radius:6px; padding:1px 6px; font-size:11px; }
.cx-ring { width:34px; height:34px; border-radius:99px; border:1px solid var(--navb); display:grid; place-items:center; color:var(--navt); position:relative; }
.cx-ring .dot { position:absolute; top:7px; right:8px; width:8px; height:8px; border-radius:99px; background:#F5B544; box-shadow:0 0 0 2px var(--nav); }
.cx-theme { display:flex; gap:2px; padding:3px; height:34px; border:1px solid var(--navb); border-radius:99px; cursor:pointer; }
.cx-theme span { width:28px; height:26px; border-radius:99px; display:grid; place-items:center; color:var(--navm); }
.cx-theme span.on { background:var(--navpill); color:var(--navt); }
.cx-sun { width:12px; height:12px; border-radius:99px; box-shadow:0 0 0 2px currentColor inset; }
.cx-moon { width:12px; height:12px; border-radius:99px; background:radial-gradient(circle at 70% 30%, transparent 5px, currentColor 5.5px); }
.cx-me { width:32px; height:32px; }

/* buttons */
.cx-btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; height:36px; padding:0 14px; border-radius:8px; font-weight:500; white-space:nowrap; border:1px solid transparent; color:var(--t1); background:none; cursor:pointer; font:inherit; font-weight:500; }
.cx-btn.sm { height:28px; padding:0 10px; font-size:12px; }
.cx-btn.pri { background:var(--brand); color:var(--on); box-shadow:var(--sh-sm); }
.cx-btn.sec { background:var(--surface); border-color:var(--b2); color:var(--t1); }
.cx-btn.gho { color:var(--t2); }
.cx-btn.sub { background:var(--bsub); color:var(--btext); }
.cx-btn.dan { background:var(--bad); color:#fff; }
.cx-btn[disabled], .cx-btn.is-off { opacity:.4; pointer-events:none; }
.cx-ib { width:32px; height:32px; border-radius:8px; display:grid; place-items:center; color:var(--t1); border:1px solid var(--b1); background:var(--surface); }
.cx-ib.gho { border-color:transparent; background:none; color:var(--t2); }

/* badges, chips */
.cx-bd { display:inline-flex; align-items:center; gap:6px; height:20px; padding:0 8px; border-radius:99px; font-size:12px; font-weight:500; white-space:nowrap; background:var(--muted); color:var(--t2); }
.cx-bd::before { content:""; width:6px; height:6px; border-radius:99px; background:var(--t3); }
.cx-bd.nod::before { display:none; }
.cx-bd.ok { background:var(--okS); color:var(--okT); } .cx-bd.ok::before { background:var(--ok); }
.cx-bd.warn { background:var(--warnS); color:var(--warnT); } .cx-bd.warn::before { background:var(--warn); }
.cx-bd.bad { background:var(--badS); color:var(--badT); } .cx-bd.bad::before { background:var(--bad); }
.cx-bd.info { background:var(--infoS); color:var(--infoT); } .cx-bd.info::before { background:var(--info); }
.cx-bd.brand { background:var(--bsub); color:var(--btext); } .cx-bd.brand::before { background:var(--brand); }
.cx-chip { display:inline-flex; align-items:center; height:22px; padding:0 7px; border-radius:6px; background:var(--muted); color:var(--t2); font-size:12px; font-weight:500; white-space:nowrap; }
.cx-lvl { display:inline-flex; height:20px; align-items:center; padding:0 7px; border:1px solid var(--b2); border-radius:6px; color:var(--t2); font-family:"Geist Mono",monospace; font-weight:500; font-size:11.5px; }

/* fields */
.cx-in { display:flex; align-items:center; gap:8px; height:36px; padding:0 12px; border:1px solid var(--b2); border-radius:8px; background:var(--surface); color:var(--t3); min-width:0; }
.cx-in > span { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cx-in.val { color:var(--t1); } .cx-in.val > svg { color:var(--t3); }
.cx-in.foc { border-color:var(--focus); box-shadow:0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.cx-in.err { border-color:var(--bad); }
.cx-in.sm { height:32px; }
.cx-lab { font-size:12px; font-weight:500; color:var(--t2); }
.cx-cb { width:16px; height:16px; border-radius:4.5px; border:1.25px solid var(--b2); background:var(--surface); display:grid; place-items:center; color:var(--on); flex:none; cursor:pointer; }
.cx-cb.on, .cx-cb.mix { background:var(--brand); border-color:var(--brand); }
.cx-cb svg { width:12px; height:12px; }
.cx-tg { width:32px; height:18px; border-radius:99px; background:var(--b2); padding:2px; display:flex; flex:none; }
.cx-tg::after { content:""; width:14px; height:14px; border-radius:99px; background:#fff; box-shadow:var(--sh-sm); }
.cx-tg.on { background:var(--brand); justify-content:flex-end; }
.cx-av { width:28px; height:28px; border-radius:99px; display:grid; place-items:center; flex:none; font-size:11px; font-weight:500; background:var(--bsub); color:var(--btext); }
.cx-av.info { background:var(--infoS); color:var(--infoT); } .cx-av.ok { background:var(--okS); color:var(--okT); } .cx-av.warn { background:var(--warnS); color:var(--warnT); } .cx-av.neu { background:var(--muted); color:var(--t2); }
.cx-av.s24 { width:24px; height:24px; font-size:9.5px; } .cx-av.s32 { width:32px; height:32px; font-size:12px; } .cx-av.s40 { width:40px; height:40px; font-size:15px; } .cx-av.s44 { width:44px; height:44px; font-size:16px; }

/* tabs, segments */
.cx-tabs { display:flex; gap:24px; border-bottom:1px solid var(--b1); }
.cx-tab { padding:10px 2px; font-size:14px; font-weight:500; color:var(--t3); border-bottom:2px solid transparent; margin-bottom:-1px; white-space:nowrap; cursor:pointer; }
.cx-tab.on { color:var(--t1); border-color:var(--brand); }
.cx-seg { display:inline-flex; gap:2px; padding:2px; border-radius:8px; background:var(--muted); }
.cx-seg span { height:28px; padding:0 12px; display:flex; align-items:center; border-radius:6px; font-size:12px; font-weight:500; color:var(--t2); white-space:nowrap; cursor:pointer; }
.cx-seg span.on { background:var(--surface); color:var(--t1); box-shadow:var(--sh-sm); }

/* card, table */
.cx-card { background:var(--surface); border:1px solid var(--b1); border-radius:14px; min-width:0; }
.cx-ch { display:flex; align-items:center; gap:10px; padding:16px 20px; border-bottom:1px solid var(--b1); }
.cx-tbl { width:100%; }
.cx-tr { display:flex; align-items:center; min-height:44px; border-bottom:1px solid var(--b1); }
.cx-tr:last-child { border-bottom:0; }
.cx-tr.hd { min-height:36px; background:var(--subtle); color:var(--t3); font-size:12px; font-weight:500; }
.cx-td { padding:0 14px; display:flex; align-items:center; gap:8px; min-width:0; overflow:hidden; }
.cx-td.rt { justify-content:flex-end; text-align:right; }
.cx-td.ct { justify-content:center; }
.cx-tr.sel { background:var(--bsub); } .cx-tr.held { background:var(--warnS); } .cx-tr.err { background:var(--badS); } .cx-tr.fix { background:var(--okS); } .cx-tr.chg { background:var(--warnS); }
.cx-grp { padding:6px 16px; background:var(--subtle); border-bottom:1px solid var(--b1); }

/* overlays */
.cx-scrim { position:absolute; inset:0; background:var(--scrim); }
.cx-pop { position:absolute; background:var(--surface); border:1px solid var(--b1); border-radius:14px; box-shadow:var(--sh-lg); overflow:hidden; }
.cx-dlg { position:absolute; background:var(--surface); border-radius:16px; box-shadow:var(--sh-lg); overflow:hidden; }
.cx-toast { position:absolute; display:flex; align-items:center; gap:10px; padding:12px 16px; border-radius:12px; background:var(--nav); color:var(--navt); border:1px solid var(--navb); box-shadow:var(--sh-lg); font-weight:500; white-space:nowrap; }
.cx-toast svg { color:var(--c4); }
.cx-bulk { position:absolute; display:flex; align-items:center; gap:12px; height:56px; padding:0 8px 0 18px; border-radius:14px; background:var(--nav); border:1px solid var(--navb); color:var(--navt); box-shadow:var(--sh-lg); }
.cx-bulk .lk { color:var(--c4); font-size:12px; font-weight:500; cursor:pointer; }
.cx-bulk .rj { display:flex; align-items:center; gap:6px; height:36px; padding:0 12px; border-radius:8px; border:1px solid var(--navb); font-weight:500; }
.cx-bulk .cf { display:flex; align-items:center; gap:6px; height:36px; padding:0 14px; border-radius:8px; background:var(--navt); color:var(--nav); font-weight:500; cursor:pointer; }

/* bars */
.cx-bar { height:6px; border-radius:99px; background:var(--muted); overflow:hidden; }
.cx-bar i { display:block; height:100%; border-radius:99px; background:var(--brand); }
.cx-split { display:flex; gap:3px; height:40px; border-radius:10px; overflow:hidden; }
.cx-split > span { display:flex; align-items:center; padding:0 12px; color:#fff; font-family:"Geist Mono",monospace; font-weight:500; font-size:12.5px; white-space:nowrap; overflow:hidden; min-width:0; }
.cx-split > .s1 { background:var(--c1); } .cx-split > .s2 { background:var(--c2); } .cx-split > .s3 { background:var(--c3); } .cx-split > .s5 { background:var(--c5); color:var(--t2); } .cx-split > .sx { background:var(--bad); }

/* screen frame for renders */
.cx-screen { width:1440px; position:relative; overflow:hidden; }
.cx-body { padding:24px 32px 32px; display:flex; flex-direction:column; gap:20px; }
.cx-side { width:248px; flex:none; padding:20px 12px; background:var(--surface); border-right:1px solid var(--b1); display:flex; flex-direction:column; gap:2px; }
.cx-nav { display:flex; align-items:center; gap:10px; padding:7px 10px; border-radius:8px; color:var(--t2); }
.cx-nav.on { background:var(--bsub); color:var(--btext); }
.cx-nav span { flex:1; }

/* fit box: a design-size layer scaled to the box width (see CXfit in kit.js) */
.cx-fit { position:relative; width:100%; aspect-ratio:var(--gw) / var(--gh); overflow:hidden; }
.cx-fit > .cx-layer { position:absolute; left:0; top:0; width:calc(var(--gw) * 1px); height:calc(var(--gh) * 1px); transform-origin:0 0; transform:scale(var(--gs, 1)); }
