:root {
  --bg: #06131d;
  --panel: #0a2130;
  --input: #081a26;
  --border: #294b61;
  --text: #dceaf3;
  --muted: #a2bacb;
  --mint: #45efd4;
  --healthy: #49efbc;
  --queue-volume: #f7d85b;
  --night-panel: linear-gradient(150deg, #10283a 0%, #0a2130 55%, #0a2135 100%);
  --night-inset: linear-gradient(145deg, #0b2232, #081c2a);
  --night-raised: linear-gradient(180deg, #112c3e, #0a2131);
  --night-gloss: inset 0 1px 0 #70b8dd16, inset 0 -1px 0 #41a9c913;
}

.topbar {
  --header-control-height: 30px;
  --header-user-size: 13px;
  background: linear-gradient(180deg, #10253f, #091930);
  box-shadow: var(--night-gloss);
}
.topbar :is(.panel-account-tag, #header-user-name, #header-session) {
  min-block-size: var(--header-control-height);
}
.topbar #header-user-name .report-picker-caption { font-size: var(--header-user-size); }
.topbar .top-actions :is(#network-test, #tab-history, #panel-profiles, #restart-app, #panel-logout) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  block-size: var(--header-control-height);
  min-block-size: var(--header-control-height);
  padding-block: 0;
  font-size: var(--header-user-size);
  font-weight: 400;
  line-height: 1.25;
}

.workspace .card,
.workspace[data-view="entry"] > .workspace-sidebar,
#account-dialog > .workspace-sidebar,
.account-sheet,
dialog:not(.account-page),
.report-picker-menu[popover],
.symbol-results {
  background-image: var(--night-panel);
  box-shadow: var(--night-gloss);
}
.workspace .queue-summary {
  background-image: radial-gradient(ellipse at 16% 95%, #1b305530, transparent 75%), var(--night-panel);
}
#order-form {
  box-shadow: var(--night-gloss), 0 8px 18px -15px #2398ab58;
}
:is(#market-info, #order-form .order-amounts, #order-form .timing-panel) {
  background: var(--night-inset);
  border-color: var(--border);
  box-shadow: var(--night-gloss);
}
:is(.topbar > .clock, .report-picker-trigger, .market-grid > span,
  .amount-row > .split-switch, .workspace input:not([type="checkbox"]), .workspace select,
  dialog input:not([type="checkbox"], [type="range"], [type="file"]), dialog select) {
  background: var(--input);
  border-color: var(--border);
  box-shadow: inset 0 1px 0 #84bed812;
}
:is(.workspace, dialog) :is(input:focus:not([type="checkbox"], [type="range"], [type="file"]), select:focus) {
  border-color: #4bb8d0;
  box-shadow: 0 0 0 2px #47d5de2b;
}
:is(.top-actions .icon-button, .top-actions [data-tab], .queue-summary .icon-button,
  #save.defaults-button) {
  background: var(--night-raised);
  border-color: var(--border);
  box-shadow: var(--night-gloss);
}
:is(.top-actions .icon-button, .top-actions [data-tab], .queue-summary .icon-button,
  #save.defaults-button):hover { border-color: #59a5bc; }

.order-side-actions #schedule {
  background: linear-gradient(180deg, #125052, #103a42);
  border-color: #37afab;
  color: var(--mint);
  box-shadow: inset 0 1px 0 #73efd748, 0 2px 6px #02cdb129;
}
.order-side-actions #schedule-sell {
  background: linear-gradient(180deg, #4b2a44, #382237);
  border-color: #af6085;
  color: #ffadca;
  box-shadow: inset 0 1px 0 #f1a3c637, 0 2px 6px #e6549822;
}
.order-side-actions #schedule:hover { border-color: #53ddca; }
.order-side-actions #schedule-sell:hover { border-color: #e998ba; }
.order-actions #check {
  background: linear-gradient(180deg, #19465e, #122e44);
  border-color: #3b6f88;
  color: var(--text);
  box-shadow: var(--night-gloss);
}
.order-actions #check:hover { border-color: #68acc7; }

.platform-picker button[aria-pressed="true"] {
  background: linear-gradient(165deg, #153f49, #0c2d35);
  border-color: #43c4b5;
  box-shadow: inset 0 1px 0 #90f6e33d, 0 0 7px #29dfbc26;
}
#header-session[data-active="true"] {
  background: linear-gradient(180deg, #15493c, #0c302c);
  border-color: var(--healthy);
  color: var(--healthy);
  box-shadow: inset 0 1px 0 #a6f9cd30;
}
#network-result .network-good { color: var(--healthy); }
#network-result .network-fair { color: var(--queue-volume); }
#network-result .network-poor { color: #ff929d; }
#clock { color: var(--text); }

dialog:not(.account-page),
.account-sheet,
.report-picker-menu[popover],
.symbol-results {
  border-color: #32566c;
  box-shadow: var(--night-gloss), 0 14px 36px #020b16a6;
}

dialog .view-dialog-heading,
#market-filter-dialog .view-dialog-heading,
#order-performance-dialog .view-dialog-heading,
#confirm-dialog .confirm-header {
  background: var(--night-panel);
}
dialog :is(.credentials-panel, .panel-account-form, .order-performance-chart, .history-scroll, .market-filter-row),
.workspace-dialog .view-dialog-body .card {
  background: var(--night-inset);
  border-color: var(--border);
  box-shadow: var(--night-gloss);
}
dialog .market-filter-row:hover { border-color: #59a5bc; }

.report-picker-account-name,
.report-picker-all,
.history-table th,
.panel-account-table th,
.calendar-head > button {
  background: var(--night-raised);
  border-color: var(--border);
  box-shadow: var(--night-gloss);
}
dialog .icon-button:not(.danger),
dialog .secondary:not(.danger),
.workspace-dialog[data-view="history"] .view-dialog-actions button {
  background: var(--night-raised);
  border-color: var(--border);
  box-shadow: var(--night-gloss);
}
dialog :is(.icon-button,.secondary):not(.danger):hover { border-color: #59a5bc; }

.history-table .history-day td { background: var(--night-raised); }
.history-table tbody tr:nth-child(odd) { background: #102c3e; }
.history-table tbody tr:not(.history-day):hover,
.history-table tbody tr:focus-within { background: #1b3d51; }

.order-toast {
  background-image: linear-gradient(180deg, #1c624d, #124331);
  box-shadow: var(--night-gloss), 0 8px 24px #020b16a6;
}
.order-toast.error { background-image: linear-gradient(180deg, #822f49, #592438); }
