/* Duo Backend Graph Styles v3.1 - Parallel Roadmap & Deadlines */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body {
  font-family: var(--font-sans);
  background-color: #060911;
  color: #f1f5f9;
  overflow: hidden;
}

code, pre, .font-mono {
  font-family: var(--font-mono);
}

/* Canvas Graph Background with grid */
.graph-viewport {
  position: relative;
  width: 100%;
  height: calc(100vh - 105px);
  overflow: hidden;
  cursor: grab;
  background-color: #060911;
  background-image: radial-gradient(rgba(51, 65, 85, 0.4) 1px, transparent 1px);
  background-size: 28px 28px;
  user-select: none;
}

.graph-viewport.grabbing {
  cursor: grabbing;
}

.graph-world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

/* Swimlane Bands (Horizontal Tracks) */
.lane-band {
  position: absolute;
  left: 20px;
  width: 3100px;
  height: 190px;
  border-radius: 16px;
  border: 1.5px solid rgba(51, 65, 85, 0.35);
  background: rgba(15, 23, 42, 0.45);
  pointer-events: none;
  transition: all 0.2s ease;
}

.lane-band-1 {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0.03) 40%, rgba(15, 23, 42, 0.45) 100%);
  border-color: rgba(99, 102, 241, 0.3);
}

.lane-band-2 {
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.08) 0%, rgba(234, 179, 8, 0.03) 40%, rgba(15, 23, 42, 0.45) 100%);
  border-color: rgba(234, 179, 8, 0.3);
}

.lane-band-3 {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.08) 0%, rgba(56, 189, 248, 0.03) 40%, rgba(15, 23, 42, 0.45) 100%);
  border-color: rgba(56, 189, 248, 0.3);
}

.lane-band-4 {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 40%, rgba(15, 23, 42, 0.45) 100%);
  border-color: rgba(16, 185, 129, 0.3);
}

.lane-band-5 {
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.08) 0%, rgba(236, 72, 153, 0.03) 40%, rgba(15, 23, 42, 0.45) 100%);
  border-color: rgba(236, 72, 153, 0.3);
}

/* Phase Vertical Column Headers (Weeks 1-2, 3-4, 5-6, 7-8) */
.phase-header {
  position: absolute;
  top: 15px;
  text-align: center;
  pointer-events: none;
  z-index: 6;
}

.phase-divider {
  position: absolute;
  top: 15px;
  width: 1px;
  height: 1140px;
  border-left: 1px dashed rgba(71, 85, 105, 0.35);
  pointer-events: none;
}

/* SVG Line Animations */
.edge-line {
  fill: none;
  stroke: #243042;
  stroke-width: 2.5px;
  stroke-linecap: round;
  transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.edge-line-active {
  stroke: #6366f1;
  stroke-width: 2.5px;
  stroke-dasharray: 6, 6;
  animation: flowLine 25s linear infinite;
}

.edge-line-done {
  stroke: #10b981;
  stroke-width: 3px;
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.4));
}

@keyframes flowLine {
  to {
    stroke-dashoffset: -1000;
  }
}

/* Node card styling */
.node-card {
  position: absolute;
  width: 230px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  border: 1.5px solid #334155;
  border-radius: 14px;
  padding: 8px 12px;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
  z-index: 10;
}

.node-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: #6366f1;
  box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.35);
  z-index: 25;
}

/* Overdue Node State (Deadlines missed) */
.node-card.is-overdue {
  border-color: #f43f5e !important;
  background: rgba(244, 63, 94, 0.08) !important;
  box-shadow: 0 0 20px -2px rgba(244, 63, 94, 0.45) !important;
}

.node-card.is-overdue:hover {
  border-color: #fb7185 !important;
  box-shadow: 0 0 25px -1px rgba(244, 63, 94, 0.65) !important;
}

/* Urgent Node State (Deadlines due within 3 days) */
.node-card.is-urgent {
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.08) !important;
  box-shadow: 0 0 20px -2px rgba(245, 158, 11, 0.45) !important;
}

.node-card.is-urgent:hover {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 25px -1px rgba(245, 158, 11, 0.65) !important;
}

/* Completed Node State (Done overrides deadline warnings) */
.node-card.is-done {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.09) !important;
  box-shadow: 0 0 20px -3px rgba(16, 185, 129, 0.35) !important;
}

.node-card.is-done:hover {
  border-color: #34d399 !important;
  box-shadow: 0 0 25px -2px rgba(16, 185, 129, 0.55) !important;
}

/* Filter Dimmed */
.node-card.is-dimmed {
  opacity: 0.2;
  filter: grayscale(70%);
}

/* Drawer / Slide-over */
.drawer-panel {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-open {
  transform: translateX(0);
}

.drawer-closed {
  transform: translateX(100%);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fade-in {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom scrollbars inside drawer */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}
