/*
 * Aurora — Bot Details
 *
 * Presentation-only redesign of the canonical #botDialog.
 *
 * Safety:
 * - every selector is rooted under #botDialog
 * - app.js retains dialog rendering, chart, raw-data and Bot Stop ownership
 * - canonical dialog IDs are unchanged
 * - asset/market artwork is added by aurora-symbols.js
 */


/* =========================================================
   Dialog shell / backdrop
   ========================================================= */

#botDialog {
  width:
    min(
      1220px,
      calc(100vw - 42px)
    );
  max-height:
    calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
  border:
    1px solid
    rgba(83, 197, 158, 0.24);
  border-radius: 22px;
  background:
    linear-gradient(
      145deg,
      rgba(5, 31, 24, 0.985),
      rgba(2, 18, 15, 0.995)
    );
  color: #def3eb;
  box-shadow:
    0 34px 90px
    rgba(0, 0, 0, 0.55),
    0 0 0 1px
    rgba(70, 255, 195, 0.025),
    inset 0 1px
    rgba(255, 255, 255, 0.03);
}

#botDialog::backdrop {
  background:
    radial-gradient(
      circle at 50% 22%,
      rgba(16, 85, 64, 0.22),
      transparent 42%
    ),
    rgba(0, 7, 5, 0.82);
  backdrop-filter:
    blur(7px);
}


/* =========================================================
   Header
   ========================================================= */

#botDialog .dialog-header {
  /*
   * The dialog shell clips, while .dialog-content owns
   * vertical scrolling. Keep this header positioned so
   * its decorative ::before remains locally anchored,
   * but do not make it sticky: sticky positioning lets
   * it overlay section headings in the inner scroller.
   */
  position: relative;
  z-index: 5;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  padding:
    19px 21px 18px;
  border-bottom:
    1px solid
    rgba(85, 176, 146, 0.17);
  background:
    linear-gradient(
      180deg,
      rgba(7, 38, 29, 0.99),
      rgba(4, 26, 21, 0.985)
    );
  box-shadow:
    0 12px 28px
    rgba(0, 0, 0, 0.16);
}

#botDialog .dialog-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(82, 242, 190, 0.6),
      rgba(67, 167, 255, 0.3),
      transparent
    );
}

#botDialog .dialog-header > div {
  min-width: 0;
}

#botDialog #dialogTitle {
  margin: 0;
  color: #effff9;
  font-size: 1.08rem;
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

#botDialog #dialogSubtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  min-height: 24px;
  margin: 6px 0 0;
  color:
    rgba(172, 208, 194, 0.62);
  font-size: 0.74rem;
  line-height: 1.4;
}

#botDialog #closeDialog {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border:
    1px solid
    rgba(82, 242, 190, 0.25);
  border-radius: 11px;
  background:
    rgba(12, 60, 45, 0.46);
  color: #d8f7eb;
  font-size: 1.15rem;
  line-height: 1;
  box-shadow:
    inset 0 1px
    rgba(255, 255, 255, 0.035);
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    transform 140ms ease;
}

#botDialog #closeDialog:hover {
  border-color:
    rgba(82, 242, 190, 0.47);
  background:
    rgba(20, 83, 62, 0.6);
  transform:
    translateY(-1px);
}


/* =========================================================
   Dialog content surface
   ========================================================= */

#botDialog .dialog-content {
  position: relative;
  max-height:
    calc(100vh - 120px);
  padding: 21px;
  overflow: auto;
  background:
    radial-gradient(
      circle at 13% 0%,
      rgba(42, 146, 105, 0.085),
      transparent 36%
    ),
    radial-gradient(
      circle at 89% 5%,
      rgba(62, 146, 227, 0.05),
      transparent 31%
    );
  scrollbar-width: thin;
  scrollbar-color:
    rgba(82, 242, 190, 0.2)
    transparent;
}

#botDialog .dialog-content::-webkit-scrollbar {
  width: 9px;
}

#botDialog .dialog-content::-webkit-scrollbar-track {
  background: transparent;
}

#botDialog .dialog-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background:
    rgba(82, 242, 190, 0.16);
}


/* =========================================================
   Performance metrics
   ========================================================= */

#botDialog #botDetailMetrics {
  display: grid;
  grid-template-columns:
    repeat(
      6,
      minmax(0, 1fr)
    );
  gap: 10px;
  margin-bottom: 17px;
}

#botDialog .detail-stat {
  position: relative;
  min-width: 0;
  min-height: 92px;
  padding: 13px 14px;
  overflow: hidden;
  border:
    1px solid
    rgba(92, 170, 144, 0.16);
  border-radius: 13px;
  background:
    linear-gradient(
      145deg,
      rgba(10, 45, 35, 0.72),
      rgba(4, 27, 22, 0.8)
    );
  box-shadow:
    inset 0 1px
    rgba(255, 255, 255, 0.02);
}

#botDialog .detail-stat::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  pointer-events: none;
  background:
    rgba(82, 242, 190, 0.025);
}

#botDialog .detail-stat:nth-child(3),
#botDialog .detail-stat:nth-child(6),
#botDialog .detail-stat:nth-child(7) {
  border-color:
    rgba(82, 242, 190, 0.23);
  background:
    linear-gradient(
      145deg,
      rgba(14, 57, 43, 0.82),
      rgba(5, 31, 25, 0.86)
    );
}

#botDialog .detail-stat span,
#botDialog .detail-stat small {
  display: block;
  color:
    rgba(171, 204, 191, 0.56);
  font-size: 0.66rem;
  font-weight: 680;
  letter-spacing: 0.025em;
}

#botDialog .detail-stat strong {
  display: block;
  margin: 9px 0 0;
  overflow-wrap: anywhere;
  color: #e8f8f2;
  font-size: 1.04rem;
  font-weight: 760;
  line-height: 1.15;
  font-variant-numeric:
    tabular-nums;
}

#botDialog .detail-stat strong.positive {
  color: #58efb6;
}

#botDialog .detail-stat strong.negative {
  color: #ff8c9a;
}

#botDialog .detail-stat:nth-child(11) {
  grid-column:
    span 2;
}

#botDialog .detail-stat:nth-child(11) strong {
  width: fit-content;
  padding: 5px 9px;
  border:
    1px solid
    rgba(82, 242, 190, 0.22);
  border-radius: 999px;
  background:
    rgba(20, 90, 67, 0.28);
  color: #77edc1;
  font-size: 0.76rem;
}


/* =========================================================
   Equity / drawdown chart
   ========================================================= */

#botDialog .detail-chart {
  position: relative;
  margin: 0 0 17px;
  padding: 17px;
  overflow: hidden;
  border:
    1px solid
    rgba(91, 170, 144, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(
      145deg,
      rgba(5, 27, 22, 0.82),
      rgba(2, 18, 15, 0.9)
    );
}

#botDialog .detail-chart::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(82, 242, 190, 0.3),
      transparent
    );
}

#botDialog .detail-chart .panel-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

#botDialog .detail-chart .panel-header > div {
  min-width: 0;
}

#botDialog .detail-chart h3 {
  margin: 0;
  color: #dff3eb;
  font-size: 0.82rem;
  font-weight: 730;
}

#botDialog #drawdownSummary {
  margin: 5px 0 0;
  color:
    rgba(166, 199, 186, 0.56);
  font-size: 0.71rem;
  line-height: 1.4;
}

#botDialog #botHistoryRange {
  flex: 0 0 auto;
  min-width: 108px;
  min-height: 38px;
  padding: 0 10px;
  border:
    1px solid
    rgba(96, 173, 147, 0.18);
  border-radius: 10px;
  outline: 0;
  background:
    rgba(3, 22, 18, 0.9);
  color: #d7ede5;
  font-size: 0.73rem;
}

#botDialog #botHistoryRange:focus {
  border-color:
    rgba(82, 242, 190, 0.5);
  box-shadow:
    0 0 0 3px
    rgba(82, 242, 190, 0.07);
}

#botDialog .detail-chart .chart-wrap {
  position: relative;
  height: 270px;
  overflow: hidden;
  border:
    1px solid
    rgba(96, 159, 139, 0.09);
  border-radius: 12px;
  background:
    linear-gradient(
      rgba(82, 242, 190, 0.025) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(82, 242, 190, 0.025) 1px,
      transparent 1px
    ),
    rgba(0, 12, 10, 0.35);
  background-size:
    44px 44px;
}

#botDialog #botChart {
  display: block;
  width: 100%;
  height: 100%;
}


/* =========================================================
   Strategy / Gate data columns
   ========================================================= */

#botDialog .detail-columns {
  display: grid;
  grid-template-columns:
    minmax(320px, 0.9fr)
    minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
}

#botDialog .detail-columns > section {
  min-width: 0;
  padding: 17px;
  border:
    1px solid
    rgba(91, 169, 143, 0.15);
  border-radius: 16px;
  background:
    linear-gradient(
      145deg,
      rgba(6, 31, 25, 0.76),
      rgba(2, 20, 16, 0.84)
    );
}

#botDialog .detail-columns > section > h3 {
  margin: 0 0 14px;
  color: #e0f2eb;
  font-size: 0.8rem;
  font-weight: 730;
}


/* =========================================================
   Strategy information
   ========================================================= */

#botDialog #botDefinitionList {
  display: grid;
  grid-template-columns:
    minmax(126px, 0.72fr)
    minmax(0, 1fr);
  gap: 0;
  margin: 0;
}

#botDialog #botDefinitionList dt,
#botDialog #botDefinitionList dd {
  min-width: 0;
  margin: 0;
  padding: 9px 0;
  border-bottom:
    1px solid
    rgba(91, 150, 131, 0.1);
  line-height: 1.35;
}

#botDialog #botDefinitionList dt {
  padding-right: 14px;
  color:
    rgba(164, 198, 185, 0.56);
  font-size: 0.7rem;
  font-weight: 610;
}

#botDialog #botDefinitionList dd {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  color:
    rgba(225, 241, 235, 0.9);
  font-size: 0.73rem;
  font-weight: 580;
  text-align: right;
  overflow-wrap: anywhere;
  font-variant-numeric:
    tabular-nums;
}

#botDialog #botDefinitionList dt:last-of-type,
#botDialog #botDefinitionList dd:last-of-type {
  border-bottom-color:
    transparent;
}


/* =========================================================
   Gate dynamic data
   ========================================================= */

#botDialog .raw-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: -2px 0 10px;
  padding: 3px;
  border:
    1px solid
    rgba(93, 166, 142, 0.13);
  border-radius: 10px;
  background:
    rgba(0, 14, 11, 0.38);
}

#botDialog .raw-tab {
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color:
    rgba(165, 197, 185, 0.56);
  font-size: 0.69rem;
  font-weight: 680;
  cursor: pointer;
  transition:
    background-color 130ms ease,
    color 130ms ease;
}

#botDialog .raw-tab:hover {
  background:
    rgba(82, 242, 190, 0.05);
  color:
    rgba(211, 234, 225, 0.8);
}

#botDialog .raw-tab.active {
  border: 0;
  background:
    rgba(24, 100, 74, 0.38);
  color: #63edba;
  box-shadow:
    inset 0 0 0 1px
    rgba(82, 242, 190, 0.15);
}

#botDialog #botRaw {
  min-height: 220px;
  max-height: 440px;
  margin: 0;
  padding: 14px 15px;
  overflow: auto;
  border:
    1px solid
    rgba(93, 163, 140, 0.13);
  border-radius: 12px;
  background:
    linear-gradient(
      145deg,
      rgba(0, 13, 10, 0.92),
      rgba(1, 20, 15, 0.9)
    );
  color:
    rgba(190, 221, 209, 0.78);
  font:
    11.5px/1.55
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
  scrollbar-color:
    rgba(82, 242, 190, 0.18)
    transparent;
}


/* =========================================================
   Bot control / danger zone
   ========================================================= */

#botDialog #dangerZone {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  padding: 14px 15px;
  border:
    1px solid
    rgba(242, 104, 122, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(
      145deg,
      rgba(82, 25, 34, 0.16),
      rgba(41, 17, 22, 0.13)
    );
}

#botDialog #dangerZone p {
  margin: 0;
  color:
    rgba(210, 178, 181, 0.66);
  font-size: 0.72rem;
  line-height: 1.45;
}

#botDialog #stopBotButton {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border:
    1px solid
    rgba(246, 100, 120, 0.28);
  border-radius: 10px;
  background:
    rgba(102, 31, 42, 0.3);
  color: #f6a4ae;
  font-size: 0.72rem;
  font-weight: 700;
}

#botDialog #stopBotButton:hover:not(:disabled) {
  border-color:
    rgba(246, 100, 120, 0.5);
  background:
    rgba(124, 39, 52, 0.42);
  color: #ffd0d5;
}

#botDialog #stopBotButton:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}


/* =========================================================
   Bot market / asset artwork
   ========================================================= */

#botDialog .aurora-bot-detail-market-symbols {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-width: 28px;
  height: 21px;
}

#botDialog .aurora-bot-detail-market-symbol-slot {
  position: relative;
  display: inline-flex;
  width: 19px;
  height: 19px;
  align-items: center;
  justify-content: center;
}

#botDialog .aurora-bot-detail-market-symbol-slot
+ .aurora-bot-detail-market-symbol-slot {
  margin-left: -6px;
}

#botDialog .aurora-bot-detail-market-symbol-slot
.aurora-symbol {
  width: 19px;
  height: 19px;
  border:
    1px solid
    rgba(109, 187, 159, 0.24);
  border-radius: 50%;
  background: #061a14;
  box-shadow:
    0 0 0 2px
    rgba(4, 25, 20, 0.98);
}

#botDialog .aurora-bot-detail-market-symbol-slot
.aurora-symbol-fallback {
  font-size: 0.48rem;
  font-weight: 800;
}

#botDialog #botDefinitionList dd
> .aurora-symbol {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
  #botDialog {
    width:
      min(
        980px,
        calc(100vw - 30px)
      );
  }

  #botDialog #botDetailMetrics {
    grid-template-columns:
      repeat(
        4,
        minmax(0, 1fr)
      );
  }

  #botDialog .detail-stat:nth-child(11) {
    grid-column:
      auto;
  }

  #botDialog .detail-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  #botDialog {
    width:
      calc(100vw - 18px);
    max-height:
      calc(100vh - 18px);
    border-radius: 17px;
  }

  #botDialog .dialog-header {
    padding:
      16px 16px 15px;
  }

  #botDialog .dialog-content {
    max-height:
      calc(100vh - 94px);
    padding: 15px;
  }

  #botDialog #botDetailMetrics {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  #botDialog .detail-stat {
    min-height: 84px;
  }

  #botDialog .detail-chart {
    padding: 14px;
  }

  #botDialog .detail-chart .chart-wrap {
    height: 230px;
  }

  #botDialog .detail-columns > section {
    padding: 14px;
  }
}

@media (max-width: 520px) {
  #botDialog .dialog-header {
    gap: 12px;
  }

  #botDialog #dialogTitle {
    font-size: 0.96rem;
  }

  #botDialog #dialogSubtitle {
    font-size: 0.68rem;
  }

  #botDialog #botDetailMetrics {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  #botDialog .detail-stat {
    min-height: 79px;
    padding: 11px;
  }

  #botDialog .detail-stat strong {
    font-size: 0.91rem;
  }

  #botDialog .detail-chart .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  #botDialog #botHistoryRange {
    width: 100%;
  }

  #botDialog #botDefinitionList {
    grid-template-columns: 1fr;
  }

  #botDialog #botDefinitionList dt {
    padding:
      9px 0 3px;
    border-bottom: 0;
  }

  #botDialog #botDefinitionList dd {
    justify-content: flex-start;
    padding:
      0 0 9px;
    text-align: left;
  }

  #botDialog #dangerZone {
    align-items: stretch;
    flex-direction: column;
  }

  #botDialog #stopBotButton {
    width: 100%;
  }
}



/* =========================================================
   M4.11D Gate-style cumulative return
   ========================================================= */

#botDialog .cumulative-return-chart {
  margin-top: 0;
}

#botDialog .cumulative-return-empty {
  display: flex;
  min-height: 116px;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border:
    1px dashed
    rgba(96, 173, 147, 0.2);
  border-radius: 12px;
  background:
    rgba(3, 22, 18, 0.52);
  color:
    rgba(180, 211, 198, 0.67);
  font-size: 0.76rem;
  line-height: 1.55;
  text-align: center;
}

/* M4.11D-R3 async cumulative-return loading */

#botDialog .cumulative-return-empty.loading {
  gap: 10px;
}

#botDialog .cumulative-return-empty.loading::before {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border:
    2px solid
    rgba(122, 255, 207, 0.18);
  border-top-color:
    var(--accent);
  border-radius: 50%;
  content: "";
  animation:
    aurora-cumulative-return-spin
    0.8s linear infinite;
}

@keyframes aurora-cumulative-return-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   M4.21C — Native bot Open Orders / Trades
   ========================================================= */

#botDialog .bot-native-activity {
  position: relative;
  margin: 0 0 17px;
  padding: 17px;
  overflow: hidden;
  border:
    1px solid
    rgba(91, 170, 144, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(
      145deg,
      rgba(5, 27, 22, 0.82),
      rgba(2, 18, 15, 0.9)
    );
}

#botDialog .bot-native-activity::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(82, 242, 190, 0.3),
      transparent
    );
}

#botDialog .bot-native-activity-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 13px;
}

#botDialog .bot-native-activity-header h3 {
  margin: 0;
  color: #dff3eb;
  font-size: 0.82rem;
  font-weight: 730;
}

#botDialog .bot-native-activity-header p {
  margin: 5px 0 0;
  color:
    rgba(166, 199, 186, 0.56);
  font-size: 0.71rem;
  line-height: 1.4;
}

#botDialog .bot-native-activity-header p.error {
  color: #ff8c9a;
}

#botDialog .bot-native-summary {
  display: grid;
  grid-template-columns:
    repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 13px;
}

#botDialog .bot-native-summary > div {
  min-width: 0;
  padding: 10px 11px;
  border:
    1px solid
    rgba(92, 170, 144, 0.14);
  border-radius: 11px;
  background:
    rgba(4, 29, 23, 0.68);
}

#botDialog .bot-native-summary span {
  display: block;
  color:
    rgba(171, 204, 191, 0.56);
  font-size: 0.64rem;
  font-weight: 650;
}

#botDialog .bot-native-summary strong {
  display: block;
  margin-top: 6px;
  color: #e8f8f2;
  font-size: 0.96rem;
  font-weight: 750;
  font-variant-numeric:
    tabular-nums;
}

#botDialog .bot-native-activity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
}

#botDialog .bot-native-activity-section {
  min-width: 0;
  overflow: hidden;
  border:
    1px solid
    rgba(91, 169, 143, 0.13);
  border-radius: 12px;
  background:
    rgba(0, 15, 12, 0.34);
}

#botDialog .bot-native-section-head {
  padding: 10px 12px;
  border-bottom:
    1px solid
    rgba(91, 150, 131, 0.1);
}

#botDialog .bot-native-section-head strong {
  display: block;
  color: #dcefe8;
  font-size: 0.75rem;
  font-weight: 710;
}

#botDialog .bot-native-section-head small {
  display: block;
  margin-top: 3px;
  color:
    rgba(165, 197, 185, 0.54);
  font-size: 0.65rem;
}

#botDialog .bot-native-table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color:
    rgba(82, 242, 190, 0.18)
    transparent;
}

#botDialog .bot-native-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

#botDialog .bot-native-table th {
  padding: 9px 11px;
  border-bottom:
    1px solid
    rgba(91, 150, 131, 0.1);
  background:
    rgba(3, 24, 19, 0.72);
  color:
    rgba(161, 194, 181, 0.52);
  font-size: 0.61rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

#botDialog .bot-native-table td {
  padding: 9px 11px;
  border-bottom:
    1px solid
    rgba(91, 150, 131, 0.075);
  color:
    rgba(222, 240, 233, 0.84);
  font-size: 0.69rem;
  font-variant-numeric:
    tabular-nums;
}

#botDialog .bot-native-table tbody tr:last-child td {
  border-bottom: 0;
}

#botDialog .bot-native-table tbody tr:hover td {
  background:
    rgba(82, 242, 190, 0.025);
}

#botDialog .bot-native-table td.mono {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
  font-size: 0.64rem;
}

#botDialog .bot-native-table td.positive {
  color: #58efb6;
}

#botDialog .bot-native-side {
  display: inline-flex;
  min-width: 44px;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 720;
}

#botDialog .bot-native-side.buy {
  border:
    1px solid
    rgba(82, 242, 190, 0.22);
  background:
    rgba(82, 242, 190, 0.07);
  color: #63edba;
}

#botDialog .bot-native-side.sell {
  border:
    1px solid
    rgba(255, 120, 139, 0.22);
  background:
    rgba(255, 120, 139, 0.06);
  color: #ff94a2;
}

#botDialog .bot-native-empty {
  padding: 22px 12px !important;
  color:
    rgba(165, 197, 185, 0.5) !important;
  text-align: center !important;
}

@media (max-width: 820px) {
  #botDialog .bot-native-summary {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #botDialog .bot-native-activity-header {
    flex-direction: column;
  }

  #botDialog .bot-native-summary {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

/* M4.47B2C8A30 — Aurora Bot Detail neutral presentation palette
 *
 * Presentation only.
 *
 * Explicitly excluded:
 * - positive / negative metric semantics
 * - cumulative-return series semantics
 * - native activity positive/error semantics
 * - buy / sell semantics
 * - Stop Bot danger zone / danger button
 */

html[data-dashboard-ui="aurora"]
#botDialog {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.24
    );

  background:
    linear-gradient(
      145deg,
      var(--aurora-palette-surface-2),
      var(--aurora-palette-bg)
    );

  color:
    rgba(
      var(--aurora-bright-rgb),
      0.90
    );

  box-shadow:
    0 34px 90px
      rgba(0, 0, 0, 0.55),
    0 0 0 1px
      rgba(
        var(--aurora-accent-rgb),
        0.025
      ),
    inset 0 1px
      rgba(255, 255, 255, 0.03);
}

html[data-dashboard-ui="aurora"]
#botDialog::backdrop {
  background:
    radial-gradient(
      circle at 50% 22%,
      rgba(
        var(--aurora-accent-rgb),
        0.12
      ),
      transparent 42%
    ),
    rgba(0, 0, 0, 0.82);
}

html[data-dashboard-ui="aurora"]
#botDialog
.dialog-header {
  border-bottom-color:
    rgba(
      var(--aurora-border-rgb),
      0.17
    );

  background:
    linear-gradient(
      180deg,
      var(--aurora-palette-surface-3),
      var(--aurora-palette-surface)
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.dialog-header::before {
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(
        var(--aurora-accent-rgb),
        0.60
      ),
      rgba(
        var(--aurora-border-rgb),
        0.26
      ),
      transparent
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
#dialogTitle {
  color:
    var(--aurora-bright);
}

html[data-dashboard-ui="aurora"]
#botDialog
#dialogSubtitle {
  color:
    rgba(
      var(--aurora-border-rgb),
      0.62
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
#closeDialog {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.25
    );

  background:
    var(--aurora-palette-muted);

  color:
    rgba(
      var(--aurora-bright-rgb),
      0.86
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
#closeDialog:hover {
  border-color:
    rgba(
      var(--aurora-accent-rgb),
      0.47
    );

  background:
    var(--aurora-palette-hover);
}

html[data-dashboard-ui="aurora"]
#botDialog
.dialog-content {
  background:
    radial-gradient(
      circle at 13% 0%,
      rgba(
        var(--aurora-accent-rgb),
        0.07
      ),
      transparent 36%
    ),
    radial-gradient(
      circle at 89% 5%,
      rgba(
        var(--aurora-border-rgb),
        0.035
      ),
      transparent 31%
    );

  scrollbar-color:
    rgba(
      var(--aurora-accent-rgb),
      0.20
    )
    transparent;
}

html[data-dashboard-ui="aurora"]
#botDialog
.dialog-content::-webkit-scrollbar-thumb {
  background:
    rgba(
      var(--aurora-accent-rgb),
      0.16
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.detail-stat {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.16
    );

  background:
    linear-gradient(
      145deg,
      var(--aurora-palette-surface-2),
      var(--aurora-palette-surface)
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.detail-stat::after {
  background:
    rgba(
      var(--aurora-accent-rgb),
      0.025
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.detail-stat:nth-child(3),
html[data-dashboard-ui="aurora"]
#botDialog
.detail-stat:nth-child(6),
html[data-dashboard-ui="aurora"]
#botDialog
.detail-stat:nth-child(7) {
  border-color:
    rgba(
      var(--aurora-accent-rgb),
      0.23
    );

  background:
    linear-gradient(
      145deg,
      var(--aurora-palette-surface-3),
      var(--aurora-palette-surface-2)
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.detail-stat span,
html[data-dashboard-ui="aurora"]
#botDialog
.detail-stat small {
  color:
    rgba(
      var(--aurora-border-rgb),
      0.56
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.detail-stat strong {
  color:
    rgba(
      var(--aurora-bright-rgb),
      0.92
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.detail-chart,
html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-activity {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.16
    );

  background:
    linear-gradient(
      145deg,
      var(--aurora-palette-surface-2),
      var(--aurora-palette-surface)
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.detail-chart::before,
html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-activity::before {
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(
        var(--aurora-accent-rgb),
        0.30
      ),
      transparent
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.detail-chart h3,
html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-activity-header h3 {
  color:
    rgba(
      var(--aurora-bright-rgb),
      0.88
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
#drawdownSummary,
html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-activity-header p {
  color:
    rgba(
      var(--aurora-border-rgb),
      0.56
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
#botHistoryRange {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.18
    );

  background:
    var(--aurora-palette-muted);

  color:
    rgba(
      var(--aurora-bright-rgb),
      0.84
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
#botHistoryRange:focus {
  border-color:
    rgba(
      var(--aurora-accent-rgb),
      0.50
    );

  box-shadow:
    0 0 0 3px
      rgba(
        var(--aurora-accent-rgb),
        0.07
      );
}

html[data-dashboard-ui="aurora"]
#botDialog
.detail-chart
.chart-wrap {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.09
    );

  background:
    linear-gradient(
      rgba(
        var(--aurora-accent-rgb),
        0.025
      )
      1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(
        var(--aurora-accent-rgb),
        0.025
      )
      1px,
      transparent 1px
    ),
    var(--aurora-palette-bg);
}

html[data-dashboard-ui="aurora"]
#botDialog
.detail-columns > section {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.15
    );

  background:
    linear-gradient(
      145deg,
      var(--aurora-palette-surface-2),
      var(--aurora-palette-surface)
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.detail-columns > section > h3 {
  color:
    rgba(
      var(--aurora-bright-rgb),
      0.88
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
#botDefinitionList dt,
html[data-dashboard-ui="aurora"]
#botDialog
#botDefinitionList dd {
  border-bottom-color:
    rgba(
      var(--aurora-border-rgb),
      0.10
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
#botDefinitionList dt {
  color:
    rgba(
      var(--aurora-border-rgb),
      0.56
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
#botDefinitionList dd {
  color:
    rgba(
      var(--aurora-bright-rgb),
      0.90
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.admin-only-label {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.18
    );

  background:
    var(--aurora-palette-muted);

  color:
    rgba(
      var(--aurora-border-rgb),
      0.62
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.raw-tabs {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.13
    );

  background:
    var(--aurora-palette-muted);
}

html[data-dashboard-ui="aurora"]
#botDialog
.raw-tab {
  color:
    rgba(
      var(--aurora-border-rgb),
      0.56
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.raw-tab:hover {
  background:
    rgba(
      var(--aurora-accent-rgb),
      0.05
    );

  color:
    rgba(
      var(--aurora-bright-rgb),
      0.80
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.raw-tab.active {
  background:
    var(--aurora-palette-hover);

  color:
    var(--aurora-bright);

  box-shadow:
    inset 0 0 0 1px
      rgba(
        var(--aurora-accent-rgb),
        0.15
      );
}

html[data-dashboard-ui="aurora"]
#botDialog
#botRaw {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.13
    );

  background:
    linear-gradient(
      145deg,
      var(--aurora-palette-bg),
      var(--aurora-palette-surface)
    );

  color:
    rgba(
      var(--aurora-border-rgb),
      0.78
    );

  scrollbar-color:
    rgba(
      var(--aurora-accent-rgb),
      0.18
    )
    transparent;
}

html[data-dashboard-ui="aurora"]
#botDialog
.aurora-bot-detail-market-symbol-slot
.aurora-symbol {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.24
    );

  background:
    var(--aurora-palette-bg);

  box-shadow:
    0 0 0 2px
      var(--aurora-palette-surface);
}

html[data-dashboard-ui="aurora"]
#botDialog
.cumulative-return-empty {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.20
    );

  background:
    var(--aurora-palette-muted);

  color:
    rgba(
      var(--aurora-border-rgb),
      0.67
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.cumulative-return-empty.loading::before {
  border-color:
    rgba(
      var(--aurora-accent-rgb),
      0.18
    );

  border-top-color:
    var(--aurora-bright);
}

html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-summary > div {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.14
    );

  background:
    var(--aurora-palette-muted);
}

html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-summary span {
  color:
    rgba(
      var(--aurora-border-rgb),
      0.56
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-summary strong {
  color:
    rgba(
      var(--aurora-bright-rgb),
      0.92
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-activity-section {
  border-color:
    rgba(
      var(--aurora-border-rgb),
      0.13
    );

  background:
    var(--aurora-palette-muted);
}

html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-section-head {
  border-bottom-color:
    rgba(
      var(--aurora-border-rgb),
      0.10
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-section-head strong {
  color:
    rgba(
      var(--aurora-bright-rgb),
      0.86
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-section-head small {
  color:
    rgba(
      var(--aurora-border-rgb),
      0.54
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-table-wrap {
  scrollbar-color:
    rgba(
      var(--aurora-accent-rgb),
      0.18
    )
    transparent;
}

html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-table th {
  border-bottom-color:
    rgba(
      var(--aurora-border-rgb),
      0.10
    );

  background:
    var(--aurora-palette-surface);

  color:
    rgba(
      var(--aurora-border-rgb),
      0.52
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-table td {
  border-bottom-color:
    rgba(
      var(--aurora-border-rgb),
      0.075
    );

  color:
    rgba(
      var(--aurora-bright-rgb),
      0.84
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-table
tbody tr:hover td {
  background:
    rgba(
      var(--aurora-accent-rgb),
      0.025
    );
}

html[data-dashboard-ui="aurora"]
#botDialog
.bot-native-empty {
  color:
    rgba(
      var(--aurora-border-rgb),
      0.50
    ) !important;
}

/* End M4.47B2C8A30 */
