* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

body {
  background: #f4f6fb;
  color: #1f2937;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  gap: 16px;
}

.app-header h1 {
  font-size: 24px;
  margin-bottom: 4px;
}

.subtitle {
  color: #6b7280;
  font-size: 14px;
}

.privacy-note {
  font-size: 12px;
  color: #6b7280;
  background: #f9fafb;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
}

.app {
  display: grid;
  grid-template-columns: 320px 320px 1fr;
  gap: 16px;
  padding: 24px 32px;
}

.tabs {
  display: flex;
  gap: 12px;
  padding: 16px 32px 0;
}

.tab-button {
  border-radius: 999px;
  background: #eef2ff;
  color: #1f2937;
  border: 1px solid transparent;
}

.tab-button.active {
  background: #1f6feb;
  color: #ffffff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
}

.panel h2 {
  font-size: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #4b5563;
}

.field.inline {
  flex-direction: row;
  gap: 10px;
  align-items: center;
}

textarea {
  min-height: 110px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  resize: vertical;
  font-size: 13px;
  color: #111827;
}

input,
select,
button {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 13px;
}

button {
  background: #1f6feb;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

button:hover {
  background: #155ec7;
}

button.ghost {
  background: transparent;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.helper-text {
  color: #6b7280;
  font-size: 12px;
}

.message-area {
  min-height: 48px;
  font-size: 12px;
  color: #6b7280;
}

.message-area .error {
  color: #dc2626;
}

.chart-panel {
  min-height: 700px;
}

.chart-wrapper {
  flex: 1;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px dashed #d1d5db;
  padding: 8px;
  overflow: auto;
}

#chartSvg {
  width: 100%;
  height: 100%;
  min-height: 600px;
}

.node rect {
  rx: 10px;
  ry: 10px;
  stroke: #64748b;
  stroke-width: 1px;
}

.node.existing rect {
  fill: #d9ecff;
}

.node.planned rect {
  fill: #efe0ff;
}

.node.virtual rect {
  fill: #e5e7eb;
}

.node text {
  font-size: 12px;
  fill: #0f172a;
}

.link {
  stroke: #94a3b8;
  stroke-width: 1.2px;
  fill: none;
}

.drag-ghost {
  position: fixed;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(31, 111, 235, 0.1);
  border: 1px solid #1f6feb;
  font-size: 12px;
  color: #1f2937;
}

.burn-rate {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #f9fafb;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
}

.burn-rate strong {
  font-size: 16px;
  color: #111827;
}

.forecast-layout,
.integrations-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  padding: 24px 32px;
}

.forecast-chart canvas {
  width: 100%;
  height: 460px;
}

.schedule-header,
.schedule-row {
  display: grid;
  grid-template-columns: 140px 1fr 70px 120px 40px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}

.schedule-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-row input {
  width: 100%;
}

.schedule-row button {
  padding: 6px 8px;
}

@media (max-width: 1200px) {
  .forecast-layout,
  .integrations-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .app {
    grid-template-columns: 1fr;
  }
}
