/* bmaxsdg-scoped.css — bmaxsdg.css ที่จำกัดขอบเขตไว้ใต้ .bxs (ตัวแปร, reset, พื้นหลัง) สำหรับแสดงภายในเทมเพลต pv2 ของ genseal — สร้างจาก bmaxsdg.css */
/* ============================
   CSS VARIABLES — WHITE THEME
   ============================ */
 .bxs {
  --white: #ffffff;
  --off-white: #f8f9fc;
  --light-gray: #f0f2f7;
  --border: #e2e6f0;
  --text-dark: #1a1f36;
  --text-mid: #3d4466;
  --text-soft: #7882a0;
  --accent-blue: #2563eb;
  --accent-blue-light: #dbeafe;
  --accent-teal: #0891b2;
  --accent-green: #16a34a;
  --accent-amber: #d97706;
  --accent-red: #dc2626;
  --accent-purple: #7c3aed;
  --level4: #16a34a;
  --level3: #d97706;
  --level2: #ea580c;
  --level1: #dc2626;
  --nodata: #94a3b8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-sm: 8px;
  font-size: 14px;
}

.bxs *, .bxs *::before, .bxs *::after { box-sizing: border-box; margin: 0; padding: 0; }

.bxs {
  font-family: 'Sarabun', sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  min-height: 100vh;
}

/* ============================
   TOP HEADER
   ============================ */
.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 24px;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.logo-emblem {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.logo-text h1 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}
.logo-text p {
  font-size: 10px;
  color: var(--text-soft);
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 2px;
  flex: 1;
}
.nav-tab {
  padding: 6px 16px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Sarabun', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.nav-tab:hover {
  background: var(--light-gray);
  color: var(--text-dark);
}
.nav-tab.active {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
}
.nav-tab .tab-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

.header-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}
.badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.badge-blue { background: var(--accent-blue-light); color: var(--accent-blue); }
.badge-green { background: #dcfce7; color: var(--accent-green); text-decoration: none; display: inline-block; }

/* ============================
   PAGE SYSTEM
   ============================ */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ============================
   SHARED UTILITIES
   ============================ */
.page-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 32px;
}
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================
   PAGE 1: SDG PROFILE DASHBOARD
   ============================ */

/* Hero Stats */
.hero-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.hero-sub {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 20px;
}
.stat-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 10px;
}
.stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 4px;
  font-family: 'IBM Plex Mono', monospace;
}
.stat-label { font-size: 12px; color: var(--text-soft); font-weight: 500; }
.stat-sub { font-size: 11px; color: var(--text-soft); margin-top: 5px; }

/* SDG Performance Banner */
.sdg-banner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.sdg-banner-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}
.sdg-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.sdg-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.sdg-pill:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.sdg-pill.above { background: #dcfce7; color: #15803d; border-color: #86efac; }
.sdg-pill.below-mild { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.sdg-pill.below-severe { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.sdg-pill.no-data { background: var(--light-gray); color: var(--text-soft); border-color: var(--border); }
.sdg-pill .pill-num {
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
}

/* Legend Bar */
.legend-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.legend-label { font-size: 11px; color: var(--text-soft); font-weight: 600; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-mid); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* SDG GRID */
.sdg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.sdg-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sdg-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.sdg-card.active {
  border-color: var(--accent-blue);
  background: var(--accent-blue-light);
}
.sdg-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sdg-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.sdg-num { font-family: 'IBM Plex Mono', monospace; font-size: 0.65rem; color: var(--text-soft); }
.sdg-title { font-size: 0.75rem; font-weight: 600; line-height: 1.4; color: var(--text-dark); }

/* Mini Bars */
.mini-bars { display: flex; gap: 2px; margin-top: 8px; height: 4px; border-radius: 2px; overflow: hidden; }
.mini-bar { height: 100%; border-radius: 2px; flex: 1; }

.sdg-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.sdg-indicator-count { font-size: 0.68rem; color: var(--text-soft); }

/* Level Pills */
.level-pill {
  font-size: 0.65rem;
  font-family: 'IBM Plex Mono', monospace;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}
.lv4 { background: #dcfce7; color: #15803d; }
.lv3 { background: #fef3c7; color: #92400e; }
.lv2 { background: #ffedd5; color: #9a3412; }
.lv1 { background: #fee2e2; color: #991b1b; }
.lv0 { background: var(--light-gray); color: var(--text-soft); }

/* Detail Panel */
.detail-panel {
  background: var(--white);
  border: 1.5px solid var(--accent-blue);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  display: none;
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.25s ease;
}
.detail-panel.open { display: block; }
.dp-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.dp-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.dp-meta h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; color: var(--text-dark); }
.dp-meta p { font-size: 0.82rem; color: var(--text-soft); line-height: 1.6; }
.dp-close {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: 'Sarabun', sans-serif;
  transition: all 0.15s;
  flex-shrink: 0;
}
.dp-close:hover { border-color: var(--accent-blue); color: var(--accent-blue); background: var(--accent-blue-light); }

/* Indicators Grid */
.indicators-grid { display: grid; gap: 8px; margin-bottom: 18px; }
.indicator-row {
  display: grid;
  grid-template-columns: 90px 1fr 100px 90px;
  gap: 12px;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  align-items: center;
}
.ind-code { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; color: var(--accent-blue); font-weight: 600; }
.ind-name { font-size: 0.8rem; line-height: 1.4; color: var(--text-dark); }
.ind-value { text-align: right; font-family: 'IBM Plex Mono', monospace; font-size: 0.82rem; font-weight: 700; }

/* Context Boxes */
.context-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.context-box {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.context-box h4 { font-size: 0.76rem; color: var(--accent-blue); margin-bottom: 8px; font-weight: 700; }
.context-box ul { font-size: 0.78rem; color: var(--text-mid); padding-left: 1.2rem; line-height: 1.9; }

/* Overview Bars */
.overview-section { margin-bottom: 24px; }
.overview-bars {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 130px;
  padding-bottom: 16px;
}
.ov-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ov-bar { width: 100%; border-radius: 5px 5px 0 0; transition: all 0.25s; cursor: pointer; }
.ov-bar:hover { filter: brightness(0.85); }
.ov-label { font-size: 0.58rem; color: var(--text-soft); font-family: 'IBM Plex Mono', monospace; }

/* Survey Section */
.survey-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.survey-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.survey-card h3 { font-size: 0.82rem; font-weight: 700; color: var(--text-mid); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.survey-item { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.survey-item .rank { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; color: var(--text-soft); width: 18px; flex-shrink: 0; }
.survey-item .sdg-badge { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 0.82rem; flex-shrink: 0; }
.survey-item .name { font-size: 0.78rem; flex: 1; color: var(--text-dark); }
.survey-item .score { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 0.82rem; }
.survey-bar-track { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 10px; overflow: hidden; }
.survey-bar-fill { height: 100%; border-radius: 2px; }

/* ============================
   PAGE 2: 9-STRATEGY DASHBOARD
   ============================ */

/* Hero Stats (reuse from p1 but different colors) */
.p2-stat-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* SDG Banner in page 2 */
.p2-sdg-banner {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

/* Budget Bars */
.budget-bar-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.budget-domain-bars { display: grid; gap: 10px; margin-top: 14px; }
.budget-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
  transition: opacity 0.15s;
}
.budget-row:hover { opacity: 0.8; }
.budget-row-label { width: 130px; font-size: 12px; font-weight: 600; color: var(--text-mid); flex-shrink: 0; }
.budget-track {
  flex: 1;
  height: 24px;
  background: var(--off-white);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.budget-fill {
  height: 100%;
  border-radius: 3px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 700;
  color: white;
  min-width: 2px;
  transition: width 0.8s ease;
}
.budget-amount { width: 90px; text-align: right; font-size: 12px; font-weight: 700; color: var(--text-mid); flex-shrink: 0; }

/* Main 2-col layout */
.main-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
.sidebar { position: sticky; top: 76px; }
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.sidebar-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--light-gray);
}
.sidebar-header h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.domain-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.domain-item:last-child { border-bottom: none; }
.domain-item:hover { background: var(--off-white); }
.domain-item.active {
  background: var(--accent-blue-light);
  border-left: 3px solid var(--accent-blue);
}
.domain-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.domain-info { flex: 1; min-width: 0; }
.domain-name { font-size: 12px; font-weight: 600; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.domain-count { font-size: 10px; color: var(--text-soft); margin-top: 2px; }
.domain-progress-mini { width: 46px; text-align: right; }
.progress-pct { font-size: 12px; font-weight: 700; color: var(--text-mid); }
.progress-bar-mini { height: 4px; background: var(--border); border-radius: 2px; margin-top: 3px; overflow: hidden; }
.progress-fill-mini { height: 100%; border-radius: 2px; transition: width 0.5s; }

/* Content Panel */
.detail-header {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.detail-domain-title { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.detail-domain-icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-sm);
}
.detail-domain-name { font-size: 20px; font-weight: 800; color: var(--text-dark); }
.detail-domain-desc { font-size: 12px; color: var(--text-soft); margin-top: 2px; line-height: 1.5; }
.detail-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.detail-stat {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.detail-stat-val { font-size: 20px; font-weight: 800; color: var(--text-dark); font-family: 'IBM Plex Mono', monospace; }
.detail-stat-label { font-size: 10px; color: var(--text-soft); font-weight: 500; margin-top: 2px; }

/* Progress bar */
.progress-section { margin-top: 14px; }
.progress-label-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-soft); margin-bottom: 6px; }
.progress-bar-large { height: 9px; background: var(--border); border-radius: 5px; overflow: hidden; display: flex; }
.pb-completed { background: var(--accent-green); transition: width 0.7s; }
.pb-inprogress { background: var(--accent-amber); transition: width 0.7s; }
.pb-notstarted { background: var(--border); }
.pb-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 10px; color: var(--text-soft); flex-wrap: wrap; }
.pb-legend span { display: flex; align-items: center; gap: 5px; }
.pb-dot { width: 7px; height: 7px; border-radius: 50%; }

/* SDG Linkage */
.sdg-linkage-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.sdg-link-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sdg-link-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  border: 1.5px solid;
  cursor: pointer;
  transition: all 0.15s;
}
.sdg-link-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.sdg-link-chip .chip-num { font-size: 10px; font-weight: 800; background: rgba(0,0,0,0.1); border-radius: 4px; padding: 1px 5px; }
.strategies-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.strategy-chip {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 11px;
  color: var(--text-mid);
  font-weight: 500;
}
.strategy-chip strong { display: block; font-size: 12px; font-weight: 700; color: var(--text-dark); margin-bottom: 2px; }

/* Issues */
.issues-grid { display: grid; gap: 10px; margin-bottom: 24px; }
.issue-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.issue-card:hover { border-color: var(--accent-blue); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.issue-card.expanded { border-color: var(--accent-blue); background: #fafbff; }
.issue-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.issue-badge {
  background: var(--accent-blue-light);
  color: var(--accent-blue);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  font-family: 'IBM Plex Mono', monospace;
}
.issue-name { font-size: 13px; font-weight: 600; color: var(--text-dark); flex: 1; line-height: 1.4; }
.issue-meta { display: flex; gap: 14px; margin-top: 8px; }
.issue-meta-item { font-size: 11px; color: var(--text-soft); }
.issue-meta-item strong { color: var(--text-mid); font-weight: 700; }
.issue-expand-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  font-family: 'Sarabun', sans-serif;
}
.issue-expand-btn:hover { background: var(--accent-blue-light); color: var(--accent-blue); border-color: var(--accent-blue); }

/* Drill */
.drill-panel { display: none; margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.drill-panel.open { display: block; }
.drill-title { font-size: 11px; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.project-list { display: grid; gap: 7px; }
.project-item {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.project-status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.project-info { flex: 1; min-width: 0; }
.project-name { font-size: 12px; font-weight: 600; color: var(--text-dark); line-height: 1.4; margin-bottom: 4px; }
.project-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.project-meta span { font-size: 10px; color: var(--text-soft); }
.project-progress-bar { width: 54px; flex-shrink: 0; text-align: center; }
.project-progress-value { font-size: 11px; font-weight: 700; color: var(--text-mid); }
.project-progress-track { height: 4px; background: var(--border); border-radius: 2px; margin-top: 3px; overflow: hidden; }
.project-progress-fill { height: 100%; border-radius: 2px; }

/* Tabs (p2 inline) */
.tabs { display: flex; gap: 2px; background: var(--light-gray); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 16px; }
.tab-btn {
  flex: 1;
  padding: 7px 10px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Sarabun', sans-serif;
}
.tab-btn.active { background: var(--white); color: var(--text-dark); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1100px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stat-cards, .p2-stat-cards { grid-template-columns: repeat(3, 1fr); }
  .detail-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .page-wrap { padding: 16px; }
  .header-inner { padding: 0 16px; }
  .stat-cards, .p2-stat-cards { grid-template-columns: 1fr 1fr; }
  .sdg-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .indicator-row { grid-template-columns: 75px 1fr; }
  .ind-value, .indicator-row .level-pill { display: none; }
  .context-boxes, .survey-grid { grid-template-columns: 1fr; }
  .strategies-grid { grid-template-columns: 1fr; }
}
