/* SkillBridge AI - Organization & Architecture Module Styles */

.org-structure-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 0 48px 0;
  animation: fadeIn 0.25s ease-out;
}

/* ─── Top Header & Controls ─── */
.org-header-card {
  background: var(--surface-bright, #FFFFFF);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.org-header-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.org-header-titles h1 {
  font-family: 'Work Sans', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--on-surface, #0F172A);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.org-header-titles p {
  color: var(--on-surface-variant, #475569);
  font-size: 13.5px;
  margin: 4px 0 0 0;
}

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

/* KPI Chips Bar */
.org-kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #F1F5F9;
}

.org-kpi-pill {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.org-kpi-pill:hover {
  background: #FFFFFF;
  border-color: #CBD5E1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.org-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.org-kpi-val {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.1;
}

.org-kpi-lbl {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ─── Architectural Component Segmented Tabs ─── */
.org-tabs-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.org-nav-tabs {
  display: flex;
  gap: 6px;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 8px;
}

.org-tab-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.org-tab-btn:hover {
  color: #0F172A;
  background: rgba(255, 255, 255, 0.5);
}

.org-tab-btn.active {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.org-tab-btn .tab-badge {
  background: #E2E8F0;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}

.org-tab-btn.active .tab-badge {
  background: #0F172A;
  color: #FFFFFF;
}

.org-filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.org-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.org-search-box .material-symbols-outlined {
  position: absolute;
  left: 10px;
  font-size: 18px;
  color: #94A3B8;
  pointer-events: none;
}

.org-search-input {
  width: 240px;
  padding: 7px 12px 7px 34px;
  font-size: 13px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: #F8FAFC;
  color: #0F172A;
  transition: all 0.2s ease;
}

.org-search-input:focus {
  outline: none;
  border-color: #3B82F6;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* ─── TIER 1: ORGANIZATIONAL STRUCTURE STYLES ─── */
.org-hierarchy-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Company Root Node Card */
.company-root-card {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.company-root-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.company-root-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.company-root-details h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #FFFFFF;
}

.company-root-details p {
  font-size: 13px;
  color: #94A3B8;
  margin: 3px 0 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.company-root-stats {
  display: flex;
  gap: 16px;
}

.company-root-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 8px;
  text-align: right;
}

.company-root-badge .val {
  font-size: 16px;
  font-weight: 700;
  color: #38BDF8;
}

.company-root-badge .lbl {
  font-size: 11px;
  color: #94A3B8;
  text-transform: uppercase;
}

/* Division Cards */
.divisions-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.division-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.division-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.division-header {
  padding: 16px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.division-header:hover {
  background: #F1F5F9;
}

.division-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.division-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #0F172A;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.division-title-group h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.division-lead-meta {
  font-size: 12.5px;
  color: #64748B;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.division-lead-meta strong {
  color: #1E293B;
}

.division-badges {
  display: flex;
  align-items: center;
  gap: 10px;
}

.division-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.division-desc {
  font-size: 13px;
  color: #475569;
  background: #F8FAFC;
  border-left: 3px solid #3B82F6;
  padding: 8px 14px;
  border-radius: 0 6px 6px 0;
  margin: 0;
}

/* Departments inside Division */
.departments-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dept-pod {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #FFFFFF;
  padding: 16px 18px;
}

.dept-pod-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #E2E8F0;
}

.dept-pod-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dept-pod-title h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.dept-meta-tag {
  font-size: 12px;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Teams inside Department */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.team-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.team-box-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.team-box-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #1E293B;
  margin: 0;
}

.team-box-lead {
  font-size: 11.5px;
  color: #64748B;
  margin-top: 2px;
}

.team-members-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #FFFFFF;
  border: 1px solid #F1F5F9;
  border-radius: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.team-member-item:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
  transform: translateX(2px);
}

.member-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0F172A;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.member-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #0F172A;
}

.member-role {
  font-size: 11.5px;
  color: #64748B;
}

.member-skill-badge {
  font-size: 11px;
  font-weight: 600;
  background: #DCFCE7;
  color: #166534;
  padding: 2px 7px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── TIER 2: JOB ARCHITECTURE STYLES ─── */
.job-arch-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Benchmark Banner */
.gov-benchmark-banner {
  background: linear-gradient(135deg, #064E3B 0%, #065F46 100%);
  color: #FFFFFF;
  border-radius: 12px;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(6, 78, 59, 0.15);
}

.gov-benchmark-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gov-benchmark-icon {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gov-benchmark-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

.gov-benchmark-info p {
  font-size: 12.5px;
  color: #A7F3D0;
  margin: 2px 0 0 0;
}

/* L1-L5 Career Level Ladder */
.levels-ladder-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.ladder-header {
  margin-bottom: 16px;
}

.ladder-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.ladder-header p {
  font-size: 12.5px;
  color: #64748B;
  margin: 2px 0 0 0;
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.level-card {
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.level-card:hover {
  background: #FFFFFF;
  border-color: #3B82F6;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.level-card.active-filter {
  background: #EFF6FF;
  border-color: #3B82F6;
  box-shadow: 0 0 0 2px #3B82F6;
}

.level-badge-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.level-code {
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  background: #0F172A;
  padding: 2px 8px;
  border-radius: 4px;
}

.level-years {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748B;
}

.level-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.level-scope {
  font-size: 11.5px;
  font-weight: 600;
  color: #2563EB;
}

.level-desc {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.4;
  margin: 0;
}

/* Job Families */
.families-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.family-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.family-header {
  padding: 16px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.family-header:hover {
  background: #F1F5F9;
}

.family-header-info h4 {
  font-size: 15.5px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.family-header-info p {
  font-size: 12.5px;
  color: #64748B;
  margin: 3px 0 0 0;
}

.family-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.family-competencies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.comp-tag {
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #CBD5E1;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

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

.role-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.role-card:hover {
  border-color: #94A3B8;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.role-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.role-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.role-card-dept {
  font-size: 11.5px;
  color: #64748B;
  margin-top: 2px;
}

.role-skills-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.role-skill-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  background: #F8FAFC;
  padding: 4px 8px;
  border-radius: 4px;
}

/* ─── TIER 3: SKILLS ARCHITECTURE STYLES ─── */
.skills-arch-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 5-Level Rubric Table */
.rubric-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.rubric-header {
  margin-bottom: 16px;
}

.rubric-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.rubric-header p {
  font-size: 13px;
  color: #64748B;
  margin: 2px 0 0 0;
}

.rubric-table-wrap {
  overflow-x: auto;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
}

.rubric-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.rubric-table th {
  background: #0F172A;
  color: #FFFFFF;
  padding: 12px 14px;
  font-weight: 600;
}

.rubric-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #E2E8F0;
  vertical-align: top;
}

.rubric-table tr:nth-child(even) td {
  background: #F8FAFC;
}

.rubric-level-tag {
  display: inline-block;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11.5px;
}

.rubric-tag-1 { background: #F1F5F9; color: #475569; }
.rubric-tag-2 { background: #FEF3C7; color: #92400E; }
.rubric-tag-3 { background: #DCFCE7; color: #166534; }
.rubric-tag-4 { background: #DBEAFE; color: #1E40AF; }
.rubric-tag-5 { background: #F3E8FF; color: #6B21A8; }

/* Skills Catalog Table */
.skills-catalog-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.catalog-filter-bar {
  display: flex;
  gap: 8px;
}

.cat-filter-btn {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cat-filter-btn.active {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
}

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

.skills-catalog-table th {
  background: #F8FAFC;
  color: #475569;
  padding: 10px 14px;
  font-weight: 600;
  border-bottom: 2px solid #E2E8F0;
  text-align: left;
}

.skills-catalog-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

.skills-catalog-table tr:hover td {
  background: #F8FAFC;
}

.proficiency-meter {
  display: flex;
  gap: 4px;
  align-items: center;
}

.meter-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #CBD5E1;
}

.meter-dot.filled {
  background: #2563EB;
}

/* ─── TIER 4: FULL ENTERPRISE MAP ─── */
.unified-map-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.unified-flow-banner {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
  color: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.flow-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  position: relative;
}

.flow-step-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flow-step-box h4 {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flow-step-box p {
  font-size: 12px;
  color: #C7D2FE;
  margin: 0;
  line-height: 1.4;
}

/* ─── Interactive Inspection Modals ─── */
.org-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.org-modal-card {
  background: #FFFFFF;
  border-radius: 14px;
  width: 100%;
  max-width: 650px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.org-modal-header {
  padding: 18px 24px;
  background: #0F172A;
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.org-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.org-modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.org-modal-footer {
  padding: 14px 24px;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: flex-end;
}

/* ═════════════════════════════════════════════════════════════════════════════
   VISUAL TREE ORG CHART (MATCHING TEMPLATE REFERENCE)
   ═════════════════════════════════════════════════════════════════════════════ */

.org-chart-tree-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* Toolbar Bar */
.org-chart-toolbar {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.org-chart-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.org-chart-dataset-toggle {
  display: flex;
  background: #F1F5F9;
  padding: 3px;
  border-radius: 8px;
  gap: 4px;
}

.chart-toggle-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.chart-toggle-btn.active {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.org-chart-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoom-btn {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  color: #1E293B;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.zoom-btn:hover {
  background: #FFFFFF;
  border-color: #94A3B8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Tree Chart Canvas */
.org-chart-canvas-wrap {
  background: #FAFAFB;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 36px 28px 48px 28px;
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  display: flex;
  justify-content: center;
  position: relative;
  min-height: 650px;
}

.org-chart-canvas {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s ease-out;
  transform-origin: top center;
  min-width: 980px;
  max-width: 1300px;
}

/* Executive Vertical Spine */
.chart-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.chart-stem-vertical {
  width: 2px;
  height: 24px;
  background: #2B2D42;
  position: relative;
  display: flex;
  justify-content: center;
}

.chart-stem-arrow {
  position: absolute;
  bottom: -4px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #2B2D42;
}

/* Specific Node Styles Matching Attached Template */
.tree-node {
  border-radius: 6px;
  border: 1.5px solid #2B2D42;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
  text-align: center;
}

.tree-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

/* Level 1: Board of Directors (Purple) */
.node-board {
  background: #B4B5F7;
  color: #1E1B4B;
  min-width: 200px;
  padding: 12px 24px;
}

.node-board .node-main-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.node-board .node-lead-subtitle {
  font-size: 11px;
  color: #3730A3;
  margin-top: 2px;
}

/* Level 2: CEO (Sage Green) */
.node-ceo {
  background: #A3C9B8;
  color: #064E3B;
  min-width: 190px;
  padding: 12px 24px;
}

.node-ceo .node-main-title {
  font-size: 14px;
  font-weight: 700;
}

.node-ceo .node-lead-subtitle {
  font-size: 11px;
  color: #065F46;
  margin-top: 2px;
}

/* Level 3: Chief Operating Officer (Peach / Orange) */
.node-coo {
  background: #F8B48B;
  color: #7C2D12;
  min-width: 210px;
  padding: 12px 24px;
}

.node-coo .node-main-title {
  font-size: 14px;
  font-weight: 700;
}

.node-coo .node-lead-subtitle {
  font-size: 11px;
  color: #9A3412;
  margin-top: 2px;
}

/* Horizontal Bus Bar & Distribution Stem */
.chart-bus-wrap {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chart-stem-from-coo {
  width: 2px;
  height: 24px;
  background: #2B2D42;
}

.chart-bus-bar {
  height: 2px;
  background: #2B2D42;
  position: relative;
}

/* 4 Department Columns */
.chart-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
  margin-top: 0;
  position: relative;
}

.chart-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.chart-col-drop-line {
  width: 2px;
  height: 22px;
  background: #2B2D42;
  margin-bottom: 0;
}

/* Department / Division Header Node (Light Slate Gray) */
.node-dept {
  background: #D1D5DB;
  color: #111827;
  width: 100%;
  max-width: 210px;
  padding: 11px 16px;
  border-radius: 6px;
}

.node-dept .node-main-title {
  font-size: 13.5px;
  font-weight: 700;
}

.node-dept .node-lead-subtitle {
  font-size: 11px;
  color: #374151;
  margin-top: 2px;
}

/* Subteams Branching System under Department */
.subteams-trunk {
  width: 100%;
  max-width: 210px;
  position: relative;
  padding-left: 20px;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* The vertical trunk line running down from the department node */
.subteams-trunk::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 22px;
  width: 2px;
  background: #2B2D42;
}

.subteam-branch-item {
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 14px;
}

/* L-shaped horizontal connector branching from the vertical trunk */
.subteam-branch-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 2px;
  background: #2B2D42;
}

/* Level 5: Sub-team Nodes (Yellow / Gold) */
.node-subteam {
  background: #FEE08B;
  color: #78350F;
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  text-align: center;
}

.node-subteam .node-main-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}

.node-subteam .node-lead-subtitle {
  font-size: 10.5px;
  color: #92400E;
  margin-top: 2px;
}

.node-meta-pills {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
}

.node-pill {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.08);
}

/* Side Illustration Banner (Matching Reference Image) */
.chart-goals-badge {
  position: absolute;
  top: 24px;
  right: 28px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.goals-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #ECFDF5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
}

.goals-badge-text h5 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 6px;
}

.goals-badge-text p {
  margin: 2px 0 0 0;
  font-size: 11px;
  color: #64748B;
}

