/* General Body & Font Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #111827; /* gray-900 */
    color: #d1d5db; /* gray-300 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header Flair */
header {
    background: rgba(17, 24, 39, 0.8); /* gray-900 with opacity */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom-color: #374151; /* gray-700 */
}

/* Initiative Sidebar Styles */
.initiative-item {
    cursor: default; /* Change cursor to default as the whole item isn't clickable */
    transition: background-color 0.2s ease-in-out, padding-left 0.2s ease-in-out, border-color 0.2s ease-in-out;
    border-left: 4px solid transparent;
    color: #d1d5db; /* gray-300 */
}

.initiative-item:hover {
    background-color: #1f2937; /* gray-800 */
}

.initiative-item.active {
    background-color: #991b1b; /* red-800 */
    border-color: #f87171; /* red-400 */
    font-weight: 700;
    color: #fee2e2; /* red-100 */
}

/* Style for inline initiative editing */
.initiative-edit-input {
    background-color: #1f2937; /* gray-800 */
    color: #fee2e2; /* red-100 */
    border: 1px solid #f87171; /* red-400 */
    border-radius: 5px;
    padding: 2px 6px;
    width: 100%;
}

/* --- Dagre-D3 Graph Styles --- */
.task-map {
    -webkit-tap-highlight-color: transparent;
    overflow: auto;
    cursor: default;
}

/* This is the SVG <rect> that dagre-d3 draws. We'll use it as the node background/border. */
.task-map .node rect {
    fill: #374151; /* gray-700 */
    stroke: #4b5563; /* gray-600 */
    stroke-width: 1px;
    rx: 5px;
    ry: 5px;
}

.task-map .node:hover rect {
    fill: #4b5563; /* gray-600 */
}

.task-map .node.source-selected rect {
    stroke: #f87171; /* red-400 */
    stroke-width: 2px;
}

/* This is the HTML <div> we inject into the SVG node as a label */
.task-map .task-node-label {
    color: #d1d5db; /* gray-300 */
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    white-space: normal; /* Allow text to wrap */
    word-break: break-word; /* Break long words if they are wider than the max-width */
    max-width: 160px;
}

.task-map .edgePath path {
    stroke: #f87171; /* red-400 */
    stroke-width: 2.5px;
    fill: none;
}

.task-map .arrowhead {
    fill: #f87171; /* red-400 */
    stroke: none;
}

/* General UI Flair & Enhancements */
button, a.button {
    transition: all 0.2s ease-in-out;
}

button:hover, a.button:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

button:active, a.button:active {
    transform: translateY(0px);
    filter: brightness(0.95);
}

/* Improved Focus Rings for Accessibility */
input:focus, select:focus, button:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.6); /* red-400 with opacity */
}

/* Modal animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#feedback-modal, #beta-modal, #edit-task-modal {
    animation: fadeIn 0.3s ease-out;
}

#feedback-modal > div, #beta-modal > div, #edit-task-modal > div {
    animation: slideIn 0.3s ease-out;
}

/* Gradient text for headings */
.gradient-heading {
    background: linear-gradient(to right, #ef4444, #fca5a5); /* red-500 to red-300 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* CTA Gradient */
.cta-gradient {
    background-image: linear-gradient(to right, #dc2626, #ef4444); /* red-600 to red-500 */
}
.cta-gradient:hover {
    background-image: linear-gradient(to right, #b91c1c, #dc2626); /* red-700 to red-600 */
}