:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #243047; background: #f6f8fb; font-synthesis: none;
  --blue: #365df1; --muted: #738097; --line: #e6eaf1; --surface: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button { border: 1px solid var(--line); background: white; color: inherit; border-radius: 7px; min-height: 40px; padding: 9px 14px; font-size: 13px; font-weight: 600; transition: background .15s; }
button:hover { background: #f0f3fa; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--blue); border-color: var(--blue); color: white; box-shadow: 0 2px 3px #365df11a; }
button.primary:hover { background: #274cdb; }
button.danger { background: #fff0f0; color: #bb3443; border-color: #f0c6ca; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #a7b9ff; outline-offset: 3px; }
input, select { width: 100%; border: 1px solid #d7deea; border-radius: 7px; min-height: 42px; padding: 10px 12px; background: white; color: inherit; font-size: 13px; }
input::placeholder { color: #98a3b5; }
input:focus, select:focus { outline: 2px solid #cfdaff; border-color: var(--blue); }
label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 600; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 27px; font-weight: 650; letter-spacing: -.8px; }
h2 { font-size: 17px; font-weight: 650; letter-spacing: -.3px; }
h3 { font-size: 15px; font-weight: 600; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 1.3px; }
.full { width: 100%; }
[hidden] { display: none !important; }
.brand-strip { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 25px; background: white; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 700; font-size: 17px; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; background: var(--blue); color: white; border-radius: 8px; font-size: 18px; }
.brand small { color: var(--muted); font-weight: 400; font-size: 12px; }
.brand-divider { color: #cbd2de; font-weight: 400; margin: 0 5px; }
.strip-note { font-size: 11px; color: var(--muted); }
.workspace { display: grid; grid-template-columns: 205px minmax(0, 1fr); min-height: calc(100dvh - 60px); }
.tabs { background: white; border-right: 1px solid var(--line); padding: 26px 14px; display: flex; flex-direction: column; gap: 5px; }
.desk-picker { font-size: 9px; letter-spacing: 1.1px; color: var(--muted); margin: 0 2px 25px; gap: 10px; }
.desk-picker select { font-weight: 600; letter-spacing: normal; color: #243047; background: #f8f9fc; }
.nav-label { font-size: 9px; letter-spacing: 1.3px; color: #98a3b5; font-weight: 600; margin: 0 12px 9px; }
.tabs > button { display: flex; align-items: center; gap: 11px; text-align: left; padding: 11px 13px; border: 0; background: transparent; color: #738097; font-size: 13px; font-weight: 500; min-height: 44px; }
.tabs > button:hover { color: #365df1; background: #f6f8fc; }
.tabs > button[aria-current=page] { background: #eef2ff; color: var(--blue); font-weight: 600; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; font-size: 20px; line-height: 1; font-weight: 400; }
.nav-count { margin-left: auto; font-size: 10px; background: #e9edf5; border-radius: 4px; padding: 2px 5px; color: #738097; }
.nav-count:empty { display: none; }
.nav-foot { margin-top: auto; padding: 28px 12px 0; font-size: 11px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.security-dot { width: 6px; height: 6px; background: #8490a5; border-radius: 50%; }
.workspace-content { min-width: 0; width: 100%; max-width: 1500px; padding: 30px 34px 20px; margin: 0 auto; }
.workspace-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.desk-context { display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 9px; }
.desk-context .tag { font-size: 9px; padding: 3px 6px; border: 1px solid var(--line); background: white; font-weight: 500; }
.workspace-head h1 { margin-bottom: 6px; }
.workspace-head .muted { font-size: 12px; }
.head-actions { display: flex; align-items: center; gap: 9px; }
.refresh { color: var(--muted); background: transparent; border: 0; font-size: 12px; }
.refresh span { font-size: 16px; }
.account { position: relative; }
.account summary { padding: 11px 12px; border: 1px solid var(--line); background: white; border-radius: 7px; min-height: 40px; font-size: 12px; font-weight: 600; max-width: 155px; overflow-wrap: anywhere; }
.account-options { position: absolute; right: 0; top: calc(100% + 8px); z-index: 3; width: 240px; background: white; border: 1px solid var(--line); border-radius: 10px; padding: 12px; box-shadow: 0 8px 25px #18264416; display: grid; gap: 8px; }
.account-options span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; margin: 4px 3px 6px; }
.notice { border: 1px solid #d6dff8; background: #eaf0ff; border-radius: 8px; padding: 11px 14px; font-size: 12px; margin-bottom: 18px; line-height: 1.5; }
.notice.bad { color: #913142; background: #fff1f1; border-color: #f1d4d8; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: white; border-radius: 10px; margin-bottom: 22px; }
.metric { padding: 20px 23px; border-right: 1px solid var(--line); display: grid; gap: 10px; }
.metric:last-child { border-right: 0; }
.metric > span { font-size: 11px; font-weight: 500; color: var(--muted); }
.metric strong { font-size: 29px; letter-spacing: -.8px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric small { font-size: 10px; color: #96a0b1; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; }
.panel { border: 1px solid var(--line); background: white; border-radius: 10px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 21px; border-bottom: 1px solid var(--line); gap: 14px; }
.panel-head h2 { font-size: 14px; }
.panel-head p { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.tag { font-size: 10px; color: var(--muted); padding: 4px 7px; background: #f3f5f9; border-radius: 4px; white-space: nowrap; }
.text-button { border: 0; padding: 7px 0; background: transparent; color: var(--blue); font-size: 11px; min-height: 36px; white-space: nowrap; }
.text-button:hover { background: transparent; color: #244bd2; text-decoration: underline; }
.text-button span { margin-left: 5px; }
.recent-list { padding: 0 20px; }
.recent-item { padding: 16px 0; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
.recent-item:last-child { border-bottom: 0; }
.market-icon { width: 33px; height: 33px; border-radius: 8px; display: grid; place-items: center; background: #f4f6fb; color: #738097; font-size: 20px; flex-shrink: 0; }
.recent-item > div { min-width: 0; flex: 1; }
.recent-item strong { display: block; font-size: 12px; font-weight: 600; }
.recent-item strong span { color: var(--muted); font-weight: 400; margin-left: 4px; font-size: 10px; }
.recent-item small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item .status { flex-shrink: 0; }
.list-empty { padding: 28px 2px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.list-empty b { color: #43516a; font-size: 13px; display: block; margin-bottom: 7px; font-weight: 500; }
.list-empty p { max-width: 330px; font-size: 11px; }
.list-empty button { margin-top: 8px; }
.performance { padding: 3px 21px; }
.currency-result { display: grid; grid-template-columns: 55px 1fr 1fr; gap: 16px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.currency-result:last-child { border-bottom: 0; }
.currency-result b { font-size: 12px; }
.currency-result strong { font-size: 19px; display: block; margin-top: 6px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; font-weight: 600; }
.currency-result span { font-size: 10px; color: var(--muted); }
.panel-foot { padding: 12px 21px; border-top: 1px solid var(--line); color: #8a96a9; font-size: 10px; line-height: 1.6; }
.result-empty { display: flex; align-items: center; gap: 18px; padding: 23px 0; color: var(--muted); }
.result-empty > span { font-size: 28px; color: #bcc5d3; }
.result-empty b { font-size: 12px; font-weight: 500; color: #56647c; }
.result-empty p { font-size: 11px; margin-top: 6px; line-height: 1.6; }
.desk-note { display: flex; align-items: flex-start; gap: 15px; padding: 24px 21px; border-radius: 10px; border: 1px dashed #dce2ee; }
.note-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 9px; color: var(--blue); background: #eaf0ff; flex-shrink: 0; font-size: 21px; }
.desk-note h2 { font-size: 14px; margin: 2px 0 8px; }
.desk-note p { font-size: 11px; line-height: 1.7; color: var(--muted); max-width: 340px; }
.desk-note button { margin-top: 7px; }
.empty-assignment { padding: 65px 20px; text-align: center; }
.empty-symbol { font-size: 42px; color: var(--blue); display: block; margin-bottom: 20px; }
.empty-assignment p { color: var(--muted); font-size: 13px; margin-top: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
thead { background: #fafbfe; color: #8a96a9; }
th { font-size: 9px; text-transform: uppercase; letter-spacing: .8px; padding: 11px 18px; font-weight: 600; }
td { padding: 15px 18px; border-top: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
td strong { font-weight: 600; }
td small { display: block; color: var(--muted); margin-top: 5px; font-size: 10px; overflow-wrap: anywhere; }
td button { font-size: 11px; min-height: 36px; padding: 7px 10px; }
.row-actions { display: flex; gap: 6px; }
.status { display: inline-block; border-radius: 4px; padding: 4px 7px; background: #edf1f8; font-size: 9px; color: #61708c; }
.status.good { background: #e8f6ee; color: #247955; }
.status.paper { background: #f1edfc; color: #7560a6; }
.status.bad { background: #fdecef; color: #aa4354; }
.empty-table thead { display: none; }
.empty-row { text-align: center; color: var(--muted); padding: 38px 20px !important; border-top: 0; }
.empty-icon { display: grid; place-items: center; width: 42px; height: 42px; background: #f3f6fc; color: #8594b1; border: 1px solid var(--line); border-radius: 12px; margin: 0 auto 15px; font-size: 24px; }
.empty-row h3 { color: #43516a; font-size: 14px; }
.empty-row p { max-width: 365px; font-size: 12px; line-height: 1.6; margin: 9px auto 0; }
.empty-row button { margin-top: 13px; }
.pagination { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 18px; border-top: 1px solid var(--line); }
.pagination button { font-size: 11px; }
.positive { color: #248365; }
.negative { color: #c84b5b; }
.workspace-footer { display: flex; justify-content: space-between; font-size: 10px; color: #96a0b1; margin-top: 22px; gap: 15px; }
dialog { border: 1px solid var(--line); border-radius: 13px; padding: 25px; width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; color: inherit; box-shadow: 0 25px 100px #18223e26; }
dialog::backdrop { background: #17223f45; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.dialog-head h2 { font-size: 21px; }
.dialog-head .eyebrow { margin-bottom: 8px; }
.dialog-head > button { font-size: 24px; padding: 0; min-width: 40px; border: 0; background: #f5f7fb; color: #738097; }
.signal-dialog { margin: 0 0 0 auto; width: min(470px, 100vw); height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; border-left: 1px solid var(--line); padding: 27px; }
.signal-dialog form { display: flex; flex-direction: column; min-height: 100%; }
.signal-context { display: flex; justify-content: space-between; align-items: center; padding-bottom: 22px; font-size: 12px; font-weight: 500; color: var(--muted); }
fieldset { border: 0; border-top: 1px solid var(--line); padding: 20px 0 24px; margin: 0; min-width: 0; }
legend { font-size: 11px; font-weight: 600; padding: 0 10px 0 0; color: #56647c; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 17px 14px; margin-top: 8px; }
.full-field { grid-column: 1 / -1; }
.field-hint { font-size: 10px; color: var(--muted); line-height: 1.6; margin-top: -9px; }
.sizing-note { background: #f6f8fc; border-radius: 7px; font-size: 11px; line-height: 1.7; color: #738097; padding: 12px; margin: 22px 0 20px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; }
.signal-dialog .dialog-actions { margin-top: auto; padding-top: 20px; }
.signal-dialog .dialog-actions .primary { flex: 1; }
.signal-dialog .dialog-actions .primary span { margin-left: 10px; }
.error { color: #b63b4d; font-size: 12px; line-height: 1.5; margin-top: 18px; }
.warning { background: #fff3de; border: 1px solid #efdfbd; border-radius: 7px; color: #866323; padding: 13px; font-size: 12px; line-height: 1.6; margin-top: 18px; }
.review-desk { font-size: 12px; color: var(--muted); margin: -8px 0 20px; }
.order-summary { padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: #fafbfe; margin-bottom: 20px; }
.review-market { display: flex; align-items: center; gap: 10px; }
.review-market b { font-size: 18px; letter-spacing: -.5px; }
.order-direction { padding: 4px 7px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.order-direction.buy { background: #e8f6ee; color: #247955; }
.order-direction.sell { background: #fdecef; color: #aa4354; }
.review-prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 17px 0 0; }
.review-prices dt { font-size: 10px; color: var(--muted); }
.review-prices dd { font-size: 14px; font-weight: 600; margin: 6px 0 0; overflow-wrap: anywhere; }
.review-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.review-counts span { padding: 7px 10px; border-radius: 5px; font-size: 11px; background: #f2f4f9; color: var(--muted); }
#reviewPaper { background: #f1edfc; color: #7560a6; }
#reviewLive { background: #fff1e7; color: #a9622a; }
.recipient-list { max-height: 270px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; }
.recipient { padding: 13px; display: flex; justify-content: space-between; gap: 15px; font-size: 12px; border-bottom: 1px solid var(--line); }
.recipient:last-child { border: 0; }
.recipient small { display: block; color: var(--muted); font-size: 10px; margin-top: 6px; line-height: 1.5; }
.recipient > span { font-weight: 600; white-space: nowrap; font-size: 10px; }
.auth-layout { max-width: 1000px; min-height: calc(100dvh - 60px); margin: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; padding: 50px 40px; }
.auth-intro h1 { font-size: 44px; line-height: 1.14; letter-spacing: -1.8px; margin: 24px 0; }
.auth-intro > p:not(.eyebrow) { max-width: 350px; color: var(--muted); line-height: 1.8; font-size: 14px; }
.intro-rule { width: 40px; height: 3px; background: var(--blue); margin: 27px 0; }
.auth-intro .quiet { font-size: 11px !important; }
.auth-card { background: white; border: 1px solid var(--line); padding: 30px; border-radius: 13px; box-shadow: 0 8px 30px #17233d04; }
.auth-card h2 { margin: 12px 0; }
.auth-card label { margin-top: 18px; }
.auth-card .full { margin-top: 24px; }
.qr { display: block; width: 180px; height: 180px; margin: 22px auto; }
.secret { display: block; overflow-wrap: anywhere; font-size: 12px; padding: 12px; background: #f2f4fa; border-radius: 8px; }
pre { padding: 18px; background: #f2f4fa; border-radius: 8px; white-space: pre-wrap; line-height: 1.8; }
#setup2FA { margin-top: 20px; }
@media (min-width: 1800px) { .workspace-content { padding-top: 38px; } }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 175px minmax(0, 1fr); }
  .workspace-content { padding: 26px 22px 20px; }
  .tabs { padding: 25px 10px; }
  .workspace-head { align-items: flex-start; }
  .head-actions { flex-wrap: wrap; justify-content: flex-end; }
  .metric { padding: 18px 16px; }
  .metric strong { font-size: 26px; }
  .overview-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 760px) {
  .text-button { min-height: 44px; }
  .brand-strip { padding: 0 18px; height: 54px; }
  .strip-note { display: none; }
  .workspace { display: block; min-height: calc(100dvh - 54px); }
  .tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 16px 7px; gap: 3px; }
  .desk-picker { grid-column: 1 / -1; max-width: 250px; margin: 0 0 10px; font-size: 9px; gap: 6px; }
  .desk-picker select { min-height: 40px; }
  .nav-label, .nav-foot { display: none; }
  .tabs > button { justify-content: center; gap: 5px; padding: 9px 3px; font-size: 12px; min-height: 44px; }
  .nav-icon { font-size: 17px; width: 15px; }
  .nav-count { display: none; }
  .workspace-content { padding: 23px 18px 18px; }
  .workspace-head { gap: 14px; margin-bottom: 22px; }
  .workspace-head .muted { max-width: 220px; }
  .head-actions { gap: 6px; }
  .refresh { padding: 7px; font-size: 11px; }
  .account summary { font-size: 11px; max-width: 110px; padding: 11px 10px; }
  .head-actions > .primary { font-size: 12px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 16px 18px; gap: 8px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .auth-layout { gap: 30px; padding: 35px 25px; }
  .auth-intro h1 { font-size: 36px; }
  .table-wrap { overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr { padding: 13px 18px; border-top: 1px solid var(--line); }
  td { border: 0; padding: 7px 0; display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 12px; overflow-wrap: anywhere; }
  td::before { content: attr(data-label); font-size: 10px; color: var(--muted); padding-top: 2px; }
  td.empty-row { display: block; }
  td.empty-row::before { display: none; }
  .empty-table tbody tr { padding: 0; border: 0; }
  .row-actions { flex-wrap: wrap; }
  .row-actions button { flex: 1; min-height: 44px; }
  th { display: none; }
}
@media (max-width: 500px) {
  .brand { font-size: 16px; gap: 8px; }
  .brand small { font-size: 11px; }
  .workspace-head { flex-direction: column; }
  .workspace-head .muted { max-width: none; }
  .head-actions { width: 100%; justify-content: flex-start; }
  .head-actions > .primary { order: -1; min-height: 44px; }
  .head-actions .account { margin-left: auto; }
  .head-actions .refresh { min-height: 44px; }
  .panel-head { padding: 16px; gap: 9px; }
  .panel-head h2 { font-size: 13px; }
  .panel-head p { font-size: 10px; }
  .recent-list { padding: 0 16px; }
  .recent-item { gap: 9px; }
  .recent-item strong { font-size: 11px; }
  .recent-item .status { font-size: 8px; }
  .metric strong { font-size: 27px; }
  .metric small { font-size: 9px; }
  .performance { padding: 3px 16px; }
  .currency-result { grid-template-columns: 43px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .currency-result strong { font-size: 17px; }
  .panel-foot { padding: 12px 16px; }
  .desk-note { padding: 20px 16px; gap: 12px; }
  .auth-layout { display: block; min-height: calc(100dvh - 54px); padding: 30px 20px; }
  .auth-intro { display: none; }
  .auth-card { max-width: 420px; margin: 15px auto; padding: 25px; }
  dialog { padding: 22px; }
  .signal-dialog { padding: 23px; }
  .signal-dialog .form-grid { gap: 15px 12px; }
  .dialog-head h2 { font-size: 20px; }
  .dialog-actions button { min-height: 44px; font-size: 12px; }
  .review-prices dd { font-size: 12px; }
  .recipient { flex-direction: column; gap: 8px; }
  .workspace-footer { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
