:root {
  --zeb-bg: #f8fafc;
  --zeb-card: #ffffff;
  --zeb-card-soft: #f0f9ff;
  --zeb-line: #e2e8f0;
  --zeb-line-dark: #cbd5e1;
  --zeb-text: #1e293b;
  --zeb-sub: #64748b;
  --zeb-accent: #0891b2;
  --zeb-accent-dark: #0e7490;
  --zeb-shadow: 0 8px 24px rgba(14, 116, 144, 0.08);
}

.zeb-dashboard-app,
.zeb-admin-wrap {
  color: var(--zeb-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
}

.zeb-dashboard-app {
  display: grid;
  gap: 20px;
  margin: 8px 0 20px;
}

.zeb-card,
.zeb-kpi,
.zeb-stat-box {
  background: var(--zeb-card);
  border: 1px solid var(--zeb-line);
  border-radius: 14px;
  box-shadow: var(--zeb-shadow);
}

.zeb-card {
  padding: 18px;
}

.zeb-card h3,
.zeb-card h2 {
  margin: 0 0 10px;
  color: var(--zeb-accent-dark);
  font-size: 22px;
  letter-spacing: 0.02em;
}

.zeb-card p,
.zeb-card li,
.zeb-field span,
.zeb-kpi small,
.zeb-empty,
.zeb-loading,
.zeb-insights,
.zeb-section-head p {
  color: var(--zeb-sub);
}

.zeb-hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--zeb-line);
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfeff 0%, #f0f9ff 50%, #f0fdf4 100%);
}

.zeb-eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--zeb-accent);
  font-weight: 700;
}

.zeb-hero h2 {
  margin: 8px 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  color: #0e7490;
}

.zeb-hero p {
  margin: 0;
  line-height: 1.9;
}

.zeb-hero-aside {
  display: grid;
  gap: 12px;
}

.zeb-stat-box {
  padding: 14px 16px;
}

.zeb-stat-box span,
.zeb-kpi span {
  display: block;
  font-size: 12px;
  color: var(--zeb-sub);
  margin-bottom: 6px;
}

.zeb-stat-box strong,
.zeb-kpi strong {
  display: block;
  font-size: 22px;
  line-height: 1.3;
  color: #0e7490;
}

.zeb-filter-card {
  background: #fff;
}

.zeb-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.zeb-section-head p {
  margin: 0;
  line-height: 1.8;
  font-size: 14px;
}

.zeb-filter-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

.zeb-field {
  display: block;
}

.zeb-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.zeb-field select,
.zeb-admin-wrap input[type="text"],
.zeb-admin-wrap textarea,
.zeb-admin-wrap input[type="file"] {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--zeb-line-dark);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  color: var(--zeb-text);
}

.zeb-field select:focus,
.zeb-admin-wrap input:focus,
.zeb-admin-wrap textarea:focus {
  outline: none;
  border-color: var(--zeb-accent);
  box-shadow: 0 0 0 3px rgba(135, 122, 107, 0.12);
}

.zeb-btn {
  appearance: none;
  border: 1px solid var(--zeb-accent);
  border-radius: 999px;
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #fff;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
}

.zeb-btn-secondary {
  background: #fff;
  color: var(--zeb-accent-dark);
}

.zeb-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
}

.zeb-kpi {
  padding: 18px;
}

.zeb-grid {
  display: grid;
  gap: 18px;
}

.zeb-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.zeb-card canvas {
  width: 100% !important;
  height: 320px !important;
}

.zeb-map-card {
  overflow: hidden;
}

.zeb-map-layout {
  display: grid;
  grid-template-columns: minmax(700px, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.zeb-map-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

.zeb-japan-map {
  min-width: 700px;
  display: grid;
  grid-template-columns: repeat(13, 48px);
  grid-template-rows: repeat(14, 42px);
  gap: 6px;
  padding: 4px;
}

.zeb-pref-tile {
  appearance: none;
  border: 1px solid var(--zeb-line-dark);
  border-radius: 12px;
  padding: 4px 6px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(46, 42, 36, 0.03);
}

.zeb-pref-tile:hover,
.zeb-pref-tile.is-selected {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(46, 42, 36, 0.1);
}

.zeb-pref-name {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zeb-pref-value {
  font-size: 11px;
  line-height: 1.15;
}

.zeb-map-side {
  display: grid;
  gap: 14px;
}

.zeb-map-legend,
.zeb-map-toplist {
  border: 1px solid var(--zeb-line);
  border-radius: 12px;
  background: var(--zeb-card-soft);
  padding: 14px;
}

.zeb-legend-title,
.zeb-map-toplist-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--zeb-accent-dark);
  margin-bottom: 10px;
}

.zeb-legend-bar {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f0f9ff 0%, #22d3ee 50%, #0e7490 100%);
  border: 1px solid var(--zeb-line-dark);
}

.zeb-legend-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--zeb-sub);
}

.zeb-map-toplist ol,
.zeb-insights ul {
  margin: 0;
  padding-left: 18px;
}

.zeb-map-toplist li,
.zeb-insights li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.zeb-map-toplist li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.zeb-map-toplist strong {
  color: var(--zeb-accent-dark);
}

.zeb-admin-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 2fr 1fr;
  align-items: start;
}

.zeb-admin-grid .zeb-card:last-child {
  grid-column: 1 / -1;
}

.zeb-admin-wrap pre {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0e7490;
  color: #fff;
}

.zeb-empty,
.zeb-loading {
  border: 1px dashed var(--zeb-line-dark);
  border-radius: 14px;
  background: #fff;
  text-align: center;
  padding: 32px 18px;
}

@media (max-width: 1200px) {
  .zeb-filter-row {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .zeb-map-layout {
    grid-template-columns: 1fr;
  }

  .zeb-map-side {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  .zeb-hero,
  .zeb-grid-2,
  .zeb-admin-grid,
  .zeb-kpis {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  .zeb-dashboard-app {
    gap: 16px;
  }

  .zeb-hero,
  .zeb-grid-2,
  .zeb-admin-grid,
  .zeb-kpis,
  .zeb-filter-row,
  .zeb-map-side {
    grid-template-columns: 1fr;
  }

  .zeb-card,
  .zeb-kpi {
    padding: 16px;
  }

  .zeb-section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .zeb-map-metric {
    width: 100%;
  }

  .zeb-japan-map {
    min-width: 620px;
    grid-template-columns: repeat(13, 42px);
    grid-template-rows: repeat(14, 38px);
  }

  .zeb-card canvas {
    height: 260px !important;
  }

  .zeb-hero h2 {
    font-size: 28px;
  }
}


/* ─── Comment Card (light blue) ─── */
.zeb-comment-card {
  background: linear-gradient(135deg, #ecfeff 0%, #f0f9ff 100%);
  border-color: #bae6fd;
}
.zeb-comment-card h3 {
  color: #0e7490;
}
.zeb-comment-sub {
  font-size: 13px;
  color: #0891b2;
  margin: -6px 0 12px;
}
.zeb-comments ul {
  list-style: none;
  padding: 0;
}
.zeb-comments li {
  padding: 10px 14px;
  margin-bottom: 8px;
  background: rgba(255,255,255,.7);
  border-radius: 10px;
  border-left: 4px solid #22d3ee;
  font-size: 14px;
  line-height: 1.7;
  color: #164e63;
}

/* ─── SVG Japan Map ─── */
.zeb-japan-svg-wrap {
  min-width: 500px;
  padding: 4px;
}
.zeb-japan-svg-wrap svg {
  display: block;
}
.zeb-svg-pref:hover circle {
  filter: brightness(0.9);
  stroke-width: 2.5;
}
.zeb-svg-pref:hover text {
  font-weight: 800;
}

/* ─── KPI color accents ─── */
.zeb-kpis .zeb-kpi:nth-child(1) { border-top: 3px solid #22d3ee; }
.zeb-kpis .zeb-kpi:nth-child(2) { border-top: 3px solid #34d399; }
.zeb-kpis .zeb-kpi:nth-child(3) { border-top: 3px solid #fbbf24; }
.zeb-kpis .zeb-kpi:nth-child(4) { border-top: 3px solid #a78bfa; }

.zeb-kpi:nth-child(1) strong { color: #0891b2 !important; }
.zeb-kpi:nth-child(2) strong { color: #059669 !important; }
.zeb-kpi:nth-child(3) strong { color: #d97706 !important; }
.zeb-kpi:nth-child(4) strong { color: #7c3aed !important; }

/* ─── Pref tile improvements ─── */
.zeb-pref-tile {
  border-radius: 8px;
  font-size: 11px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.zeb-pref-tile:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(14, 116, 144, 0.2);
  z-index: 2;
}
