:root {
  color-scheme: dark;
  --bg: #0b1020;
  --panel: #11182b;
  --panel-raised: #151e33;
  --line: rgba(194, 208, 234, .13);
  --text: #f3f6fc;
  --muted: #9aa6bb;
  --mint: #73e0b5;
  --warn: #e5bd73;
  --red: #f18b8b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 "DM Sans", "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: Manrope, "Segoe UI", sans-serif; letter-spacing: -.04em; }
p { margin-top: 0; }
button, input, select { font: inherit; }
.brand-mark { width: 25px; height: 24px; display: flex; align-items: end; gap: 3px; padding: 4px; border: 1px solid rgba(115,224,181,.4); border-radius: 7px; }
.brand-mark i { width: 4px; border-radius: 3px; background: var(--mint); }.brand-mark i:first-child { height: 7px; }.brand-mark i:nth-child(2) { height: 12px; }.brand-mark i:nth-child(3) { height: 16px; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font: 800 18px Manrope, sans-serif; letter-spacing: -.8px; }.auth-brand > span:last-child > span { color: var(--mint); }
.eyebrow { margin: 0 0 8px; color: var(--mint); font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 35px 18px; background: radial-gradient(ellipse at 50% 0, rgba(86,119,203,.17), transparent 50%), var(--bg); }
.auth-page > .auth-brand { position: absolute; top: 28px; left: max(22px, calc((100% - 1000px) / 2)); }
.auth-card { width: min(100%, 430px); margin: 44px 0 0; padding: 32px; border: 1px solid var(--line); border-radius: 13px; background: rgba(17,24,43,.92); box-shadow: 0 26px 90px rgba(0,0,0,.32); }
.back-link { display: inline-block; margin-bottom: 29px; color: #aab5c7; font-size: 11px; }.back-link:hover, .auth-switch a:hover { color: var(--mint); }
.auth-card h1 { font-size: 30px; }.auth-intro { margin: 7px 0 23px; color: var(--muted); font-size: 12px; }
.auth-form { display: grid; gap: 9px; }.auth-form label, .workspace-form label { margin-top: 5px; color: #d5dceb; font-size: 11px; font-weight: 600; }
.auth-form input, .workspace-form select, .admin-update-form select { width: 100%; min-height: 43px; padding: 0 11px; border: 1px solid rgba(194,208,234,.2); border-radius: 6px; background: #0c1323; color: var(--text); outline: none; }
.auth-form input:focus, .workspace-form select:focus, .admin-update-form select:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(115,224,181,.1); }
.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; padding: 0 17px; border: 0; border-radius: 6px; cursor: pointer; font-weight: 700; }
.button.primary { margin-top: 10px; background: var(--mint); color: #092018; }.button.primary:hover { background: #91ecc8; }.button.compact { min-height: 35px; margin: 0; padding: 0 12px; font-size: 10px; }
.form-note, .auth-footnote { color: #8591a6; font-size: 10px; line-height: 1.7; }.auth-switch { margin: 18px 0; color: #a2aec2; text-align: center; font-size: 11px; }.auth-switch a { color: var(--mint); font-weight: 700; }.auth-footnote { padding-top: 14px; border-top: 1px solid var(--line); text-align: center; }
.flash-list { display: grid; gap: 8px; margin: 15px 0; }.flash { margin: 0; padding: 10px 12px; border: 1px solid rgba(115,224,181,.22); border-radius: 6px; background: rgba(115,224,181,.07); color: #bcefd8; font-size: 11px; }.flash.error { border-color: rgba(241,139,139,.24); background: rgba(241,139,139,.07); color: #ffb5b5; }
.app-header { height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100% - 1440px) / 2)); border-bottom: 1px solid var(--line); background: rgba(11,16,32,.94); }
.header-user { display: flex; align-items: center; gap: 20px; color: #bec8d9; font-size: 11px; }.header-user > a { color: var(--mint); }.header-user form { margin: 0; }.link-button { padding: 0; border: 0; background: transparent; color: #9facc1; cursor: pointer; font-size: 11px; }.link-button:hover { color: var(--mint); }
.app-shell { min-height: calc(100vh - 66px); display: grid; grid-template-columns: 225px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; padding: 28px 15px; border-right: 1px solid var(--line); background: #0c1221; }.sidebar-label { margin: 0 10px 12px; color: #65728b; font-size: 9px; font-weight: 700; letter-spacing: 1.3px; }.side-link { min-height: 39px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border-radius: 5px; color: #abb6c9; font-size: 11px; }.side-link > span { width: 16px; color: #9aa8bf; font-size: 14px; }.side-link.active { background: rgba(115,224,181,.1); color: var(--mint); }.side-link.disabled { cursor: default; opacity: .59; }.side-link small { margin-left: auto; color: #748198; font-size: 8px; }.sidebar-foot { margin: auto 10px 0; padding-top: 14px; border-top: 1px solid var(--line); color: #68758d; font-size: 9px; line-height: 1.8; }
.workspace, .admin-shell { width: min(1220px, 100%); margin: 0 auto; padding: 35px clamp(18px, 3.6vw, 48px) 60px; }.admin-shell { width: min(1320px, 100%); }.workspace-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 23px; }.workspace-top h1 { font-size: 29px; }.subheading { margin: 5px 0 0; color: var(--muted); font-size: 11px; }.environment-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid rgba(115,224,181,.19); border-radius: 99px; color: #9fe8ca; background: rgba(115,224,181,.06); font-size: 8px; font-weight: 700; letter-spacing: .5px; }.environment-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }.admin-badge { color: #d8c193; border-color: rgba(229,189,115,.2); background: rgba(229,189,115,.05); }
.notice { display: grid; gap: 4px; margin-bottom: 14px; padding: 12px 15px; border-radius: 7px; font-size: 11px; }.notice.warning { border: 1px solid rgba(229,189,115,.2); background: rgba(229,189,115,.06); color: #e2c990; }.notice span { color: #c1b699; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 11px; margin-bottom: 14px; }.admin-metrics { grid-template-columns: repeat(4, minmax(0,1fr)); }.metric-card, .panel { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }.metric-card { min-height: 113px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 15px; }.metric-card > span:first-child { color: #8190a8; font-size: 8px; font-weight: 700; letter-spacing: 1px; }.metric-card > strong { font: 700 22px Manrope, sans-serif; }.metric-card > small { color: #8491a7; font-size: 9px; }.status-pill { padding: 3px 7px; border-radius: 99px; background: rgba(229,189,115,.11); color: #e7cc91; font: 700 9px "DM Sans", sans-serif !important; }.status-pill.active, .status-pill.paper { background: rgba(115,224,181,.1); color: #9ce4c5; }.status-pill.suspended, .status-pill.past_due, .status-pill.canceled { background: rgba(241,139,139,.1); color: #f5aaaa; }
.panel-grid { display: grid; grid-template-columns: .84fr 1.16fr; align-items: start; gap: 13px; }.panel { padding: 18px; }.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }.panel-heading h2 { font-size: 15px; }.panel-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; color: var(--mint); }.panel-copy { color: #98a4b8; font-size: 10px; line-height: 1.75; }.workspace-form { display: grid; gap: 7px; margin: 14px 0 18px; }.workspace-form select { min-height: 39px; }.workspace-form .button { margin-top: 4px; }.setting-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); color: #9da9bb; font-size: 10px; }.setting-row strong { color: #d4dceb; font-size: 9px; text-align: right; }
.module-list { display: grid; }.module-list > div { display: grid; grid-template-columns: 21px 1fr auto; align-items: center; gap: 8px; min-height: 55px; border-top: 1px solid var(--line); }.module-list > .subscription-row { grid-template-columns: 21px minmax(0,1fr) auto; padding: 10px 0; }.module-check { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: rgba(115,224,181,.1); color: var(--mint); font-size: 9px; }.module-check.planned { background: rgba(229,189,115,.08); color: var(--warn); }.module-list > div > span:nth-child(2) { display: grid; gap: 2px; }.module-list strong { color: #d8dfeb; font-size: 10px; }.module-list small { color: #8793a7; font-size: 9px; }.module-state { color: #b5a579; font-size: 8px; font-weight: 700; white-space: nowrap; }.module-state.ready { color: var(--mint); }
.billing-actions { display: grid; justify-items: end; gap: 7px; }.billing-message { color: #bcefd8 !important; }.billing-message.error { color: #ffb5b5 !important; }.billing-actions button:disabled { cursor: wait; opacity: .6; }
.risk-note { margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(241,139,139,.15); border-radius: 6px; background: rgba(241,139,139,.035); color: #a9a3a1; font-size: 9px; line-height: 1.7; }.risk-note strong { color: #e2a3a3; }
.profile-shell { width: min(1040px, 100%); margin: 0 auto; padding: 35px clamp(18px, 3.6vw, 48px) 60px; }.profile-panel { margin-top: 14px; }.profile-warning { border-color: rgba(241,139,139,.2); background: rgba(241,139,139,.04); color: #e7baba; }.profile-warning strong { font-size: 11px; }.profile-warning p { margin: 6px 0 0; color: #bba4a4; font-size: 10px; line-height: 1.7; }.profile-form { display: grid; gap: 8px; max-width: 700px; margin-top: 14px; }.profile-form label { margin-top: 5px; color: #d5dceb; font-size: 10px; font-weight: 600; }.profile-form input, .profile-form select, .profile-form textarea { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid rgba(194,208,234,.2); border-radius: 6px; background: #0c1323; color: var(--text); outline: none; font: inherit; font-size: 11px; }.profile-form textarea { resize: vertical; }.profile-form input:focus, .profile-form select:focus, .profile-form textarea:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(115,224,181,.1); }.profile-form input::placeholder { color: #69758a; }.credential-fields { display: grid; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: rgba(12,19,35,.55); }.credential-fields[hidden] { display: none; }.credential-fields small, .security-caption { color: #8793a7; font-size: 9px; line-height: 1.7; }.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }.profile-form button:disabled { cursor: not-allowed; opacity: .55; }.danger-button { border: 1px solid rgba(241,139,139,.27); background: rgba(241,139,139,.07); color: #f2aaaa; }.security-caption { max-width: 720px; margin-top: 12px; }.settings-profile-form { max-width: 760px; grid-template-columns: minmax(210px, .8fr) minmax(240px, 1fr); align-items: center; gap: 9px 14px; }.settings-profile-form label { margin: 0; }.settings-profile-form .profile-save { grid-column: 1 / -1; justify-self: start; margin-top: 7px; }.inline-link { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.panel-count { color: #8d99ad; font-size: 9px; }.admin-table-panel { margin-top: 14px; }.admin-table-wrap { overflow-x: auto; }.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }.admin-table th, .admin-table td { padding: 10px 9px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }.admin-table th { color: #8793a7; font-size: 8px; letter-spacing: .7px; text-transform: uppercase; }.admin-table td { color: #d4dceb; font-size: 10px; }.admin-table td strong, .admin-table td small { display: block; }.admin-table td small { margin-top: 3px; color: #8491a7; font-size: 8px; }.admin-update-form { display: grid; grid-template-columns: minmax(130px,1fr) auto; gap: 7px; }.admin-update-form select { min-height: 35px; padding: 0 7px; font-size: 9px; }.self-row { color: #8d99ad; font-size: 9px; }.empty-row { color: #8d99ad !important; text-align: center !important; }.admin-caveat { margin: 12px 0 0; color: #8793a7; font-size: 9px; }.admin-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }.admin-bottom-grid h2 { margin-bottom: 8px; font-size: 14px; }
@media (max-width: 960px) { .panel-grid { grid-template-columns: 1fr; }.admin-metrics { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 650px) {
  .app-header { height: 60px; padding: 0 14px; }.header-user { gap: 10px; }.header-user > span { max-width: 125px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.app-shell { display: block; }.sidebar { display: none; }.workspace, .admin-shell, .profile-shell { padding: 24px 14px 42px; }.workspace-top { align-items: flex-start; flex-direction: column; }.workspace-top h1 { font-size: 25px; }.metric-grid { grid-template-columns: 1fr; }.metric-card { min-height: 90px; }.admin-metrics { grid-template-columns: 1fr 1fr; }.metric-card > strong { font-size: 17px; }.panel { padding: 14px; }.module-list > div { grid-template-columns: 20px 1fr; padding: 7px 0; }.module-state { grid-column: 2; }.admin-bottom-grid { grid-template-columns: 1fr; }.settings-profile-form { grid-template-columns: 1fr; }.settings-profile-form label { margin-top: 5px; }.settings-profile-form .profile-save { grid-column: 1; }.auth-card { padding: 24px 20px; }.auth-page > .auth-brand { left: 19px; }.footer { display: none; }
}
.saas-trading-panel { margin-top: 14px; }
.table-wrap { overflow-x: auto; }
.saas-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.saas-table th, .saas-table td { padding: 9px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.saas-table th { color: #8793a7; font-size: 8px; letter-spacing: .6px; text-transform: uppercase; }
.saas-table td { color: #d4dceb; font-size: 9px; }
.saas-table button { min-height: 30px; padding: 0 9px; font-size: 8px; }
.saas-table button:disabled, .saas-trading-panel button:disabled { cursor: not-allowed; opacity: .5; }
.analysis-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: 8px; margin: 12px 0; }
.analysis-stat { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(12,19,35,.55); }
.analysis-stat span { color: #8793a7; font-size: 8px; text-transform: uppercase; }
.analysis-stat strong { color: #d9e2ef; font-size: 11px; }
.broker-connect { max-width: 700px; margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: rgba(12,19,35,.55); }
.broker-connect h3 { font-size: 13px; }
.callback-url { overflow-wrap: anywhere; margin: 10px 0; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: #0c1323; color: #bcefd8; font-size: 10px; }
.callback-url code { white-space: normal; }
@media (max-width: 760px) {
  .analysis-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
