/* Draw.io Authentic Mindmap Tree Stylesheet */

.diagram-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 18px;
}
.diagram-tab {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: 700 12px Inter, sans-serif;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.diagram-tab:hover,
.diagram-tab.active,
.diagram-tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* Outer Wrapper */
.mm-wrapper {
  background: #fdfefe;
  border: 1px solid #dce5ec;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 4px 20px rgba(16, 42, 67, 0.04);
}

/* Top Toolbar */
.mm-top-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e5edf3;
}

.mm-nav-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mm-nav-label {
  font-weight: 800;
  color: #102a43;
  font-size: 12px;
  letter-spacing: 0.8px;
  margin-right: 4px;
}

.mm-nav-pill {
  background: #e3f2fd;
  border: 1px solid #b3d7f5;
  color: #0f568a;
  border-radius: 6px;
  padding: 7px 14px;
  font: 600 11.5px Inter, sans-serif;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mm-nav-pill:hover {
  background: #0f568a;
  color: #fff;
  border-color: #0f568a;
}

.mm-scroll-cue {
  font-size: 11.5px;
  font-weight: 600;
  color: #52667a;
  background: #eef5fa;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #dce8f0;
}
.mm-cue-icon {
  color: #e97824;
  font-weight: 800;
  margin-right: 3px;
}

/* Viewport with Infinite Canvas Grid */
.mm-viewport {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 30px 24px 50px;
  background-color: #ffffff;
  background-image:
    linear-gradient(#f0f4f8 1px, transparent 1px),
    linear-gradient(90deg, #f0f4f8 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid #d5e1ea;
  border-radius: 10px;
  position: relative;
}

.mm-board {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: max-content;
  margin: 0 auto;
  width: 100%;
}

/* 1. Root Element */
.mm-root-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.mm-node-root {
  background: #10739e;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.8px;
  padding: 12px 38px;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(16, 115, 158, 0.25);
  border: 1px solid #0d5f83;
}

.mm-root-stem {
  width: 2px;
  height: 24px;
  background: #0f4f6e;
}

/* 2. Horizontal Main Trunk */
.mm-main-trunk-bar {
  position: absolute;
  top: 67px;
  height: 2px;
  background: #0f4f6e;
  z-index: 1;
  pointer-events: none;
}

/* 3. Channels Row */
.mm-channels-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 32px;
  position: relative;
  width: 100%;
}

.mm-branch-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  min-width: max-content;
  position: relative;
}

.mm-branch-stem-top {
  width: 2px;
  height: 24px;
  background: #0f4f6e;
}

.mm-node-channel {
  background: #f2931e;
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(242, 147, 30, 0.2);
  width: 100%;
  max-width: 170px;
  min-width: 116px;
  line-height: 1.3;
  border: 1px solid #d67c11;
  box-sizing: border-box;
}

.mm-channel-stem-bottom {
  width: 2px;
  height: 24px;
  background: #0f4f6e;
}

/* 4. Subgroups Layer */
.mm-subgroups-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
}

.mm-subgroups-trunk-bar {
  position: absolute;
  top: 0;
  left: calc(126px / 2);
  right: calc(126px / 2);
  height: 2px;
  background: #0f4f6e;
  z-index: 1;
}

.mm-subgroups-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  position: relative;
}

.mm-subgroup-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 126px;
  flex-shrink: 0;
  position: relative;
}

.mm-subgroup-stem-top {
  width: 2px;
  height: 20px;
  background: #0f4f6e;
}

.mm-node-subgroup {
  background: #12aab5;
  color: #ffffff;
  font-weight: 700;
  font-size: 11px;
  padding: 8px 6px;
  border-radius: 5px;
  width: 100%;
  text-align: center;
  box-shadow: 0 2px 5px rgba(18, 170, 181, 0.2);
  border: 1px solid #0d8d96;
  line-height: 1.25;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.mm-subgroup-stem-bottom {
  width: 2px;
  height: 24px;
  background: #0f4f6e;
}

/* 5. Task List Layer */
.mm-task-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.mm-task-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.mm-task-stem {
  width: 2px;
  height: 16px;
  background: #0f4f6e;
}

.mm-node-task {
  width: 100%;
  padding: 8px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  word-break: break-word;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Exact Draw.io Status Styling */
.status-ready {
  background-color: #d5e8d4 !important;
  border-color: #82b366 !important;
  color: #274e13 !important;
}

.status-training {
  background-color: #fff2cc !important;
  border-color: #d6b656 !important;
  color: #7f6000 !important;
}

.status-weak {
  background-color: #ffe6cc !important;
  border-color: #d79b00 !important;
  color: #a64d00 !important;
}

.status-missing {
  background-color: #f8cecc !important;
  border-color: #b85450 !important;
  color: #8a1f11 !important;
}

/* Status Legend Card */
.mm-legend-panel,
.mm-legend-card {
  margin-top: 24px;
  background: #ffffff;
  border: 1px solid #dce6ed;
  border-radius: 12px;
  padding: 16px 22px;
  box-shadow: 0 2px 10px rgba(16, 42, 67, 0.04);
}

.mm-legend-title,
.mm-legend-heading {
  font-weight: 700;
  font-size: 13px;
  color: #102a43;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mm-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  font-size: 12px;
  color: #334e68;
}

.mm-legend-item,
.mm-legend-entry {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mm-legend-swatch,
.mm-swatch {
  display: inline-block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border-radius: 4px;
  border: 1.5px solid rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.mm-legend-text {
  line-height: 1.4;
  font-weight: 500;
}

/* Other tab styles */
.staffing-board,.journey-board,.workflow-board{background:#fff;border:1px solid var(--line);border-radius:16px;padding:26px;box-shadow:0 8px 22px rgba(20,51,71,.05)}.staffing-title,.journey-title,.workflow-title{margin-bottom:22px}.staffing-title span,.journey-title span,.workflow-title span{color:var(--orange)}.staffing-title p,.journey-title p,.workflow-title p{color:var(--muted)}.staffing-flow{display:flex;align-items:stretch;gap:10px;overflow-x:auto;padding-bottom:8px}.staffing-team{min-width:156px;flex:1;display:grid;gap:6px;align-content:center;padding:18px 14px;border-radius:11px;color:#fff;background:#176b9c}.staffing-team b{font-size:14px}.staffing-team small{color:#d6eef8;font-size:11px}.staffing-team.content{background:#e97824}.staffing-team.media{background:#6d549c}.staffing-team.ads{background:#1d7c67}.staffing-team.commerce{background:#8b6342}.staffing-arrow{align-self:center;color:#9ab0bc;font-size:20px;font-weight:800}.diagram-note{margin-top:16px;padding:13px 15px;border-left:4px solid var(--orange);background:#fff5eb;color:var(--muted);font-size:12px}.diagram-note strong{color:var(--ink)}
.journey-stage{border:1px solid var(--line);border-radius:12px;margin:12px 0;overflow:hidden}.journey-stage header{display:flex;align-items:center;gap:13px;padding:15px 17px;background:#f4f8fa}.journey-stage header>span{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:50%;background:var(--navy);color:#fff;font-size:12px;font-weight:800}.journey-stage h3{margin:0;font-size:16px;color:var(--navy)}.journey-stage header p{margin:2px 0 0;color:var(--muted);font-size:12px}.journey-columns{display:grid;grid-template-columns:1fr 1.35fr 1.4fr 1.55fr;gap:0}.journey-columns>div{min-width:0;padding:14px;border-right:1px solid var(--line)}.journey-columns>div:last-child{border:0}.journey-columns small{display:block;color:var(--orange);font-size:9px;font-weight:800;letter-spacing:.7px}.journey-columns p{margin:6px 0 0;color:#506372;font-size:12px;line-height:1.55}
.workflow-hub{max-width:520px;margin:0 auto 22px;padding:18px 20px;text-align:center;border-radius:12px;background:linear-gradient(130deg,#102a43,#176b9c);color:#fff}.workflow-hub b{font-size:16px}.workflow-hub p{margin:5px auto 0;color:#d7edf6;font-size:12px}.workflow-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.workflow-grid article{padding:17px;border-radius:11px;border:1px solid var(--line);background:#fbfdfe}.workflow-grid h3{margin:0 0 10px;color:var(--navy);font-size:15px}.workflow-grid ul{margin:0;padding-left:18px;color:#526572}.workflow-grid li{font-size:12px;line-height:1.52;margin:6px 0}

@media (max-width: 900px) {
  .mm-legend-grid {
    grid-template-columns: 1fr;
  }
  .mm-top-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Task Detail Modal & Interactive Enhancements */
.mm-node-task, .role-task {
  cursor: pointer !important;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1), filter 0.15s !important;
  user-select: none;
}
.mm-node-task:hover, .role-task:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18) !important;
  filter: brightness(0.96);
  z-index: 2;
}

.task-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}
.task-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
body.modal-open {
  overflow: hidden;
}

.task-modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 980px;
  max-height: 96vh;
  border-radius: 12px;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.task-modal-backdrop.is-open .task-modal-container {
  transform: translateY(0) scale(1);
}

.task-modal-header {
  padding: 10px 20px 8px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #f8fafc;
  flex-shrink: 0;
}

.task-modal-title-box {
  flex: 1;
}
.task-modal-breadcrumbs {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.badge-channel {
  color: #ea580c;
  background: #fff7ed;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid #ffedd5;
}
.badge-subgroup {
  color: #0e7490;
  background: #ecfeff;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid #cffafe;
}
.task-modal-breadcrumbs .sep {
  color: #cbd5e1;
}

.task-modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 3px;
  line-height: 1.25;
}

.task-modal-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  border: 1px solid transparent;
}
.task-modal-status-badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.task-modal-close {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.task-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: scale(1.05);
}

.task-modal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 16px;
  padding: 6px 20px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 10.5px;
  flex-shrink: 0;
}
.meta-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.meta-item.full-width {
  grid-column: 1 / -1;
}
.meta-label {
  color: #64748b;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.meta-value {
  color: #1e293b;
  font-weight: 600;
}

.task-modal-body {
  padding: 10px 20px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  flex: 1 1 auto;
}

.task-modal-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.section-badge-header {
  display: flex;
  align-items: center;
  gap: 5px;
}
.section-badge-header .icon {
  font-size: 13px;
}
.section-badge-header h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #0f172a;
}

.task-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.task-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 10.5px;
  color: #334155;
  line-height: 1.35;
  background: #f8fafc;
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}
.task-checklist .check-icon {
  color: #10b981;
  font-weight: 800;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}
.task-checklist.result-list li {
  background: #fffdf5;
  border-color: #fef08a;
}
.task-checklist.result-list .check-icon {
  color: #d97706;
}

.task-modal-footer {
  padding: 6px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}
.btn-modal-action {
  background: #0f3750;
  color: #ffffff;
  font-weight: 600;
  font-size: 11px;
  padding: 5px 14px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-modal-action:hover {
  background: #1e4f70;
}

@media (max-width: 768px) {
  .task-modal-body {
    grid-template-columns: 1fr;
  }
  .task-modal-meta-grid {
    grid-template-columns: 1fr;
  }
  .task-modal-container {
    max-height: 94vh;
  }
}

/* ==========================================================================
   STAFFING TAB - COMPREHENSIVE EXECUTIVE PRESENTATION
   ========================================================================== */

.staffing-dashboard {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

/* 1. Executive Metrics Row */
.staff-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.staff-metric-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.staff-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.staff-metric-card .metric-icon {
  font-size: 26px;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.staff-metric-card.total-fte .metric-icon {
  background: #eff6ff;
}
.staff-metric-card.stat-ready .metric-icon {
  background: #ecfdf5;
}
.staff-metric-card.stat-training .metric-icon {
  background: #fffbeb;
}
.staff-metric-card.stat-missing .metric-icon {
  background: #fef2f2;
}

.staff-metric-card .metric-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.staff-metric-card .metric-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.staff-metric-card .metric-val {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.staff-metric-card .metric-val .unit {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
.staff-metric-card .metric-sub {
  font-size: 11px;
  color: #64748b;
}

/* 2. Visual Capacity Distribution Bar */
.staff-capacity-bar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.capacity-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12.5px;
}
.capacity-bar-title {
  font-weight: 700;
  color: #1e293b;
}
.capacity-bar-stats {
  color: #64748b;
}
.capacity-bar-stats strong {
  color: #0f172a;
}
.capacity-progress-track {
  height: 24px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}
.capacity-progress-fill {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: width 0.3s ease;
}
.capacity-progress-fill.fill-ready {
  background: linear-gradient(90deg, #10b981, #059669);
}
.capacity-progress-fill.fill-training {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}
.capacity-progress-fill.fill-missing {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* 3. Squads Header & Filter */
.staff-squads-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.squads-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
}
.squads-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}
.staff-filter-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.staff-filter-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.staff-filter-btn:hover {
  color: #0f172a;
}
.staff-filter-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-weight: 700;
}

/* 4. Squads Grid */
.staff-squads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}

.staff-squad-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.staff-squad-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.squad-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.squad-badge-icon {
  font-size: 22px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.squad-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.squad-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.squad-name {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.squad-fte-pill {
  font-size: 10px;
  font-weight: 700;
  color: #0f3750;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid #bae6fd;
  white-space: nowrap;
}
.squad-readiness {
  font-size: 11px;
  font-weight: 600;
}
.squad-readiness.is-ready { color: #059669; }
.squad-readiness.is-training { color: #d97706; }
.squad-readiness.is-missing { color: #dc2626; }

.squad-mission {
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 3px solid #0f3750;
}
.squad-mission strong {
  color: #1e293b;
}

.squad-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.squad-tasks-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}
.squad-task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.staff-task-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  background: #f1f5f9;
  color: #1e293b;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}
.staff-task-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.staff-task-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  filter: brightness(0.96);
}

.staff-task-pill.status-ready {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}
.staff-task-pill.status-ready .dot { background: #16a34a; }

.staff-task-pill.status-training {
  background: #fefce8;
  color: #854d0e;
  border-color: #fef08a;
}
.staff-task-pill.status-training .dot { background: #ca8a04; }

.staff-task-pill.status-weak {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}
.staff-task-pill.status-weak .dot { background: #ea580c; }

.staff-task-pill.status-missing {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.staff-task-pill.status-missing .dot { background: #dc2626; }

.squad-kpi-footer {
  font-size: 11.5px;
  color: #334155;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 6px;
  line-height: 1.45;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.squad-kpi-row {
  display: block;
}
.squad-kpi-row.kpi-3m strong {
  color: #0284c7;
}
.squad-kpi-row.kpi-full strong {
  color: #0f172a;
}

/* 5. RACI Matrix Table */
.staff-raci-section {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.raci-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.raci-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.raci-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.raci-pill {
  font-size: 11px;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}
.raci-pill strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  color: #fff;
  font-size: 9.5px;
}
.raci-pill.r strong { background: #2563eb; }
.raci-pill.a strong { background: #7c3aed; }
.raci-pill.c strong { background: #059669; }
.raci-pill.i strong { background: #64748b; }
.raci-pill.x strong { background: #94a3b8; }

.raci-table-responsive {
  width: 100%;
  overflow-x: auto;
}
.raci-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 680px;
}
.raci-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid #e2e8f0;
  font-size: 11.5px;
}
.raci-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.raci-table tr:hover td {
  background: #f8fafc;
}

.raci-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.raci-badge.r {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.raci-badge.a {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}
.raci-badge.c {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.raci-badge.i {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.raci-badge.x {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
}

/* 6. 90-Day Roadmap */
.staff-roadmap-section {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.roadmap-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 16px;
}
.roadmap-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.roadmap-col {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.roadmap-col-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.phase-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  width: fit-content;
}
.roadmap-col-head.phase-1 .phase-badge {
  background: #eff6ff;
  color: #1d4ed8;
}
.roadmap-col-head.phase-2 .phase-badge {
  background: #fefce8;
  color: #a16207;
}
.roadmap-col-head.phase-3 .phase-badge {
  background: #ecfdf5;
  color: #047857;
}
.roadmap-col-head h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.roadmap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.roadmap-list li {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
  position: relative;
  padding-left: 14px;
}
.roadmap-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #0f3750;
  font-weight: 800;
  font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .staff-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .roadmap-cols {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .staff-metrics-row {
    grid-template-columns: 1fr;
  }
  .staff-squads-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CUSTOMER JOURNEY TAB - B2B INDUSTRIAL 5-STAGE MATRIX
   ========================================================================== */

.journey-dashboard {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

/* 1. Funnel Metrics Summary Row */
.journey-funnel-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.journey-funnel-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.journey-funnel-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}
.journey-funnel-card.phase-1::before { background: #2563eb; }
.journey-funnel-card.phase-2::before { background: #d97706; }
.journey-funnel-card.phase-3::before { background: #9333ea; }
.journey-funnel-card.phase-4::before { background: #16a34a; }
.journey-funnel-card.phase-5::before { background: #0891b2; }

.journey-funnel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.funnel-step-num {
  font-size: 14px;
  font-weight: 800;
  color: #64748b;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.funnel-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.funnel-phase-title {
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.funnel-kpi-val {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.funnel-sub {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* 2. Header & Filter Toolbar */
.journey-header-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.journey-main-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
}
.journey-sub-title {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
}
.journey-filter-tabs {
  display: flex;
  gap: 5px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
}
.journey-filter-btn {
  background: none;
  border: none;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.journey-filter-btn:hover {
  color: #0f172a;
}
.journey-filter-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  font-weight: 700;
}

/* 3. Board Container & Horizontal Scroll */
.journey-board-container {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 12px;
}

.journey-columns-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(280px, 1fr));
  gap: 16px;
  min-width: 1440px;
}

/* Stage Columns */
.journey-stage-col {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.journey-stage-header {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}
.journey-stage-col.phase-1 .journey-stage-header { background: #eff6ff; border-top: 4px solid #2563eb; }
.journey-stage-col.phase-2 .journey-stage-header { background: #fffbeb; border-top: 4px solid #d97706; }
.journey-stage-col.phase-3 .journey-stage-header { background: #faf5ff; border-top: 4px solid #9333ea; }
.journey-stage-col.phase-4 .journey-stage-header { background: #f0fdf4; border-top: 4px solid #16a34a; }
.journey-stage-col.phase-5 .journey-stage-header { background: #ecfeff; border-top: 4px solid #0891b2; }

.stage-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.journey-stage-col.phase-1 .stage-badge { color: #1d4ed8; }
.journey-stage-col.phase-2 .stage-badge { color: #b45309; }
.journey-stage-col.phase-3 .stage-badge { color: #7e22ce; }
.journey-stage-col.phase-4 .stage-badge { color: #15803d; }
.journey-stage-col.phase-5 .stage-badge { color: #0e7490; }

.stage-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}
.stage-sub {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}

/* Card Stack inside Column */
.journey-card-stack {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* Blocks styling */
.journey-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.journey-block:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.block-label {
  font-size: 10px;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
}
.block-label .icon {
  font-size: 12px;
}

.block-mindset {
  background: #fefce8;
  border-color: #fef08a;
}
.block-mindset .block-content {
  font-size: 11.5px;
  color: #713f12;
  line-height: 1.4;
}

.journey-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.journey-list li {
  font-size: 11px;
  color: #334155;
  line-height: 1.35;
  position: relative;
  padding-left: 12px;
}
.journey-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #0f3750;
  font-weight: 800;
}

.block-sla {
  background: #eff6ff;
  border-color: #dbeafe;
}
.sla-badge {
  display: inline-flex;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #dbeafe;
  color: #1e40af;
  width: fit-content;
}
.sla-badge.warning {
  background: #fef3c7;
  color: #92400e;
}
.sla-badge.success {
  background: #dcfce7;
  color: #166534;
}
.sla-desc {
  font-size: 10.5px;
  color: #1e3a8a;
  line-height: 1.35;
  margin: 0;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tech-tags span {
  font-size: 9.5px;
  font-weight: 600;
  background: #e2e8f0;
  color: #334155;
  padding: 2px 6px;
  border-radius: 4px;
}

.block-kpi {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.kpi-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kpi-box strong {
  font-size: 12px;
  color: #15803d;
}
.gate-text {
  font-size: 10px;
  color: #166534;
  line-height: 1.3;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .journey-funnel-row {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .journey-funnel-row {
    grid-template-columns: 1fr;
  }
}
