/* --------------------------------------------------------- quant project web */
.qt-body {
  height: 100vh;
  overflow: hidden;
  margin: 0;
  background: #e8ebef;
  color: #20242a;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  font-size: 13px;
}

.qt-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.qt-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-bottom: 1px solid #b8c0c8;
  background: #f2f4f6;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.qt-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 190px;
}

.qt-logo {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #d30612;
  color: #fff;
  font-weight: 800;
  font-family: Consolas, monospace;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.qt-brand strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.qt-brand span {
  display: block;
  color: #6a747e;
  font-family: Consolas, monospace;
  font-size: 10px;
}

.qt-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.qt-tool,
.qt-toolbar-right button,
.qt-help-btn,
.qt-mini-btn,
.qt-btn,
.qt-sell-presets button {
  height: 29px;
  padding: 0 10px;
  border: 1px solid #afb8c1;
  border-radius: 4px;
  background: #fbfcfd;
  color: #26303a;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.qt-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-color: #b7c5d3;
  background: #f4f8fc;
  color: #235a8d;
}

.qt-help-btn:hover {
  border-color: #4f7fae;
  background: #eaf4ff;
  color: #124a88;
}

.qt-tool:hover,
.qt-toolbar-right button:hover,
.qt-mini-btn:hover,
.qt-btn:hover,
.qt-sell-presets button:hover {
  border-color: #7d8b99;
  background: #fff;
}

.qt-tool.active {
  border-color: #2b6cb0;
  background: #dcecff;
  color: #124a88;
  font-weight: 600;
}

.qt-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.qt-code-form {
  display: flex;
  align-items: center;
  gap: 3px;
}

.qt-code-form input {
  width: 102px;
  height: 29px;
  border: 1px solid #aeb8c2;
  border-radius: 4px;
  padding: 0 7px;
  background: #fff;
  color: #1e252c;
  font-family: Consolas, monospace;
  font-size: 12.5px;
  outline: none;
}

.qt-code-form input:focus {
  border-color: #2b6cb0;
  box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.15);
}

.qt-pause-btn {
  border-color: #a9b7a9 !important;
  background: #eef8ee !important;
  color: #156b2b !important;
  font-weight: 600;
}

.qt-pause-btn.running {
  border-color: #d2a7a7 !important;
  background: #fff1f1 !important;
  color: #a10808 !important;
}

.qt-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4f5e6c;
  font-size: 10px;
  white-space: nowrap;
}

.qt-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #21a84b;
  box-shadow: 0 0 0 2px rgba(33, 168, 75, 0.12);
}

.qt-status.closed {
  color: #8a5a12;
}

.qt-status.closed i {
  background: #d08a1a;
  box-shadow: 0 0 0 2px rgba(208, 138, 26, 0.14);
}

.qt-back {
  color: #526b83;
  font-size: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.qt-back:hover {
  color: #d30612;
}

.qt-account {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: #c5ccd3;
  border-bottom: 1px solid #b8c0c8;
}

.qt-account > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  background: #f7f9fa;
  min-width: 0;
}

.qt-account span {
  color: #707b86;
  font-size: 11.5px;
  white-space: nowrap;
}

.qt-account strong {
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}

.up {
  color: #d30612 !important;
}

.down {
  color: #0a8f4f !important;
}

.qt-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  gap: 6px;
  padding: 6px;
}

.qt-left {
  flex: 0 0 760px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid #b7c0c8;
  background: #fff;
}

.qt-list-head,
.qt-panel-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  padding: 4px 8px;
  border-bottom: 1px solid #d4dae0;
  background: #eef2f5;
}

.qt-list-head strong,
.qt-panel-head strong {
  font-size: 13.5px;
}

.qt-list-head span,
.qt-panel-head span,
.qt-panel-note {
  color: #6c7782;
  font-size: 11.5px;
}

.qt-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.qt-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 12.5px;
  white-space: nowrap;
}

.qt-watch-table {
  min-width: 760px;
}

.qt-holdings-table {
  min-width: 1180px;
}

.qt-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 6px;
  border-right: 1px solid #d9dee4;
  border-bottom: 1px solid #bfc7cf;
  background: #f2f5f7;
  color: #45515c;
  font-size: 11.5px;
  font-weight: 600;
  text-align: right;
}

.qt-table td {
  padding: 6px 6px;
  border-right: 1px solid #edf0f3;
  border-bottom: 1px solid #e6eaee;
  color: #303941;
  text-align: right;
  font-family: Consolas, "Cascadia Code", monospace;
}

.qt-table th:nth-child(1),
.qt-table th:nth-child(2),
.qt-table td:nth-child(1),
.qt-table td:nth-child(2) {
  text-align: left;
}

.qt-table tbody tr {
  cursor: pointer;
}

.qt-table tbody tr:hover {
  background: #f2f8ff;
}

.qt-table tbody tr.selected {
  background: #dcecff;
}

.qt-watch-table th:last-child,
.qt-watch-table td:last-child,
.qt-holdings-table th:last-child,
.qt-holdings-table td:last-child {
  text-align: center;
}

.qt-watch-table td {
  height: 31px;
}

.qt-stock-name {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: #1f2a33;
}

.qt-strategy-cell {
  color: #124a88;
  text-decoration: underline;
  cursor: pointer;
}

.qt-strategy-cell.empty {
  color: #9aa5ae;
  text-decoration: none;
}

.qt-row-btn {
  height: 23px;
  padding: 0 6px;
  border: 1px solid #b8c2cb;
  border-radius: 3px;
  background: #fff;
  color: #4b5965;
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
}

.qt-row-btn:hover {
  border-color: #2b6cb0;
  color: #124a88;
}

.qt-list-hint {
  flex: 0 0 auto;
  margin: 0;
  padding: 5px 8px;
  border-top: 1px solid #e1e6ea;
  color: #7b858f;
  font-size: 10.5px;
  background: #f8fafb;
}

.qt-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qt-kline-panel,
.qt-holdings-panel {
  min-height: 0;
  border: 1px solid #b7c0c8;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.qt-kline-panel {
  flex: 1 1 68%;
}

.qt-holdings-panel {
  flex: 0 0 30%;
  min-height: 135px;
}

.qt-kline-panel.hidden,
.qt-holdings-panel.hidden,
.qt-left.hidden {
  display: none;
}

.qt-main.kline-off .qt-holdings-panel {
  flex: 1 1 auto;
}

.qt-main.holdings-off .qt-kline-panel {
  flex: 1 1 auto;
}

.qt-chart-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 9px;
  border-bottom: 1px solid #cfd6dd;
  background: #f7f9fa;
}

.qt-chart-title {
  min-width: 0;
}

.qt-chart-title h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.qt-chart-title span {
  color: #6e7984;
  font-family: Consolas, monospace;
  font-size: 10.5px;
}

.qt-chart-quote {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin-left: auto;
}

.qt-chart-quote strong {
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 20px;
  font-weight: 600;
}

.qt-chart-quote > span {
  font-family: Consolas, monospace;
  font-size: 12px;
}

.qt-chart-quote small {
  color: #68737e;
  font-size: 11px;
}

.qt-chart-quote b {
  font-family: Consolas, monospace;
  font-weight: 500;
}

.qt-chart-actions {
  display: flex;
  gap: 4px;
}

.qt-mini-btn.sell {
  border-color: #d5acac;
  background: #fff4f4;
  color: #a21111;
}

.qt-mini-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.qt-chart-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 240px;
  margin: 0;
  background: #050607;
}

.qt-chart-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.qt-chart-tip {
  position: absolute;
  z-index: 3;
  min-width: 138px;
  padding: 6px 8px;
  border: 1px solid #44515c;
  border-radius: 3px;
  background: rgba(18, 22, 26, 0.94);
  color: #dbe5ee;
  font-family: Consolas, monospace;
  font-size: 9.5px;
  line-height: 1.65;
  pointer-events: none;
}

.qt-chart-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 8px;
  border-top: 1px solid #252d34;
  background: #171b1f;
  color: #84919d;
  font-family: Consolas, monospace;
  font-size: 9px;
}

.qt-chart-foot span:nth-child(2) {
  color: #e3b765;
}

.qt-chart-foot span:last-child {
  margin-left: auto;
}

.qt-holdings-panel .qt-panel-head {
  background: #f2f5f7;
}

.qt-holdings-panel .qt-table-scroll {
  flex: 1 1 auto;
}

.qt-holdings-table td {
  height: 29px;
}

.qt-empty {
  padding: 18px;
  color: #929ca5;
  font-size: 10.5px;
  text-align: center;
}

.qt-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 60;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 30px));
  padding: 7px 13px;
  border: 1px solid #9eaebc;
  border-radius: 4px;
  background: rgba(29, 37, 45, 0.94);
  color: #f0f5f9;
  font-size: 11px;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.55);
}

.qt-toast.ok {
  border-color: #77b98d;
  color: #d8ffe4;
}

.qt-toast.error {
  border-color: #d79c9c;
  color: #ffe1e1;
}

/* modals */
.qt-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(26, 32, 38, 0.42);
}

.qt-modal[hidden] {
  display: none;
}

.qt-dialog {
  width: min(560px, calc(100vw - 30px));
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border: 1px solid #98a3ad;
  border-radius: 5px;
  background: #f7f9fa;
  box-shadow: 0 20px 70px -24px rgba(0, 0, 0, 0.65);
}

.qt-dialog-wide {
  width: min(940px, calc(100vw - 30px));
}

.qt-dialog-sm {
  width: min(420px, calc(100vw - 30px));
}

.qt-dialog-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-bottom: 1px solid #c3cbd3;
  background: #e8edf1;
}

.qt-dialog-head strong {
  font-size: 12.5px;
}

.qt-dialog-head button {
  width: 24px;
  height: 22px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #5d6873;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.qt-dialog-head button:hover {
  border-color: #b5bfc8;
  background: #fff;
}

.qt-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.qt-dialog-hint {
  margin: 0;
  padding: 7px 12px;
  border-top: 1px solid #dce2e7;
  color: #78838d;
  font-size: 10px;
  background: #f2f5f7;
}

.qt-dialog-foot {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 8px 12px;
  border-top: 1px solid #c9d1d8;
  background: #eef2f5;
}

.qt-btn {
  height: 28px;
  padding: 0 14px;
}

.qt-btn.primary,
.qt-sell-presets .primary {
  border-color: #2b6cb0;
  background: #2b6cb0;
  color: #fff;
}

.qt-btn.primary:hover,
.qt-sell-presets .primary:hover {
  background: #245e9b;
}

.qt-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 12px;
}

.qt-form-grid label,
.qt-two label,
.qt-settings-grid label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #5d6974;
  font-size: 10px;
}

.qt-form-grid input,
.qt-form-grid select,
.qt-two input,
.qt-settings-grid input,
.qt-martingale-form input {
  height: 27px;
  border: 1px solid #b4bec7;
  border-radius: 3px;
  background: #fff;
  color: #202830;
  padding: 0 7px;
  font-family: Consolas, monospace;
  font-size: 11px;
  outline: none;
}

.qt-form-grid input:focus,
.qt-form-grid select:focus,
.qt-settings-grid input:focus {
  border-color: #2b6cb0;
  box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.13);
}

.qt-col-span {
  grid-column: span 2;
}

.qt-sell-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
}

.qt-sell-line b {
  font-size: 13px;
}

.qt-sell-line span {
  color: #65717c;
  font-family: Consolas, monospace;
  font-size: 10.5px;
}

.qt-sell-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}

.qt-sell-presets button {
  height: 27px;
  flex: 1 1 auto;
}

.qt-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.qt-settings-grid fieldset {
  min-width: 0;
  margin: 0;
  padding: 8px 10px 10px;
  border: 1px solid #c6ced6;
  border-radius: 4px;
  background: #fff;
}

.qt-settings-grid legend {
  padding: 0 4px;
  color: #4f5c67;
  font-size: 10px;
  font-weight: 600;
}

.qt-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 7px;
}

.qt-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  padding-top: 5px;
}

.qt-checks label {
  flex-direction: row;
  align-items: center;
  gap: 4px;
  color: #49555f;
  font-size: 10.5px;
}

.qt-checks input {
  accent-color: #2b6cb0;
}

.qt-records-scroll {
  max-height: min(64vh, 520px);
  padding: 0 12px 4px;
}

.qt-martingale-form {
  grid-template-columns: 1fr 1fr;
  max-width: 440px;
  margin-bottom: 10px;
}

.qt-martingale-scroll {
  max-height: min(54vh, 430px);
  border: 1px solid #c6ced6;
}

.qt-martingale-scroll .qt-table th,
.qt-martingale-scroll .qt-table td {
  text-align: right;
}

.qt-martingale-scroll .qt-table th:first-child,
.qt-martingale-scroll .qt-table td:first-child {
  text-align: center;
}

@media (max-width: 1280px) {
  .qt-left {
    flex-basis: 500px;
  }

  .qt-brand {
    min-width: 160px;
  }

  .qt-toolbar {
    gap: 6px;
  }
}

@media (max-width: 1050px) {
  .qt-left {
    flex-basis: 390px;
  }

  .qt-account {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .qt-toolbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .qt-status,
  .qt-back {
    display: none;
  }
}

@media (max-width: 820px) {
  .qt-body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  .qt-app {
    height: auto;
    min-height: 100vh;
  }

  .qt-toolbar {
    flex-wrap: wrap;
  }

  .qt-tools {
    order: 3;
    width: 100%;
  }

  .qt-toolbar-right {
    margin-left: auto;
  }

  .qt-layout {
    display: block;
  }

  .qt-left {
    width: 100%;
    max-height: 320px;
    margin-bottom: 6px;
  }

  .qt-main {
    min-height: 640px;
  }

  .qt-kline-panel {
    min-height: 430px;
  }

  .qt-holdings-panel {
    min-height: 220px;
  }

  .qt-settings-grid,
  .qt-form-grid {
    grid-template-columns: 1fr;
  }

  .qt-col-span {
    grid-column: auto;
  }

  .qt-chart-quote small {
    display: none;
  }
}

@media (max-width: 520px) {
  .qt-brand strong {
    font-size: 11.5px;
  }

  .qt-toolbar-right {
    width: 100%;
  }

  .qt-code-form {
    flex: 1 1 auto;
  }

  .qt-code-form input {
    flex: 1 1 auto;
    width: auto;
  }

  .qt-tool {
    padding: 0 7px;
  }

  .qt-chart-head {
    flex-wrap: wrap;
  }

  .qt-chart-quote {
    margin-left: 0;
  }

  .qt-chart-actions {
    width: 100%;
  }

  .qt-chart-actions button {
    flex: 1 1 0;
  }
}

.qt-user {
  padding: 4px 8px;
  border: 1px solid #b8c6d2;
  border-radius: 999px;
  background: #f4f8fc;
  color: #235a8d;
  font-size: 10.5px;
  white-space: nowrap;
}

.qt-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(30, 40, 50, 0.42);
}

.qt-auth-gate[hidden] {
  display: none;
}

.qt-auth-card {
  width: min(430px, calc(100vw - 32px));
  padding: 20px 22px;
  border: 1px solid #9aa8b5;
  border-radius: 7px;
  background: #f7f9fa;
  box-shadow: 0 24px 80px -30px rgba(0, 0, 0, 0.65);
}

.qt-auth-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.qt-auth-head strong {
  display: block;
  font-size: 14px;
}

.qt-auth-head span {
  display: block;
  color: #6c7884;
  font-size: 10.5px;
}

.qt-auth-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid #c3ccd5;
  border-radius: 4px;
  background: #e9eef2;
}

.qt-auth-tabs button {
  flex: 1 1 0;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #5c6975;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.qt-auth-tabs button.active {
  border-color: #b6c6d5;
  background: #fff;
  color: #174f82;
  font-weight: 600;
}

.qt-auth-error {
  margin-top: 9px;
  padding: 6px 8px;
  border: 1px solid #e0b4b4;
  border-radius: 3px;
  background: #fff4f4;
  color: #a11d1d;
  font-size: 10.5px;
}

.qt-auth-form[hidden] {
  display: none;
}

.qt-auth-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 12px;
}

.qt-auth-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #5c6874;
  font-size: 10.5px;
}

.qt-auth-form input {
  height: 31px;
  border: 1px solid #adb9c4;
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
  color: #202830;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.qt-auth-form input:focus {
  border-color: #2b6cb0;
  box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.13);
}

.qt-auth-form .qt-btn {
  margin-top: 2px;
  height: 31px;
}

.qt-auth-note {
  margin: 12px 0 0;
  color: #7a858f;
  font-size: 9.5px;
  line-height: 1.7;
}