/* BackComTrader app (/app) — shell + shared components. OWNER: app builder 1.
   Layout, spacing, radii, type and motion are app.backcom.io's (Tailwind classes read from the REA chunks, custom
   lg-/bc- rules from its production CSS); colour is the gold BackComTrader tone. html[data-skin=source] (?skin=source)
   restores the source lime tokens for side-by-side parity checks (docs/DECISIONS.md, App rule).
   Shared component classes for every app page: .ap-page .ap-card(.ap-card-h/.ap-card-b) .ap-btn .ap-btn-ghost .ap-chip
   .ap-input .ap-label .ap-field .ap-err .ap-shimmer .ap-muted .ap-tabs/.ap-tab .ap-modal .ap-empty .t-* text helpers. */

/* ------------------------------------------------------------------ tokens */
:root {
  --ap-p: var(--gold-500, #FFC72C);        /* primary fill */
  --ap-p2: var(--gold-200, #FFDF85);       /* gradient partner (source: mint) */
  --ap-p-rgb: 255 199 44;
  --ap-pt: var(--gold-500, #FFC72C);       /* primary used as text */
  --ap-p-ink: #121110;                      /* text on primary */
  --ap-grad: linear-gradient(324deg, var(--ap-p2), var(--ap-p) 42%);
  --ap-bar: linear-gradient(180deg, var(--ap-p), var(--ap-p2));
  --ap-bg: #0B0B0C;
  --ap-surface: #17171A;                    /* bg-surface (dropdown panels) */
  --ap-raised: #1C1C20;
  --ap-drawer: #0E0E10;
  --ap-text: #F7F6F2;                       /* text-white */
  --ap-g100: #EDECE7; --ap-g200: #DAD9D3; --ap-g300: #C3C2BB; --ap-g400: #A09F98; --ap-g500: #7F7E78;
  --ap-line: rgb(255 255 255 / .1);
  --ap-line-6: rgb(255 255 255 / .06);
  --ap-line-5: rgb(255 255 255 / .05);
  --ap-w2: rgb(255 255 255 / .02);
  --ap-w3: rgb(255 255 255 / .03);
  --ap-w4: rgb(255 255 255 / .04);
  --ap-w5: rgb(255 255 255 / .05);
  --ap-w10: rgb(255 255 255 / .1);
  --ap-amber: #FF9F1A;  --ap-amber-rgb: 255 159 26;
  --ap-sky: #6CB4FF;    --ap-sky-rgb: 108 180 255;
  --ap-red: #FF6B63;    --ap-red-rgb: 255 107 99;
  --ap-red-soft: #FCA5A5;
  --ap-up: #34D399;     --ap-down: #F87171;
  --ap-violet: #A78BFA;
  --ap-amb-a: rgb(255 199 44 / .09); --ap-amb-b: rgb(255 223 133 / .06); --ap-amb-c: rgb(255 199 44 / .05);
  --ap-glass-bg: linear-gradient(180deg, rgb(255 255 255 / .065), rgb(255 255 255 / .025));
  --ap-glass-line: rgb(255 255 255 / .09);
  --ap-glass-sh: inset 0 1px 0 rgb(255 255 255 / .1), inset 0 -1px 0 rgb(255 255 255 / .02), 0 24px 60px -24px rgb(0 0 0 / .75);
  --ap-glass-hi: radial-gradient(120% 55% at 0 0, rgb(255 255 255 / .07), transparent 60%);
  --ap-menu-bg: rgb(20 19 18 / .78);
  --ap-shadow-card: none;
  --ap-font-num: var(--font-sans);
  --ap-chart-1: #FFC72C; --ap-chart-2: #FFE7A3; --ap-chart-3: #38BDF8; --ap-chart-4: #A78BFA; --ap-chart-o: #5C5B57;
  --ap-consent-left: 0px;
  color-scheme: dark;
}
html[data-skin=source] {
  --ap-p: #8dff08; --ap-p2: #08ffb5; --ap-p-rgb: 141 255 8; --ap-pt: #8dff08; --ap-p-ink: #0a0a0a;
  --ap-bg: #090e0a; --ap-surface: #181a16; --ap-raised: #1d1f1b; --ap-drawer: #0b0f0b;
  --ap-text: #f5f7f1;
  --ap-g100: #eceee8; --ap-g200: #d9dcd3; --ap-g300: #c1c5ba; --ap-g400: #9da296; --ap-g500: #7b8174;
  --ap-amber: #fcd34d; --ap-amber-rgb: 252 211 77; --ap-sky: #38bdf8; --ap-sky-rgb: 56 189 248; --ap-red: #f87171; --ap-red-rgb: 248 113 113;
  --ap-amb-a: rgb(141 255 8 / .09); --ap-amb-b: rgb(8 255 181 / .06); --ap-amb-c: rgb(141 255 8 / .05);
  --ap-menu-bg: rgb(18 20 18 / .72);
  --ap-chart-1: #8DFF08; --ap-chart-2: #08FFB5; --ap-chart-3: #38BDF8; --ap-chart-4: #A78BFA; --ap-chart-o: #6B7280;
}
html[data-theme=light] {
  --ap-pt: #805B00;
  --ap-bg: #F2F1EC; --ap-surface: #FFFFFF; --ap-raised: #FFFFFF;
  --ap-text: #121110;
  --ap-g100: #1E1D1A; --ap-g200: #2B2925; --ap-g300: #423F39; --ap-g400: #5D5A53; --ap-g500: #5D5A53;
  --ap-line: rgb(18 17 16 / .1); --ap-line-6: rgb(18 17 16 / .06); --ap-line-5: rgb(18 17 16 / .05);
  --ap-w2: rgb(18 17 16 / .02); --ap-w3: #FFFFFF; --ap-w4: rgb(18 17 16 / .035); --ap-w5: rgb(18 17 16 / .045); --ap-w10: rgb(18 17 16 / .08);
  --ap-amber: #9A5800; --ap-sky: #1C62B5; --ap-red: #C42B2B; --ap-red-soft: #B3261E; --ap-up: #0E7A43; --ap-down: #C42B2B;
  --ap-amb-a: rgb(255 199 44 / .16); --ap-amb-b: rgb(255 223 133 / .14); --ap-amb-c: rgb(255 199 44 / .08);
  --ap-glass-bg: linear-gradient(180deg, rgb(255 255 255 / .82), rgb(250 249 245 / .66));
  --ap-glass-line: rgb(18 17 16 / .08);
  --ap-glass-sh: inset 0 1px 0 rgb(255 255 255 / .9), 0 18px 48px -24px rgb(18 17 16 / .25);
  --ap-glass-hi: radial-gradient(120% 55% at 0 0, rgb(255 255 255 / .55), transparent 60%);
  --ap-menu-bg: rgb(255 255 255 / .9);
  --ap-shadow-card: 0 1px 2px rgb(18 17 16 / .04), 0 10px 28px -20px rgb(18 17 16 / .18);
  --ap-chart-2: #B8860B; --ap-chart-o: #A9A8A3;
  color-scheme: light;
}
html[data-theme=light][data-skin=source] {
  --ap-pt: #3a7d00; --ap-bg: #ecf4e2; --ap-text: #0b0c0a; --ap-chart-2: #08FFB5;
  --ap-g100: #1f221c; --ap-g200: #2a2d26; --ap-g300: #41453c; --ap-g400: #5a5f53; --ap-g500: #5a5f53;
  --ap-amber: #b45309; --ap-sky: #0369a1; --ap-red: #dc2626;
}
/* sections that stay dark in the light theme (sidebar, balance hero, bottom bar, drawer) */
html[data-theme=light] .keep-dark {
  --ap-pt: var(--ap-p); --ap-text: #F7F6F2;
  --ap-g100: #EDECE7; --ap-g200: #DAD9D3; --ap-g300: #C3C2BB; --ap-g400: #A09F98; --ap-g500: #7F7E78;
  --ap-line: rgb(255 255 255 / .1); --ap-line-6: rgb(255 255 255 / .06); --ap-line-5: rgb(255 255 255 / .05);
  --ap-w2: rgb(255 255 255 / .02); --ap-w3: rgb(255 255 255 / .03); --ap-w4: rgb(255 255 255 / .04); --ap-w5: rgb(255 255 255 / .05); --ap-w10: rgb(255 255 255 / .1);
  --ap-amber: #FF9F1A; --ap-sky: #6CB4FF; --ap-red: #FF6B63; --ap-red-soft: #FCA5A5;
  color: var(--ap-text); color-scheme: dark;
}
html[data-theme=light][data-skin=source] .keep-dark { --ap-text: #f5f7f1; --ap-g200: #d9dcd3; --ap-g300: #c1c5ba; --ap-g400: #9da296; --ap-g500: #7b8174; --ap-amber: #fcd34d; --ap-sky: #38bdf8; --ap-red: #f87171; }

/* ------------------------------------------------------------------ base */
body.ap { margin: 0; min-height: 100vh; background: var(--ap-bg); color: var(--ap-text); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
:where(body.ap a) { color: inherit; text-decoration: none; }
:where(body.ap button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(body.ap) :where(h1, h2, h3, p) { margin: 0; }
:where(body.ap ul) { list-style: none; margin: 0; padding: 0; }
.ap [hidden] { display: none !important; }
.ap-ic { width: 20px; height: 20px; flex-shrink: 0; display: block; }
.ap-skip { position: absolute; left: -9999px; top: 8px; z-index: 300; padding: 8px 14px; border-radius: 10px; background: var(--ap-p); color: var(--ap-p-ink); font-weight: 600; }
.ap-skip:focus { left: 12px; }
.ap :focus-visible { outline: 2px solid var(--ap-p); outline-offset: 2px; }
.tnum, .ap-num { font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums; }
.font-display { font-family: var(--font-sans); font-feature-settings: "tnum" 1; letter-spacing: -.02em; }
.t-white { color: var(--ap-text); } .t-g200 { color: var(--ap-g200); } .t-g300 { color: var(--ap-g300); } .t-g400 { color: var(--ap-g400); } .t-g500 { color: var(--ap-g500); }
.t-primary { color: var(--ap-pt); } .t-amber { color: var(--ap-amber); } .t-sky { color: var(--ap-sky); } .t-red { color: var(--ap-red); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------------------ source custom classes (lg-*, bc-*) */
.lg-glass { position: relative; isolation: isolate; background: var(--ap-glass-bg); backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%); border: 1px solid var(--ap-glass-line); box-shadow: var(--ap-glass-sh); }
.lg-glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; background: var(--ap-glass-hi); }
html[data-theme=light] .keep-dark.lg-glass { background: linear-gradient(180deg, #19181a, #0f0f10); border-color: rgb(255 255 255 / .07); box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 24px 56px -28px rgb(11 12 10 / .6); }
html[data-theme=light] .keep-dark.lg-glass::before { background: radial-gradient(120% 55% at 0 0, rgb(var(--ap-p-rgb) / .1), transparent 60%); }
html[data-theme=light][data-skin=source] .keep-dark.lg-glass { background: linear-gradient(180deg, #161a13, #0e110c); }
.lg-glass-menu { background: var(--ap-menu-bg); backdrop-filter: blur(28px) saturate(170%); -webkit-backdrop-filter: blur(28px) saturate(170%); border: 1px solid var(--ap-line); box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), 0 24px 60px -20px rgb(0 0 0 / .8); }
html[data-theme=light] .lg-glass-menu { box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), 0 20px 50px -20px rgb(18 17 16 / .3); }
.lg-item { position: relative; border: 1px solid transparent; }
.lg-item:hover { background: var(--ap-w5); border-color: var(--ap-line-6); box-shadow: inset 0 1px 0 rgb(255 255 255 / .05); }
html[data-theme=light] .lg-item:hover { box-shadow: none; }
.lg-item-active, .lg-item-active:hover { color: var(--ap-text) !important; font-weight: 600; background: linear-gradient(90deg, rgb(var(--ap-p-rgb) / .13), rgb(var(--ap-p-rgb) / .02) 80%); border-color: transparent; box-shadow: none; }
.lg-item-active .ap-ic { color: var(--ap-p) !important; }
.lg-item-active::before { content: ""; position: absolute; left: -1px; top: 24%; bottom: 24%; width: 3px; border-radius: 9999px; background: var(--ap-bar); box-shadow: 0 0 10px rgb(var(--ap-p-rgb) / .55); }
.lg-sub.lg-item-active::before { left: -10px; top: 18%; bottom: 18%; }
html[data-theme=light] .lg-item-active:not(.keep-dark *) { color: #10130e !important; background: linear-gradient(90deg, rgb(201 148 0 / .16), rgb(201 148 0 / .03) 80%); }
html[data-theme=light] .lg-item-active:not(.keep-dark *) .ap-ic { color: var(--ap-pt) !important; }
.lg-item.lg-item-exness { color: #ffe45c; font-weight: 600; background: linear-gradient(90deg, rgb(255 222 2 / .14), rgb(255 179 0 / .03) 85%); border-color: rgb(255 222 2 / .22); box-shadow: inset 0 1px 0 rgb(255 240 120 / .08); }
.lg-item.lg-item-exness.is-on, .lg-item.lg-item-exness:hover { background: linear-gradient(90deg, rgb(255 222 2 / .22), rgb(255 179 0 / .05) 85%); border-color: rgb(255 222 2 / .38); }
.lg-item-exness .ap-ic { color: #ffde02 !important; }
.lg-item-exness.is-on::before { content: ""; position: absolute; left: -1px; top: 24%; bottom: 24%; width: 3px; border-radius: 9999px; background: linear-gradient(180deg, #fff27a, #ffb300); box-shadow: 0 0 10px rgb(255 222 2 / .55); }
.lg-exness-text { background: linear-gradient(90deg, #fff27a, #ffde02 45%, #ffb300); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-exness-badge { background: linear-gradient(135deg, #fff27a, #ffde02 50%, #ffb300); color: #1a1600; }
.lg-exness-chip { background: rgb(255 222 2 / .14) !important; color: #ffde02 !important; }
@keyframes lg-marquee { 0% { transform: translateZ(0); } to { transform: translate3d(-50%, 0, 0); } }
.lg-marquee { animation: lg-marquee var(--lg-marquee-duration, 90s) linear infinite; will-change: transform; }
.lg-marquee-mask:focus-within .lg-marquee, .lg-marquee-mask:hover .lg-marquee { animation-play-state: paused; }
.lg-marquee-mask { -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent); }
@media (prefers-reduced-motion: reduce) { .lg-marquee { animation-duration: calc(var(--lg-marquee-duration, 90s) * 2); } }
.lg-ambient { background: radial-gradient(38rem 26rem at 8% -6%, var(--ap-amb-a), transparent 70%), radial-gradient(34rem 24rem at 96% 4%, var(--ap-amb-b), transparent 70%), radial-gradient(40rem 30rem at 60% 110%, var(--ap-amb-c), transparent 70%); }
.lg-grain::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .035; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
html[data-theme=light] .lg-grain::after { opacity: .025; mix-blend-mode: multiply; }
.bc-shimmer, .ap-shimmer { display: block; position: relative; overflow: hidden; background-color: rgb(255 255 255 / .06); border-radius: .5rem; }
.bc-shimmer::after, .ap-shimmer::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgb(255 255 255 / .09) 45%, rgb(var(--ap-p-rgb) / .05) 50%, rgb(255 255 255 / .09) 55%, transparent); animation: bc-shimmer 1.4s ease-in-out infinite; }
html[data-theme=light] .ap-shimmer:not(.keep-dark .ap-shimmer) { background-color: rgb(18 17 16 / .06); }
html[data-theme=light] .ap-shimmer:not(.keep-dark .ap-shimmer)::after { background: linear-gradient(90deg, transparent, rgb(255 255 255 / .75) 50%, transparent); }
@keyframes bc-shimmer { to { transform: translateX(100%); } }
.bc-fade-up { animation: bc-fade-up .35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes bc-fade-up { 0% { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes dash-rise { 0% { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .dash-enter > .ap-page > * { animation: dash-rise .52s cubic-bezier(.16, 1, .3, 1) both; }
  .dash-enter > .ap-page > :nth-child(2) { animation-delay: 50ms; } .dash-enter > .ap-page > :nth-child(3) { animation-delay: .1s; }
  .dash-enter > .ap-page > :nth-child(4) { animation-delay: .15s; } .dash-enter > .ap-page > :nth-child(5) { animation-delay: .2s; }
  .dash-enter > .ap-page > :nth-child(n+6) { animation-delay: .24s; }
}
@media (prefers-reduced-motion: reduce) { .bc-shimmer::after, .ap-shimmer::after { animation: none; display: none; } .bc-fade-up { animation: none; } }
.fx-dots { background-image: radial-gradient(circle at center, var(--fx-dot, rgb(247 246 242 / .16)) 1px, transparent 1.6px); background-size: 22px 22px; background-position: top; }
.fx-dots--right { -webkit-mask-image: radial-gradient(90% 120% at 100% 0, #000 0, transparent 70%); mask-image: radial-gradient(90% 120% at 100% 0, #000 0, transparent 70%); }
html[data-theme=light] .fx-dots { --fx-dot: rgb(18 17 16 / .16); }

/* ------------------------------------------------------------------ app frame */
.ap-root { min-height: 100vh; position: relative; }
.ap-bg { position: fixed; inset: 0; z-index: 0; background: var(--ap-bg); }
.ap-bg-dim { position: fixed; inset: 0; z-index: 0; }
.ap-ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.ap-main { position: relative; z-index: 10; min-height: 100vh; transition: padding .3s; }
.ap-content { width: 100%; max-width: 28rem; margin: 0 auto; padding: 0 .5rem 6rem; box-sizing: border-box; }
.ap-page { margin: 0 auto; width: 100%; max-width: 1400px; padding: 1rem .5rem; box-sizing: border-box; display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 640px) { .ap-page { padding-left: 1rem; padding-right: 1rem; } }
@media (min-width: 1024px) {
  .ap-main { padding-top: 4.25rem; padding-left: 16rem; }
  .ap-collapsed .ap-main { padding-left: 5.5rem; }
  .ap-content { max-width: none; margin: 0; padding: 1.5rem; }
  .ap-page { padding: .5rem; }
}

/* sidebar */
.ap-aside { display: none; }
@media (min-width: 1024px) {
  .ap-aside { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 50; padding: .75rem; width: 16rem; box-sizing: border-box; transition: width .3s; }
  .ap-collapsed .ap-aside { width: 5.5rem; }
}
.ap-aside-in { display: flex; flex-grow: 1; flex-direction: column; overflow-y: auto; overflow-x: hidden; border-radius: 28px; padding: 1.25rem .625rem; scrollbar-width: none; color: var(--ap-text); }
.ap-aside-in::-webkit-scrollbar { display: none; }
.ap-brand { display: flex; align-items: center; margin-bottom: 1.75rem; padding: 0 .875rem; min-height: 28px; }
.ap-brand-link { display: flex; align-items: center; }
.ap-logo-full { height: 22px; width: auto; display: block; }
.ap-logo-mark { height: 28px; width: 28px; display: none; }
.ap-nav { display: flex; flex: 1; flex-direction: column; }
.ap-nav-list { display: flex; flex: 1; flex-direction: column; gap: .25rem; }
.ap-nav-item { display: flex; width: 100%; box-sizing: border-box; align-items: center; gap: .75rem; border-radius: 1rem; padding: .625rem .875rem; font-size: .875rem; line-height: 1.25rem; font-weight: 500; color: var(--ap-g400); transition: all .2s; text-align: left; }
.ap-nav-item:hover, .ap-nav-item.is-current { color: var(--ap-text); }
.ap-nav-item .ap-nav-ic { color: var(--ap-g300); transition: color .15s; }
.ap-nav-item:hover .ap-nav-ic { color: var(--ap-text); }
.ap-nav-item.is-current .ap-nav-ic { color: var(--ap-p); }
.ap-nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ap-nav-badge { margin-left: auto; border-radius: 9999px; padding: .125rem .5rem; font-size: .75rem; line-height: 1rem; font-weight: 700; flex-shrink: 0; }
.ap-nav-badge.is-icon { margin-left: .25rem; padding: 0; display: flex; align-items: center; justify-content: center; }
.ap-nav-badge.is-icon .ap-ic { width: 16px; height: 16px; }
.ap-flame { color: #FBBF24; }
.ap-nav-chev { width: 16px !important; height: 16px !important; margin-left: auto; transition: transform .2s; color: currentColor; }
.ap-nav-group.is-open > button .ap-nav-chev { transform: rotate(180deg); }
.ap-nav-sub { margin: .25rem 0 .25rem 1.45rem; display: flex; flex-direction: column; gap: .125rem; overflow: hidden; border-left: 1px solid var(--ap-line); padding-left: .5rem; }
.ap-nav-subitem { display: flex; align-items: center; gap: .75rem; border-radius: .75rem; padding: .5rem .75rem; font-size: .875rem; line-height: 1.25rem; font-weight: 500; color: var(--ap-g400); transition: all .2s; }
.ap-nav-subitem:hover { color: var(--ap-text); }
.ap-nav-ic-sm { width: 16px !important; height: 16px !important; color: var(--ap-g300); }
.ap-nav-subitem:hover .ap-nav-ic-sm { color: var(--ap-text); }
.ap-nav-ext { width: 16px !important; height: 16px !important; margin-left: auto; opacity: .5; }
.ap-res { margin-top: auto; display: flex; flex-direction: column; gap: .25rem; border-top: 1px solid var(--ap-line); padding-top: 1rem; }
.ap-res-title { padding: 0 .75rem; margin-bottom: .5rem; font-size: .75rem; line-height: 1rem; font-weight: 500; color: var(--ap-g500); text-transform: uppercase; letter-spacing: .05em; }
.ap-ver { padding: .5rem .875rem; font-size: 11px; font-weight: 500; letter-spacing: .025em; color: rgb(160 159 152 / .7); }
html[data-skin=source] .ap-ver { color: rgb(157 162 150 / .7); }
.ap-ver-short, .ap-collapse-r { display: none !important; }
/* collapsed sidebar (APP-54) */
.ap-collapsed .ap-brand { justify-content: center; padding: 0; }
.ap-collapsed .ap-logo-full { display: none; }
.ap-collapsed .ap-logo-mark { display: block; }
.ap-collapsed .ap-aside .ap-nav-item { justify-content: center; padding-left: .5rem; padding-right: .5rem; }
.ap-collapsed .ap-aside .ap-nav-label, .ap-collapsed .ap-aside .ap-nav-badge, .ap-collapsed .ap-aside .ap-nav-chev, .ap-collapsed .ap-aside .ap-nav-ext, .ap-collapsed .ap-aside .ap-res-title, .ap-collapsed .ap-aside .ap-nav-sub, .ap-collapsed .ap-ver-full, .ap-collapsed .ap-collapse-l { display: none !important; }
.ap-collapsed .ap-ver-short, .ap-collapsed .ap-collapse-r { display: block !important; }
.ap-collapsed .ap-ver { padding-left: 0; padding-right: 0; text-align: center; }

/* header */
.ap-header { display: none; }
@media (min-width: 1024px) {
  .ap-header { display: flex; position: fixed; top: .75rem; right: .75rem; left: 16rem; z-index: 40; height: 3.5rem; align-items: center; gap: 1rem; padding: 0 .75rem; border-radius: 1rem; transition: left .3s; }
  .ap-collapsed .ap-header { left: 5.5rem; }
}
.ap-header-in { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: flex-end; gap: 1rem; }
.ap-tick { margin-right: auto; display: flex; min-width: 0; flex: 1; align-items: center; gap: .75rem; }
.ap-live { display: flex; flex-shrink: 0; align-items: center; gap: .25rem; border-radius: 9999px; border: 1px solid var(--ap-line); padding: 1px .375rem; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ap-g400); }
.ap-live-dot { width: 6px; height: 6px; border-radius: 9999px; background: var(--ap-g400); }
.ap-live.is-on { border-color: rgb(52 211 153 / .3); color: #34d399; }
.ap-live.is-on .ap-live-dot { background: #34d399; animation: ap-pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
html[data-theme=light] .ap-live.is-on { color: #10b981; }
@keyframes ap-pulse { 50% { opacity: .5; } }
.ap-tick-mask { position: relative; min-width: 0; flex: 1; overflow: hidden; }
.ap-tick-skel { display: flex; gap: .75rem; }
.ap-tick-skel i { height: 1.5rem; width: 9rem; border-radius: .375rem; background: var(--ap-w5); animation: ap-pulse 2s infinite; }
.ap-tick-track { display: flex; width: max-content; }
.ap-tk-list { display: flex; flex-shrink: 0; align-items: center; }
.ap-tk { display: flex; flex-shrink: 0; align-items: center; }
.ap-tk-l { display: flex; align-items: center; gap: .375rem; font-size: 10px; font-weight: 600; letter-spacing: .025em; color: var(--ap-g400); }
.ap-tk-img { width: 15px; height: 15px; border-radius: 9999px; flex-shrink: 0; object-fit: cover; }
.ap-tk-dot { width: 6px; height: 6px; border-radius: 9999px; background: var(--ap-p); }
.ap-tk-dot.is-metal { background: #fbbf24; } .ap-tk-dot.is-energy { background: #f97316; } .ap-tk-dot.is-fx { background: #38bdf8; } .ap-tk-dot.is-equity { background: #a78bfa; }
.ap-tk-p { margin-left: .375rem; border-radius: .25rem; padding: 0 .25rem; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ap-text); transition: color .5s, background-color .5s; }
.ap-tk-p.is-up { background: rgb(52 211 153 / .15); color: #34d399; }
.ap-tk-p.is-down { background: rgb(248 113 113 / .15); color: #f87171; }
.ap-tk-c { margin-left: .125rem; font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ap-tk-c.is-up { color: #34d399; } .ap-tk-c.is-down { color: #f87171; }
html[data-theme=light] .ap-tk-c.is-up { color: #059669; } html[data-theme=light] .ap-tk-c.is-down { color: #dc2626; }
.ap-tk-sep { margin: 0 .75rem; height: .75rem; width: 1px; background: var(--ap-w10); }
.ap-demo { flex-shrink: 0; border-radius: 9999px; border: 1px dashed rgb(var(--ap-p-rgb) / .55); padding: 2px 8px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ap-pt); background: rgb(var(--ap-p-rgb) / .08); cursor: help; white-space: nowrap; }
.ap-demo.is-sm { padding: 1px 6px; font-size: 9px; }
/* dropdowns */
.ap-dd { position: relative; }
.ap-langbtn { display: flex; align-items: center; gap: .5rem; border-radius: .75rem; padding: .5rem .75rem; font-size: .875rem; color: var(--ap-g400); transition: color .15s; }
.ap-langbtn span { font-weight: 500; }
.ap-langbtn:hover { color: var(--ap-text); }
.ap-flag { width: 20px; height: 20px; border-radius: 9999px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px rgb(255 255 255 / .2); }
.ap-flag.is-18 { width: 18px; height: 18px; } .ap-flag.is-16 { width: 16px; height: 16px; }
.ap-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; border-radius: .75rem; overflow: hidden; padding: 0; animation: bc-fade-up .18s ease-out both; color: var(--ap-text); }
.ap-menu-lang { width: 10rem; } .ap-menu-mlang { width: 8rem; padding: .25rem 0; } .ap-menu-user { width: 16rem; }
.ap-menu-item { display: flex; width: 100%; box-sizing: border-box; align-items: center; gap: .75rem; padding: .75rem 1rem; font-size: .875rem; color: var(--ap-g400); transition: background .15s, color .15s; text-align: left; }
.ap-menu-item.is-sm { gap: .625rem; padding: .5rem 1rem; }
.ap-menu-item:hover, .ap-menu-item.is-on { background: var(--ap-w5); color: var(--ap-text); }
.ap-menu-user .ap-menu-item { padding: .625rem 1rem; }
.ap-menu-item.is-danger { color: rgb(var(--ap-red-rgb) / .8); }
html[data-theme=light] .ap-menu-item.is-danger { color: #C42B2B; }
.ap-dot-on { margin-left: auto; width: 8px; height: 8px; border-radius: 9999px; background: var(--ap-p); }
.ap-menu-head { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--ap-line); }
.ap-menu-who { flex: 1; min-width: 0; }
.ap-menu-body { padding: .25rem 0; }
.ap-theme { display: flex; align-items: center; gap: .5rem; border-radius: .5rem; padding: .5rem .625rem; font-size: .875rem; color: var(--ap-g400); transition: color .15s, background .15s; }
.ap-theme:hover { color: var(--ap-text); background: var(--ap-w10); }
.ap-theme .ap-ic { width: 16px; height: 16px; }
.ap-ic-moon { display: none !important; }
html[data-theme=light] .ap-ic-sun { display: none !important; }
html[data-theme=light] .ap-ic-moon { display: block !important; }
html[data-theme=light] .ap-header .ap-theme { background: rgb(18 17 16 / .05); color: var(--ap-g300); }
.ap-bell { position: relative; display: flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; border-radius: .75rem; color: var(--ap-g400); }
.ap-badge { position: absolute; right: -4px; top: -4px; display: flex; height: 1rem; min-width: 1rem; box-sizing: border-box; align-items: center; justify-content: center; border-radius: 9999px; background: var(--ap-p); padding: 0 .25rem; font-size: 10px; font-weight: 700; color: #000; line-height: 1; }
.ap-userbtn { display: flex; align-items: center; gap: .75rem; border-radius: .75rem; padding: .375rem .5rem; }
.ap-user-txt { display: none; text-align: left; max-width: 220px; min-width: 0; }
@media (min-width: 1280px) { .ap-user-txt { display: block; } }
.ap-user-name { display: block; font-size: .875rem; line-height: 1.25rem; font-weight: 500; color: var(--ap-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-user-mail { display: block; font-size: .75rem; line-height: 1rem; color: var(--ap-g400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-avatar { display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 9999px; background: rgb(var(--ap-p-rgb) / .2); color: var(--ap-pt); font-size: .875rem; font-weight: 700; flex-shrink: 0; }
.ap-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ap-avatar.is-36 { width: 36px; height: 36px; } .ap-avatar.is-40 { width: 40px; height: 40px; }
.ap-avatar.is-44 { width: 44px; height: 44px; background: rgb(var(--ap-p-rgb) / .15); font-size: 1rem; box-shadow: 0 0 0 2px rgb(var(--ap-p-rgb) / .25); }
/* notifications panel (APP-65) */
.ap-notif { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 380px; max-width: calc(100vw - 24px); overflow: hidden; border-radius: 1rem; border: 1px solid var(--ap-line); background: var(--ap-surface); box-shadow: 0 24px 60px -12px rgb(0 0 0 / .8); animation: bc-fade-up .18s ease-out both; }
html[data-theme=light] .ap-notif { box-shadow: 0 24px 60px -20px rgb(18 17 16 / .35); }
.ap-notif-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-bottom: 1px solid rgb(255 255 255 / .08); padding: .75rem 1rem; }
html[data-theme=light] .ap-notif-head, html[data-theme=light] .ap-notif-foot { border-color: var(--ap-line); }
.ap-notif-ttl { display: flex; min-width: 0; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 600; color: var(--ap-text); white-space: nowrap; }
.ap-notif-count { white-space: nowrap; border-radius: 9999px; background: rgb(var(--ap-p-rgb) / .15); padding: .125rem .5rem; font-size: 11px; font-weight: 600; color: var(--ap-pt); }
.ap-notif-all { white-space: nowrap; font-size: .75rem; font-weight: 500; color: var(--ap-pt); }
.ap-notif-all:hover { opacity: .8; }
.ap-notif-list { max-height: 420px; overflow-y: auto; }
.ap-notif-list > * + * { border-top: 1px solid var(--ap-line-6); }
.ap-notif-skel { display: grid; gap: .5rem; padding: .75rem; border: 0 !important; }
.ap-notif-skel i { height: 3.5rem; border-radius: .75rem; background: var(--ap-w5); animation: ap-pulse 2s infinite; }
.ap-notif-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 2.5rem 0; font-size: .875rem; color: var(--ap-g500); }
.ap-notif-empty-ic { display: flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; border-radius: .75rem; background: var(--ap-w5); }
.ap-notif-empty-ic svg { width: 20px; height: 20px; }
.ap-notif-foot { border-top: 1px solid rgb(255 255 255 / .08); padding: .5rem; }
.ap-notif-view { display: flex; width: 100%; align-items: center; justify-content: center; gap: .375rem; border-radius: .5rem; padding: .5rem 0; font-size: .75rem; font-weight: 600; color: var(--ap-pt); transition: background .15s; }
.ap-notif-view:hover { background: rgb(var(--ap-p-rgb) / .1); }
.ap-notif-view .ap-ic { width: 14px; height: 14px; }
.ap-nitem { display: flex; align-items: flex-start; gap: .75rem; padding: .875rem 1rem; transition: background .15s; position: relative; }
.ap-nitem:hover { background: var(--ap-w3); }
.ap-nitem.is-unread { background: rgb(255 255 255 / .03); }
html[data-theme=light] .ap-nitem.is-unread { background: rgb(var(--ap-p-rgb) / .06); }
.ap-ni { display: flex; width: 2.25rem; height: 2.25rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: .75rem; background: var(--ap-w5); color: var(--ap-g400); overflow: hidden; }
.ap-ni svg { width: 18px; height: 18px; } .ap-ni img { width: 100%; height: 100%; object-fit: cover; }
.ap-ni.is-ok { background: rgb(var(--ap-p-rgb) / .12); color: var(--ap-pt); }
.ap-ni.is-bad { background: rgb(var(--ap-red-rgb) / .12); color: var(--ap-red); }
.ap-ni.is-info { background: rgb(var(--ap-sky-rgb) / .12); color: var(--ap-sky); }
.ap-nbody { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: .125rem; }
.ap-ntitle { font-size: .875rem; font-weight: 600; color: var(--ap-text); }
.ap-nmsg { font-size: .8125rem; color: var(--ap-g400); }
.ap-ntime { font-size: .75rem; color: var(--ap-g500); }
.ap-ndot { width: 8px; height: 8px; margin-top: .375rem; border-radius: 9999px; background: var(--ap-p); flex-shrink: 0; }

/* mobile top bar */
.ap-mtop { position: sticky; top: 0; z-index: 40; }
@media (min-width: 1024px) { .ap-mtop { display: none; } }
.ap-mtop-in { position: relative; display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; transition: all .2s; border-bottom: 1px solid transparent; }
.ap-mtop.is-scrolled .ap-mtop-in { background: var(--ap-glass-bg); backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%); border-bottom-color: var(--ap-glass-line); box-shadow: var(--ap-glass-sh); }
.ap-mtop-logo { display: flex; align-items: center; }
.ap-mtop-logo img { height: 18px; width: auto; }
.ap-logo-l { display: none; }
html[data-theme=light] .ap-logo-l { display: block; } html[data-theme=light] .ap-logo-d { display: none; }
.ap-mtop-r { display: flex; align-items: center; gap: .75rem; }
.ap-mlang { display: flex; height: 2.5rem; align-items: center; justify-content: center; gap: .375rem; border-radius: .75rem; padding: 0 .375rem; }
.ap-mlang span { font-size: .875rem; font-weight: 500; color: var(--ap-g400); }
.ap-msq { position: relative; display: flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; border-radius: .75rem; background: var(--ap-w5); color: var(--ap-g400); transition: background .15s; }
.ap-msq:hover { background: var(--ap-w10); }
.ap-dots { fill: #9CA3AF; }
@media (max-width: 400px) { .ap-mtop-r { gap: .5rem; } }

/* bottom tab bar */
.ap-bnav { position: fixed; bottom: .75rem; left: .75rem; right: .75rem; z-index: 50; border-radius: 24px; padding-bottom: env(safe-area-inset-bottom, 0px); }
@media (min-width: 1024px) { .ap-bnav { display: none; } }
.ap-bnav-in { margin: 0 auto; display: flex; max-width: 28rem; align-items: center; gap: .125rem; padding: .375rem; }
.ap-bnav-item { position: relative; display: flex; min-width: 0; flex: 1; flex-direction: column; align-items: center; border-radius: 1rem; padding: .25rem .125rem; }
.ap-bnav-pill { position: absolute; left: 0; right: 0; top: -.25rem; margin: 0 auto; height: 3px; width: 1.75rem; border-radius: 9999px; background: linear-gradient(90deg, var(--ap-p), var(--ap-p2)); box-shadow: 0 0 10px 1px rgb(var(--ap-p-rgb) / .7); animation: ap-pill .35s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes ap-pill { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
.ap-bnav-icw { position: relative; display: flex; width: 3rem; height: 1.75rem; align-items: center; justify-content: center; }
.ap-bnav-glow { position: absolute; inset: 0 .25rem; border-radius: 9999px; background: radial-gradient(closest-side, rgb(var(--ap-p-rgb) / .22), transparent); }
.ap-bnav-ic { position: relative; width: 20px !important; height: 20px !important; color: var(--ap-g300); transition: color .2s; }
.ap-bnav-item.is-on .ap-bnav-ic { color: var(--ap-p); }
.ap-bnav-logo { position: relative; width: 20px; height: 20px; opacity: .5; transition: opacity .2s; }
.ap-bnav-item.is-on .ap-bnav-logo, .ap-bnav-item:hover .ap-bnav-logo { opacity: 1; }
.ap-bnav-flame { position: absolute; right: .35rem; top: -.15rem; color: #FBBF24; }
.ap-bnav-flame .ap-ic { width: 12px; height: 12px; }
.ap-bnav-l { margin-top: .125rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; letter-spacing: -.025em; font-weight: 500; color: var(--ap-g400); transition: color .2s; }
.ap-bnav-item.is-on .ap-bnav-l { font-weight: 600; color: var(--ap-text); }

/* drawer */
.ap-drawer-scrim { position: fixed; inset: 0; z-index: 90; background: rgb(0 0 0 / .8); opacity: 0; transition: opacity .25s; }
.ap-drawer { position: fixed; inset: 0 auto 0 0; z-index: 91; width: 86%; max-width: 360px; overflow: hidden; border-right: 1px solid var(--ap-line); background: var(--ap-drawer); color: var(--ap-text); transform: translateX(-100%); transition: transform .26s cubic-bezier(.32, .72, 0, 1); }
.ap-drawer-open .ap-drawer { transform: none; } .ap-drawer-open .ap-drawer-scrim { opacity: 1; }
@media (min-width: 1024px) { .ap-drawer, .ap-drawer-scrim { display: none !important; } }
.ap-drawer-in { display: flex; height: 100%; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.ap-drawer-top { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1rem .75rem; }
.ap-drawer-logo { height: 19px; width: auto; }
.ap-drawer-x { display: flex; width: 2.25rem; height: 2.25rem; align-items: center; justify-content: center; border-radius: .75rem; border: 1px solid var(--ap-line); background: var(--ap-w5); color: var(--ap-g300); }
.ap-drawer-x:hover { background: var(--ap-w10); color: var(--ap-text); }
.ap-dprof { margin: 0 .75rem; display: flex; align-items: center; gap: .75rem; border-radius: 1rem; border: 1px solid var(--ap-line); background: linear-gradient(to bottom right, rgb(var(--ap-p-rgb) / .09), rgb(255 255 255 / .02), transparent); padding: .75rem; transition: border-color .15s; }
.ap-dprof:hover { border-color: rgb(var(--ap-p-rgb) / .3); }
.ap-dprof-txt { min-width: 0; flex: 1; }
.ap-dprof-row { display: flex; align-items: center; gap: .5rem; }
.ap-dprof-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.ap-dprof-tier { flex-shrink: 0; border-radius: .375rem; border: 1px solid var(--ap-line); background: var(--ap-w10); padding: .125rem .375rem; font-size: 10px; font-weight: 600; color: var(--ap-g200); }
.ap-dprof-mail { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; color: var(--ap-g400); }
.ap-dprof-chev { width: 16px !important; height: 16px !important; color: var(--ap-g500); }
.ap-dnav { margin-top: .75rem; flex: 1; overflow-y: auto; padding: 0 .75rem .75rem; }
.ap-dlist { display: flex; flex-direction: column; gap: .125rem; }
.ap-ditem { display: flex; height: 3rem; width: 100%; box-sizing: border-box; align-items: center; gap: .75rem; border-radius: .75rem; padding: 0 .625rem; font-size: 15px; font-weight: 500; color: var(--ap-g300); transition: color .15s; text-align: left; }
.ap-ditem:hover, .ap-ditem.is-current { color: var(--ap-text); }
.ap-dsq { display: flex; width: 2rem; height: 2rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: .5rem; background: var(--ap-w4); color: var(--ap-g300); transition: background .15s, color .15s; }
.ap-dsq .ap-ic { width: 18px; height: 18px; }
.ap-dsq.is-on { background: rgb(var(--ap-p-rgb) / .15); color: var(--ap-p); }
.ap-ditem.lg-item-active::before { left: -1px; }
.ap-ditem .ap-nav-chev { color: var(--ap-g500); }
.ap-dsub { margin-left: 1.55rem; overflow: hidden; border-left: 1px solid var(--ap-line); padding-left: .5rem; }
.ap-dsubitem { margin: .125rem 0; display: flex; height: 2.75rem; align-items: center; gap: .75rem; border-radius: .75rem; padding: 0 .75rem; font-size: .875rem; font-weight: 500; color: var(--ap-g400); }
.ap-dsubitem:hover { color: var(--ap-text); }
.ap-dres { margin: 1.25rem 0 .25rem; padding: 0 .625rem; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ap-g500); }
.ap-dver { padding: 0 1.25rem .5rem; font-size: 11px; font-weight: 500; letter-spacing: .025em; color: rgb(160 159 152 / .7); }
.ap-dfoot { display: flex; align-items: center; gap: .5rem; border-top: 1px solid var(--ap-line); padding: .75rem; }
.ap-dlang { display: flex; border-radius: .75rem; border: 1px solid var(--ap-line); background: var(--ap-w3); padding: .125rem; }
.ap-dlang button { display: flex; height: 2.25rem; align-items: center; gap: .375rem; border-radius: .5rem; padding: 0 .625rem; font-size: .75rem; font-weight: 600; color: var(--ap-g400); }
.ap-dlang button.is-on { background: var(--ap-w10); color: var(--ap-text); }
.ap-dout { margin-left: auto; display: flex; height: 2.5rem; align-items: center; gap: .5rem; border-radius: .75rem; border: 1px solid rgb(248 113 113 / .2); background: rgb(248 113 113 / .06); padding: 0 .75rem; font-size: .875rem; font-weight: 500; color: #fca5a5; transition: background .15s; }
.ap-dout:hover { background: rgb(248 113 113 / .15); }
.ap-dout .ap-ic { width: 16px; height: 16px; }

/* loading splash (APP-58): appears only when booting takes > 300 ms */
.ap-splash { display: none; }
html.ap-boot .ap-splash { display: flex; position: fixed; inset: 0; z-index: 200; align-items: center; justify-content: center; background: radial-gradient(40rem 30rem at 50% 45%, rgb(var(--ap-p-rgb) / .08), transparent 70%), var(--ap-bg); animation: ap-splash-in .2s .3s both; }
html.ap-boot .ap-root { visibility: hidden; }
@keyframes ap-splash-in { from { opacity: 0; } to { opacity: 1; } }
.ap-splash-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ap-splash-mark { position: relative; display: flex; align-items: center; justify-content: center; }
.ap-splash-mark img { width: 64px; height: 64px; }
.ap-splash-dots { position: absolute; right: -22px; top: 50%; display: flex; gap: 4px; transform: translateY(-50%); }
.ap-splash-dots i { width: 6px; height: 6px; border-radius: 9999px; background: var(--ap-p); animation: ap-dot 1.2s infinite ease-in-out; }
.ap-splash-dots i:nth-child(2) { animation-delay: .15s; } .ap-splash-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ap-dot { 0%, 80%, 100% { opacity: .2; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.ap-splash-t { margin-top: 1.5rem !important; font-size: 1.125rem; font-weight: 600; color: var(--ap-text); }
.ap-splash-s { margin-top: .75rem !important; font-size: .875rem; color: var(--ap-g400); }

/* cookie bar placement inside the app (APP-60) */
body.ap-app .bc-ck-bar { bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 1024px) {
  body.ap-app .bc-ck-bar { left: calc(16rem + 3rem); right: 3rem; bottom: 1rem; max-width: 1040px; }
  .ap-collapsed body.ap-app .bc-ck-bar { left: calc(5.5rem + 3rem); }
}
body.ap-app .bc-toasts { bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 1024px) { body.ap-app .bc-toasts { bottom: 1.5rem; } }

/* ------------------------------------------------------------------ shared components */
.ap-card { position: relative; display: flex; min-width: 0; flex-direction: column; border-radius: 1rem; border: 1px solid var(--ap-line); background: var(--ap-w3); box-shadow: var(--ap-shadow-card); box-sizing: border-box; }
.ap-card-h { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem 0; }
.ap-card-h h2, .ap-card-title { font-size: .875rem; line-height: 1.25rem; font-weight: 600; color: var(--ap-text); }
.ap-card-sub { margin-top: .125rem !important; font-size: 11px; color: var(--ap-g500); }
.ap-card-b { min-width: 0; flex: 1; padding: 1.25rem; }
.ap-card-h + .ap-card-b { padding-top: .75rem; }
.ap-btn { display: inline-flex; height: 2.5rem; align-items: center; justify-content: center; gap: .5rem; border-radius: .75rem; background: var(--ap-p); background-image: var(--ap-grad); padding: 0 1rem; font-size: .875rem; font-weight: 600; color: var(--ap-p-ink) !important; transition: filter .15s, opacity .15s; border: 0; cursor: pointer; white-space: nowrap; }
.ap-btn:hover { filter: brightness(1.06) saturate(1.05); }
.ap-btn:disabled, .ap-btn[aria-disabled=true] { background-image: none; opacity: .5; cursor: not-allowed; filter: none; }
.ap-btn .ap-ic { width: 16px; height: 16px; }
.ap-btn.is-sm { height: 2.25rem; border-radius: .5rem; }
.ap-btn.is-lg { height: 2.75rem; }
.ap-btn-ghost { display: inline-flex; height: 2.5rem; align-items: center; justify-content: center; gap: .5rem; border-radius: .75rem; border: 1px solid var(--ap-line); background: var(--ap-w5); padding: 0 1rem; font-size: .875rem; font-weight: 500; color: var(--ap-g200); transition: background .15s, border-color .15s; cursor: pointer; white-space: nowrap; }
.ap-btn-ghost:hover { background: var(--ap-w10); }
.ap-btn-ghost .ap-ic { width: 16px; height: 16px; }
.ap-btn-ghost.is-sm { height: 2.25rem; border-radius: .5rem; font-weight: 600; }
html[data-theme=light] .ap-btn-ghost:not(.keep-dark *) { background: rgb(201 148 0 / .06); border-color: rgb(201 148 0 / .32); color: #151812; }
html[data-theme=light] .ap-btn-ghost:not(.keep-dark *):hover { background: rgb(201 148 0 / .11); border-color: rgb(201 148 0 / .5); }
html[data-theme=light][data-skin=source] .ap-btn-ghost:not(.keep-dark *) { background: rgb(58 125 0 / .06); border-color: rgb(58 125 0 / .32); }
html[data-theme=light] .keep-dark .ap-btn-ghost { background: rgb(var(--ap-p-rgb) / .06); border-color: rgb(var(--ap-p-rgb) / .35); color: #eff1ec; }
.ap-chip { display: inline-flex; align-items: center; gap: .25rem; border-radius: 9999px; border: 1px solid transparent; padding: .125rem .5rem; font-size: 10px; font-weight: 600; line-height: 1rem; white-space: nowrap; }
.ap-chip::before { content: ""; width: 5px; height: 5px; border-radius: 9999px; background: currentColor; }
.ap-chip.is-pending { color: var(--ap-amber); background: rgb(var(--ap-amber-rgb) / .1); border-color: rgb(var(--ap-amber-rgb) / .3); }
.ap-chip.is-rejected { color: var(--ap-red); background: rgb(var(--ap-red-rgb) / .1); border-color: rgb(var(--ap-red-rgb) / .3); }
.ap-chip.is-inactive { color: var(--ap-g400); background: var(--ap-w5); border-color: var(--ap-line); }
.ap-chip.is-verified { color: var(--ap-pt); background: rgb(var(--ap-p-rgb) / .1); border-color: rgb(var(--ap-p-rgb) / .3); }
.ap-tabs { display: flex; border-radius: .5rem; border: 1px solid var(--ap-line); background: var(--ap-w3); padding: .125rem; }
.ap-tab { border-radius: .375rem; padding: .25rem .625rem; font-size: 11px; font-weight: 600; text-transform: uppercase; font-variant-numeric: tabular-nums; color: var(--ap-g500); transition: color .15s, background .15s; }
.ap-tab:hover { color: var(--ap-g300); }
.ap-tab[aria-selected=true] { background: var(--ap-w10); color: var(--ap-text); }
html[data-theme=light] .ap-tab[aria-selected=true] { background: rgb(18 17 16 / .07); }
.ap-label { display: block; margin-bottom: .5rem; font-size: .875rem; font-weight: 600; color: var(--ap-text); }
.ap-label small { font-weight: 400; color: var(--ap-g500); font-size: .8125rem; }
.ap-field { position: relative; }
.ap-input { display: block; width: 100%; box-sizing: border-box; height: 2.75rem; border-radius: .5rem; border: 1px solid var(--ap-line); background: var(--ap-w5); padding: 0 .875rem; font: inherit; font-size: .9375rem; color: var(--ap-text); transition: border-color .15s, box-shadow .15s; outline: none; }
.ap-input::placeholder { color: var(--ap-g500); }
.ap-input:focus { border-color: rgb(var(--ap-p-rgb) / .55); box-shadow: 0 0 0 3px rgb(var(--ap-p-rgb) / .15); }
.ap-input[aria-invalid=true] { border-color: rgb(var(--ap-red-rgb) / .7); }
html[data-theme=light] .ap-input { background: #fff; color: #121110; border-color: rgb(0 0 0 / .15); }
html[data-theme=light] .ap-input::placeholder { color: #6b6963; }
.ap-err { margin-top: .375rem !important; font-size: .8125rem; color: var(--ap-red); }
.ap-muted { color: var(--ap-g400); }
.ap-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem 0; }
.ap-empty-t { font-size: .875rem; font-weight: 600; color: var(--ap-text); }
.ap-empty-d { margin-top: .25rem !important; max-width: 16rem; font-size: .75rem; color: var(--ap-g400); }
.ap-link-more { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 500; color: var(--ap-g400); transition: color .15s; }
.ap-link-more:hover { color: var(--ap-pt); }
.ap-link-more .ap-ic { width: 14px; height: 14px; }
.ap-logo-tile { position: relative; display: flex; flex-shrink: 0; align-items: center; justify-content: center; overflow: hidden; border-radius: 11px; background: var(--ap-w5); font-weight: 700; color: var(--ap-g200); }
.ap-logo-tile::after { content: ""; position: absolute; inset: 0; border-radius: 11px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1), inset 0 1px 0 rgb(255 255 255 / .08); pointer-events: none; }
html[data-theme=light] .ap-logo-tile::after { box-shadow: inset 0 0 0 1px rgb(18 17 16 / .08); }
.ap-logo-tile img { width: 62%; height: 62%; object-fit: contain; }
.ap-logo-tile.is-36 { width: 36px; height: 36px; font-size: .9rem; }
/* modal (Radix dialog look) */
.ap-modal-scrim { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgb(0 0 0 / .8); animation: ap-splash-in .15s both; }
.ap-modal { position: relative; width: 100%; max-width: 28rem; max-height: calc(100vh - 2rem); overflow: auto; border-radius: 1rem; border: 1px solid var(--ap-line); background: var(--ap-raised); color: var(--ap-text); box-shadow: 0 25px 50px -12px rgb(0 0 0 / .6); animation: bc-fade-up .2s ease-out both; }
.ap-modal-x { position: absolute; right: 1rem; top: 1rem; display: flex; width: 2rem; height: 2rem; align-items: center; justify-content: center; border-radius: .5rem; color: var(--ap-g400); }
.ap-modal-x:hover { background: var(--ap-w10); color: var(--ap-text); }
.ap-modal-x .ap-ic { width: 18px; height: 18px; }
