/* ===== WOI LAB ONLY ===== */

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: #06111f;
  color: #e6edf5;
  font-family: Inter, Arial, sans-serif;
}

#react-entry-point, #_dash-app-content {
  background: #06111f;
}

.lab-page,
.lab-wrap,
.lab-root {
  background: #06111f;
  color: #e6edf5;
}

/* top container */
.lab-shell {
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px;
}

/* headings */
.lab-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 6px 0;
  color: #f4f8fc;
}

.lab-subtitle {
  font-size: 13px;
  color: rgba(230, 237, 245, 0.72);
  margin-bottom: 18px;
}

/* section cards */
.lab-card {
  background: linear-gradient(180deg, rgba(13,19,28,0.98) 0%, rgba(7,11,19,1) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.03),
    0 12px 28px rgba(0,0,0,0.22);
  padding: 14px;
  margin-bottom: 16px;
}

.lab-section-title {
  font-size: 16px;
  font-weight: 900;
  color: #f4f8fc;
  margin: 0 0 12px 0;
}

.lab-section-sub {
  font-size: 12px;
  color: rgba(230,237,245,0.70);
  margin: -6px 0 12px 0;
}

/* filters */
.lab-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.lab-filter-box label,
.lab-filter-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #b8c7d9;
}

/* KPI row */
.lab-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.lab-kpi-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.lab-kpi-title {
  font-size: 11px;
  color: rgba(230,237,245,0.68);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lab-kpi-value {
  font-size: 22px;
  font-weight: 900;
  color: #f8fbff;
  line-height: 1.1;
}

.lab-kpi-sub {
  font-size: 11px;
  color: rgba(230,237,245,0.58);
  margin-top: 4px;
}

/* insights */
.lab-insights-box {
  background: linear-gradient(180deg, rgba(0,200,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(96,165,250,0.20);
  border-radius: 16px;
  padding: 14px 16px;
}

.lab-insights-box ul {
  margin: 8px 0 0 18px;
}

.lab-insights-box li {
  margin-bottom: 6px;
  color: #dce7f3;
}

/* tables */
.lab-table-wrap {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.015);
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner table {
  background: #081423 !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner th {
  background: #0d1b2a !important;
  color: #dbe7f3 !important;
  font-weight: 800 !important;
  border-color: rgba(255,255,255,0.08) !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td {
  background: #081423 !important;
  color: #dce7f3 !important;
  border-color: rgba(255,255,255,0.06) !important;
}

.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner tr:hover td {
  background: #0d1b2a !important;
}

/* dropdown / input polish */
.Select-control,
.Select-menu-outer,
input,
.DateInput_input {
  background: #0b1624 !important;
  color: #e6edf5 !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}

.Select-placeholder,
.Select-value-label {
  color: #dbe7f3 !important;
}

@media (max-width: 1200px) {
  .lab-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lab-kpi-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .lab-shell {
    padding: 12px;
  }

  .lab-filter-grid,
  .lab-kpi-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .lab-title {
    font-size: 24px;
  }
}

/* all-time health polish */
#lab-health-table .dash-spreadsheet-container,
#lab-summary-table .dash-spreadsheet-container,
#lab-explorer-table .dash-spreadsheet-container{
  border-radius: 14px;
  overflow: hidden;
}

#lab-insights-box li{
  margin-bottom: 8px;
}

/* top3 screener cards */
.lab-top3-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}

.lab-top3-card{
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.lab-top3-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}

.lab-top3-rank{
  width:30px;
  height:30px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:900;
  color:#f8fbff;
  background: rgba(96,165,250,0.18);
  border:1px solid rgba(96,165,250,0.30);
}

.lab-top3-name{
  font-size:15px;
  font-weight:900;
  color:#f4f8fc;
}

.lab-top3-body{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
}

.lab-top3-kv{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 10px 11px;
}

.lab-top3-k{
  font-size:11px;
  color: rgba(230,237,245,0.68);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lab-top3-v{
  font-size:14px;
  font-weight:800;
  color:#f8fbff;
}

.lab-top3-empty{
  color: rgba(230,237,245,0.72);
  font-size: 13px;
}

@media (max-width: 1200px){
  .lab-top3-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px){
  .lab-top3-grid{
    grid-template-columns: minmax(0, 1fr);
  }
}

.lab-top3-head{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}

.lab-top3-name{
  font-size:15px;
  font-weight:900;
  color:#f4f8fc;
  flex:1 1 auto;
  min-width:0;
}

.lab-top3-score-pill,
.lab-top3-quality-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.10);
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.lab-top3-body{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:10px;
}

.lab-top3-kv{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 10px 11px;
  min-width: 0;
}

.lab-top3-k{
  font-size:11px;
  color: rgba(230,237,245,0.68);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lab-top3-v{
  font-size:14px;
  font-weight:800;
  color:#f8fbff;
}

@media (max-width: 1200px){
  .lab-top3-body{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px){
  .lab-top3-head{
    flex-wrap:wrap;
  }

  .lab-top3-body{
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===== LAB: Insight column readability ===== */
#lab-health-table td[data-dash-column="insight"] {
    white-space: normal !important;
    min-width: 240px;
    max-width: 280px;
    line-height: 1.35;
    font-size: 12px;
}

/* Dash fallback (div-based cells) */
#lab-health-table .dash-cell.column-insight {
    white-space: normal !important;
}

/* Markdown spacing fix */
#lab-health-table td[data-dash-column="insight"] p {
    margin: 0;
}

