:root {
  color-scheme: dark;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: #e6edf1;
  background: #0f1419;
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.5;
  --muted: #a0adb9;
  --border: #2b353f;
  --panel: #171e25;
  --accent: #7adbc6;
  --small-text: 13px;
  --label-text: 14px;
  --table-text: 15px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-width: min(360px, 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 5px;
  min-height: 44px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
}
button:disabled,
fieldset:disabled {
  cursor: not-allowed;
}
button:disabled,
input:disabled,
select:disabled {
  opacity: 0.65;
}
button[aria-busy='true'] {
  cursor: progress;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[role='tabpanel']:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.app-header {
  min-height: 96px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  background: #141b22;
}
.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand strong {
  display: block;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.brand small {
  display: block;
  font-size: var(--small-text);
  color: var(--muted);
  margin-top: 3px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: #203733;
  color: var(--accent);
  border: 1px solid #40665c;
  border-radius: 7px;
  font:
    600 14px Consolas,
    monospace;
}
.environment {
  font:
    12px Consolas,
    monospace;
  color: var(--muted);
  letter-spacing: 1px;
}
.environment span {
  color: var(--accent);
}
.session-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--label-text);
  color: #c6d1da;
}
.role-badge,
.workspace-badge {
  font:
    600 12px Consolas,
    monospace;
  padding: 7px 11px;
  border: 1px solid #3b5c53;
  color: var(--accent);
  border-radius: 4px;
}
main {
  max-width: 1680px;
  width: 100%;
  flex: 1;
  margin: 0 auto;
  padding: 28px 32px 40px;
}
h1 {
  font-size: clamp(30px, 3.3vw, 46px);
  letter-spacing: -1.2px;
  line-height: 1.2;
  margin: 12px 0 18px;
  font-weight: 600;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.2px;
  margin: 0 0 12px;
  font-weight: 600;
}
p {
  line-height: 1.6;
}
.eyebrow {
  font:
    600 12px Consolas,
    monospace;
  color: var(--accent);
  letter-spacing: 1.2px;
  margin: 0 0 9px;
}
.muted {
  color: var(--muted);
  font-size: 15px;
}
.login-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 9%;
  max-width: 1060px;
  margin: 7vh auto;
}
.login-intro > p:not(.eyebrow) {
  color: var(--muted);
  max-width: 460px;
  font-size: 16px;
}
.lab-note {
  border-left: 2px solid var(--accent);
  padding: 2px 0 2px 20px;
  margin: 32px 0;
}
.lab-note strong {
  font-size: 16px;
}
.lab-note p {
  font-size: 15px;
  color: var(--muted);
  margin: 8px 0;
}
.workflow {
  display: flex;
  gap: 23px;
  color: var(--muted);
  font:
    12px Consolas,
    monospace;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 24px;
  min-width: 0;
  box-shadow: 0 4px 18px rgb(0 0 0 / 12%);
}
.login-panel {
  padding: 30px;
}
label {
  display: block;
  color: #c5d0d9;
  font-size: var(--label-text);
  font-weight: 600;
  margin: 14px 0 6px;
}
input,
select {
  width: 100%;
  border: 1px solid #657787;
  border-radius: 4px;
  background: #101820;
  color: #e6edf1;
  padding: 11px 12px;
  min-height: 48px;
  font-size: 16px;
}
input:hover:not(:disabled),
select:hover:not(:disabled) {
  border-color: #8fa3b2;
}
input::placeholder {
  color: #94a5b4;
}
.primary {
  background: var(--accent);
  color: #102c27;
  border-color: var(--accent);
}
.primary:hover:not(:disabled) {
  background: #9be7d6;
}
form > .primary,
fieldset > .primary {
  width: 100%;
  margin-top: 18px;
}
.login-panel .primary {
  display: flex;
  justify-content: space-between;
}
.secondary {
  background: #202b35;
  color: #d4dfe7;
  border-color: #657787;
}
.secondary:hover:not(:disabled) {
  background: #2d3b48;
}
.danger {
  background: #3c2730;
  color: #ffc7d0;
  border-color: #7b4958;
}
.danger:hover:not(:disabled) {
  background: #55313e;
}
.credentials {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 24px;
  font-size: var(--small-text);
  color: var(--muted);
}
.credentials strong {
  color: #c5d0d9;
}
.credentials p {
  margin: 9px 0 0;
}
code {
  color: #d8e1e8;
}
.workspace-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.workspace-nav button {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 14px 24px 16px;
  font-size: 16px;
}
.workspace-nav button:hover {
  color: #e6edf1;
}
.workspace-nav button[aria-selected='true'] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: #182923;
}
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.workspace-heading h1 {
  font-size: 36px;
  line-height: 1.25;
  margin: 5px 0 6px;
}
.workspace-heading p {
  margin-bottom: 0;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
.blotter-panel {
  padding: 0;
}
.blotter-panel .panel-heading,
.filters {
  padding: 22px 24px;
}
.blotter-panel .panel-heading {
  border-bottom: 1px solid var(--border);
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.panel-heading h2 {
  margin: 0;
}
.panel-heading .muted {
  font-size: var(--label-text);
}
.filters {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--border);
}
.filters > div {
  flex: 1;
  min-width: 0;
}
.filters label {
  margin-top: 0;
}
.filters select {
  font-size: 15px;
}
.orders-loading {
  margin: 0;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--table-text);
  text-align: left;
  font-variant-numeric: tabular-nums;
}
th {
  color: #acbac7;
  background: #131b23;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding: 14px 10px;
}
td {
  padding: 17px 10px;
  border-bottom: 1px solid #29333d;
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover,
tbody tr:focus-within {
  background: #202b34;
}
td:first-child {
  font-family: Consolas, monospace;
  overflow-wrap: anywhere;
}
.order-id,
.created-time {
  font-size: var(--small-text);
}
.numeric {
  text-align: right;
}
table[aria-label='Orders'] th:nth-child(4),
table[aria-label='Positions'] th:not(:first-child),
table[aria-label='Synthetic market snapshot'] th:not(:first-child) {
  text-align: right;
}
td button {
  font-size: 14px;
  min-height: 38px;
  padding: 7px 10px;
}
td.symbol {
  font-weight: 600;
}
table[aria-label='Orders'] {
  table-layout: fixed;
}
table[aria-label='Orders'] th:nth-child(1) {
  width: 17%;
}
table[aria-label='Orders'] th:nth-child(2) {
  width: 8%;
}
table[aria-label='Orders'] th:nth-child(3) {
  width: 7%;
}
table[aria-label='Orders'] th:nth-child(4) {
  width: 10%;
}
table[aria-label='Orders'] th:nth-child(5) {
  width: 8%;
}
table[aria-label='Orders'] th:nth-child(6) {
  width: 18%;
}
table[aria-label='Orders'] th:nth-child(7) {
  width: 22%;
}
table[aria-label='Orders'] th:nth-child(8) {
  width: 10%;
}
table[aria-label='Orders'] td:nth-child(7) {
  color: var(--muted);
}
.buy {
  color: #87deca;
}
.sell {
  color: #f5c49e;
}
.status-pill {
  display: inline-block;
  font:
    600 12px Consolas,
    monospace;
  padding: 6px 7px;
  border-radius: 4px;
  background: #293542;
  color: #d5e0eb;
  white-space: nowrap;
}
.status-NEW {
  color: #9be8d6;
  background: #213b35;
}
.status-PARTIALLY_FILLED {
  color: #ffe2ae;
  background: #403729;
}
.status-FILLED {
  color: #bfd6fc;
  background: #29374c;
}
.status-CANCELED {
  color: #ccd4dd;
  background: #303840;
}
.status-REJECTED {
  color: #ffc5ce;
  background: #442c35;
}
.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 40px 24px;
  font-size: 16px;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.form-pair {
  display: flex;
  gap: 12px;
}
.form-pair > div {
  flex: 1;
  min-width: 0;
}
.form-note {
  font-size: var(--small-text);
  color: var(--muted);
  margin: 14px 0 0;
  line-height: 1.6;
}
.entry-panel h2 {
  font-size: 24px;
}
.entry-panel {
  border-top: 2px solid #568e7f;
}
#viewer-note {
  padding: 12px 14px;
  border-left: 2px solid var(--accent);
  background: #1e2b30;
  font-size: 14px;
}
.detail-panel {
  grid-column: 1;
}
dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 28px;
  margin: 24px 0;
}
dl div {
  min-width: 0;
}
#detail-fields > div:first-child {
  grid-column: 1 / -1;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
#detail-fields [data-testid='detail-id'] {
  font-size: 18px;
  color: #edf4f7;
}
#order-detail-heading:focus {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 2px;
}
dt {
  font-size: var(--label-text);
  color: var(--muted);
  margin-bottom: 7px;
}
dd {
  margin: 0;
  font:
    15px Consolas,
    monospace;
  overflow-wrap: anywhere;
}
.lifecycle {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.lifecycle ol {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0 0 10px;
  padding-left: 18px;
  font:
    14px Consolas,
    monospace;
  line-height: 1.6;
}
.lifecycle p {
  color: var(--muted);
  font-size: var(--small-text);
  margin: 0;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.metric {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 24px;
}
.metric h2 {
  font-size: 16px;
  color: #c4d0d9;
  margin-bottom: 16px;
}
.metric strong {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.metric p {
  color: var(--muted);
  font-size: var(--small-text);
  margin: 12px 0 0;
}
.metric-wide {
  grid-column: span 3;
}
.metric .metric-session {
  font-size: 20px;
  letter-spacing: 0;
}
.snapshot-panel .table-scroll,
.positions-panel .table-scroll {
  margin-top: 18px;
}
.snapshot-panel td:first-child,
.positions-panel td:first-child {
  font-weight: 600;
}
.snapshot-panel td,
.positions-panel td {
  font-size: 16px;
  padding: 20px 14px;
}
.activity-list {
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}
.activity-list li {
  display: flex;
  gap: 28px;
  border-top: 1px solid var(--border);
  padding: 22px 0;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.activity-list time {
  flex: 0 0 130px;
  color: var(--muted);
  font:
    14px Consolas,
    monospace;
  line-height: 1.8;
}
.message {
  border: 1px solid;
  border-radius: 5px;
  padding: 13px 18px;
  font-size: 16px;
  margin-bottom: 22px;
  overflow-wrap: anywhere;
}
.error {
  background: #32212a;
  color: #ffc7d0;
  border-color: #824b5d;
}
.success {
  background: #1b352e;
  color: #a9efd9;
  border-color: #487b69;
}
footer {
  color: var(--muted);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 32px;
  font-size: var(--small-text);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1180px) {
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .entry-panel {
    grid-row: 2;
  }
  .detail-panel {
    grid-row: 3;
  }
  #order-entry-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }
  #order-entry-fields > .form-pair,
  #order-entry-fields > .form-note,
  #order-entry-fields > .primary {
    grid-column: 1 / -1;
  }
}
@media (max-width: 900px) {
  .app-header {
    gap: 12px;
    padding: 18px 24px;
  }
  .environment {
    margin-left: auto;
  }
  .session-controls {
    flex-basis: 100%;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    gap: 12px;
  }
  main {
    padding: 24px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-wide {
    grid-column: auto;
  }
  .metric strong {
    font-size: 34px;
  }
  table[aria-label='Orders'] {
    font-size: 14px;
  }
  table[aria-label='Orders'] th,
  table[aria-label='Orders'] td {
    padding: 15px 6px;
  }
  table[aria-label='Orders'] th:nth-child(2) {
    width: 9%;
  }
  table[aria-label='Orders'] th:nth-child(3) {
    width: 8%;
  }
  table[aria-label='Orders'] th:nth-child(5) {
    width: 10%;
  }
  table[aria-label='Orders'] th:nth-child(6) {
    width: 20%;
  }
  table[aria-label='Orders'] th:nth-child(7) {
    width: 17%;
  }
  table[aria-label='Orders'] th:nth-child(8) {
    width: 9%;
  }
  .status-pill {
    padding: 6px;
  }
  td button {
    padding: 7px 8px;
  }
  dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}
@media (max-width: 700px) {
  .environment {
    display: none;
  }
  main {
    padding: 24px 4%;
  }
  .login-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 0;
  }
  .login-intro h1 {
    font-size: 34px;
  }
  .workflow {
    display: none;
  }
  .lab-note {
    margin: 20px 0;
  }
  .login-panel {
    padding: 24px;
  }
  .workspace-badge {
    display: none;
  }
  .session-controls #user-label {
    max-width: 92px;
  }
  .brand small {
    max-width: 120px;
  }
  .workspace-nav {
    flex-wrap: wrap;
  }
  .workspace-nav button {
    padding: 12px 16px;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .filters {
    flex-wrap: wrap;
  }
  .filters > div {
    flex-basis: 180px;
  }
  #order-entry-fields {
    display: block;
  }
  dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .panel-heading .muted {
    text-align: right;
  }
  .activity-list li {
    flex-direction: column;
    gap: 8px;
  }
  .activity-list time {
    flex: auto;
  }
  table[aria-label='Orders'] {
    min-width: 680px;
  }
}
