:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #263447;
  background: #f4f6f9;
  font-synthesis: none;
  --ink: #142238;
  --muted: #627187;
  --line: #dfe5ec;
  --accent: #087c70;
  --nav: #14243a;
  --shadow: 0 2px 6px #10283e05;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}
a {
  color: #086f68;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #087368;
  background: var(--accent);
  color: white;
  border-radius: 7px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: none;
}
button:hover,
.button:hover {
  background: #06645b;
  text-decoration: none;
}
.secondary {
  background: white;
  color: #344359;
  border-color: #cdd6e1;
}
.secondary:hover {
  background: #edf2f6;
}
.danger {
  background: #b63139;
  border-color: #b63139;
  color: white;
}
.danger:hover {
  background: #92252d;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.button.small {
  padding: 5px 10px;
  min-height: 32px;
  font-size: 12px;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #3fa8e5;
  outline-offset: 3px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #58aba3;
  outline-offset: 1px;
  border-color: #087c70;
}
input,
select,
textarea {
  max-width: 100%;
  width: 100%;
  padding: 9px 11px;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: var(--ink);
  background: white;
}
input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  height: 17px;
  accent-color: var(--accent);
  vertical-align: middle;
  flex-shrink: 0;
}
label {
  display: block;
  font-weight: 600;
  color: #33445b;
  margin-bottom: 6px;
}
label:has(input[type="checkbox"]) {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-weight: 400;
}
textarea {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  resize: vertical;
  min-height: 130px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.9px;
  line-height: 1.2;
  margin-bottom: 9px;
  color: var(--ink);
  font-weight: 700;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.25px;
  line-height: 1.4;
  margin-bottom: 0;
  color: var(--ink);
}
h3 {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 8px;
}
p {
  margin-bottom: 12px;
}
p:last-child {
  margin-bottom: 0;
}
ul {
  padding-left: 20px;
}
img {
  max-width: 100%;
}
.muted,
.hint {
  color: var(--muted);
}
.hint {
  font-size: 12px;
  margin-top: 7px;
}
.strong,
strong {
  font-weight: 650;
}
.mono,
code,
pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}
.numeric {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 20px;
  top: -60px;
  z-index: 20;
  background: white;
  padding: 10px;
}
.skip-link:focus {
  top: 10px;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 224px;
  flex: 0 0 224px;
  background: var(--nav);
  color: #d6e0eb;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 27px 16px 20px;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  color: white;
  font-size: 17px;
  font-weight: 700;
  padding: 0 8px 29px;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  border-radius: 8px;
}
.brand-sub {
  display: block;
  font-size: 9px;
  color: #a9bbcf;
  letter-spacing: 1.6px;
  font-weight: 500;
  margin-top: 3px;
}
.nav-section {
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #8fa4bd;
  padding: 14px 12px 8px;
  font-weight: 650;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #c4d1df;
  padding: 10px 13px;
  margin: 3px 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
}
.sidebar nav a:hover {
  background: #20344d;
  color: white;
  text-decoration: none;
}
.sidebar nav a[aria-current] {
  background: #24443f;
  color: #c7fbeb;
  border-left-color: #54d2b5;
}
.nav-count {
  font-size: 10px;
  background: #355c56;
  padding: 1px 6px;
  border-radius: 3px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 30px 10px 0;
}
.sidebar-status {
  border-top: 1px solid #334155;
  padding-top: 18px;
}
.sidebar-status p {
  font-size: 11px;
  color: #9fb2c8;
  margin: 10px 0 18px;
}
.sidebar .badge {
  background: #283e54;
  color: #d4e9f7;
  border-color: #40556c;
}
.logout {
  background: transparent;
  border: 1px solid #405168;
  color: #dbe6ef;
  width: 100%;
  font-size: 12px;
}
.logout:hover {
  background: #243a51;
}
.sidebar-note {
  display: block;
  color: #90a6bf;
  font-size: 10px;
  margin-top: 14px;
}
.workspace {
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 66px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #344359;
}
.separator {
  padding: 0 12px;
  color: #b9c4d1;
}
.topbar-meta {
  display: flex;
  gap: 18px;
  align-items: center;
  color: #627187;
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 32px 34px;
  outline: none;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 700;
  color: #627187;
  margin-bottom: 9px;
}
.page-description {
  color: #627187;
  font-size: 13px;
  margin-bottom: 0;
  max-width: 680px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  min-width: 0;
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid #e9edf2;
  flex-wrap: wrap;
}
.panel-header p {
  font-size: 12px;
  margin: 4px 0 0;
}
.panel-header > a {
  font-size: 12px;
  font-weight: 600;
}
.panel-body {
  padding: 22px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.grid-2 > .panel {
  margin-bottom: 22px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 20px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.metric-label {
  font-size: 12px;
  color: #627187;
  font-weight: 500;
  margin-bottom: 12px;
}
.metric-value {
  font-size: 27px;
  color: #17293f;
  font-weight: 650;
  letter-spacing: -0.7px;
  line-height: 1.2;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.metric-value span {
  font-size: 13px;
  color: #627187;
  font-weight: 400;
  letter-spacing: 0;
}
.metric > p:last-child {
  font-size: 11px;
  color: #627187;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  letter-spacing: 0.2px;
  line-height: 1.4;
  font-weight: 650;
  text-transform: capitalize;
  white-space: nowrap;
  border: 1px solid #dce4ec;
  background: #eff3f7;
  color: #53657a;
}
.badge-success,
.badge-scheduled,
.badge-enabled {
  background: #e6f5ef;
  color: #176b4a;
  border-color: #c9e8d9;
}
.badge-partial,
.badge-paused,
.badge-missed,
.badge-warning {
  background: #fff5df;
  color: #805411;
  border-color: #f0dfb9;
}
.badge-failed,
.badge-interrupted {
  background: #fcebed;
  color: #a23740;
  border-color: #f4d2d6;
}
.badge-running,
.badge-queued {
  background: #e9f2ff;
  color: #315f9c;
  border-color: #d0e0f9;
}
.badge-call,
.badge-stock {
  color: #176e66;
  background: #e9f5f2;
  border-color: #cde6df;
}
.badge-put,
.badge-option {
  color: #66548b;
  background: #f1edf8;
  border-color: #e2d9f0;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.85fr) minmax(0, 1.4fr);
  column-gap: 18px;
  row-gap: 15px;
  margin: 0 0 22px;
  font-size: 12px;
}
.detail-grid dt {
  color: #6a788c;
}
.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #2a3e55;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.actions form {
  margin: 0;
}
.inset-note {
  padding: 12px 14px;
  border-radius: 6px;
  background: #f3f6f9;
  color: #69798b;
  font-size: 12px;
  margin-top: 22px;
}
.notice {
  border: 1px solid #d6e4f0;
  background: #edf4fb;
  border-radius: 8px;
  padding: 15px 18px;
  margin-bottom: 20px;
  color: #355976;
  font-size: 13px;
}
.notice p {
  margin: 4px 0 0;
}
.notice.warning {
  background: #fff8e9;
  border-color: #eadbbc;
  color: #76501a;
}
.notice.error {
  background: #fff0f1;
  border-color: #ecc9ce;
  color: #922c36;
}
.notice.success {
  background: #eaf7f0;
  border-color: #c6e5d2;
  color: #256245;
}
.notice ul {
  margin-bottom: 0;
}
.setup-items {
  display: flex;
  gap: 8px 22px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.setup-items a {
  font-size: 12px;
  text-decoration: underline;
  color: #795617;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}
.data-table th {
  padding: 11px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  color: #627187;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 650;
  white-space: nowrap;
}
.data-table td {
  padding: 15px 20px;
  border-bottom: 1px solid #edf0f4;
  vertical-align: top;
  white-space: nowrap;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: #fafcfd;
}
.data-table td.wrap {
  white-space: normal;
  min-width: 180px;
}
.data-table .numeric {
  font-variant-numeric: tabular-nums;
}
.cell-sub {
  display: block;
  color: #627187;
  font-size: 10px;
  margin-top: 4px;
  font-weight: 400;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e8edf3;
  padding: 14px 20px;
  font-size: 11px;
}
.pagination .button {
  font-size: 11px;
  min-height: 32px;
  padding: 6px 12px;
}
.empty-state {
  text-align: center;
  padding: 44px 26px;
  color: #627187;
}
.empty-state h3 {
  font-size: 15px;
  margin-bottom: 9px;
  font-weight: 600;
}
.empty-state p {
  font-size: 12px;
  max-width: 430px;
  margin: auto;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 22px;
  border-bottom: 1px solid #edf1f5;
  font-size: 12px;
  gap: 14px;
}
.list-row:last-child {
  border-bottom: 0;
}
a.list-row:hover {
  background: #f7fafb;
  text-decoration: none;
}
.toolbar {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.toolbar .field {
  min-width: 130px;
}
.field.grow {
  flex: 1;
}
.field label,
.form-grid label {
  font-size: 12px;
}
.field {
  min-width: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.form-grid .full-width,
.form-grid .wide {
  grid-column: 1/-1;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 24px;
  min-width: 0;
}
legend {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 16px;
  color: var(--ink);
}
.stack > * + * {
  margin-top: 18px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  gap: 12px;
  border-top: 1px solid #e8edf3;
  flex-wrap: wrap;
}
.section-heading h3 {
  margin: 0;
}
.section-heading .muted {
  font-size: 11px;
}
.section-heading.outside {
  padding: 0;
  margin: 25px 0 16px;
  border: 0;
}
.row-detail {
  white-space: normal;
  min-width: 145px;
  margin-top: 7px;
}
.row-detail summary {
  font-size: 11px;
  color: #08746b;
}
.detail-content {
  min-width: 280px;
  max-width: 440px;
  padding: 15px 0;
}
.detail-content .detail-grid {
  font-size: 11px;
  grid-template-columns: 100px 1fr;
}
.detail-content pre {
  max-height: 350px;
  overflow: auto;
}
details > summary {
  cursor: pointer;
  font-weight: 600;
  color: #3a5069;
  padding: 5px 0;
}
pre {
  background: #f3f6f9;
  color: #33465c;
  padding: 16px;
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 100%;
  overflow: auto;
}
.snapshot-detail h2 {
  overflow-wrap: anywhere;
  max-width: 100%;
  font-size: 15px;
}
.instrument-picks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0 24px;
}
.instrument-pick {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 13px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  font-size: 12px;
}
.instrument-pick span {
  color: #627187;
  font-size: 10px;
}
.instrument-pick.selected {
  background: #e9f5f1;
  border-color: #64b2a4;
  color: #17685b;
}
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.chart-panel {
  margin-bottom: 0;
}
.chart-panel h2 {
  font-size: 14px;
}
.chart-legend {
  color: #718397;
  font-size: 11px;
}
.chart-body {
  padding: 22px 18px 8px;
  display: flex;
  align-items: stretch;
  gap: 7px;
}
.chart-range {
  font-size: 10px;
  color: #627187;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  max-width: 90px;
  overflow-wrap: anywhere;
  padding: 15px 0;
}
.price-chart {
  width: 100%;
  min-width: 0;
  color: #0b9382;
  overflow: visible;
}
.grid-line {
  stroke: #e9edf2;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}
.chart-axis {
  font-size: 9px;
  color: #627187;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 18px;
  overflow-wrap: anywhere;
}
.chart-axis span {
  max-width: 48%;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  margin-top: 32px;
  padding-top: 18px;
  color: #627187;
  font-size: 10px;
}
.login-page {
  background: #14243a;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 900px;
  width: 100%;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 80px #06142466;
}
.login-story {
  background: #1c334c;
  color: #d9e4ef;
  padding: 50px 40px;
}
.login-story .brand {
  padding: 0;
  margin-bottom: 64px;
}
.login-story h1 {
  color: white;
  font-size: 33px;
  letter-spacing: -0.8px;
}
.login-story p {
  color: #afc2d5;
  font-size: 14px;
}
.login-story .eyebrow {
  color: #81d9c2;
}
.login-feature {
  border-top: 1px solid #365069;
  padding: 15px 0;
  font-size: 12px;
}
.login-form {
  padding: 60px 40px;
}
.login-form h2 {
  font-size: 25px;
  margin-bottom: 8px;
}
.login-form .field {
  margin: 28px 0 20px;
}
.login-form button {
  width: 100%;
}
.login-footnote {
  font-size: 11px;
  color: #627187;
  margin-top: 25px;
}
.login-error:empty {
  display: none;
}
.login-error {
  margin-top: 16px;
}
.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}
.form-footer {
  border-top: 1px solid var(--line);
  padding: 20px 22px;
  background: #fafcfd;
}
.settings-section {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.settings-section:last-child {
  border: 0;
  margin-bottom: 0;
}
.checkbox-field {
  margin-top: 18px;
}
.status-line {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.job-id {
  overflow-wrap: anywhere;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
@media (min-width: 1500px) {
  main {
    padding: 38px 46px;
  }
  .topbar {
    padding: 0 46px;
  }
  .metric {
    padding: 24px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 190px;
    flex-basis: 190px;
    padding: 22px 12px;
  }
  .brand {
    font-size: 15px;
    gap: 8px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2,
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    gap: 0;
  }
  main {
    padding: 26px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
}
@media (max-width: 700px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 16px;
    display: block;
  }
  .brand {
    padding: 0 2px 14px;
  }
  .brand-sub {
    font-size: 8px;
  }
  .sidebar > .nav-section,
  .sidebar nav .nav-section,
  .sidebar-status,
  .sidebar-note {
    display: none;
  }
  .sidebar nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
  }
  .sidebar nav a {
    font-size: 12px;
    flex-shrink: 0;
    padding: 8px 10px;
    margin: 0;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }
  .sidebar nav a[aria-current] {
    border-bottom-color: #54d2b5;
  }
  .sidebar-bottom {
    position: absolute;
    right: 16px;
    top: 19px;
    padding: 0;
  }
  .logout {
    min-height: 32px;
    font-size: 11px;
    padding: 5px 12px;
  }
  .topbar {
    height: 48px;
    padding: 0 18px;
  }
  .desktop-only {
    display: none;
  }
  main {
    padding: 24px 16px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
  }
  .page-heading > .button {
    padding: 6px 10px;
    font-size: 11px;
    min-height: 34px;
  }
  .page-description {
    font-size: 12px;
  }
  h1 {
    font-size: 26px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
  .metric-value {
    font-size: 23px;
  }
  .metric-label {
    font-size: 11px;
  }
  .metric-value span {
    display: block;
    margin-top: 5px;
    font-size: 11px;
  }
  .metric > p:last-child {
    font-size: 10px;
  }
  .panel-header,
  .panel-body {
    padding: 17px;
  }
  .panel-header {
    gap: 10px;
  }
  .panel-header h2 {
    font-size: 15px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .detail-grid dd {
    margin-bottom: 12px;
  }
  .actions {
    gap: 8px;
  }
  .actions .button,
  .actions button {
    font-size: 12px;
  }
  .toolbar {
    gap: 12px;
  }
  .toolbar .field {
    flex: 1 1 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .pagination {
    padding: 14px;
    font-size: 10px;
  }
  .table-wrap {
    overscroll-behavior-x: contain;
  }
  .data-table td,
  .data-table th {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-footer {
    flex-direction: column;
    gap: 5px;
  }
  .chart-axis {
    font-size: 8px;
  }
  .chart-range {
    max-width: 55px;
  }
  .login-shell {
    display: block;
    max-width: 450px;
  }
  .login-story {
    padding: 28px;
  }
  .login-story .brand {
    margin-bottom: 24px;
  }
  .login-story h1 {
    font-size: 26px;
  }
  .login-feature {
    display: none;
  }
  .login-form {
    padding: 30px 28px;
  }
  .login-story p {
    font-size: 12px;
  }
  .notice {
    font-size: 12px;
  }
  .section-heading {
    padding: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.detail-grid > div {
  min-width: 0;
}
.detail-grid > div dt {
  margin-bottom: 5px;
}
.detail-grid > div dd {
  margin: 0;
}
.chart-range {
  flex: 0 0 auto;
  min-width: 48px;
  max-width: 100px;
  overflow-wrap: normal;
  white-space: nowrap;
}
.chart-range span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table caption {
  padding: 12px 20px;
  text-align: left;
  color: #627187;
  font-size: 11px;
  background: #fafcfd;
}
.preset-actions {
  margin-top: 14px;
}
.preset-actions .button {
  font-size: 11px;
  min-height: 30px;
  padding: 5px 10px;
}
.settings-save {
  position: sticky;
  bottom: 12px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 4px 20px #14243a12;
  z-index: 2;
}
.dirty-state {
  font-size: 12px;
  color: #895c16;
}
.panel > summary.panel-header {
  cursor: pointer;
  display: list-item;
  list-style-position: inside;
}
.panel > summary.panel-header h2 {
  display: inline;
}
.panel > summary.panel-header .muted {
  display: block;
  margin-top: 5px;
  font-size: 12px;
}
.login-shell {
  padding: 0;
  margin: 0;
}

/* Theme selection is applied before styles load; dark is the first-visit default. */
:root {
  color-scheme: light;
}
.theme-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.theme-control select {
  width: auto;
  min-height: 32px;
  padding: 5px 26px 5px 9px;
  font-size: 12px;
}
.login-form > .theme-control {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 22px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  color: #d6dfeb;
  background: #0d1522;
  --ink: #ecf2fa;
  --muted: #a3b2c6;
  --line: #2c3b50;
  --nav: #101d2e;
  --shadow: 0 2px 8px #00000018;
}
[data-theme="dark"] a {
  color: #71d6c7;
}
[data-theme="dark"] .panel,
[data-theme="dark"] .metric,
[data-theme="dark"] .topbar,
[data-theme="dark"] .settings-save,
[data-theme="dark"] .login-shell {
  background: #162234;
}
[data-theme="dark"] .topbar {
  color: #d6dfeb;
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #111c2c;
  border-color: #43536a;
  color: #e5edf7;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: #91a0b5;
  opacity: 1;
}
[data-theme="dark"] label,
[data-theme="dark"] .detail-grid dd,
[data-theme="dark"] pre,
[data-theme="dark"] details > summary {
  color: #d4e0ef;
}
[data-theme="dark"] .secondary {
  background: #203047;
  border-color: #45566e;
  color: #e2ebf6;
}
[data-theme="dark"] .secondary:hover {
  background: #2c405b;
}
[data-theme="dark"] .button:not(.secondary):not(.danger) {
  color: white;
}
[data-theme="dark"] .metric-value {
  color: #edf4fc;
}
[data-theme="dark"] .muted,
[data-theme="dark"] .hint,
[data-theme="dark"] .page-description,
[data-theme="dark"] .metric-label,
[data-theme="dark"] .metric > p:last-child,
[data-theme="dark"] .metric-value span,
[data-theme="dark"] .cell-sub,
[data-theme="dark"] .detail-grid dt,
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .page-footer,
[data-theme="dark"] .topbar-meta,
[data-theme="dark"] .chart-legend,
[data-theme="dark"] .chart-range,
[data-theme="dark"] .chart-axis,
[data-theme="dark"] .login-footnote {
  color: #a3b2c6;
}
[data-theme="dark"] .panel-header,
[data-theme="dark"] .section-heading,
[data-theme="dark"] .pagination,
[data-theme="dark"] .list-row,
[data-theme="dark"] .data-table td {
  border-color: #2a3a50;
}
[data-theme="dark"] .data-table th,
[data-theme="dark"] .data-table caption {
  background: #1b2a3e;
  color: #b3c1d3;
}
[data-theme="dark"] .data-table tbody tr:hover,
[data-theme="dark"] a.list-row:hover {
  background: #1b2c42;
}
[data-theme="dark"] .inset-note,
[data-theme="dark"] pre,
[data-theme="dark"] .form-footer {
  background: #101c2c;
  color: #b1c1d6;
}
[data-theme="dark"] .empty-state {
  color: #a3b2c6;
}
[data-theme="dark"] .badge {
  background: #26374e;
  border-color: #40536c;
  color: #c4d3e6;
}
[data-theme="dark"] .badge-success,
[data-theme="dark"] .badge-scheduled,
[data-theme="dark"] .badge-enabled,
[data-theme="dark"] .badge-call,
[data-theme="dark"] .badge-stock {
  background: #183e36;
  border-color: #326154;
  color: #9be2c7;
}
[data-theme="dark"] .badge-partial,
[data-theme="dark"] .badge-paused,
[data-theme="dark"] .badge-missed,
[data-theme="dark"] .badge-warning {
  background: #43351d;
  border-color: #6d5630;
  color: #f0cd86;
}
[data-theme="dark"] .badge-failed,
[data-theme="dark"] .badge-interrupted {
  background: #462831;
  border-color: #75404c;
  color: #ffb5c1;
}
[data-theme="dark"] .badge-running,
[data-theme="dark"] .badge-queued {
  background: #203d60;
  border-color: #395f86;
  color: #afd4ff;
}
[data-theme="dark"] .badge-put,
[data-theme="dark"] .badge-option {
  background: #362e4d;
  border-color: #5b4b78;
  color: #d7c1f4;
}
[data-theme="dark"] .notice {
  background: #1b344b;
  border-color: #345874;
  color: #bad9f3;
}
[data-theme="dark"] .notice.warning {
  background: #362e20;
  border-color: #625131;
  color: #edcf94;
}
[data-theme="dark"] .notice.error {
  background: #3c252e;
  border-color: #72404b;
  color: #ffc0c9;
}
[data-theme="dark"] .notice.success {
  background: #193b32;
  border-color: #326350;
  color: #a4e3c4;
}
[data-theme="dark"] .setup-items a {
  color: #f1d294;
}
[data-theme="dark"] .instrument-pick {
  background: #1a293d;
}
[data-theme="dark"] .instrument-pick span {
  color: #a3b2c6;
}
[data-theme="dark"] .instrument-pick.selected {
  background: #1c403a;
  border-color: #4f9e8d;
  color: #a7e9d8;
}
[data-theme="dark"] .price-chart {
  color: #64d8c5;
}
[data-theme="dark"] .grid-line {
  stroke: #33465d;
}
[data-theme="dark"] .dirty-state {
  color: #efcd8b;
}
[data-theme="dark"] .skip-link {
  background: #203047;
}
[data-theme="dark"] .sidebar .brand,
[data-theme="dark"] .sidebar nav a {
  color: #d5e3ef;
}
[data-theme="dark"] .sidebar nav a[aria-current] {
  color: #b9f4dd;
}
@media (max-width: 700px) {
  .topbar-meta {
    gap: 8px;
  }
  .topbar-meta > .badge {
    display: none;
  }
  .theme-control {
    font-size: 11px;
    gap: 5px;
  }
}

/* Shared interaction and density system. */
:root {
  --surface: #ffffff;
  --secondary-bg: #eef2f7;
  --secondary-ink: #263447;
}
[data-theme="dark"] {
  --surface: #162234;
  --secondary-bg: #203047;
  --secondary-ink: #e2ebf6;
}
button.secondary,
a.button.secondary {
  background: var(--secondary-bg);
  color: var(--secondary-ink);
}
button.secondary:hover,
a.button.secondary:hover {
  background: var(--line);
  color: var(--ink);
}
button:disabled {
  opacity: 0.65;
}
.nav-toggle {
  display: none;
}
.workspace,
main,
.panel,
.panel-body,
.stack,
.actions,
.detail-content {
  min-width: 0;
  max-width: 100%;
}
.panel-body {
  overflow-wrap: anywhere;
}
.table-wrap {
  max-width: 100%;
  overflow: auto;
  max-height: 620px;
}
.table-wrap:focus-visible {
  outline: 3px solid #3fa8e5;
  outline-offset: 2px;
}
.data-table {
  font-size: 13px;
}
.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  font-size: 12px;
}
.data-table td {
  padding: 12px 16px;
}
.data-table .cell-sub {
  font-size: 12px;
}
.numeric {
  font-variant-numeric: tabular-nums;
}
.row-detail summary {
  min-height: 32px;
  padding-block: 5px;
}
.field-error {
  color: #ab202e;
  font-weight: 600;
  margin: 4px 0;
}
[data-theme="dark"] .field-error {
  color: #ffabb3;
}
[aria-invalid="true"] {
  border: 2px solid #c93d4a;
}
html {
  scroll-padding-bottom: 120px;
}
input,
select,
textarea,
button,
a {
  scroll-margin-block: 24px 120px;
}
.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.view-tabs a {
  display: inline-flex;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.view-tabs a[aria-current] {
  background: var(--accent);
  color: white;
}
.page-heading {
  margin-bottom: 24px;
}
.page-footer {
  font-size: 12px;
  gap: 16px;
  flex-wrap: wrap;
}
[data-run-monitor] {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-block: 16px;
}
@media (max-width: 700px) {
  .nav-toggle {
    display: inline-flex;
    width: 100%;
    margin: 8px 0 0;
    justify-content: space-between;
  }
  .nav-toggle::after {
    content: "▾";
  }
  .sidebar nav {
    display: none;
    white-space: normal;
    overflow: visible;
  }
  .sidebar nav.nav-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
  }
  .sidebar nav a {
    min-width: 0;
  }
  .actions {
    flex-wrap: wrap;
  }
  .actions > *,
  .toolbar > * {
    min-width: 0;
    max-width: 100%;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-save {
    bottom: 8px;
    padding: 12px;
  }
  .settings-save .dirty-state {
    flex-basis: 100%;
  }
  .table-wrap {
    max-height: 520px;
  }
  .page-heading {
    gap: 12px;
  }
}

[data-density="compact"] .data-table td {
  padding: 6px 12px;
}
.table-wrap {
  position: relative;
}
@media (max-width: 700px) {
  .topbar .desktop-only {
    display: none;
  }
}
