:root {
  color-scheme: dark;
  --bg: #252a2f;
  --panel: #30363c;
  --panel2: #343b41;
  --line: #454c52;
  --text: #e0e3e5;
  --muted: #929ca5;
  --amber: #efb155;
  --green: #4bb58b;
  --red: #ef7d80;
  --blue: #83b7d5;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 13px var(--sans);
}
button,
input,
select {
  font: inherit;
}
button,
a,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
button {
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button:hover {
  background: #ffffff08;
}
input,
select {
  color: var(--text);
  background: #2e343a;
  border: 1px solid var(--line);
  border-radius: 4px;
}
select {
  padding: 7px 28px 7px 10px;
  height: 32px;
}
input {
  padding: 7px 9px;
}
b,
strong {
  font-weight: 600;
}
small {
  font-size: 11px;
}
.terminal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 57px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 22px;
  background: #2d3338;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.brandmark {
  font: bold 22px var(--mono);
  color: var(--amber);
  border: 1px solid #a87c40;
  line-height: 26px;
  width: 29px;
  height: 29px;
  border-radius: 5px;
  text-align: center;
  position: relative;
}
.brandmark span {
  font-size: 14px;
  position: absolute;
  right: -5px;
  top: -7px;
  background: #2d3338;
}
.brand strong {
  font-size: 16px;
  letter-spacing: 1.4px;
}
.brand strong > span {
  font-weight: 400;
  color: #b7bfc7;
}
.brand small {
  font: 9px var(--mono);
  letter-spacing: 1.1px;
  color: var(--muted);
  margin-left: 2px;
}
.top-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
}
.workspace {
  font-size: 12px;
  color: var(--muted);
}
.workspace b {
  color: #cbd0d4;
  font-weight: 400;
}
.workspace .muted {
  padding: 0 10px;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.demo-tag {
  font: 10px var(--mono);
  color: #d6b379;
  border: 1px solid #715e40;
  background: #80602918;
  padding: 5px 8px;
  border-radius: 3px;
  letter-spacing: 0.35px;
}
.clock {
  font: 12px var(--mono);
  color: #a9b3bb;
  white-space: nowrap;
}
.icon-button {
  border: 1px solid transparent;
  border-radius: 4px;
  min-width: 29px;
  height: 29px;
  font-size: 18px;
  color: #a4afb8;
}
.workarea {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 85px);
}
.sidebar {
  width: 250px;
  flex: 0 0 250px;
  border-right: 1px solid var(--line);
  background: #282e33;
  display: flex;
  flex-direction: column;
}
.sidebar-head {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  font: 10px var(--mono);
  letter-spacing: 0.6px;
  color: #9da7af;
  border-bottom: 1px solid var(--line);
}
nav {
  padding-top: 9px;
}
.tree-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  text-align: left;
  min-height: 38px;
  padding: 7px 16px;
  color: #c6cdd2;
  position: relative;
}
.tree-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 10px;
  font-weight: 400;
}
.tree-row.selected {
  background: #b0874721;
  color: #f5c880;
  box-shadow: inset 3px 0 var(--amber);
}
.tree-row.selected small {
  color: #b6a58b;
}
.tree-icon {
  font-size: 19px;
  color: var(--amber);
}
.count {
  font: 10px var(--mono);
  margin-left: auto;
  color: var(--muted);
}
.overview {
  font-weight: 600;
  margin-bottom: 14px;
}
.tree-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #78858f;
  letter-spacing: 1px;
  font: 9px var(--mono);
  margin: 22px 16px 10px;
}
.tree-section:first-of-type {
  margin-top: 15px;
}
.provider {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  font: bold 14px var(--mono);
}
.upscale {
  color: #e2ad63;
  background: #423c33;
  border: 1px solid #67563e;
}
.hl {
  color: #72c0ae;
  background: #30453f;
  border: 1px solid #435f57;
}
.account {
  font-weight: 600;
}
.account > .status-dot {
  margin-left: auto;
}
.tree-children {
  margin-top: 3px;
}
.child {
  padding-left: 23px;
  gap: 8px;
  min-height: 49px;
}
.branch {
  align-self: flex-start;
  padding-top: 2px;
  color: #4f5a63;
}
.tree-short {
  font: 10px var(--mono);
  border: 1px solid #785557;
  color: #d88c8b;
  background: #a8626010;
  padding: 2px 4px;
  margin-left: auto;
  border-radius: 2px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
  background: var(--muted);
}
.green {
  background: var(--green);
}
.amber {
  background: var(--amber);
}
.gray {
  background: #727e88;
}
.red {
  background: var(--red);
}
.server-subhead {
  font: 8px var(--mono);
  letter-spacing: 0.8px;
  color: #7f8b95;
  margin: 22px 0 6px 23px;
}
.server-row {
  padding: 8px 18px 8px 24px;
}
.server-row > .status-dot {
  margin-left: auto;
}
.server-glyph {
  color: #83929d;
  font-size: 17px;
}
.server-row small {
  font: 9px var(--mono);
  margin-top: 5px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 24px 17px 17px;
  color: #97a2ab;
  border-top: 1px solid #3d454c;
}
.sidebar-bottom > div {
  display: flex;
  gap: 10px;
  font-size: 11px;
}
.sidebar-bottom small {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  color: #737f89;
}
.key-icon {
  font-size: 20px;
  color: #b18e5e;
}
.sidebar-bottom p {
  font-size: 10px;
  line-height: 1.7;
  margin: 12px 0;
  color: #7f8a94;
}
.sidebar-bottom .text-button {
  font-size: 11px;
  width: 100%;
  text-align: left;
  padding: 8px 0 0;
}
.sidebar-bottom .text-button span {
  float: right;
}
.text-button {
  font-size: 11px;
  color: #aeb9c2;
  padding: 4px;
  border-radius: 3px;
}
.text-button:hover {
  color: var(--amber);
}
main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
}
.contextbar {
  min-height: 46px;
  padding: 0 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 15px;
  background: #2e343a;
}
.contextbar > div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.contextbar strong {
  font-size: 13px;
  font-weight: 500;
}
.context-sub {
  font: 10px var(--mono);
  color: var(--muted);
  padding-left: 5px;
}
.readonly {
  font-size: 10px;
  color: var(--muted);
  margin-right: 10px;
  white-space: nowrap;
}
.readonly > span {
  font-size: 12px;
  padding-right: 3px;
  color: #89a99b;
}
.small-button {
  border: 1px solid #4a525a;
  border-radius: 4px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  height: 30px;
  white-space: nowrap;
  color: #bbc4cb;
}
.small-button:hover {
  border-color: #8b795e;
  color: var(--amber);
}
.metrics {
  display: grid;
  grid-template-columns: 1.15fr 1.12fr 1fr 1fr 1fr 1.4fr;
  background: #30363c;
  border-bottom: 1px solid var(--line);
}
.metric {
  min-width: 0;
  padding: 17px 18px 14px;
  border-right: 1px solid var(--line);
  position: relative;
}
.metric:last-child {
  border-right: none;
}
.metric-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #99a5af;
  font-size: 10px;
  letter-spacing: 0.1px;
  white-space: nowrap;
}
.metric-value {
  font: 20px var(--mono);
  font-weight: 500;
  margin: 10px 0 7px;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.metric-value small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
  margin-left: 5px;
}
.metric-note {
  font: 9px var(--mono);
  color: #89959e;
  white-space: nowrap;
}
.metric-note .green-text {
  margin-right: 5px;
}
.green-text {
  color: var(--green) !important;
}
.red-text {
  color: var(--red) !important;
}
.amber-text {
  color: var(--amber) !important;
}
.blue-text {
  color: var(--blue) !important;
}
.muted {
  color: var(--muted) !important;
}
.metric svg {
  position: absolute;
  right: 15px;
  bottom: 16px;
  width: 67px;
  height: 35px;
  opacity: 0.8;
}
.notice {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 17px;
  background: #9c713013;
  border-bottom: 1px solid #69543a;
  font-size: 10px;
  color: #c3ad8b;
  min-height: 35px;
}
.notice b {
  font-weight: 500;
  color: #e3bf87;
}
.notice-icon {
  display: grid;
  place-items: center;
  border: 1px solid #9b773e;
  border-radius: 3px;
  width: 14px;
  height: 14px;
  font: 10px var(--mono);
  color: var(--amber);
}
.notice button {
  color: #d5b481;
  margin-left: auto;
  font-size: 10px;
  white-space: nowrap;
}
.notice button span {
  margin-left: 4px;
}
.notice.good {
  background: #346b4d13;
  border-color: #41614f;
}
.tabbar {
  display: flex;
  align-items: center;
  gap: 1px;
  border-bottom: 1px solid var(--line);
  height: 45px;
  padding: 0 12px;
  background: #2c3238;
  overflow: auto;
  flex-shrink: 0;
}
.tab {
  height: 45px;
  padding: 0 12px;
  white-space: nowrap;
  color: #a3adb5;
  font-size: 11px;
  border-bottom: 2px solid transparent;
}
.tab.active {
  color: #efcf99;
  border-bottom: 2px solid var(--amber);
  background: linear-gradient(0deg, #e0aa4d09, transparent);
}
.tab > span {
  font: 9px var(--mono);
  background: #444d54;
  color: #bac3cb;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 4px;
}
.tab .tab-alert {
  background: #93683b32;
  color: #e6b268;
}
.tabbar-spacer {
  flex: 1;
}
.panel-label {
  font: 8px var(--mono);
  letter-spacing: 0.3px;
  color: #7e8b96;
  margin: 0 7px;
  white-space: nowrap;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 49px;
  padding: 8px 17px;
  border-bottom: 1px solid var(--line);
  background: #32383e;
}
.toolbar-left {
  display: flex;
  gap: 8px;
  min-width: 0;
}
.toolbar select {
  font-size: 10px;
}
.search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #2b3137;
  max-width: 240px;
  min-width: 150px;
  height: 32px;
}
.search-box > span {
  font-size: 23px;
  line-height: 20px;
  margin-left: 8px;
  color: #82909a;
}
.search-box input {
  border: 0;
  background: transparent;
  outline: 0;
  width: 100%;
  min-width: 70px;
  font-size: 10px;
}
.search-box kbd {
  font: 10px var(--mono);
  border: 1px solid #515b64;
  color: #8e9aa3;
  border-radius: 3px;
  padding: 0 4px;
  margin: 0 7px;
}
.content-panel {
  flex: 1;
  min-height: 345px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.table-wrap {
  overflow: auto;
  flex: 1;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
}
th {
  color: #8e9ba5;
  font-size: 9px;
  letter-spacing: 0.2px;
  font-weight: 400;
  background: #2d3339;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  text-align: left;
}
td {
  font: 11px var(--mono);
  padding: 12px 13px;
  border-bottom: 1px solid #454e563b;
  color: #cbd1d5;
}
tbody tr:nth-child(even) {
  background: #ffffff012;
}
tbody tr:hover {
  background: #ffffff05;
}
tr[data-trade] {
  cursor: pointer;
}
tr[data-trade]:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: -2px;
}
td.numeric,
th.numeric {
  text-align: right;
}
td.coin {
  font-weight: 600;
  color: var(--amber);
}
td .sub {
  font: 9px var(--sans);
  color: #82909a;
  display: block;
  margin-top: 4px;
}
.time-cell {
  color: #a8b3bc;
}
.time-cell .date {
  font-size: 9px;
  color: #78858e;
  margin-right: 7px;
}
.badge {
  font: 9px var(--mono);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 3px;
  padding: 3px 5px;
  line-height: 1.2;
  white-space: nowrap;
}
.badge.short {
  color: #db9496;
  background: #b6696a14;
}
.badge.open {
  color: #a9b8d4;
  background: #738eb118;
}
.badge.close {
  color: #c8b18b;
  background: #ab906018;
}
.badge.success {
  color: #81b79b;
  background: #578d6b13;
}
.badge.virtual {
  color: #939fab;
  background: #85919d12;
}
.badge.wait {
  color: #dbb16c;
  background: #c1964c16;
}
.badge.error {
  color: #ea9090;
  background: #b35f5f15;
}
.trade-status {
  font: 9px var(--sans);
  display: flex;
  align-items: center;
  gap: 5px;
}
.reason-cell {
  font: 10px var(--sans);
  color: #a3afb8;
}
.table-summary {
  padding: 10px 17px;
  border-top: 1px solid var(--line);
  font: 10px var(--mono);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #2d3339;
  color: #a1adb6;
}
.table-summary b {
  font-weight: 500;
}
.summary-left {
  display: flex;
  gap: 19px;
  flex-wrap: wrap;
}
.bottom-panel {
  border-top: 1px solid #50585e;
  background: #2e343a;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 17px;
  border-bottom: 1px solid var(--line);
}
h2 {
  font-size: 11px;
  font-weight: 500;
  margin: 0;
}
.connection-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.connection-card {
  padding: 15px 17px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.connection-card:last-child {
  border: 0;
}
.connection-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #c0c8ce;
}
.connection-head > span:last-child {
  margin-left: auto;
  font: 9px var(--mono);
  color: #82919d;
}
.connection-main {
  font: 17px var(--mono);
  margin: 12px 0 8px;
  color: #c4cdd4;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.connection-main small {
  font: 9px var(--mono);
  color: #84939e;
}
.connection-note {
  font: 9px var(--mono);
  color: #8b98a2;
  line-height: 1.5;
}
.mini-bars {
  height: 15px;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  margin-top: 10px;
  opacity: 0.65;
}
.mini-bars i {
  width: 7px;
  background: #72998c;
  border-radius: 1px;
  display: block;
}
.connection-card.warning .mini-bars i {
  background: #b19162;
}
.statusbar {
  min-height: 28px;
  padding: 6px 17px;
  background: #252b30;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 9px var(--mono);
  color: #84919b;
}
.statusbar > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.statusbar b {
  font-weight: 400;
  color: #b8a385;
}
.footer-sep {
  color: #525f69;
  margin: 0 7px;
}
.empty {
  padding: 65px 20px;
  text-align: center;
  color: #96a2ac;
  flex: 1;
}
.empty .empty-icon {
  font-size: 30px;
  color: #66747f;
  margin-bottom: 12px;
}
.empty strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #c2cbd1;
}
.empty p {
  font-size: 11px;
  line-height: 1.8;
}
.detail-link {
  color: var(--amber);
}
.panel-padding {
  padding: 20px;
}
.section-kicker {
  font: 9px var(--mono);
  letter-spacing: 0.8px;
  color: #8998a4;
  margin-bottom: 9px;
}
.panel-heading {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 7px;
}
.panel-description {
  font-size: 11px;
  color: #8e9ca6;
  line-height: 1.7;
  margin: 0 0 22px;
}
.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.risk-card,
.chart-card,
.infra-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px;
  background: #2e343a;
}
.risk-card h3,
.infra-card h3 {
  font-size: 12px;
  font-weight: 500;
  margin: 0 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.risk-line {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 8px;
  color: #acb8c0;
}
.risk-line strong {
  font: 12px var(--mono);
  color: #d2d8dd;
}
.progress-track {
  height: 5px;
  background: #434b53;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 7px;
}
.progress-track > span {
  display: block;
  height: 100%;
  background: #b08c53;
  border-radius: 5px;
}
.progress-help {
  font: 9px var(--mono);
  color: #8e9ba5;
  display: flex;
  justify-content: space-between;
  margin-bottom: 23px;
}
.risk-note {
  font-size: 10px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
  line-height: 1.7;
  color: #8c9aa5;
}
.analytics-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 15px;
}
.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 24px;
}
.chart-head strong {
  font: 18px var(--mono);
  color: var(--green);
}
.chart-svg {
  width: 100%;
  height: 200px;
  display: block;
}
.analytic-stat {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #a4b0ba;
  font-size: 11px;
}
.analytic-stat strong {
  font: 18px var(--mono);
  color: #d3dbe0;
}
.infra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.infra-card.selected {
  border-color: #947547;
}
.server-address {
  font: 11px var(--mono);
  color: #8da4b5;
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 20px;
}
.info-grid span {
  display: block;
  font-size: 9px;
  color: #8b99a5;
}
.info-grid strong {
  display: block;
  margin-top: 6px;
  font: 13px var(--mono);
  font-weight: 400;
}
.diagnostic-box {
  padding: 12px;
  margin-top: 16px;
  border: 1px solid #766044;
  background: #a07b3510;
  border-radius: 3px;
  color: #c2aa87;
  font-size: 11px;
  line-height: 1.8;
}
.route {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  margin-top: 16px;
  background: #2c3238;
  font: 10px var(--mono);
  flex-wrap: wrap;
}
.route > span {
  padding: 8px;
  background: #374047;
  border: 1px solid #4b5963;
  border-radius: 3px;
}
.route > i {
  color: #b28b4e;
  font-style: normal;
}
.route .route-error {
  border-color: #8b604c;
  color: #e0a178;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: #10141975;
  z-index: 10;
}
.drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 440px;
  max-width: 95vw;
  background: #2b3238;
  z-index: 11;
  border-left: 1px solid #56616b;
  box-shadow: -20px 0 65px #0b101844;
  overflow: auto;
}
.drawer-head {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-head h2 {
  font-size: 15px;
}
.drawer-head small {
  display: block;
  color: #83939f;
  font: 10px var(--mono);
  margin-top: 6px;
}
.drawer-body {
  padding: 20px;
}
.drawer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 20px 0 28px;
}
.drawer-stats span {
  display: block;
  font-size: 10px;
  color: #8b9ba7;
  margin-bottom: 7px;
}
.drawer-stats strong {
  font: 15px var(--mono);
}
.timeline {
  margin: 20px 0;
  border-left: 1px solid #51605c;
  padding-left: 18px;
}
.timeline-item {
  position: relative;
  margin-bottom: 23px;
  font-size: 11px;
}
.timeline-item:before {
  content: "";
  position: absolute;
  left: -22px;
  top: 3px;
  width: 7px;
  height: 7px;
  background: #72b091;
  border: 2px solid #2b3238;
  border-radius: 50%;
}
.timeline-item small {
  display: block;
  font: 10px var(--mono);
  margin-top: 7px;
  color: #8b9ca9;
}
.drawer-data {
  font: 10px var(--mono);
  border-top: 1px solid var(--line);
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #9cabb6;
}
.drawer-data code {
  color: #c7d0d6;
  overflow-wrap: anywhere;
  text-align: right;
  font: 10px var(--mono);
}
.drawer-note {
  font-size: 11px;
  line-height: 1.8;
  color: #9baab5;
  margin: 20px 0;
}
.drawer-badge {
  font-size: 9px;
  color: #d5b983;
  letter-spacing: 0.3px;
}
.drawer .primary-button {
  margin-top: 18px;
}
.primary-button {
  background: #c69549;
  color: #1f252a;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: 4px;
  font-size: 11px;
}
.primary-button:hover {
  background: #ddb067;
}
dialog {
  background: #30373d;
  border: 1px solid #57626a;
  color: var(--text);
  border-radius: 6px;
  width: 420px;
  max-width: 92vw;
  padding: 23px;
}
dialog::backdrop {
  background: #11171db0;
}
.dialog-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-title h2 {
  font-size: 15px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 23px 0;
  font-size: 12px;
}
.setting-row input {
  accent-color: var(--amber);
}
.demo-explainer {
  border: 1px solid #796445;
  background: #98733512;
  border-radius: 4px;
  padding: 13px;
  margin: 20px 0;
  font-size: 11px;
  color: #c9b390;
}
.demo-explainer p {
  line-height: 1.7;
  color: #a4a2a0;
  margin-bottom: 0;
}
.toast {
  position: fixed;
  bottom: 45px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  border: 1px solid #6c786c;
  padding: 12px 20px;
  background: #313f38;
  color: #bdd9ca;
  border-radius: 5px;
  font-size: 12px;
  box-shadow: 0 8px 30px #0004;
}
.mobile-menu {
  display: none;
}
[hidden] {
  display: none !important;
}
.compact td {
  padding-top: 7px;
  padding-bottom: 7px;
}
.hide-ips .server-row small {
  font-size: 0;
}
.hide-ips .server-row small:after {
  content: "IP скрыт";
  font: 9px var(--mono);
}
.hide-ips .server-address {
  visibility: hidden;
}
@media (min-width: 1700px) {
  body {
    font-size: 14px;
  }
  .sidebar {
    width: 270px;
    flex-basis: 270px;
  }
  .metric {
    padding: 20px 24px;
  }
  .metric-value {
    font-size: 23px;
  }
  td {
    padding: 14px 17px;
    font-size: 12px;
  }
  th {
    padding-left: 17px;
    padding-right: 17px;
  }
  .connection-card {
    padding: 20px 22px;
  }
  .connection-main {
    font-size: 21px;
  }
  .content-panel {
    min-height: 420px;
  }
  .tab {
    font-size: 12px;
  }
}
@media (max-width: 1190px) {
  .sidebar {
    width: 225px;
    flex-basis: 225px;
  }
  .brand small,
  .workspace,
  .context-sub,
  .panel-label {
    display: none;
  }
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .metric:nth-child(3) {
    border-right: 0;
  }
  .metric:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
  .metric {
    padding: 12px 16px;
  }
  .metric-value {
    font-size: 19px;
    margin: 7px 0;
  }
  .metric-note {
    font-size: 9px;
  }
  .metric svg {
    width: 55px;
  }
  .toolbar-left {
    flex-wrap: wrap;
  }
  .toolbar {
    align-items: flex-start;
  }
  .connection-card {
    padding: 12px;
  }
  .connection-head {
    font-size: 9px;
  }
  .connection-head > span:last-child {
    display: none;
  }
  .statusbar > span:last-child {
    display: none;
  }
  .notice-description {
    display: none;
  }
  .tree-row {
    padding-left: 13px;
  }
  .child {
    padding-left: 18px;
  }
}
@media (max-width: 800px) {
  .topbar {
    height: 50px;
    padding: 0 10px;
    gap: 8px;
  }
  .brand strong {
    font-size: 13px;
  }
  .brandmark {
    width: 24px;
    height: 24px;
    line-height: 22px;
    font-size: 18px;
  }
  .top-divider,
  .clock {
    display: none;
  }
  .top-right {
    gap: 7px;
  }
  .demo-tag {
    font-size: 8px;
    padding: 4px 5px;
  }
  .sidebar {
    display: none;
    position: fixed;
    top: 50px;
    bottom: 28px;
    left: 0;
    z-index: 8;
    width: 250px;
    box-shadow: 10px 0 35px #10141980;
  }
  .sidebar.mobile-open {
    display: flex;
  }
  .mobile-menu {
    display: block;
  }
  .contextbar {
    padding: 8px 12px;
    min-height: 46px;
  }
  .readonly {
    display: none;
  }
  .contextbar strong {
    font-size: 11px;
  }
  .small-button {
    font-size: 10px;
  }
  .metric {
    padding: 12px;
  }
  .metric-label {
    font-size: 9px;
  }
  .metric-value {
    font-size: 16px;
  }
  .metric-note {
    font-size: 8px;
  }
  .metric svg {
    display: none;
  }
  .tabbar {
    padding: 0 2px;
  }
  .tab {
    padding: 0 10px;
  }
  .notice {
    padding: 8px 12px;
    font-size: 9px;
  }
  .toolbar {
    padding: 8px 12px;
  }
  .toolbar-left {
    gap: 5px;
  }
  .search-box {
    max-width: 180px;
  }
  .toolbar select {
    font-size: 9px;
    height: 30px;
    padding: 5px 20px 5px 7px;
  }
  .connection-strip {
    grid-template-columns: 1fr 1fr;
  }
  .connection-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .connection-card:nth-child(2) {
    border-right: 0;
  }
  .content-panel {
    min-height: 330px;
  }
  .risk-grid,
  .analytics-grid,
  .infra-grid {
    grid-template-columns: 1fr;
  }
  .table-summary {
    font-size: 9px;
  }
  .summary-left {
    gap: 10px;
  }
  .statusbar {
    font-size: 8px;
    padding: 7px 10px;
  }
  .statusbar .footer-sep {
    margin: 0 3px;
  }
  .panel-padding {
    padding: 15px;
  }
  .connection-main {
    font-size: 17px;
  }
}

@media (max-width: 800px) {
  .metric {
    overflow: hidden;
  }
  .metric-note {
    white-space: normal;
    line-height: 1.4;
  }
  .metric-value {
    font-size: 15px;
  }
  .metric-value small {
    font-size: 9px;
    margin-left: 2px;
  }
  .brand strong {
    letter-spacing: 0.5px;
  }
}
.live-ok {
  color: var(--green);
  border-color: #46785f;
  background: #335c4318;
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 50% 35%, #363e43, #23282d 70%);
}
.login-card {
  display: block;
  width: 400px;
  max-width: 92vw;
  border: 1px solid var(--line);
  padding: 35px;
  border-radius: 8px;
  box-shadow: 0 30px 90px #0003;
  background: #2d343a;
}
.login-card .brand {
  margin-bottom: 45px;
}
.login-card h1 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
}
.login-card .section-kicker {
  font-size: 9px;
}
.login-card label,
#passwordForm label {
  display: block;
  margin: 18px 0;
  color: var(--muted);
  font-size: 11px;
}
.login-card input,
#passwordForm input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  font-size: 14px;
}
.login-card .primary-button {
  width: 100%;
  font-size: 13px;
  padding: 12px;
}
.login-footer {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 18px;
  font-size: 10px;
  color: var(--muted);
}
#loginError {
  color: var(--red);
  font-size: 12px;
  line-height: 1.7;
}
.log-detail {
  white-space: normal;
  max-width: 650px;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.7;
}
.connection-strip {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.notice {
  line-height: 1.6;
}
.notice #noticeText {
  overflow-wrap: anywhere;
}
.metric-note {
  white-space: normal;
  line-height: 1.5;
}
.data-stale .metric-value {
  opacity: 0.55;
}
.drawer-data {
  overflow-wrap: anywhere;
}
.drawer-data code {
  max-width: 65%;
}
.tabbar {
  overflow-x: auto;
}
.metrics {
  overflow: hidden;
}
#passwordForm {
  border-top: 1px solid var(--line);
  margin: 22px 0;
  padding-top: 12px;
}
.muted {
  color: var(--muted);
}
.green-text {
  color: var(--green);
}
.red-text {
  color: var(--red);
}
.table-wrap {
  max-height: 65vh;
}
.metric-value {
  white-space: nowrap;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
#noticeText {
  flex: 1;
}
.chart-svg text {
  font-family: var(--mono);
}
