/* Client dashboard: clean surfaces, one accent, dark balance card (modelled on the Corvex Markets portal feel) */
.dx-summary { display: grid; grid-template-columns: minmax(300px, 1.1fr) 2fr; gap: 18px; margin-bottom: 20px; }
.dx-hero { background: var(--fn-ink); color: #fff; padding: 24px 26px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 10px 30px rgba(20, 16, 90, .25); }
.dx-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dx-kicker { font-size: 13px; color: #b9b4ff; margin-bottom: 4px; }
.dx-hero-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #cfcdf0; font-weight: 600; }
.dx-balance { font-size: 42px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.dx-pill { font-size: 12px; font-weight: 600; padding: 4px 10px; background: rgba(255, 255, 255, .1); color: #d0cef5; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.dx-pill i { width: 7px; height: 7px; background: #8c89c4; border-radius: 50% !important; }
.dx-pill.live { color: #7ff0bd; }
.dx-pill.live i { background: #3ee59b; animation: lpPulse 1.6s infinite; }
.dx-hero-actions { display: flex; gap: 10px; margin-top: 8px; }
.dx-btn { padding: 10px 22px; font-weight: 600; text-decoration: none; font-size: 14px; border: 1px solid transparent; }
.dx-btn-primary { background: var(--fn-indigo-400); color: #fff !important; }
.dx-btn-primary:hover { background: #8379ff; }
.dx-btn-ghost { color: #fff !important; border-color: rgba(255, 255, 255, .35); }
.dx-btn-ghost:hover { background: rgba(255, 255, 255, .12); }

.dx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.dx-stat { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--fn-border); padding: 20px; text-decoration: none; color: var(--fn-text) !important; }
.dx-stat:hover { border-color: var(--fn-indigo-400); box-shadow: 0 8px 22px rgba(48, 35, 192, .12); transform: translateY(-2px); }
.dx-stat small { display: block; font-size: 12px; color: var(--fn-muted); margin-bottom: 4px; }
.dx-stat b { font-size: 24px; color: var(--fn-navy); }
.dx-stat em { font-style: normal; font-size: 14px; color: var(--fn-muted); font-weight: 500; }
.dx-dot { width: 10px; height: 10px; background: var(--fn-indigo-400); flex: none; border-radius: 50% !important; }
.dx-dot.warn { background: var(--fn-warn); }
@media (max-width: 900px) { .dx-summary { grid-template-columns: 1fr; } }

/* general dashboard polish */
.rz-body .rz-alert { border: 1px solid var(--fn-border); box-shadow: none; }
.rz-body .rz-card { box-shadow: 0 1px 2px rgba(20, 16, 90, .05); }

/* =====================================================================
   Corvex-style app shell (dashboard, support and admin layouts)
   Neutral near-black chrome, light content, one blue accent, Sora + IBM Plex Mono.
   ===================================================================== */
.rz-layout {
    --fn-ink: #0a0a0a;
    --fn-navy: #141414;
    --fn-indigo: #4361ee;
    --fn-indigo-600: #3651d6;
    --fn-indigo-400: #5b73f5;
    --fn-indigo-300: #8da0ff;
    --fn-indigo-100: #e8ecff;
    --fn-bg: #f5f5f5;
    --fn-border: #e0e0e0;
    --fn-text: #121212;
    --fn-muted: #666666;
    --rz-primary: #4361ee;
    --rz-primary-light: #5b73f5;
    --rz-primary-lighter: rgba(67, 97, 238, .1);
    --rz-primary-dark: #3651d6;
    --rz-primary-darker: #141414;
    --rz-link-color: #4361ee;
    --rz-body-background-color: #f5f5f5;
    --rz-base-background-color: #f5f5f5;
    --rz-header-background-color: #141414;
    --rz-sidebar-background-color: #141414;
    background: #f5f5f5;
    min-height: 100vh;
}
.rz-layout .rz-header { background: #141414 !important; border-bottom: 1px solid #2e2e2e !important; box-shadow: none; }
.rz-layout .rz-sidebar { background: #141414 !important; border-right: 1px solid #2e2e2e !important; }
.rz-layout .rz-body { background: transparent; }

/* menu items: icon + label, muted until hover, active = soft primary fill + 3px bar */
.rz-sidebar .rz-panel-menu { padding: 12px 8px; }
.rz-sidebar .rz-navigation-item { border: 0 !important; margin: 2px 0; }
.rz-sidebar .rz-navigation-item-wrapper { border: 0 !important; }
.rz-sidebar .rz-navigation-item-link {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px !important;
    min-height: 0 !important;
    color: #8c8c8c !important;
    font-size: 14px; font-weight: 500;
    background: transparent !important;
    box-shadow: none !important;
}
.rz-sidebar .rz-navigation-item-text { color: inherit !important; font-size: 14px; font-weight: 500; }
.rz-sidebar .rz-navigation-item-icon, .rz-sidebar .rzi { color: inherit !important; font-size: 20px; }
.rz-sidebar .rz-navigation-item-link:hover { background: rgba(255, 255, 255, .06) !important; color: #fafafa !important; }
.rz-sidebar .rz-navigation-item-link:hover * { color: #fafafa !important; }
.rz-sidebar .rz-navigation-item-link-active,
.rz-sidebar .rz-state-active > .rz-navigation-item-wrapper > .rz-navigation-item-link,
.rz-sidebar .rz-navigation-item-wrapper-active .rz-navigation-item-link {
    background: rgba(91, 115, 245, .16) !important;
    color: #5b73f5 !important;
    box-shadow: none !important;
}
.rz-sidebar .rz-navigation-item-link-active *,
.rz-sidebar .rz-navigation-item-wrapper-active * { color: #7d90ff !important; }
.rz-sidebar .rz-navigation-item-link-active::before,
.rz-sidebar .rz-navigation-item-wrapper-active .rz-navigation-item-link::before {
    content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 20px; background: #5b73f5;
}
.rz-layout .rz-profile-menu { background: transparent !important; }

/* figures use the mono face */
.dx-balance, .dx-stat b, .fn-kpi .v, .fn-balance-value, .fn-price, .rz-grid-table td .fn-num { font-family: var(--fn-mono); font-variant-numeric: tabular-nums; }

/* balance card in the neutral palette */
.dx-hero { background: #141414; border: 1px solid #2e2e2e; box-shadow: none; }
.dx-kicker { color: #8c8c8c; }
.dx-hero-label { color: #8c8c8c; }
.dx-btn-primary { background: #5b73f5; }
.dx-btn-primary:hover { background: #7186ff; }
.dx-stat { border-color: #e0e0e0; }
.dx-stat:hover { border-color: #5b73f5; box-shadow: 0 6px 18px rgba(67, 97, 238, .12); }
.dx-dot { background: #5b73f5; }
.fn-balance { background: #141414; }
.fn-kpi { border-top-color: #4361ee; }
.fn-tag { background: #e8ecff; color: #3651d6; }
.fn-tag.dark { background: #141414; color: #fff; }
.rz-datatable thead th, .rz-grid-table thead th { background: #fafafa; color: #121212; }
.rz-datatable-data tr:hover td, .rz-grid-table tbody tr:hover td { background: #f3f5ff; }
.btn-primary, .rz-button.rz-primary { background-color: #4361ee; border-color: #4361ee; }
.btn-primary:hover, .rz-button.rz-primary:hover:not(.rz-state-disabled) { background-color: #3651d6 !important; border-color: #3651d6 !important; box-shadow: 0 4px 14px rgba(67, 97, 238, .3); }
.dx-stat b.dx-b-text { font-family: 'Sora', system-ui, sans-serif; font-size: 16px; }

/* support tickets */
.tk-layout { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.tk-item { display: block; background: #fff; border: 1px solid var(--fn-border); padding: 12px 14px; margin-bottom: 8px; text-decoration: none; color: var(--fn-text) !important; }
.tk-item:hover, .tk-item.active { border-color: var(--fn-indigo-400); background: #f6f8ff; }
.tk-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.tk-item-sub { font-weight: 600; color: var(--fn-navy); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.tk-actions { display: flex; gap: 10px; align-items: center; }
.tk-thread { display: grid; gap: 12px; margin-bottom: 14px; }
.tk-msg { padding: 14px 16px; border: 1px solid var(--fn-border); background: #fff; max-width: 92%; }
.tk-msg.staff { background: #eef1ff; border-color: #cdd6ff; justify-self: start; }
.tk-msg.me { justify-self: end; }
.tk-meta { font-size: 12px; color: var(--fn-muted); margin-bottom: 6px; }
.tk-body { white-space: pre-wrap; line-height: 1.6; }
@media (max-width: 900px) { .tk-layout { grid-template-columns: 1fr; } }

/* analytics */
.an-summary ul, .an-dash-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; color: var(--fn-text); line-height: 1.5; }
.an-dash { margin-bottom: 20px; }
.an-dash-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.an-dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 14px 0 6px; }
.an-dash-kpis small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--fn-muted); }
.an-dash-kpis b { font-family: var(--fn-mono); font-size: 20px; color: var(--fn-navy); }

/* social trading */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.sc-card { background: #fff; border: 1px solid var(--fn-border); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.sc-card:hover { border-color: var(--fn-indigo-400); box-shadow: 0 10px 24px rgba(67, 97, 238, .12); transform: translateY(-2px); }
.sc-top { display: flex; gap: 12px; align-items: center; }
.sc-top > div:nth-child(2) { flex: 1; min-width: 0; }
.sc-top b { display: block; color: var(--fn-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-top small { color: var(--fn-muted); }
.sc-desc { margin: 0; color: var(--fn-muted); font-size: 13.5px; line-height: 1.5; min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-stats, .sc-earn { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 10px; }
.sc-stats small, .sc-earn small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--fn-muted); }
.sc-stats b, .sc-earn b { font-family: var(--fn-mono); color: var(--fn-navy); }
.sc-earn { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--fn-border); }
.sc-terms { padding-left: 20px; display: grid; gap: 8px; line-height: 1.55; color: var(--fn-text); }

/* Wallet card: keep Deposit / Withdraw inside the box at every width (the card sits in a narrow column on desktop). */
.HFT7765 { overflow: hidden; }
.fn-wallet-head { flex-wrap: wrap !important; gap: 6px 8px !important; min-width: 0; }
.fn-wallet-head > h6 { flex: 1 1 auto; min-width: 0; margin: 0; }
.fn-wallet-head .xm-card__ctas { flex-wrap: wrap; gap: 6px; max-width: 100%; }
.fn-wallet-head .HFT55454 { padding: 4px 10px !important; white-space: nowrap; gap: 4px; }

/* Admin: platform rules form */
.fn-rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 18px; margin-top: 12px; }
.fn-rule { display: flex; flex-direction: column; gap: 4px; }

/* Analytics: Myfxbook-style account report */
.fx-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fx-head h1 { margin: 0; }
.fx-head p { margin: 4px 0 0; }
.fx-summary { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
.fx-box { background: var(--fn-surface); border: 1px solid var(--fn-border); border-top: 3px solid #f08a00; padding: 14px 18px; }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px 18px; }
.fx-box small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--fn-muted); }
.fx-box b { font-family: var(--fn-mono); font-size: 20px; color: var(--fn-navy); font-weight: 700; }
.fx-gains { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 14px; border-top-color: #4361ee; }
.fx-box b.pos, .fx-stats td.good, .fx-months td.pos, b.pos { color: var(--fn-success); }
.fx-box b.neg, .fx-stats td.bad, .fx-months td.neg, b.neg { color: var(--fn-danger); }
.fx-tabs { background: transparent; }
.fx-chart h3 small { font-weight: 400; margin-left: 6px; }
.fx-stats { width: 100%; border-collapse: collapse; }
.fx-stats td { padding: 8px 4px; border-bottom: 1px solid var(--fn-border); font-size: 14px; }
.fx-stats td:last-child { text-align: right; font-family: var(--fn-mono); font-weight: 600; }
.fx-months { width: 100%; border-collapse: collapse; min-width: 880px; font-size: 13px; }
.fx-months th, .fx-months td { padding: 8px 6px; text-align: right; border-bottom: 1px solid var(--fn-border); font-family: var(--fn-mono); }
.fx-months th:first-child, .fx-months td:first-child { text-align: left; }
.fx-months th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--fn-muted); font-weight: 600; }

/* Admin inbox */
.fn-mail { display: grid; grid-template-columns: 360px 1fr; gap: 0; border: 1px solid #dfe3ea; background: #fff; min-height: 560px; }
.fn-mail-list { border-right: 1px solid #dfe3ea; overflow-y: auto; max-height: 72vh; }
.fn-mail-row { padding: 12px 16px; border-bottom: 1px solid #eef0f4; cursor: pointer; }
.fn-mail-row:hover { background: #f6f9fe; }
.fn-mail-row.sel { background: #e6f1fd; box-shadow: inset 3px 0 0 #2f7fe3; }
.fn-mail-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.fn-mail-top span { color: #8a94a6; font-size: 12px; white-space: nowrap; }
.fn-mail-sub { font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-mail-snip { font-size: 12px; color: #8a94a6; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-mail-row.unread .fn-mail-top b, .fn-mail-row.unread .fn-mail-sub { font-weight: 700; color: #0b1d3a; }
.fn-mail-row.unread::before { content: ""; float: left; width: 8px; height: 8px; margin: 5px 8px 0 -8px; background: #2f7fe3; border-radius: 50%; }
.fn-mail-view { padding: 20px 24px; overflow-y: auto; max-height: 72vh; }
.fn-mail-head h2 { font-size: 20px; margin: 0 0 8px; }
.fn-mail-body { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 14px; line-height: 1.65; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid #eef0f4; }
.fn-mail-empty { padding: 40px 24px; color: #8a94a6; text-align: center; font-size: 14px; }
.fn-mail-modal { position: fixed; inset: 0; background: rgba(8, 15, 33, .5); z-index: 2000; display: grid; place-items: center; padding: 20px; }
.fn-mail-compose { width: min(680px, 100%); background: #fff; padding: 20px 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); max-height: 92vh; overflow-y: auto; }
.fn-mail-compose-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 16px; }
.fn-mail-compose-head button { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: #8a94a6; }
.fn-mail-field { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 8px; margin-bottom: 8px; }
.fn-mail-field label { font-size: 12px; color: #8a94a6; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 900px) { .fn-mail { grid-template-columns: 1fr; } .fn-mail-list { max-height: 280px; border-right: 0; border-bottom: 1px solid #dfe3ea; } }

/* Quick connect dialog */
.qc { width: min(580px, 88vw); max-width: 100%; }
.qc-lead { color: #5b6b82; font-size: 14px; line-height: 1.55; margin: 0 0 12px; }
.qc-found { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.qc-chip { padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid transparent; }
.qc-chip.ok { background: #e6f6ee; color: #0e8a52; border-color: #bfe7d1; }
.qc-chip.warn { background: #fff4de; color: #a56a00; border-color: #f3d9a4; }
.qc-note { margin-top: 10px; padding: 8px 12px; background: #fff4de; color: #7a5200; font-size: 13px; border-left: 3px solid #e0a01c; }
.qc-edit { margin-top: 14px; }
.qc-edit summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #2f7fe3; margin-bottom: 8px; }
.qc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-top: 8px; }
.qc-grid label { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: #8a94a6; margin-bottom: 4px; }
.qc-pw { display: flex; gap: 6px; align-items: center; }
.qc-eye { border: 0; background: none; color: #2f7fe3; font-size: 12px; font-weight: 600; cursor: pointer; padding: 0 4px; }
.qc-sug { margin-top: 12px; padding: 12px; background: #f1f7fe; border: 1px solid #cfe1f7; }
.qc-sug-title { font-size: 13px; margin-bottom: 8px; color: #35506f; }
.qc-sug-btn { margin: 0 6px 6px 0; padding: 5px 11px; border: 1px solid #9cc3ee; background: #fff; color: #1d6fd8; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 6px; }
.qc-sug-btn:hover { background: #e6f1fd; }
.qc-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.qc-steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #35506f; }
.qc-steps li i { width: 16px; height: 16px; border-radius: 50%; flex: none; border: 2px solid #b9c6d8; }
.qc-steps li.active i { border-color: #2f7fe3; border-top-color: transparent; animation: qcSpin .8s linear infinite; }
.qc-steps li.ok i { background: #1e9f62; border-color: #1e9f62; }
.qc-steps li.fail i { background: #d64545; border-color: #d64545; }
@keyframes qcSpin { to { transform: rotate(360deg); } }
.qc-error { margin-top: 12px; padding: 10px 14px; background: #fdecec; color: #a12727; font-size: 13.5px; line-height: 1.5; border-left: 3px solid #d64545; }
.qc-ok { margin-top: 12px; padding: 10px 14px; background: #e6f6ee; color: #0e6a40; font-size: 14px; font-weight: 600; border-left: 3px solid #1e9f62; }
.qc-actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.qc-link { border: 0; background: none; color: #5b6b82; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 0; }
@media (max-width: 560px) { .qc-grid { grid-template-columns: 1fr; } }
