.qbc-lj-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(6px);
}

.qbc-lj-dialog {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1020px;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
}

.qbc-lj-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(120deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
  color: #fff;
}

.qbc-lj-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.qbc-lj-subtitle {
  margin: 4px 0 0;
  color: rgba(226, 232, 240, 0.86);
  font-size: 12px;
  line-height: 1.5;
}

.qbc-lj-close {
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.qbc-lj-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.qbc-lj-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  padding: 10px 16px 0;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.qbc-lj-tab {
  padding: 8px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.qbc-lj-tab[data-active="1"] {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}

.qbc-lj-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 18px;
}

.qbc-lj-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.qbc-lj-ranges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.qbc-lj-range {
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
}

.qbc-lj-range[data-active="1"] {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
}

.qbc-lj-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.qbc-lj-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.qbc-lj-card-label {
  color: #64748b;
  font-size: 12px;
}

.qbc-lj-card-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.qbc-lj-card-hint {
  color: #94a3b8;
  font-size: 11px;
}

.qbc-lj-block {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.qbc-lj-block-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.qbc-lj-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding-top: 6px;
}

.qbc-lj-chart-col {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
}

.qbc-lj-chart-bar {
  width: 100%;
  max-width: 26px;
  border-radius: 4px 4px 0 0;
  background: #cbd5e1;
}

.qbc-lj-chart-bar[data-active="1"] {
  background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

.qbc-lj-chart-day {
  color: #94a3b8;
  font-size: 9px;
  white-space: nowrap;
}

.qbc-lj-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.qbc-lj-table th,
.qbc-lj-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
  vertical-align: middle;
}

.qbc-lj-table th {
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.qbc-lj-table td.is-num,
.qbc-lj-table th.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.qbc-lj-target {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
}

.qbc-lj-muted {
  color: #94a3b8;
}

.qbc-lj-empty {
  margin: 0;
  padding: 18px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}

.qbc-lj-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.6;
}

.qbc-lj-select {
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
}

.qbc-lj-footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.qbc-lj-status {
  color: #64748b;
  font-size: 12px;
}

.qbc-lj-status[data-tone="ok"] {
  color: #15803d;
}

.qbc-lj-status[data-tone="error"] {
  color: #b91c1c;
}

.qbc-lj-actions {
  display: flex;
  gap: 8px;
}

.qbc-lj-btn {
  padding: 7px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  cursor: pointer;
}

.qbc-lj-btn:hover {
  background: #f1f5f9;
}

.qbc-lj-btn.is-primary {
  align-self: flex-start;
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #fff;
}

.qbc-lj-btn.is-danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.qbc-lj-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

html[data-theme="dark"] .qbc-lj-dialog {
  border-color: #334155;
  background: #0f172a;
  color: #e2e8f0;
}

html[data-theme="dark"] .qbc-lj-tabs,
html[data-theme="dark"] .qbc-lj-footer {
  background: #111c33;
  border-color: #334155;
}

html[data-theme="dark"] .qbc-lj-tab {
  color: #94a3b8;
}

html[data-theme="dark"] .qbc-lj-tab[data-active="1"] {
  color: #93c5fd;
  border-bottom-color: #93c5fd;
}

html[data-theme="dark"] .qbc-lj-card,
html[data-theme="dark"] .qbc-lj-block {
  border-color: #334155;
  background: #111c33;
}

html[data-theme="dark"] .qbc-lj-card-label,
html[data-theme="dark"] .qbc-lj-block-title,
html[data-theme="dark"] .qbc-lj-status,
html[data-theme="dark"] .qbc-lj-muted {
  color: #94a3b8;
}

html[data-theme="dark"] .qbc-lj-range,
html[data-theme="dark"] .qbc-lj-btn,
html[data-theme="dark"] .qbc-lj-select {
  border-color: #334155;
  background: #1e293b;
  color: #e2e8f0;
}

html[data-theme="dark"] .qbc-lj-range[data-active="1"],
html[data-theme="dark"] .qbc-lj-btn.is-primary {
  border-color: #3b82f6;
  background: #1d4ed8;
  color: #fff;
}

html[data-theme="dark"] .qbc-lj-table th,
html[data-theme="dark"] .qbc-lj-table td {
  border-color: #1e293b;
  color: #cbd5e1;
}

html[data-theme="dark"] .qbc-lj-target {
  color: #e2e8f0;
}

html[data-theme="dark"] .qbc-lj-hint {
  background: #172554;
  color: #bfdbfe;
}

@media (max-width: 640px) {
  .qbc-lj-dialog {
    max-height: calc(100dvh - 12px);
    border-radius: 14px;
  }

  .qbc-lj-header {
    padding: 12px 14px;
  }

  .qbc-lj-title {
    font-size: 16px;
  }

  .qbc-lj-body {
    padding: 10px 10px 14px;
  }

  .qbc-lj-target {
    max-width: 140px;
  }

  .qbc-lj-chart {
    height: 96px;
  }

  .qbc-lj-footer {
    flex-wrap: wrap;
  }
}
