.qai-dash {
  --qai-bg: #141414;
  --qai-panel: #1f1f1f;
  --qai-panel-soft: #2a2a2a;
  --qai-red: #bb1919;
  --qai-red-hover: #d32a2a;
  --qai-gold: #c9a227;
  --qai-text: #ffffff;
  --qai-muted: rgba(255, 255, 255, 0.72);
  --qai-line: rgba(255, 255, 255, 0.1);
  --qai-green: #7dce82;
  --qai-rose: #ff8a8a;
  box-sizing: border-box;
  width: 100%;
  margin: 28px 0 8px;
  padding: 0;
  overflow: hidden;
  color: var(--qai-text);
  background: var(--qai-bg);
  border: 1px solid #2b2b2b;
  border-radius: 4px;
  font-family: "BBC Reith Sans", ReithSans, Helvetica, Arial, sans-serif;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.qai-dash *,
.qai-dash *::before,
.qai-dash *::after {
  box-sizing: border-box;
}

.qai-dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 20px 18px;
  background:
    linear-gradient(180deg, rgba(187, 25, 25, 0.16) 0%, transparent 100%),
    var(--qai-bg);
  border-bottom: 1px solid var(--qai-line);
}

.qai-dash-title {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.qai-dash-subtitle {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--qai-muted);
}

.qai-dash-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f3c1c1;
}

.qai-dash-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e62727;
  box-shadow: 0 0 0 0 rgba(230, 39, 39, 0.7);
  animation: qaiPulse 1.6s ease-out infinite;
}

@keyframes qaiPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(230, 39, 39, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(230, 39, 39, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(230, 39, 39, 0);
  }
}

.qai-invest-wrap {
  flex-shrink: 0;
  text-align: right;
}

.qai-invest-wrap a {
  color: inherit;
  text-decoration: none;
}

.qai-invest-btn {
  display: inline-block;
  padding: 11px 18px;
  border: 0;
  border-radius: 2px;
  background: var(--qai-red);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  appearance: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

.qai-invest-btn:hover {
  background: var(--qai-red-hover);
}

.qai-invest-min {
  margin-top: 7px;
  font-size: 0.72rem;
  color: var(--qai-muted);
}

.qai-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 20px 6px;
}

.qai-stats-text {
  grid-column: 1 / -1;
  padding: 14px 15px;
  background: var(--qai-panel);
  border: 1px solid var(--qai-line);
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.qai-stats-text strong {
  color: #fff;
  font-weight: 700;
}

.qai-stat-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 92px;
  padding: 12px 10px;
  text-align: center;
  background: var(--qai-panel-soft);
  border-top: 3px solid var(--qai-red);
}

.qai-stat-box .val {
  display: block;
  color: #fff;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.15;
}

.qai-stat-box .lbl {
  display: block;
  margin-top: 6px;
  color: #bdbdbd;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
}

.qai-activation {
  margin: 12px 20px 4px;
  padding: 14px 16px 12px;
  background: var(--qai-panel);
  border: 1px solid var(--qai-line);
}

.qai-act-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.qai-act-top > span:last-child {
  white-space: nowrap;
}

.qai-act-title {
  font-size: 0.95rem;
  font-weight: 800;
}

.qai-act-status {
  color: var(--qai-green);
  font-weight: 700;
}

.qai-act-timer {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.qai-act-note {
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--qai-muted);
}

.qai-progress {
  width: 100%;
  height: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.qai-progress-bar {
  height: 100%;
  width: 2%;
  background: linear-gradient(90deg, var(--qai-red) 0%, var(--qai-gold) 100%);
  transition: width 1s linear;
}

.qai-capital-title {
  margin: 18px 20px 8px;
  font-size: 0.95rem;
  font-weight: 800;
}

#qaiCapital {
  max-height: 320px;
  margin: 0 20px;
  overflow-y: auto;
  border-top: 1px solid var(--qai-line);
}

#qaiCapital::-webkit-scrollbar {
  width: 6px;
}

#qaiCapital::-webkit-scrollbar-thumb {
  background: #4a4a4a;
}

.qai-capital-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--qai-line);
  font-size: 0.84rem;
  line-height: 1.4;
}

.qai-capital-row:last-child {
  border-bottom: none;
}

.qai-dep {
  color: var(--qai-green);
  font-weight: 700;
}

.qai-wit {
  color: var(--qai-rose);
  font-weight: 700;
}

.qai-amount {
  flex-shrink: 0;
  font-weight: 700;
  color: #f3f3f3;
  font-variant-numeric: tabular-nums;
}

.qai-footer {
  margin-top: 16px;
  padding: 14px 20px 16px;
  border-top: 1px solid var(--qai-line);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.68rem;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 767px) {
  .qai-dash {
    margin-left: -2px;
    margin-right: -2px;
    border-radius: 6px;
  }

  .qai-dash-header {
    flex-direction: column;
    padding: 16px;
    gap: 12px;
  }

  .qai-dash-title {
    font-size: 1.35rem;
  }

  .qai-invest-wrap {
    width: 100%;
    text-align: left;
  }

  .qai-invest-btn {
    width: 100%;
    text-align: center;
    padding: 13px 16px;
  }

  .qai-stats-row {
    padding: 14px 16px 4px;
    gap: 8px;
  }

  .qai-activation,
  .qai-capital-title,
  #qaiCapital {
    margin-left: 16px;
    margin-right: 16px;
  }

  .qai-stat-box .val {
    font-size: 1.08rem;
  }

  .qai-act-top {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }

  .qai-act-top > span:last-child {
    white-space: normal;
    font-size: 0.82rem;
  }

  .qai-capital-row {
    flex-wrap: wrap;
    gap: 4px 12px;
  }

  .qai-capital-row > span:first-child {
    flex: 1 1 100%;
    min-width: 0;
  }

  .qai-footer {
    padding-left: 16px;
    padding-right: 16px;
    font-size: 0.62rem;
  }
}

@media (max-width: 400px) {
  .qai-stats-row {
    grid-template-columns: 1fr;
  }

  .qai-stat-box {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: auto;
    padding: 10px 14px;
    text-align: left;
  }

  .qai-stat-box .lbl {
    margin-top: 0;
    text-align: right;
  }

  .qai-stat-box .val br {
    display: none;
  }
}

@media (min-width: 590px) and (max-width: 1024px) {
  .qai-dash-title {
    font-size: 1.5rem;
  }

  .qai-stats-row {
    gap: 12px;
  }

  .qai-stat-box {
    min-height: 84px;
  }
}


/* Keep original look inside the article column */
.main-content .qai-dash,
.main-content .qai-dash *:not(i) {
  font-family: Helvetica, Arial, sans-serif;
}

.main-content .qai-dash a.qai-invest-btn {
  color: #fff !important;
  text-decoration: none !important;
  text-transform: none;
  border: 0;
}

.main-content .qai-dash a.qai-invest-btn:hover {
  background: var(--qai-red-hover);
  color: #fff !important;
}
