/* ═══════════════════════════════════════════════════════════════════════════
   MASTER_PLAN.CSS — Premium Jira-Style Interactive Timeline (LIGHT MODE)
   All colors are explicitly light — no reliance on dark CSS variables.
═══════════════════════════════════════════════════════════════════════════ */

/* ── Tab Container ── */
#tab-master-plan {
  padding: 0;
  height: calc(100vh - 70px);
  overflow: hidden;
  background: #f1f5f9;
}
#tab-master-plan.active {
  display: flex;
  flex-direction: column;
}

.mp-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  z-index: 10;
}

.mp-header-bar h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-north-star {
  font-size: 0.75rem;
  color: #6366f1;
  padding: 3px 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
}

.mp-updated {
  font-size: 0.72rem;
  color: #64748b;
}

/* ── View Switcher ── */
.mp-view-switcher {
  display: flex;
  gap: 6px;
  padding: 10px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  z-index: 10;
}

.mp-view-btn {
  padding: 6px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.mp-view-btn:hover {
  background: #f1f5f9;
  color: #334155;
}
.mp-view-btn.active {
  background: rgba(99,102,241,0.1);
  border-color: #6366f1;
  color: #4f46e5;
  font-weight: 600;
}

/* ── v2.0: North Star Banner ── */
.mp-north-star-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%);
  color: white;
  flex-shrink: 0;
  z-index: 10;
}
.mp-ns-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mp-ns-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.3));
}
.mp-ns-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mp-ns-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.mp-ns-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
}
.mp-ns-version {
  font-size: 0.7rem;
  padding: 3px 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

/* ── v2.0: Pillar Filter Bar ── */
.mp-pillar-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  z-index: 10;
  overflow-x: auto;
}
.mp-pillar-chip {
  padding: 5px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.mp-pillar-chip:hover {
  background: #f1f5f9;
  border-color: var(--pillar-color, #94a3b8);
  color: var(--pillar-color, #334155);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.mp-pillar-chip.active {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-weight: 600;
}

/* ── v2.0: Pillar Badge (on tree rows) ── */
.mp-pillar-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.6rem;
  font-weight: 600;
  margin-left: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Main Layout: Split Tree / Gantt Timeline ── */
.mp-timeline-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Left tree pane */
.mp-tree-pane {
  width: 380px;
  min-width: 380px;
  max-width: 380px;
  border-right: 1px solid #e2e8f0;
  background: #ffffff;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  z-index: 5;
}

.mp-tree-header {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f8fafc;
}

.mp-tree-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}
.mp-tree-body::-webkit-scrollbar { display: none; }

/* Tree nodes */
.mp-tree-row {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.82rem;
  color: #1e293b;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}
.mp-tree-row:hover {
  background: rgba(99, 102, 241, 0.04);
}
.mp-tree-row.active {
  background: rgba(99, 102, 241, 0.08);
}

/* Tree indentation & symbols */
.mp-tree-indent { display: inline-flex; }
.mp-tree-indent-level { width: 18px; flex-shrink: 0; }

.mp-tree-toggle {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  color: #94a3b8;
  font-size: 0.65rem;
  cursor: pointer;
  border-radius: 3px;
}
.mp-tree-toggle:hover {
  background: #f1f5f9;
  color: #334155;
}

.mp-tree-icon {
  margin-right: 6px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.mp-tree-title-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.mp-tree-row-track .mp-tree-title-text { font-weight: 700; color: #4f46e5; }
.mp-tree-row-epic .mp-tree-title-text { font-weight: 600; color: #334155; }
.mp-tree-row-task .mp-tree-title-text { font-weight: 400; color: #64748b; }

/* Task status indicator */
.mp-tree-status {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
  text-transform: uppercase;
}
.mp-tree-status.status-done { background: #dcfce7; color: #16a34a; }
.mp-tree-status.status-in_progress { background: #fef3c7; color: #d97706; }
.mp-tree-status.status-todo { background: #f1f5f9; color: #94a3b8; }
.mp-tree-status.status-blocked { background: #fee2e2; color: #dc2626; }

/* Inline task addition trigger */
.mp-tree-add-btn {
  opacity: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 4px;
  color: #6366f1;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.mp-tree-row:hover .mp-tree-add-btn { opacity: 1; }
.mp-tree-add-btn:hover {
  background: #6366f1;
  color: #fff;
}

/* ── Right Gantt Pane ── */
.mp-gantt-pane {
  flex: 1;
  overflow: auto;
  position: relative;
  background: #f8fafc;
}

.mp-gantt-grid {
  position: relative;
  min-width: 1200px;
}

/* Gantt Calendar Scale Headers */
.mp-gantt-scale-header {
  height: 56px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 6;
}

.mp-gantt-months {
  display: flex;
  height: 28px;
  border-bottom: 1px solid #e2e8f0;
}
.mp-gantt-month-cell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  border-right: 1px solid #e2e8f0;
  text-transform: uppercase;
}

.mp-gantt-weeks {
  display: flex;
  height: 28px;
}
.mp-gantt-week-cell {
  width: calc(100% / 12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  border-right: 1px solid #f1f5f9;
}

/* Gantt rows layout */
.mp-gantt-body {
  position: relative;
}

.mp-gantt-row {
  height: 44px;
  position: relative;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
}
.mp-gantt-row:hover {
  background: rgba(99, 102, 241, 0.03);
}

/* Verticals grid column lines overlay */
.mp-gantt-grid-columns {
  position: absolute;
  top: 56px; bottom: 0; left: 0; right: 0;
  display: flex;
  pointer-events: none;
  z-index: 1;
}
.mp-gantt-grid-col {
  width: calc(100% / 12);
  height: 100%;
  border-right: 1px solid #f1f5f9;
  flex-shrink: 0;
}

/* Today line marker */
.mp-gantt-today-line {
  position: absolute;
  top: 56px; bottom: 0;
  width: 2px;
  background: rgba(16, 185, 129, 0.5);
  border-left: 1px dashed #10b981;
  pointer-events: none;
  z-index: 4;
}
.mp-gantt-today-badge {
  position: absolute;
  top: 60px;
  left: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #059669;
  background: #dcfce7;
  border: 1px solid #86efac;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Milestone Flags in header scale */
.mp-milestone-flag {
  position: absolute;
  top: 6px;
  z-index: 7;
  cursor: pointer;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mp-flag-marker {
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #6366f1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.mp-milestone-flag.rag-red .mp-flag-marker { background: #ef4444; }
.mp-milestone-flag.rag-amber .mp-flag-marker { background: #f59e0b; }
.mp-milestone-flag.rag-green .mp-flag-marker { background: #10b981; }
.mp-milestone-flag.rag-grey .mp-flag-marker { background: #94a3b8; }

.mp-flag-line {
  width: 1px;
  height: 38px;
  border-left: 1px dotted #cbd5e1;
  pointer-events: none;
}
.mp-flag-label {
  position: absolute;
  top: 18px;
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

/* ── Gantt Scheduled Bars ── */
.mp-gantt-bar-wrapper {
  position: absolute;
  height: 26px;
  top: 9px;
  display: flex;
  align-items: center;
  z-index: 3;
}

.mp-gantt-bar {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  position: relative;
  cursor: grab;
  user-select: none;
  display: flex;
  align-items: center;
  padding: 0 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mp-gantt-bar:active { cursor: grabbing; }
.mp-gantt-bar:hover {
  border-color: #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.mp-gantt-bar-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

/* Permanent ID on Gantt Bar */
.mp-gantt-bar-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(99, 102, 241, 0.12);
  margin-right: 6px;
  color: #4f46e5;
  pointer-events: none;
}

/* Drag & Resize handlers */
.mp-drag-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 6px;
  cursor: w-resize;
  background: transparent;
  transition: background 0.15s;
  z-index: 5;
}
.mp-drag-handle:hover {
  background: rgba(99, 102, 241, 0.3);
}
.mp-drag-handle-left { left: 0; border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.mp-drag-handle-right { right: 0; border-top-right-radius: 6px; border-bottom-right-radius: 6px; }

/* Bar tooltips */
.mp-gantt-tooltip {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.72rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.15s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
  text-align: left;
}
.mp-gantt-bar-wrapper:hover .mp-gantt-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.mp-gantt-tooltip strong { display: block; color: #fff; margin-bottom: 2px; }
.mp-gantt-tooltip span { color: #cbd5e1; }

/* ── Dependency SVGs Layer ── */
.mp-gantt-svg-layer {
  position: absolute;
  top: 56px; left: 0;
  width: 100%; height: calc(100% - 56px);
  pointer-events: none;
  z-index: 2;
}

.mp-dependency-line {
  stroke: rgba(100, 116, 139, 0.4);
  stroke-width: 1.5;
  fill: none;
  marker-end: url(#arrow);
  transition: stroke 0.15s, stroke-width 0.15s;
}
.mp-dependency-line.highlighted {
  stroke: #6366f1;
  stroke-width: 2.2;
  z-index: 10;
}

/* ── Inline Task Creation Modal ── */
.mp-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.mp-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.mp-modal {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  width: 480px;
  max-width: 90%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0,0,0,0.08);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}
.mp-modal-overlay.show .mp-modal {
  transform: scale(1);
}

.mp-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mp-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}
.mp-modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  cursor: pointer;
}
.mp-modal-close:hover { color: #334155; }

.mp-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mp-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mp-form-group label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
}
.mp-form-input, .mp-form-select {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  color: #1e293b;
  font-family: inherit;
  font-size: 0.85rem;
}
.mp-form-input:focus, .mp-form-select:focus {
  border-color: #6366f1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.mp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mp-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.mp-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.mp-btn-cancel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
}
.mp-btn-cancel:hover { background: #f1f5f9; }

.mp-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  color: #fff;
}
.mp-btn-primary:hover { opacity: 0.9; }

/* ── Board & Drill View ── */
.mp-board, .mp-drill {
  height: calc(100vh - 122px);
  overflow-y: auto;
  padding: 20px 24px;
  background: #f1f5f9;
}

.mp-board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.mp-board-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.mp-track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.mp-track-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.mp-tc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}
.mp-tc-title {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.mp-track-dot-lg {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.mp-tc-title strong {
  display: block;
  font-size: 0.95rem;
  color: #1e293b;
}
.mp-tc-title small {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}

.mp-owner-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6366f1;
  background: rgba(99,102,241,0.08);
  padding: 3px 8px;
  border-radius: 6px;
}

.mp-tc-progress {
  margin-bottom: 14px;
}
.mp-tc-progress span {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 4px;
  display: block;
}

.mp-progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.mp-progress-bar-lg { height: 8px; margin-top: 10px; }
.mp-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.mp-tc-milestones {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mp-tc-ms-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  transition: background 0.15s;
}
.mp-tc-ms-row:hover { background: #f1f5f9; }
.mp-tc-ms-row.done { opacity: 0.5; }
.mp-rag-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mp-rag-dot.red { background: #ef4444; }
.mp-rag-dot.amber { background: #f59e0b; }
.mp-rag-dot.green { background: #10b981; }
.mp-rag-dot.grey { background: #94a3b8; }
.mp-rag-dot.black { background: #1e293b; }

.mp-tc-ms-id {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.72rem;
  color: #6366f1;
}
.mp-tc-ms-name {
  flex: 1;
  color: #334155;
}
.mp-tc-ms-date {
  font-size: 0.72rem;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
}
.mp-tc-ms-days {
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 40px;
  text-align: right;
}
.mp-tc-ms-days.red { color: #ef4444; }
.mp-tc-ms-days.amber { color: #d97706; }
.mp-tc-ms-days.green { color: #059669; }
.mp-tc-ms-days.grey { color: #94a3b8; }

/* ── Drill View ── */
.mp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  color: #64748b;
}
.mp-back-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.8rem;
  color: #475569;
  cursor: pointer;
  font-family: inherit;
}
.mp-back-btn:hover { background: #f1f5f9; }
.mp-bc-sep { color: #cbd5e1; }
.mp-bc-track { font-weight: 600; }
.mp-bc-ms { font-weight: 600; color: #1e293b; }

.mp-drill-header {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.mp-drill-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.mp-ms-id-lg {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
}
.mp-drill-title h2 {
  margin: 0;
  font-size: 1.1rem;
  color: #1e293b;
}
.mp-drill-title p {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: #64748b;
}
.mp-drill-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 10px;
}
.mp-drill-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  display: block;
}
.mp-drill-stat-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
}
.mp-days.overdue { color: #dc2626; font-weight: 700; }
.mp-days.today { color: #d97706; font-weight: 700; }

.mp-epics {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mp-no-epics {
  text-align: center;
  padding: 32px;
  color: #94a3b8;
  font-size: 0.85rem;
}

.mp-epic {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.mp-epic-blocked { border-left: 4px solid #ef4444; }

.mp-epic-header {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f5f9;
}
.mp-epic-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mp-epic-id {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.78rem;
  color: #6366f1;
}
.mp-epic-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: #1e293b;
}
.mp-priority-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}
.mp-priority-badge.priority-P0 { background: #fee2e2; color: #dc2626; }
.mp-priority-badge.priority-P1 { background: #fef3c7; color: #d97706; }
.mp-priority-badge.priority-P2 { background: #f1f5f9; color: #64748b; }

.mp-epic-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mp-epic-progress span { font-size: 0.72rem; color: #64748b; }
.mp-epic-progress .mp-progress-bar { width: 80px; }
.mp-blocked-badge { font-size: 0.68rem; color: #dc2626; }
.mp-active-badge { font-size: 0.68rem; color: #d97706; }

.mp-task-table {
  padding: 0 18px 12px;
}
.mp-task-row {
  display: grid;
  grid-template-columns: 80px 1fr 90px 65px 90px;
  gap: 8px;
  padding: 8px 0;
  font-size: 0.78rem;
  border-bottom: 1px solid #f8fafc;
  align-items: center;
}
.mp-task-row.mp-task-header {
  font-weight: 700;
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  border-bottom: 1px solid #e2e8f0;
}
.mp-task-id {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: #6366f1;
  font-size: 0.72rem;
}
.mp-task-name { color: #334155; }
.mp-task-assignee {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #475569;
}
.mp-assignee-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mp-task-due {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #64748b;
}
.mp-task-due.overdue { color: #dc2626; font-weight: 700; }
.mp-task-status-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-align: center;
}
.mp-task-status-badge.status-done { background: #dcfce7; color: #16a34a; }
.mp-task-status-badge.status-in_progress { background: #fef3c7; color: #d97706; }
.mp-task-status-badge.status-todo { background: #f1f5f9; color: #94a3b8; }
.mp-task-status-badge.status-blocked { background: #fee2e2; color: #dc2626; }

.mp-task-row.mp-task-status-blocked { background: #fef2f2; }
.mp-task-row.mp-task-status-done { opacity: 0.6; }

/* ── Daily Board Badge ── */
.mp-task-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(99,102,241,0.06);
  border: 1px solid rgba(99,102,241,0.15);
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.15s;
}
.mp-task-badge:hover { background: rgba(99,102,241,0.12); }
.mp-task-badge.urgent { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.06); }
.mp-task-badge.warn { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.06); }

.mp-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.mp-badge-track { font-weight: 600; color: #475569; }
.mp-badge-sep { color: #cbd5e1; }
.mp-badge-ms { color: #64748b; }
.mp-badge-days { font-weight: 700; }
.mp-badge-days.urgent { color: #dc2626; }
.mp-badge-days.warn { color: #d97706; }

/* ── Loading State ── */
.mp-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  font-size: 1rem;
  color: #64748b;
}
