/* =====================================================================
   ANGLE STOCK — Design System (light mode)
   One stylesheet for website, auth and user panel.
   ===================================================================== */
:root {
  --primary: #087A4B;
  --primary-600: #066A41;
  --primary-700: #055836;
  --primary-50: #E8F5EF;
  --primary-100: #CDEBDD;
  --secondary: #00A86B;
  --bg: #FFFFFF;
  --bg-2: #F7F8FA;
  --bg-3: #F1F3F6;
  --card: #FFFFFF;
  --text: #1F2937;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --border: #E5E7EB;
  --border-2: #EEF0F3;
  --profit: #00A86B;
  --profit-bg: #E6F7F0;
  --loss: #E5484D;
  --loss-bg: #FDECEC;
  --warn: #D97706;
  --warn-bg: #FEF5E7;
  --info: #2563EB;
  --info-bg: #EBF2FE;

  --font: 'Inter', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Inter', ui-monospace, 'SF Mono', Menlo, monospace;
  --fs-xs: 11.5px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 26px; --fs-3xl: 34px;

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --sh-1: 0 1px 2px rgba(16,24,40,.05);
  --sh-2: 0 1px 3px rgba(16,24,40,.06), 0 4px 12px rgba(16,24,40,.04);
  --sh-3: 0 12px 32px rgba(16,24,40,.12), 0 2px 6px rgba(16,24,40,.06);
  --ring: 0 0 0 4px rgba(8,122,75,.14);

  --sidebar-w: 248px;
  --topbar-h: 64px;
  --bottomnav-h: 64px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-md); line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
.ico { display: inline-block; flex-shrink: 0; vertical-align: middle; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-700); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.015em; color: var(--text); font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--primary-100); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; letter-spacing: -.01em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.up { color: var(--profit) !important; }
.down { color: var(--loss) !important; }
.flat { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: 8px } .mb-2 { margin-bottom: 16px }
.text-right { text-align: right; } .text-center { text-align: center; }
.fs-sm { font-size: var(--fs-sm); } .fs-xs { font-size: var(--fs-xs); } .fw-6 { font-weight: 600; } .fw-7 { font-weight: 700; }

/* ---------------------------------------------------------------- Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: .02em; }
.logo img { width: 34px; height: 34px; }
.logo-word { font-size: 17px; line-height: 1; white-space: nowrap; }
.logo-word b { color: var(--primary); font-weight: 800; }
.logo-lg img { width: 46px; height: 46px; } .logo-lg .logo-word { font-size: 22px; }

/* ---------------------------------------------------------------- Buttons */
.btn { --h: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: var(--fs-md); white-space: nowrap; transition: background .15s var(--ease), border-color .15s, color .15s, box-shadow .15s, transform .08s; user-select: none; position: relative; text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn.is-loading { opacity: .65; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(8,122,75,.25), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover:not(:disabled) { background: var(--primary-600); color: #fff; }
.btn-primary:focus-visible { box-shadow: var(--ring); outline: none; }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border); box-shadow: var(--sh-1); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-2); color: var(--text); }
.btn-soft { background: var(--primary-50); color: var(--primary); }
.btn-soft:hover:not(:disabled) { background: var(--primary-100); color: var(--primary-700); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-3); color: var(--text); }
.btn-danger { background: var(--loss); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #cf3b40; color: #fff; }
.btn-danger-soft { background: var(--loss-bg); color: var(--loss); }
.btn-buy { background: var(--profit); color: #fff; }
.btn-buy:hover:not(:disabled) { background: #009560; color: #fff; }
.btn-sell { background: var(--loss); color: #fff; }
.btn-sell:hover:not(:disabled) { background: #cf3b40; color: #fff; }
.btn-sm { --h: 34px; padding: 0 12px; font-size: var(--fs-sm); border-radius: 8px; }
.btn-xs { --h: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn-lg { --h: 50px; padding: 0 24px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }
.btn .spinner { display: none; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: .7; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--text-2); position: relative; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--bg-3); color: var(--text); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--loss); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; border: 2px solid #fff; }

/* ---------------------------------------------------------------- Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .ico.lead { position: absolute; left: 13px; color: var(--text-3); pointer-events: none; }
.input-wrap > .input { padding-left: 42px; }
.input-wrap > .trail { position: absolute; right: 6px; }
.input-wrap > .input.has-trail { padding-right: 46px; }
.input, .select, .textarea { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 15px; color: var(--text); transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: #D1D5DB; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.input-sm, .select-sm { height: 36px; font-size: var(--fs-sm); border-radius: 8px; padding: 0 10px; }
.select { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.select-sm { padding-right: 30px; background-position: right 8px center; }
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--loss); }
.field.has-error .input:focus { box-shadow: 0 0 0 4px rgba(229,72,77,.12); }
.field-error { font-size: 12.5px; color: var(--loss); display: none; align-items: center; gap: 5px; }
.field.has-error .field-error { display: flex; }
.field-hint { font-size: 12.5px; color: var(--text-2); }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; }
.check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 1px 0 0; border: 1.5px solid #CBD2D9; border-radius: 5px; background: #fff; flex-shrink: 0; display: grid; place-items: center; transition: .15s; cursor: pointer; }
.check input:checked { background: var(--primary); border-color: var(--primary); }
.check input:checked::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
.check input:focus-visible { box-shadow: var(--ring); outline: none; }
.switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #D1D5DB; border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: var(--sh-1); transition: .2s var(--ease); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }
.pw-meter { display: flex; gap: 4px; margin-top: 2px; }
.pw-meter i { flex: 1; height: 4px; border-radius: 4px; background: var(--border); transition: background .2s; }
.pw-meter[data-score="1"] i:nth-child(-n+1) { background: var(--loss); }
.pw-meter[data-score="2"] i:nth-child(-n+2) { background: var(--warn); }
.pw-meter[data-score="3"] i:nth-child(-n+3) { background: #84CC16; }
.pw-meter[data-score="4"] i:nth-child(-n+4) { background: var(--profit); }
.pw-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.pw-rules li { list-style: none; display: flex; align-items: center; gap: 6px; }
.pw-rules li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pw-rules li.ok { color: var(--profit); }
.pw-rules { padding: 0; margin-bottom: 0; }
.segmented { display: inline-flex; background: var(--bg-3); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button, .segmented label { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; transition: .15s; }
.segmented button.active, .segmented input:checked + span { background: #fff; color: var(--text); box-shadow: var(--sh-1); }
.segmented label { padding: 0; } .segmented label span { display: block; padding: 6px 12px; border-radius: 8px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.otp-inputs { display: flex; gap: 10px; justify-content: center; }
.otp-inputs input { width: 52px; height: 60px; text-align: center; font-size: 24px; font-weight: 700; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; transition: .15s; font-variant-numeric: tabular-nums; caret-color: var(--primary); }
.otp-inputs input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.otp-inputs input.filled { border-color: var(--primary-100); background: var(--primary-50); }
.otp-inputs.error input { border-color: var(--loss); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------------------------------------------------------------- Cards, badges, chips */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); min-width: 0; }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border-2); min-height: 60px; }
.card-head h2, .card-head h3 { font-size: 15.5px; font-weight: 700; }
.card-head .sub { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.card-body { padding: 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border-2); }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--bg-3); color: var(--text-2); letter-spacing: .01em; }
.badge-up { background: var(--profit-bg); color: var(--profit); }
.badge-down { background: var(--loss-bg); color: var(--loss); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-primary { background: var(--primary-50); color: var(--primary); }
.badge-outline { background: #fff; border: 1px solid var(--border); }
.chg { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chg-pill { padding: 2px 7px; border-radius: 6px; font-size: 12px; }
.chg-pill.up { background: var(--profit-bg); } .chg-pill.down { background: var(--loss-bg); }
.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-EXECUTED { background: var(--profit-bg); color: var(--profit); }
.status-OPEN, .status-TRIGGER_PENDING, .status-PENDING, .status-PARTIALLY_FILLED { background: var(--info-bg); color: var(--info); }
.status-CANCELLED, .status-EXPIRED { background: var(--bg-3); color: var(--text-2); }
.status-REJECTED { background: var(--loss-bg); color: var(--loss); }
.side { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 5px; }
.side-BUY { background: var(--profit-bg); color: var(--profit); }
.side-SELL { background: var(--loss-bg); color: var(--loss); }
.feed-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--profit-bg); color: var(--primary); white-space: nowrap; }
.feed-pill .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--profit); box-shadow: 0 0 0 0 rgba(0,168,107,.5); animation: pulse 2s infinite; }
.feed-pill[data-status="paused"], .feed-pill[data-status="stale"], .feed-pill[data-status="closed"] { background: var(--warn-bg); color: var(--warn); }
.feed-pill[data-status="paused"] .pulse, .feed-pill[data-status="stale"] .pulse, .feed-pill[data-status="closed"] .pulse { background: var(--warn); animation: none; }
.feed-pill[data-status="error"] { background: var(--loss-bg); color: var(--loss); }
.feed-pill[data-status="error"] .pulse { background: var(--loss); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0,168,107,.5); } 70% { box-shadow: 0 0 0 7px rgba(0,168,107,0); } 100% { box-shadow: 0 0 0 0 rgba(0,168,107,0); } }
.flash-up { animation: flashUp .9s var(--ease); }
.flash-down { animation: flashDown .9s var(--ease); }
@keyframes flashUp { 0% { background: rgba(0,168,107,.16); } 100% { background: transparent; } }
@keyframes flashDown { 0% { background: rgba(229,72,77,.14); } 100% { background: transparent; } }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-2); line-height: 1.55; }
.callout strong { color: var(--text); }
.callout-info { background: var(--primary-50); border-color: var(--primary-100); color: #2D5A46; }
.callout-warn { background: var(--warn-bg); border-color: #FBE3BE; color: #8A5A14; }
.callout-error { background: var(--loss-bg); border-color: #F8CFD0; color: #A2282C; }
.callout .ico { margin-top: 1px; }
.alert { display: none; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: var(--fs-sm); margin-bottom: 16px; }
.alert.show { display: flex; }
.alert-error { background: var(--loss-bg); color: #A2282C; }
.alert-success { background: var(--profit-bg); color: var(--primary-700); }
.alert-info { background: var(--info-bg); color: #1E40AF; }
.divider { height: 1px; background: var(--border-2); margin: 20px 0; border: 0; }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; margin: 22px 0; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.kbd { font-size: 11px; padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; color: var(--text-2); background: #fff; }

/* ---------------------------------------------------------------- Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 12px 14px; border: 0; background: none; font-weight: 600; font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; transition: color .15s; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); }
.tab.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }
.tab .count { margin-left: 6px; font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--bg-3); color: var(--text-2); }
.tab.active .count { background: var(--primary-50); color: var(--primary); }
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pills::-webkit-scrollbar { display: none; }
.pill { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border); background: #fff; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); white-space: nowrap; transition: .15s; }
.pill:hover { border-color: #CBD2D9; color: var(--text); }
.pill.active { background: var(--text); border-color: var(--text); color: #fff; }

/* ---------------------------------------------------------------- Tables */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; padding: 11px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border-2); vertical-align: middle; white-space: nowrap; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #FAFBFC; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table .c { text-align: center; }
.table tr.clickable { cursor: pointer; }
.sym { display: flex; flex-direction: column; min-width: 0; }
.sym b { font-weight: 700; font-size: 13.5px; color: var(--text); }
.sym span { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex-shrink: 0; background: var(--primary-50); color: var(--primary); letter-spacing: .02em; }
.avatar-sm { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; }
.avatar.c1 { background: #EAF2FF; color: #2563EB; } .avatar.c2 { background: #FFF1E6; color: #C2570C; } .avatar.c3 { background: #F3EAFE; color: #7C3AED; } .avatar.c4 { background: #E6F7F0; color: #087A4B; } .avatar.c5 { background: #FDECEC; color: #C2323A; } .avatar.c6 { background: #E8F7FA; color: #0E7490; }
.row-actions { display: inline-flex; gap: 6px; opacity: .0; transition: opacity .12s; }
tr:hover .row-actions, .row-actions.show { opacity: 1; }
@media (hover: none) { .row-actions { opacity: 1; } }

/* ---------------------------------------------------------------- Skeleton, empty states */
.sk { position: relative; overflow: hidden; background: var(--bg-3); border-radius: 6px; color: transparent !important; }
.sk::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-line { height: 12px; margin: 6px 0; } .sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; }
.sk-num { display: inline-block; height: 26px; width: 120px; }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border-2); }
.sk-row .sk-av { width: 36px; height: 36px; border-radius: 10px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 44px 24px; gap: 6px; }
.empty-ico { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); margin-bottom: 10px; }
.empty h3 { font-size: 16px; }
.empty p { color: var(--text-2); max-width: 360px; margin: 0 0 12px; font-size: var(--fs-sm); }
.error-state .empty-ico { background: var(--loss-bg); color: var(--loss); }

/* ---------------------------------------------------------------- Modal / sheet / toast / dropdown */
.overlay { position: fixed; inset: 0; background: rgba(17,24,39,.42); backdrop-filter: blur(2px); z-index: 80; opacity: 0; transition: opacity .2s; }
.overlay.show { opacity: 1; }
.modal { position: fixed; z-index: 90; left: 50%; top: 50%; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; background: #fff; border-radius: 18px; box-shadow: var(--sh-3); transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .22s var(--ease), opacity .22s; }
.modal.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal-sm { width: min(420px, calc(100vw - 32px)); }
.modal-lg { width: min(760px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; }
.modal-head h3 { font-size: 18px; }
.modal-head p { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--text-2); }
.modal-body { padding: 4px 22px 18px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 20px; border-top: 1px solid var(--border-2); }
.confirm-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--loss-bg); color: var(--loss); margin-bottom: 14px; }
.confirm-ico.info { background: var(--primary-50); color: var(--primary); }
.toasts { position: fixed; z-index: 120; right: 20px; top: 20px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--sh-3); animation: toastIn .28s var(--ease); font-size: var(--fs-sm); }
.toast.leave { animation: toastOut .22s forwards; }
.toast .t-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.toast-success .t-ico { background: var(--profit-bg); color: var(--profit); }
.toast-error .t-ico { background: var(--loss-bg); color: var(--loss); }
.toast-info .t-ico { background: var(--info-bg); color: var(--info); }
.toast-warn .t-ico { background: var(--warn-bg); color: var(--warn); }
.toast b { display: block; font-size: 13.5px; margin-bottom: 1px; }
.toast p { margin: 0; color: var(--text-2); }
.toast .x { margin-left: auto; color: var(--text-3); background: none; border: 0; padding: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }
.dropdown { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--sh-3); padding: 6px; z-index: 60; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .16s var(--ease); }
.dropdown.open .menu { opacity: 1; visibility: visible; transform: none; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; border: 0; background: none; color: var(--text); font-size: var(--fs-sm); font-weight: 500; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--bg-2); color: var(--text); }
.menu .ico { color: var(--text-2); }
.menu hr { border: 0; height: 1px; background: var(--border-2); margin: 6px 0; }
.menu .danger { color: var(--loss); } .menu .danger .ico { color: var(--loss); }
.menu-head { padding: 10px 10px 8px; }
.menu-head b { display: block; font-size: 14px; } .menu-head span { font-size: 12px; color: var(--text-2); }

/* ---------------------------------------------------------------- Public website */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.86); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.scrolled { border-bottom-color: var(--border); }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.site-nav { display: flex; align-items: center; height: 72px; gap: 28px; }
.site-links { display: flex; gap: 4px; margin-right: auto; margin-left: 24px; }
.site-links a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; font-size: 14.5px; }
.site-links a:hover, .site-links a.active { color: var(--text); background: var(--bg-2); }
.site-cta { display: flex; gap: 10px; }
.site-burger { display: none; margin-left: auto; }
.mobile-nav { display: none; }
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(900px 420px at 85% -10%, rgba(0,168,107,.12), transparent 60%), radial-gradient(700px 380px at -10% 20%, rgba(8,122,75,.07), transparent 60%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 6px; border-radius: 99px; background: #fff; border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2); box-shadow: var(--sh-1); }
.eyebrow .tag { background: var(--primary); color: #fff; padding: 2px 8px; border-radius: 99px; font-size: 11px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.06; letter-spacing: -.035em; margin: 22px 0 18px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--primary); position: relative; white-space: nowrap; }
.hero h1 em::after { content: ''; position: absolute; left: 0; right: 0; bottom: .05em; height: .14em; background: var(--primary-100); z-index: -1; border-radius: 4px; }
.hero .lead { font-size: 18px; color: var(--text-2); max-width: 540px; line-height: 1.6; }
.hero-ctas { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 22px; margin-top: 34px; flex-wrap: wrap; color: var(--text-2); font-size: 13.5px; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust .ico { color: var(--primary); }
.preview { position: relative; }
.preview-frame { background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 30px 60px -20px rgba(16,24,40,.22), 0 0 0 6px rgba(255,255,255,.7); overflow: hidden; }
.preview-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border-2); background: var(--bg-2); }
.preview-top i { width: 9px; height: 9px; border-radius: 50%; background: #E3E6EA; }
.preview-body { padding: 18px; display: grid; gap: 14px; }
.pv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pv-stat { border: 1px solid var(--border-2); border-radius: 12px; padding: 12px; }
.pv-stat span { font-size: 11px; color: var(--text-2); } .pv-stat b { display: block; font-size: 17px; margin-top: 2px; }
.pv-chart { height: 150px; border: 1px solid var(--border-2); border-radius: 12px; padding: 10px; }
.pv-rows { border: 1px solid var(--border-2); border-radius: 12px; }
.pv-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border-2); font-size: 13px; }
.pv-row:last-child { border-bottom: 0; }
.float-card { position: absolute; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--sh-3); padding: 12px 14px; font-size: 12.5px; display: flex; align-items: center; gap: 10px; animation: floaty 6s ease-in-out infinite; }
.float-card.fc1 { left: -34px; bottom: 54px; } .float-card.fc2 { right: 28px; bottom: -22px; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.ticker { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); overflow: hidden; }
.ticker-track { display: flex; gap: 36px; padding: 12px 0; width: max-content; animation: marquee 45s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; gap: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }
.section { padding: 88px 0; }
.section-alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section-head .kicker { font-size: 13px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .08em; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 10px 0 14px; letter-spacing: -.03em; font-weight: 800; }
.section-head p { color: var(--text-2); font-size: 17px; margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 26px; border-radius: 18px; border: 1px solid var(--border); background: #fff; transition: transform .2s var(--ease), box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.feature .f-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); margin-bottom: 16px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--text-2); font-size: 14.5px; margin: 0; line-height: 1.6; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 24px; border-radius: 18px; background: #fff; border: 1px solid var(--border); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); font-size: 13px; font-weight: 800; color: var(--primary); background: var(--primary-50); padding: 4px 9px; border-radius: 8px; display: inline-block; margin-bottom: 14px; }
.step h3 { font-size: 16px; margin-bottom: 6px; } .step p { color: var(--text-2); margin: 0; font-size: 14px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.check-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.check-list li .ico { color: var(--primary); margin-top: 2px; }
.check-list b { color: var(--text); }
.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: 14px; background: #fff; overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ico { transition: transform .2s; color: var(--text-2); }
.faq-item[open] summary .ico { transform: rotate(180deg); }
.faq-item .faq-a { padding: 0 20px 18px; color: var(--text-2); line-height: 1.65; }
.cta-band { border-radius: 26px; padding: 56px; background: linear-gradient(135deg, #065C38, #087A4B 50%, #00A86B); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.cta-band::after { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 50px solid rgba(255,255,255,.07); }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.02em; }
.cta-band p { color: rgba(255,255,255,.82); margin: 8px 0 0; }
.cta-band .btn-light { background: #fff; color: var(--primary-700); }
.cta-band .btn-light:hover { background: #F0FBF6; color: var(--primary-700); }
.site-footer { background: #0F1A15; color: #A9B6AF; padding: 64px 0 28px; margin-top: 0; }
.site-footer .logo { color: #fff; } .site-footer .logo-word b { color: #4ADE9C; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.site-footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer a { color: #A9B6AF; font-size: 14px; } .site-footer a:hover { color: #fff; }
.footer-disclosure { margin-top: 44px; padding: 18px 20px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); font-size: 13px; line-height: 1.6; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; font-size: 13px; flex-wrap: wrap; }
.page-hero { padding: 64px 0 40px; background: linear-gradient(180deg, var(--bg-2), #fff); border-bottom: 1px solid var(--border-2); }
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.03em; font-weight: 800; }
.page-hero p { color: var(--text-2); font-size: 17px; margin: 12px 0 0; max-width: 680px; }
.prose { max-width: 780px; font-size: 16px; line-height: 1.75; color: #374151; }
.prose h2 { font-size: 22px; margin: 36px 0 12px; }
.prose ul, .prose ol { padding-left: 22px; } .prose li { margin: 6px 0; }
.prose .callout { margin-top: 32px; font-size: 14px; }
.steps-list { counter-reset: s; list-style: none; padding: 0 !important; }
.steps-list li { counter-increment: s; position: relative; padding: 4px 0 18px 52px; }
.steps-list li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-50); color: var(--primary); font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: start; }
.info-tile { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.info-tile .f-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex-shrink: 0; }

/* ---------------------------------------------------------------- Auth */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: #fff; }
.auth-aside { position: relative; overflow: hidden; background: linear-gradient(155deg, #04412A 0%, #075E3B 45%, #08804F 100%); color: #fff; padding: 44px 52px; display: flex; flex-direction: column; }
.auth-aside::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%); }
.auth-aside .logo { color: #fff; position: relative; } .auth-aside .logo-word b { color: #7EF0BE; }
.auth-aside-body { position: relative; margin: auto 0; max-width: 470px; }
.auth-aside h2 { color: #fff; font-size: clamp(28px, 2.8vw, 38px); line-height: 1.15; letter-spacing: -.03em; font-weight: 800; }
.auth-aside p { color: rgba(255,255,255,.78); font-size: 16px; margin-top: 14px; line-height: 1.6; }
.glass { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; backdrop-filter: blur(10px); }
.auth-widget { margin-top: 34px; padding: 18px; }
.aw-head { display: flex; justify-content: space-between; align-items: center; }
.aw-head small { color: rgba(255,255,255,.65); font-size: 12px; }
.aw-head b { font-size: 22px; display: block; margin-top: 2px; }
.aw-chip { background: rgba(126,240,190,.16); color: #9DF5CF; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px; }
.aw-chart { height: 90px; margin-top: 12px; }
.aw-list { display: grid; gap: 8px; margin-top: 14px; }
.aw-row { display: flex; justify-content: space-between; font-size: 13px; padding: 9px 12px; background: rgba(255,255,255,.06); border-radius: 10px; }
.aw-row .g { color: #7EF0BE; font-weight: 600; } .aw-row .r { color: #FFA3A6; font-weight: 600; }
.auth-aside-foot { position: relative; display: flex; gap: 20px; font-size: 13px; color: rgba(255,255,255,.7); flex-wrap: wrap; }
.auth-aside-foot span { display: inline-flex; align-items: center; gap: 7px; }
.auth-main { display: flex; flex-direction: column; padding: 28px 40px; min-width: 0; }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth-top .logo { display: none; }
.auth-top-link { margin-left: auto; font-size: 14px; color: var(--text-2); }
.auth-top-link a { font-weight: 600; }
.auth-card { width: 100%; max-width: 420px; margin: auto; padding: 32px 0; animation: rise .45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.auth-card h1 { font-size: 28px; letter-spacing: -.03em; font-weight: 800; }
.auth-card .sub { color: var(--text-2); margin: 8px 0 28px; font-size: 15px; }
.auth-foot { text-align: center; font-size: 14px; color: var(--text-2); margin-top: 22px; }
.auth-foot a { font-weight: 600; }
.auth-legal { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 18px; }
.auth-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); margin-bottom: 20px; }
.auth-icon.err { background: var(--loss-bg); color: var(--loss); }
.dev-note { font-size: 12.5px; padding: 10px 12px; border-radius: 10px; background: #FFFBEB; border: 1px dashed #F5C46B; color: #8A5A14; margin-bottom: 16px; }
.steps-dots { display: flex; gap: 6px; margin-bottom: 22px; }
.steps-dots i { height: 4px; flex: 1; border-radius: 4px; background: var(--border); }
.steps-dots i.on { background: var(--primary); }

/* ---------------------------------------------------------------- Panel shell */
.panel { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; background: var(--bg-2); }
.sidebar { position: sticky; top: 0; height: 100dvh; background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 40; }
.sidebar-head { height: var(--topbar-h); display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--border-2); flex-shrink: 0; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 12px 20px; scrollbar-width: thin; }
.nav-group { margin-bottom: 14px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; padding: 8px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: 14px; position: relative; transition: background .12s, color .12s; }
.nav-item:hover { background: var(--bg-2); color: var(--text); }
.nav-item.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.nav-item .nav-count { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--loss); color: #fff; padding: 1px 7px; border-radius: 99px; }
.nav-item .nav-count.neutral { background: var(--bg-3); color: var(--text-2); }
.sidebar-foot { padding: 14px; border-top: 1px solid var(--border-2); }
.demo-card { padding: 14px; border-radius: 14px; background: linear-gradient(140deg, var(--primary-50), #F4FBF7); border: 1px solid var(--primary-100); font-size: 12.5px; color: #2D5A46; }
.demo-card b { display: flex; align-items: center; gap: 6px; color: var(--primary-700); margin-bottom: 4px; font-size: 13px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 0 24px; }
.topbar .burger, .topbar .logo { display: none; }
.gsearch { position: relative; flex: 1; max-width: 460px; }
.gsearch .input { height: 40px; background: var(--bg-2); border-color: transparent; padding-left: 40px; padding-right: 54px; font-size: 14px; }
.gsearch .input:focus { background: #fff; border-color: var(--primary); }
.gsearch .lead { position: absolute; left: 12px; top: 10px; color: var(--text-3); }
.gsearch .kbd { position: absolute; right: 10px; top: 10px; }
.search-pop { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: min(480px, 70vh); overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--sh-3); z-index: 70; padding: 6px; display: none; }
.search-pop.show { display: block; animation: rise .15s; }
.sp-group { padding: 8px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; }
.sp-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.sp-item:hover, .sp-item.active { background: var(--bg-2); }
.sp-item .sym { flex: 1; }
.sp-item .sp-actions { display: flex; gap: 4px; }
.sp-empty { padding: 26px 14px; text-align: center; color: var(--text-2); font-size: var(--fs-sm); }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.bal-chip { display: flex; flex-direction: column; align-items: flex-end; padding: 0 12px; border-right: 1px solid var(--border); margin-right: 4px; line-height: 1.2; }
.bal-chip small { font-size: 11px; color: var(--text-2); } .bal-chip b { font-size: 14px; }
.user-btn { display: flex; align-items: center; gap: 9px; padding: 4px 8px 4px 4px; border-radius: 12px; border: 0; background: transparent; }
.user-btn:hover { background: var(--bg-3); }
.user-btn .avatar { width: 34px; height: 34px; }
.notif-pop { width: min(380px, calc(100vw - 24px)); padding: 0; }
.notif-pop .np-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border-2); }
.notif-list { max-height: 400px; overflow-y: auto; }
.notif { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-2); cursor: pointer; position: relative; }
.notif:hover { background: var(--bg-2); }
.notif.unread::after { content: ''; position: absolute; right: 16px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.notif .n-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--bg-3); color: var(--text-2); }
.notif .n-ico.order { background: var(--info-bg); color: var(--info); } .notif .n-ico.protection { background: var(--warn-bg); color: var(--warn); } .notif .n-ico.welcome, .notif .n-ico.expiry { background: var(--primary-50); color: var(--primary); } .notif .n-ico.security { background: var(--loss-bg); color: var(--loss); }
.notif b { font-size: 13.5px; display: block; padding-right: 16px; } .notif p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-2); } .notif time { font-size: 11.5px; color: var(--text-3); }
.content { padding: 24px; width: 100%; max-width: 1480px; margin: 0 auto; flex: 1; animation: pageIn .35s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; letter-spacing: -.025em; font-weight: 750; }
.page-head p { margin: 4px 0 0; color: var(--text-2); font-size: var(--fs-sm); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.crumbs { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.crumbs a { color: var(--text-2); } .crumbs a:hover { color: var(--primary); }
.bottom-nav { display: none; }
.drawer-overlay { display: none; }
.app-disclaimer { font-size: 12px; color: var(--text-3); text-align: center; padding: 18px 24px 28px; }

/* grids */
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-main-r { grid-template-columns: minmax(0, 1fr) minmax(340px, .5fr); }

/* stat cards */
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat .s-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.stat .s-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-3); color: var(--text-2); }
.stat .s-ico.g { background: var(--primary-50); color: var(--primary); } .stat .s-ico.b { background: var(--info-bg); color: var(--info); } .stat .s-ico.o { background: var(--warn-bg); color: var(--warn); } .stat .s-ico.p { background: #F3EAFE; color: #7C3AED; }
.stat .s-value { font-size: 23px; font-weight: 750; margin-top: 12px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s-sub { font-size: 12.5px; color: var(--text-2); margin-top: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stat-hero { background: linear-gradient(140deg, #065C38 0%, #087A4B 55%, #0B9A60 100%); border: 0; color: #fff; }
.stat-hero .s-label, .stat-hero .s-sub { color: rgba(255,255,255,.78); }
.stat-hero .s-ico { background: rgba(255,255,255,.14); color: #fff; }
.stat-hero .s-value { color: #fff; }
.stat-hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; border: 24px solid rgba(255,255,255,.07); }
.stat-hero .chg-pill.up { background: rgba(126,240,190,.2); color: #A6F6D2 !important; } .stat-hero .chg-pill.down { background: rgba(255,163,166,.2); color: #FFC2C4 !important; }

/* index cards */
.idx-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.idx { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.idx:hover { border-color: var(--primary-100); box-shadow: var(--sh-2); }
.idx .idx-name { font-size: 12.5px; color: var(--text-2); font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.idx .idx-val { font-size: 18px; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.idx canvas { width: 100%; height: 34px; }

/* list rows (mobile-friendly instrument lists) */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border-2); min-height: 62px; transition: background .12s; position: relative; }
.li:last-child { border-bottom: 0; }
.li:hover { background: #FAFBFC; }
.li.clickable { cursor: pointer; }
.li .li-main { flex: 1; min-width: 0; }
.li .li-price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.li .li-price b { font-size: 14.5px; font-weight: 650; }
.li .li-spark { width: 72px; height: 28px; flex-shrink: 0; }
.li .li-actions { display: flex; gap: 6px; }
.li .drag { color: var(--text-3); cursor: grab; touch-action: none; }
.li.dragging { opacity: .5; background: var(--primary-50); }
.mini-kv { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px 14px; font-size: 12px; color: var(--text-2); margin-top: 6px; }
.mini-kv b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* instrument page */
.inst-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.inst-title { display: flex; gap: 14px; align-items: center; min-width: 0; }
.inst-title .avatar { width: 48px; height: 48px; border-radius: 14px; font-size: 14px; }
.inst-title h1 { font-size: 22px; letter-spacing: -.02em; }
.inst-price { font-size: 32px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.inst-cta { display: flex; gap: 10px; }
.inst-cta .btn { min-width: 120px; }
.chart-box { position: relative; height: 380px; }
.chart-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.chart-tip { position: absolute; pointer-events: none; top: 8px; left: 12px; font-size: 12px; color: var(--text-2); background: rgba(255,255,255,.9); padding: 4px 8px; border-radius: 8px; display: none; font-variant-numeric: tabular-nums; gap: 10px; }
.chart-tip.show { display: flex; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-2); font-size: var(--fs-sm); }
.kv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.kv { padding: 14px 20px; border-right: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); }
.kv span { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
.kv b { font-size: 14.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.range-bar { position: relative; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--loss), #F5B342, var(--profit)); margin: 10px 0 6px; }
.range-bar i { position: absolute; top: -4px; width: 4px; height: 14px; border-radius: 3px; background: var(--text); transform: translateX(-50%); }
.depth-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 6px 0; }

/* order ticket */
.ticket { width: min(440px, calc(100vw - 24px)); }
.ticket .modal-head { padding-bottom: 12px; border-bottom: 1px solid var(--border-2); }
.ticket-side { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-3); padding: 4px; border-radius: 12px; gap: 4px; margin: 16px 0; }
.ticket-side button { height: 40px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; color: var(--text-2); }
.ticket-side button.on-buy { background: var(--profit); color: #fff; box-shadow: 0 2px 6px rgba(0,168,107,.3); }
.ticket-side button.on-sell { background: var(--loss); color: #fff; box-shadow: 0 2px 6px rgba(229,72,77,.3); }
.ticket .seg-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.ticket .seg-row .segmented { flex: 1; } .ticket .seg-row .segmented label { flex: 1; text-align: center; }
.ticket-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ticket-grid .field { margin-bottom: 4px; }
.stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; height: 46px; overflow: hidden; background: #fff; transition: .15s; }
.stepper:focus-within { border-color: var(--primary); box-shadow: var(--ring); }
.stepper button { width: 40px; height: 100%; border: 0; background: var(--bg-2); color: var(--text-2); display: grid; place-items: center; flex-shrink: 0; }
.stepper button:hover { background: var(--bg-3); color: var(--text); }
.stepper input { border: 0; height: 100%; width: 100%; min-width: 0; text-align: center; font-weight: 650; font-size: 15px; font-variant-numeric: tabular-nums; }
.stepper input:focus { outline: none; }
.est { margin-top: 14px; border-radius: 12px; background: var(--bg-2); padding: 12px 14px; display: grid; gap: 8px; font-size: 13px; }
.est div { display: flex; justify-content: space-between; gap: 10px; }
.est span { color: var(--text-2); } .est b { font-variant-numeric: tabular-nums; }
.est .total { border-top: 1px dashed var(--border); padding-top: 8px; font-size: 14px; }
.ticket-review { display: grid; gap: 10px; }
.ticket-review .rv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-2); font-size: 14px; }
.ticket-review .rv span { color: var(--text-2); }
.ticket-result { text-align: center; padding: 10px 0 4px; }
.ticket-result .r-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; }
.ticket-result .r-ico.ok { background: var(--profit-bg); color: var(--profit); } .ticket-result .r-ico.wait { background: var(--info-bg); color: var(--info); } .ticket-result .r-ico.bad { background: var(--loss-bg); color: var(--loss); }
.ticket-ltp { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.ticket-ltp b { font-size: 18px; font-variant-numeric: tabular-nums; }
.demo-note { font-size: 12px; color: var(--text-2); display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; }
.demo-note .ico { color: var(--primary); flex-shrink: 0; margin-top: 1px; }

/* option chain */
.oc-wrap { overflow: auto; max-height: calc(100dvh - 300px); min-height: 360px; }
.oc { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.oc th { position: sticky; top: 0; z-index: 2; background: var(--bg-2); padding: 9px 10px; font-size: 11px; color: var(--text-2); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--border); white-space: nowrap; text-align: right; }
.oc thead tr:first-child th { top: 0; text-align: center; font-size: 12px; color: var(--text); }
.oc thead tr:nth-child(2) th { top: 37px; }
.oc td { padding: 8px 10px; border-bottom: 1px solid var(--border-2); text-align: right; white-space: nowrap; position: relative; }
.oc td.strike { text-align: center; font-weight: 700; background: var(--bg-2); color: var(--text); border-left: 1px solid var(--border); border-right: 1px solid var(--border); position: sticky; z-index: 1; }
.oc tr.itm-ce td.ce, .oc tr.itm-pe td.pe { background: #FFFBEF; }
.oc tr.atm td { border-top: 2px solid var(--primary); }
.oc tr.atm td.strike { background: var(--primary); color: #fff; }
.oc td.ltp { font-weight: 650; }
.oc .oi-bar { position: absolute; top: 6px; bottom: 6px; opacity: .14; border-radius: 3px; }
.oc .ce .oi-bar { right: 0; background: var(--loss); } .oc .pe .oi-bar { left: 0; background: var(--profit); }
.oc tr:hover td { background: #F6F9FF; }
.oc .bs { display: none; gap: 4px; position: absolute; top: 50%; transform: translateY(-50%); }
.oc td.ce .bs { left: 6px; } .oc td.pe .bs { right: 6px; }
.oc tr:hover .bs, .oc tr.sel .bs { display: inline-flex; }
.oc .bs button { width: 24px; height: 22px; border-radius: 5px; border: 0; font-size: 11px; font-weight: 800; color: #fff; }
.oc .bs .b { background: var(--profit); } .oc .bs .s { background: var(--loss); }
.oc-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.oc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* portfolio */
.alloc { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.alloc canvas { width: 180px; height: 180px; flex-shrink: 0; }
.legend { display: grid; gap: 8px; flex: 1; min-width: 200px; }
.legend div { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend span { flex: 1; color: var(--text-2); } .legend b { font-variant-numeric: tabular-nums; }
.bar-row { display: grid; grid-template-columns: 100px 1fr 90px; gap: 12px; align-items: center; font-size: 13px; padding: 6px 0; }
.bar-row .bar { height: 8px; background: var(--bg-3); border-radius: 8px; overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; border-radius: 8px; background: var(--primary); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 28px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 2px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }
.timeline li.bad::after { border-color: var(--loss); } .timeline li.neutral::after { border-color: var(--text-3); }
.timeline b { display: block; } .timeline small { color: var(--text-2); }
.thread { display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 82%; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg.staff { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.system { align-self: center; background: var(--bg-3); color: var(--text-2); font-size: 12.5px; max-width: 92%; text-align: center; }
.msg .meta { display: block; font-size: 11px; margin-top: 6px; opacity: .7; }
.msg a.att { display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.18); color: inherit; font-size: 12.5px; }
.msg.staff a.att { background: var(--bg-2); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-top: 1px solid var(--border-2); font-size: 13px; color: var(--text-2); gap: 10px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--border-2); }
.filters .input, .filters .select { width: auto; min-width: 130px; }
.onboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.onboard a { display: flex; gap: 12px; padding: 16px; border: 1px dashed var(--primary-100); border-radius: 14px; background: #fff; color: var(--text); }
.onboard a:hover { border-color: var(--primary); background: var(--primary-50); }
.onboard .f-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex-shrink: 0; }
.onboard b { display: block; font-size: 14px; } .onboard span { font-size: 12.5px; color: var(--text-2); }
.welcome-banner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 22px; border-radius: 18px; background: linear-gradient(120deg, #F1FAF5, #fff 70%); border: 1px solid var(--primary-100); }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--topbar-h) + 24px); }
.settings-nav a { padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.settings-nav a:hover, .settings-nav a.active { background: #fff; color: var(--text); box-shadow: var(--sh-1); }
.pref-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border-2); }
.pref-row:last-child { border-bottom: 0; }
.pref-row b { display: block; font-size: 14px; } .pref-row span { font-size: 12.5px; color: var(--text-2); }
.progress { height: 8px; background: var(--bg-3); border-radius: 8px; overflow: hidden; } .progress i { display: block; height: 100%; background: var(--primary); border-radius: 8px; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1280px) {
  .g-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g-5 > .stat-hero { grid-column: span 4; order: -1; }
  .g-main-r { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1100px) {
  :root { --sidebar-w: 76px; }
  .sidebar-head { padding: 0; justify-content: center; }
  .sidebar .logo-word, .nav-label, .nav-item span, .nav-item .nav-count, .sidebar-foot .demo-card { display: none; }
  .nav-item { justify-content: center; padding: 0; height: 44px; }
  .nav-item.active::before { left: -12px; }
  .sidebar-nav { padding: 12px; }
  .nav-group { margin-bottom: 6px; border-bottom: 1px solid var(--border-2); padding-bottom: 6px; }
  .g-main, .g-main-r { grid-template-columns: minmax(0, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding-top: 56px; }
  .preview { max-width: 620px; margin: 0 auto; width: 100%; }
  .float-card { display: none; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .kv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bal-chip { display: none; }
}
@media (max-width: 900px) {
  .site-links, .site-cta { display: none; }
  .site-burger { display: inline-grid; }
  .mobile-nav { position: fixed; inset: 72px 0 auto 0; background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--sh-3); padding: 12px 20px 20px; z-index: 49; flex-direction: column; gap: 4px; }
  .mobile-nav.open { display: flex; animation: rise .2s; }
  .mobile-nav a.link { padding: 12px; border-radius: 10px; color: var(--text); font-weight: 500; }
  .mobile-nav a.link:hover { background: var(--bg-2); }
  .mobile-nav .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-top .logo { display: inline-flex; }
  .contact-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 36px 28px; }
  .g-3, .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .idx-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-5 > .stat-hero { grid-column: span 2; }
}
/* ---- mobile app shell (≤ 768px) */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .panel { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 284px; height: 100dvh; transform: translateX(-102%); transition: transform .26s var(--ease); box-shadow: var(--sh-3); z-index: 95; }
  .sidebar.open { transform: none; }
  .sidebar .logo-word, .nav-label, .nav-item span, .nav-item .nav-count, .sidebar-foot .demo-card { display: revert; }
  .sidebar .logo-word { display: inline; }
  .nav-item { justify-content: flex-start; padding: 0 12px; height: 42px; }
  .nav-group { border: 0; margin-bottom: 12px; padding: 0; }
  .sidebar-head { justify-content: space-between; padding: 0 16px; }
  .drawer-overlay { display: block; position: fixed; inset: 0; background: rgba(17,24,39,.42); z-index: 94; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .drawer-overlay.show { opacity: 1; pointer-events: auto; }
  .topbar { height: 56px; padding: 0 12px; gap: 6px; }
  .topbar .burger { display: inline-grid; }
  .topbar .logo { display: inline-flex; }
  .topbar .logo img { width: 28px; height: 28px; } .topbar .logo-word { font-size: 15px; }
  .gsearch { position: fixed; left: 0; right: 0; top: 0; max-width: none; padding: 8px 12px; background: #fff; z-index: 75; display: none; border-bottom: 1px solid var(--border); }
  .gsearch.open { display: block; }
  .gsearch .input { height: 42px; }
  .gsearch .lead { left: 24px; top: 19px; } .gsearch .kbd { display: none; }
  .gsearch .close-search { display: inline-grid !important; position: absolute; right: 16px; top: 10px; }
  .search-pop { left: 12px; right: 12px; max-height: calc(100dvh - 80px); position: fixed; top: 62px; }
  .topbar .search-trigger { display: inline-grid !important; }
  .topbar .feed-pill { height: 26px; padding: 0 8px; font-size: 11px; }
  .topbar .feed-pill .fp-label { display: none; }
  .user-btn .u-meta, .user-btn .ico { display: none; }
  .content { padding: 16px 12px calc(var(--bottomnav-h) + 24px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 14px; align-items: flex-start; }
  .page-head h1 { font-size: 20px; }
  .page-head p { font-size: 12.5px; }
  .grid { gap: 12px; }
  .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-5 > .stat-hero { grid-column: span 2; }
  .stat { padding: 14px; }
  .stat .s-value { font-size: 18px; margin-top: 8px; }
  .stat-hero .s-value { font-size: 24px; }
  .stat .s-ico { width: 26px; height: 26px; }
  .card { border-radius: 14px; }
  .card-head { padding: 12px 14px; min-height: 52px; }
  .card-body, .card-pad { padding: 14px; }
  .li { padding: 11px 14px; min-height: 58px; }
  .li .li-spark { display: none; }
  .table th, .table td { padding: 10px 12px; }
  .filters { padding: 12px 14px; }
  .filters .input, .filters .select { flex: 1 1 140px; min-width: 0; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--border); z-index: 45; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--text-3); position: relative; }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav a.active::before { content: ''; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
  .modal { left: 0; right: 0; top: auto; bottom: 0; width: 100% !important; max-height: 94dvh; border-radius: 20px 20px 0 0; transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); }
  .modal.show { transform: none; }
  .modal::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--border); margin: 8px auto 0; flex-shrink: 0; }
  .modal-head { padding: 12px 16px 10px; } .modal-body { padding: 4px 16px 14px; } .modal-foot { padding: 12px 16px 16px; }
  .modal-foot .btn { flex: 1; }
  .ticket { width: 100%; }
  .toasts { top: auto; bottom: calc(var(--bottomnav-h) + 12px + env(safe-area-inset-bottom)); left: 12px; right: 12px; width: auto; }
  .inst-price { font-size: 26px; }
  .inst-cta { position: fixed; left: 0; right: 0; bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom)); padding: 10px 12px; background: #fff; border-top: 1px solid var(--border); z-index: 44; }
  .inst-cta .btn { flex: 1; min-width: 0; }
  .inst-page .content-pad-cta { height: 64px; }
  .chart-box { height: 280px; }
  .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { padding: 12px 14px; }
  .idx-strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
  .idx-strip::-webkit-scrollbar { display: none; }
  .idx-strip .idx { flex: 0 0 66%; scroll-snap-align: start; }
  .welcome-banner { padding: 14px 16px; gap: 10px; align-items: flex-start; }
  .welcome-banner h2 { font-size: 16px !important; }
  .welcome-banner [data-dismiss-onboard] { padding: 0 8px; }
  .welcome-banner [data-dismiss-onboard] .dl { display: none; }
  .onboard { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
  .onboard::-webkit-scrollbar { display: none; }
  .onboard a { flex: 0 0 74%; scroll-snap-align: start; padding: 12px; }
  .g-5 > .stat-hero { order: -1; }
  .hide-sm { display: none !important; }
  .oc-wrap { max-height: calc(100dvh - 260px); }
  .oc .hide-oc-sm { display: none; }
  .bar-row { grid-template-columns: 80px 1fr 80px; }
  .msg { max-width: 92%; }
  .settings-nav { flex-direction: row; overflow-x: auto; position: static; scrollbar-width: none; }
  .settings-nav a { white-space: nowrap; }
  .app-disclaimer { padding-bottom: calc(var(--bottomnav-h) + 24px); }
  /* responsive tables → cards */
  .table.stack-sm thead { display: none; }
  .table.stack-sm, .table.stack-sm tbody, .table.stack-sm tr, .table.stack-sm td { display: block; width: 100%; }
  .table.stack-sm tr { padding: 12px 14px; border-bottom: 1px solid var(--border-2); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .table.stack-sm td { padding: 0; border: 0; white-space: normal; text-align: left !important; font-size: 13px; }
  .table.stack-sm td[data-l]::before { content: attr(data-l); display: block; font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
  .table.stack-sm td.full { grid-column: 1 / -1; }
  .table.stack-sm td.end { text-align: right !important; }
  .table.stack-sm td.end[data-l]::before { text-align: right; }
  .table.stack-sm tbody tr:hover { background: transparent; }
  .row-actions { opacity: 1; }
}
@media (max-width: 600px) {
  .container { padding: 0 18px; }
  .site-nav { height: 64px; }
  .mobile-nav { inset: 64px 0 auto 0; }
  .hero { padding: 40px 0 56px; }
  .hero .lead { font-size: 16px; }
  .hero-ctas .btn { flex: 1; }
  .section { padding: 60px 0; }
  .section-head { margin-bottom: 34px; }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .pv-stats { grid-template-columns: repeat(2, 1fr); } .pv-stats .pv-stat:nth-child(3) { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .auth-main { padding: 16px 20px 28px; }
  .auth-card { padding: 24px 0; }
  .auth-card h1 { font-size: 24px; }
  .otp-inputs { gap: 7px; }
  .otp-inputs input { width: calc((100vw - 40px - 35px) / 6); max-width: 52px; height: 54px; font-size: 22px; }
  .pw-rules { grid-template-columns: 1fr; }
  .ticket-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cta-band .btn { width: 100%; }
}
@media (max-width: 360px) {
  .g-4, .g-5 { grid-template-columns: minmax(0, 1fr); }
  .g-5 > .stat-hero { grid-column: auto; }
  .bottom-nav a { font-size: 9.5px; }
  .ticket-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.aw-chart { width: 100%; display: block; }
.field > label.check { font-weight: 400; color: var(--text-2); }
@media (min-width: 769px) and (max-height: 900px) { .sidebar-foot { display: none; } .nav-group { margin-bottom: 8px; } .nav-label { padding-top: 6px; } }
@media (min-width: 1281px) { .stat-strip.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 769px) and (max-width: 1280px) { .stat-strip.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .stat-strip .s-value { font-size: 17px !important; } }
@media (max-width: 768px) {
  .stat-strip { display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
  .stat-strip::-webkit-scrollbar { display: none; }
  .stat-strip > .card { flex: 0 0 44%; scroll-snap-align: start; }
}
@media (max-width: 400px) { .topbar .logo-word { display: none; } }

/* ---------------------------------------------------------------- Admin */
.admin .sidebar-head { gap: 8px; }
.admin-tag { font-size: 10px; height: 20px; letter-spacing: .06em; }
@media (max-width: 1100px) and (min-width: 769px) { .admin-tag { display: none; } }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 14px 16px; }
.kpi .s-label { font-size: 12px; }
.kpi .s-value { font-size: 21px; margin-top: 8px; }
.alert-list { display: flex; flex-direction: column; }
.alert-row { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border-2); align-items: flex-start; color: inherit; }
.alert-row:hover { background: var(--bg-2); color: inherit; }
.alert-row .a-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.alert-row.error .a-ico { background: var(--loss-bg); color: var(--loss); } .alert-row.warn .a-ico { background: var(--warn-bg); color: var(--warn); } .alert-row.info .a-ico { background: var(--info-bg); color: var(--info); }
.alert-row b { display: block; font-size: 13.5px; } .alert-row span { font-size: 12.5px; color: var(--text-2); }
.qa { display: flex; gap: 10px; flex-wrap: wrap; }
.dl-grid { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 16px; font-size: 13.5px; }
.dl-grid dt { color: var(--text-2); } .dl-grid dd { margin: 0; font-weight: 600; word-break: break-word; }
.json { font-family: ui-monospace, Menlo, monospace; font-size: 12px; background: var(--bg-2); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow: auto; margin: 0; }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.perm-group { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.perm-group h4 { font-size: 13px; margin-bottom: 8px; }
.perm-group .check { display: flex; margin: 6px 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.msg.internal { align-self: stretch; max-width: 100%; background: #FFFBEB; border: 1px dashed #F5C46B; color: #8A5A14; }
.msg.staff-me { align-self: flex-end; background: var(--primary); color: #fff; }
.msg.user-side { align-self: flex-start; background: #fff; border: 1px solid var(--border); color: var(--text); }
.split-pane { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 20px; align-items: start; }
.sel-row { background: var(--primary-50) !important; }
.cms-editor { min-height: 360px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; line-height: 1.55; }
.check-card { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border-2); align-items: flex-start; }
.check-card .c-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.check-card.ok .c-ico { background: var(--profit-bg); color: var(--profit); } .check-card.bad .c-ico { background: var(--loss-bg); color: var(--loss); }
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .split-pane { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 768px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .form-grid, .perm-grid { grid-template-columns: minmax(0, 1fr); }
  .dl-grid { grid-template-columns: 120px minmax(0, 1fr); }
  .admin .content { padding-bottom: 32px; }
  .admin .app-disclaimer { padding-bottom: 28px; }
}
.admin .sidebar-head .logo-word { font-size: 15.5px; }
.admin .sidebar-head .logo img { width: 30px; height: 30px; }
.admin-tag { font-size: 9px !important; padding: 0 6px !important; }

/* ---------------------------------------------------------------- Add funds + KYC */
.add-funds-btn { gap: 6px; }
.af-grid { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.af-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-frame { position: relative; padding: 14px; border: 1px dashed var(--border); border-radius: var(--r-lg); background: #fff; }
.qr-frame img { display: block; width: 220px; height: 220px; object-fit: contain; }
.qr-caption { margin: 0; max-width: 250px; font-size: 11.5px; line-height: 1.5; color: var(--text-3); text-align: center; }
.af-form .amt-input .input { font-size: 22px; font-weight: 700; height: 54px; }
.af-form .pills { flex-wrap: wrap; }
.af-form .pill.active { background: var(--primary-50); border-color: var(--primary); color: var(--primary); }
.qr-frame .act-qr-empty { width: 220px; min-height: 220px; flex-direction: column; text-align: center; border: 0; }
.af-steps { margin: 12px 0 0; text-align: center; }
.af-form .callout { margin-bottom: 14px; }
.fp-modal .act-amount { padding: 0 0 12px; }
.fp-modal .act-qr-frame img { width: 200px; height: 200px; }
.fp-modal .fee-points { margin: 14px 0 6px; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); }
.fp-modal .fee-points li { color: #7a4b00; } .fp-modal .fee-points li svg { color: var(--warn); }
.fp-proof { display: block; max-width: 100%; max-height: 320px; border: 1px solid var(--border); border-radius: 10px; margin-top: 4px; }
.kyc-status { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r-lg); margin-bottom: 18px; }
.kyc-status .ks-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: #fff; }
.kyc-status.none { background: var(--bg-2); } .kyc-status.pending { background: var(--warn-bg); } .kyc-status.approved { background: var(--profit-bg); } .kyc-status.rejected { background: var(--loss-bg); }
.kyc-status.pending .ks-ico { color: var(--warn); } .kyc-status.approved .ks-ico { color: var(--profit); } .kyc-status.rejected .ks-ico { color: var(--loss); } .kyc-status.none .ks-ico { color: var(--primary); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: var(--fs-sm); }
.kv dt { color: var(--text-2); } .kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.qr-admin { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr-admin img { width: 150px; height: 150px; object-fit: contain; border: 1px solid var(--border); border-radius: 12px; padding: 8px; background: #fff; }
@media (max-width: 760px) {
  .af-grid { grid-template-columns: 1fr; gap: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .add-funds-btn { padding: 0 10px; }
}
.quick-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.quick-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.quick-card:hover { border-color: var(--primary); box-shadow: var(--sh-1); }
.quick-card > div { flex: 1; min-width: 0; } .quick-card b { display: block; font-size: var(--fs-sm); } .quick-card span:not(.f-ico) { font-size: var(--fs-xs); color: var(--text-2); }
.quick-card .f-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); flex: none; }
.quick-card.kyc-pending .f-ico { background: var(--warn-bg); color: var(--warn); } .quick-card.kyc-approved .f-ico { background: var(--profit-bg); color: var(--profit); } .quick-card.kyc-rejected .f-ico { background: var(--loss-bg); color: var(--loss); }
@media (max-width: 760px) { .quick-strip { grid-template-columns: 1fr; gap: 10px; } }

/* ------------------------------------------------------------ account registration fee / activation */
.quick-strip.qs-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .quick-strip.qs-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .quick-strip.qs-3 { grid-template-columns: 1fr; } }

.fee-points { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 7px; }
.fee-points li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.fee-points li svg { flex: none; margin-top: 2px; color: var(--primary); }

.act-body { background: var(--bg-2); }
.act-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.act-top .logo { display: inline-flex !important; }
.act-tag { gap: 5px; }
.act-content { max-width: 1180px; }
.act-steps { list-style: none; margin: 0 0 18px; padding: 14px 16px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); counter-reset: none; }
.act-steps li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-3); position: relative; min-width: 0; }
.act-steps li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-steps li i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--bg-3); color: var(--text-3); font-size: 12.5px; font-weight: 800; }
.act-steps li.done { color: var(--text); } .act-steps li.done i { background: var(--profit-bg); color: var(--profit); }
.act-steps li.current { color: var(--text); } .act-steps li.current i { background: var(--primary); color: #fff; box-shadow: var(--ring); }
.act-steps li.current.bad i { background: var(--loss); box-shadow: 0 0 0 4px rgba(229,72,77,.15); }

.act-status { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r-lg); margin-bottom: 20px; border: 1px solid transparent; }
.act-status .ks-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; background: #fff; }
.act-status b { font-size: var(--fs-md); }
.act-status .fs-sm { color: var(--text-2); margin-top: 2px; line-height: 1.5; }
.act-status.none, .act-status.unpaid { background: var(--info-bg); border-color: #D6E4FD; } .act-status.unpaid .ks-ico { color: var(--info); }
.act-status.pending { background: var(--warn-bg); border-color: #FBE3BE; } .act-status.pending .ks-ico { color: var(--warn); }
.act-status.rejected { background: var(--loss-bg); border-color: #F8CFD0; } .act-status.rejected .ks-ico { color: var(--loss); }
.act-status.approved, .act-status.exempt { background: var(--profit-bg); border-color: #C7EBDB; } .act-status.approved .ks-ico, .act-status.exempt .ks-ico { color: var(--profit); }
.act-reason { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: #fff; font-size: var(--fs-sm); color: #A2282C; }

.act-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; }
.act-amount { text-align: center; padding: 6px 0 16px; }
.act-amount small { display: block; font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.act-amount b { display: block; font-size: 38px; font-weight: 800; color: var(--primary); letter-spacing: -.03em; line-height: 1.15; margin: 4px 0 2px; }
.act-amount span { font-size: var(--fs-xs); color: var(--text-2); }
.act-qr { display: flex; justify-content: center; }
.act-qr-frame { padding: 14px; border-radius: var(--r-xl); background: #fff; border: 1px solid var(--border); box-shadow: var(--sh-2); }
.act-qr-frame img { display: block; width: 240px; height: 240px; max-width: 64vw; max-height: 64vw; object-fit: contain; }
.act-qr-empty { display: flex; gap: 8px; align-items: center; padding: 18px; border: 1px dashed var(--border); border-radius: var(--r-lg); color: var(--text-2); font-size: var(--fs-sm); width: 100%; justify-content: center; }
.act-upi { display: grid; gap: 8px; margin-top: 16px; }
.act-upi-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border-2); }
.act-upi-row small { display: block; font-size: 11.5px; color: var(--text-2); } .act-upi-row b { font-size: var(--fs-md); word-break: break-all; }
.act-how { display: grid; gap: 8px; margin-top: 16px; color: var(--text-2); }
.act-how > div { display: flex; gap: 10px; align-items: flex-start; }
.act-how p { margin: 0; line-height: 1.55; }
.act-how i { font-style: normal; width: 22px; height: 22px; border-radius: 7px; flex: none; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); font-weight: 800; font-size: 12px; }
.act-warn { border-color: #FBE3BE; } .act-warn .card-head { background: var(--warn-bg); border-radius: var(--r-lg) var(--r-lg) 0 0; } .act-warn .card-head h2 { color: #8A5A14; display: flex; gap: 8px; align-items: center; }
.act-pay .card-head h2, #actForm .card-head h2 { display: flex; gap: 8px; align-items: center; }
.act-utr { font-size: 17px; letter-spacing: 1.5px; font-weight: 700; }
@media (max-width: 960px) {
  .act-grid { grid-template-columns: 1fr; }
  .act-steps { grid-template-columns: repeat(5, auto); overflow-x: auto; justify-content: space-between; }
  .act-steps li span { display: none; } .act-steps li.current span { display: inline; }
}
dl.kv { padding: 0; border: 0; }
dl.kv dd span { display: inline; } dl.kv dd .badge { display: inline-flex; vertical-align: middle; }
@media (max-width: 560px) {
  .act-status { align-items: flex-start; flex-wrap: wrap; } .act-status > .grow { flex: 1 1 calc(100% - 64px); } .act-status .btn { width: 100%; justify-content: center; }
  .act-amount b { font-size: 32px; }
}

/* admin: registration payments */
.rf-qr { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.rf-qr .rf-img { width: 160px; height: 160px; border: 1px solid var(--border); border-radius: 14px; padding: 8px; background: #fff; display: grid; place-items: center; flex: none; }
.rf-qr .rf-img img { width: 100%; height: 100%; object-fit: contain; }
.rf-qr .rf-img.empty { border-style: dashed; color: var(--text-3); font-size: var(--fs-xs); text-align: center; }
.rf-tabs { display: flex; gap: 6px; padding: 12px 16px 0; border-bottom: 1px solid var(--border-2); }
.rf-tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 650; font-size: var(--fs-sm); color: var(--text-2); border-bottom: 2px solid transparent; cursor: pointer; }
.rf-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.rf-proof { max-width: 100%; max-height: 300px; border: 1px solid var(--border); border-radius: 10px; margin-top: 6px; }
.rf-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: var(--fs-sm); }
.rf-timeline li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
#actPayWrap[hidden], #actForm[hidden], [data-pane][hidden] { display: none !important; }
