/* ZEB Leading Owner Dashboard */
#zeb-lo-dashboard {
  font-family: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
  font-size: 14px;
  color: #1e293b;
  max-width: 1200px;
  margin: 0 auto;
}

.zeb-lo-loading {
  color: #64748b;
  padding: 40px 0;
  text-align: center;
}

/* ── ヘッダー ── */
.zeb-lo-header {
  background: linear-gradient(135deg, #ecfeff 0%, #f0f9ff 100%);
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 22px 28px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.zeb-lo-header-left { flex: 1; min-width: 280px; }

.zeb-lo-header-badge {
  display: inline-block;
  background: #0891b2;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.zeb-lo-header-title {
  font-size: 26px;
  font-weight: 700;
  color: #0e7490;
  margin: 0 0 6px;
  line-height: 1.2;
}

.zeb-lo-header-sub {
  font-size: 12px;
  color: #475569;
  margin: 0;
}

.zeb-lo-header-right {
  display: flex;
  gap: 14px;
}

.zeb-lo-header-stat {
  background: #fff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 10px 18px;
  text-align: center;
  min-width: 130px;
}

.zeb-lo-header-stat-label {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.zeb-lo-header-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #0e7490;
  line-height: 1.2;
  margin-top: 2px;
}

.zeb-lo-header-stat-sub {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}

/* ── フィルター ── */
.zeb-lo-filters {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.zeb-lo-filters::before {
  content: '絞り込み';
  display: block;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: #0891b2;
  border-left: 3px solid #0891b2;
  padding-left: 8px;
  margin-bottom: 4px;
}

.zeb-lo-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}

.zeb-lo-filter-group label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.03em;
}

.zeb-lo-filter-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.zeb-lo-filter-btns button {
  padding: 4px 10px;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.zeb-lo-filter-btns button:hover {
  border-color: #0891b2;
  color: #0891b2;
}

.zeb-lo-filter-btns button.active {
  background: #0891b2;
  border-color: #0891b2;
  color: #fff;
  font-weight: 600;
}

/* ── KPIカード ── */
.zeb-lo-kpi {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

@media (max-width: 1100px) {
  .zeb-lo-kpi { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 700px) {
  .zeb-lo-kpi { grid-template-columns: repeat(2, 1fr); }
}

.zeb-lo-kpi-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 8px 14px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  border-top: 3px solid #cbd5e1;
}

.kpi-a { border-top-color: #f59e0b; }
.kpi-b { border-top-color: #06b6d4; }
.kpi-c { border-top-color: #8b5cf6; }
.kpi-d { border-top-color: #ec4899; }
.kpi-e { border-top-color: #f59e0b; }
.kpi-f { border-top-color: #0891b2; }
.kpi-g { border-top-color: #fb923c; }

.zeb-lo-kpi-value {
  font-size: 22px;
  font-weight: 700;
  color: #0e7490;
  line-height: 1.2;
}

.zeb-lo-kpi-unit {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  margin-left: 2px;
}

.zeb-lo-kpi-label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
  font-weight: 600;
}

/* ── チャートグリッド ── */
.zeb-lo-charts-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.zeb-lo-row {
  display: grid;
  gap: 16px;
}

.zeb-lo-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.zeb-lo-row.cols-2 { grid-template-columns: 2fr 1fr; }
.zeb-lo-row.cols-1 { grid-template-columns: 1fr; }

@media (max-width: 900px) {
  .zeb-lo-row.cols-3,
  .zeb-lo-row.cols-2 { grid-template-columns: 1fr; }
}

.zeb-lo-chart-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
}

.zeb-lo-chart-box h3 {
  font-size: 13px;
  font-weight: 700;
  color: #0e7490;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #ecfeff;
}

.zeb-lo-chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 280px;
}

.zeb-lo-chart-canvas-wrap canvas {
  position: absolute !important;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
}

/* 技術採用率 — tall */
.zeb-lo-chart-box.tall .zeb-lo-chart-canvas-wrap {
  height: 700px;
}

/* ── BPI/BEI セレクター ── */
.zeb-lo-bei-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

.zeb-lo-bei-controls label {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

.zeb-lo-bei-controls select {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #374151;
}

.zeb-lo-mode-btns {
  display: flex;
  gap: 0;
  border: 1px solid #0891b2;
  border-radius: 4px;
  overflow: hidden;
}

.zeb-lo-mode-btns button {
  padding: 4px 14px;
  font-size: 12px;
  border: none;
  border-right: 1px solid #0891b2;
  background: #fff;
  color: #0891b2;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s;
}

.zeb-lo-mode-btns button:last-child { border-right: none; }

.zeb-lo-mode-btns button:hover:not(.active) {
  background: #ecfeff;
}

.zeb-lo-mode-btns button.active {
  background: #0891b2;
  color: #fff;
}

/* ── ドリルダウン ── */
.zeb-lo-drilldown {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 16px;
  margin-top: 12px;
}

.zeb-lo-drilldown-title {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zeb-lo-drilldown-close {
  cursor: pointer;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
}

.zeb-lo-drilldown-close:hover { color: #ef4444; }

.zeb-lo-no-detail {
  text-align: center;
  color: #94a3b8;
  padding: 60px 0;
  font-size: 13px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
}

.zeb-lo-boxplot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 4px;
  font-size: 11px;
  color: #475569;
  align-items: center;
}

.zeb-lo-boxplot-legend > span:not([class]) { margin-right: 4px; }

.zeb-lo-boxplot-legend .lg-box {
  display: inline-block;
  width: 18px; height: 12px;
  background: #06b6d4aa;
  border: 1px solid #06b6d4;
  margin-right: 4px;
  vertical-align: middle;
}

.zeb-lo-boxplot-legend .lg-median {
  display: inline-block;
  width: 18px; height: 0;
  border-top: 3px solid #1e293b;
  margin-right: 4px;
  vertical-align: middle;
}

.zeb-lo-boxplot-legend .lg-mean {
  display: inline-block;
  width: 10px; height: 10px;
  background: #dc2626;
  border: 2px solid #fff;
  outline: 1px solid #dc2626;
  transform: rotate(45deg);
  margin-right: 6px;
  vertical-align: middle;
}

.zeb-lo-boxplot-legend .lg-outlier {
  display: inline-block;
  width: 8px; height: 8px;
  background: #94a3b8;
  border: 1px solid #64748b;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.zeb-lo-drilldown-note {
  margin-top: 8px;
  padding: 6px 10px;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 3px;
  font-size: 11px;
  color: #92400e;
  line-height: 1.5;
}

.zeb-lo-no-data {
  text-align: center;
  color: #94a3b8;
  padding: 40px 0;
  font-size: 13px;
}

/* ── 解説セクション ── */
.zeb-lo-explain {
  margin-top: 28px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.zeb-lo-explain > h3 {
  font-size: 16px;
  color: #0e7490;
  border-left: 4px solid #0891b2;
  padding-left: 10px;
  margin: 0 0 16px;
}

.zeb-lo-explain-block {
  margin-bottom: 18px;
}

.zeb-lo-explain-block h4 {
  font-size: 13px;
  font-weight: 700;
  color: #0891b2;
  margin: 0 0 8px;
  padding-left: 6px;
  border-left: 3px solid #06b6d4;
}

.zeb-lo-explain-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.zeb-lo-explain-table th,
.zeb-lo-explain-table td {
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}

.zeb-lo-explain-table th {
  background: #f0f9ff;
  color: #0e7490;
  font-weight: 600;
  width: 18%;
  white-space: nowrap;
}

.zeb-lo-explain-list {
  margin: 6px 0 0;
  padding-left: 22px;
  font-size: 12px;
  color: #374151;
  line-height: 1.7;
}

.zeb-lo-explain-list b {
  color: #0e7490;
}

.zeb-lo-disclaimer {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 12px;
  color: #b91c1c;
  line-height: 1.7;
  margin-top: 16px;
}

.zeb-lo-disclaimer b {
  color: #991b1b;
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}
