.dlt-bi-page {
  width: 100%;
  max-width: none;
  margin: 0;
}

.dlt-card-prefix {
  padding: 16px 18px 18px;
}

.dlt-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--entry);
}

.dlt-overview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.dlt-stat-item {
  min-width: 120px;
}

.dlt-stat-label {
  font-size: 12px;
  color: var(--secondary);
}

.dlt-stat-value {
  font-size: 18px;
  font-weight: 700;
}

.dlt-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dlt-btn {
  border: 1px solid var(--border);
  background: var(--theme);
  color: var(--primary);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
}

.dlt-btn:hover {
  border-color: var(--primary);
}

.dlt-btn-primary {
  background: var(--primary);
  color: var(--theme);
  border-color: var(--primary);
}

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

.dlt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.dlt-tab {
  border: 1px solid var(--border);
  background: var(--entry);
  color: var(--primary);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
}

.dlt-tab.active {
  background: var(--primary);
  color: var(--theme);
  border-color: var(--primary);
}

.dlt-panel {
  display: none;
}

.dlt-panel.active {
  display: block;
}

.dlt-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--entry);
  padding: 16px;
  margin-bottom: 16px;
}

.dlt-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.dlt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.dlt-toolbar select,
.dlt-toolbar input {
  border: 1px solid var(--border);
  background: var(--theme);
  color: var(--primary);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}

.dlt-chart {
  width: 100%;
  height: 360px;
}

.dlt-chart-sm {
  height: 280px;
}

.dlt-table-wrap {
  overflow-x: auto;
}

.dlt-split {
  display: grid;
  grid-template-columns: minmax(260px, 36%) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 8px;
}

.dlt-split-col {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--theme);
  padding: 12px 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dlt-split-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  flex-shrink: 0;
}

.dlt-table-scroll {
  flex: 1;
  max-height: 480px;
  overflow-y: auto;
}

.dlt-table-detail td:last-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

.dlt-table-detail th:nth-child(1),
.dlt-table-detail td:nth-child(1) {
  width: 88px;
}

.dlt-table-detail th:nth-child(2),
.dlt-table-detail td:nth-child(2) {
  width: 108px;
}

.dlt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dlt-table th,
.dlt-table td {
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}

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

.dlt-table tbody tr:hover {
  background: var(--code-bg);
}

.dlt-table tbody tr.selected {
  background: var(--code-bg);
}

.dlt-msg {
  min-height: 20px;
  font-size: 13px;
  color: var(--secondary);
}

.dlt-msg.ok {
  color: #16a34a;
}

.dlt-msg.err {
  color: #dc2626;
}

.dlt-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.dlt-subtable-title {
  font-size: 14px;
  font-weight: 600;
  margin: 8px 0;
}

.dlt-ball-tag {
  display: inline-block;
  min-width: 28px;
  text-align: center;
  padding: 2px 6px;
  margin-right: 4px;
  border-radius: 6px;
  background: var(--code-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 768px) {
  .dlt-overview {
    flex-direction: column;
    align-items: flex-start;
  }

  .dlt-chart {
    height: 300px;
  }

  .dlt-split {
    grid-template-columns: 1fr;
  }

  .dlt-table-scroll {
    max-height: 320px;
  }
}

.dlt-prob-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.dlt-prob-goal label {
  margin-right: 10px;
}

.dlt-prob-disclaimer {
  font-size: 13px;
  color: var(--secondary);
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--code-bg);
}

.dlt-prob-tickets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dlt-prob-ticket {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.dlt-prob-ticket:hover {
  border-color: var(--primary);
}

.dlt-prob-ticket.selected {
  border-color: var(--primary);
  background: var(--code-bg);
}

.dlt-prob-ticket-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.dlt-prob-ticket-meta {
  font-size: 12px;
  color: var(--secondary);
  line-height: 1.5;
}

.dlt-prob-sim {
  font-size: 14px;
  line-height: 1.6;
}

.dlt-prob-sim h4 {
  margin: 12px 0 6px;
  font-size: 14px;
}

.dlt-prob-eval-note {
  font-size: 12px;
  color: var(--secondary);
  margin: 0 0 10px;
}

.dlt-prob-sim .dlt-prob-stat {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
}

.dlt-prob-rules {
  margin-top: 16px;
  font-size: 13px;
}

.dlt-prob-rules summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 8px;
}

.dlt-prob-split .dlt-split-col {
  min-height: 280px;
}

.dlt-prob-normal-intro {
  font-size: 13px;
  color: var(--secondary);
  margin: 0 0 12px;
  line-height: 1.5;
}

.dlt-prob-normal-stats {
  font-size: 13px;
  line-height: 1.6;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--code-bg);
}

.dlt-prob-normal-stats p {
  margin: 0 0 8px;
}

.dlt-normal-charts {
  margin-bottom: 12px;
}

.dlt-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: dlt-spin 0.75s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}

@keyframes dlt-spin {
  to {
    transform: rotate(360deg);
  }
}

.dlt-prob-placeholder {
  padding: 28px 12px;
  text-align: center;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.6;
}

.dlt-prob-calculating .dlt-prob-split,
.dlt-prob-calculating #probPnlChart,
.dlt-prob-calculating .dlt-normal-charts,
.dlt-prob-calculating #normalSpanChart,
.dlt-prob-calculating #probNormalStats {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s;
}

.dlt-msg.dlt-prob-calc-active {
  color: var(--primary);
  font-weight: 500;
  min-width: 200px;
}

.dlt-prob-toolbar .dlt-msg {
  flex: 1 1 100%;
  margin: 0;
}

@media (min-width: 769px) {
  .dlt-prob-toolbar .dlt-msg {
    flex: 1 1 auto;
    margin-left: 4px;
  }
}
