@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@500;700&family=IBM+Plex+Sans:wght@300;400;600&display=swap");

:root {
  --bg: #0d1117;
  --panel: rgba(18, 24, 33, 0.92);
  --card: rgba(25, 32, 44, 0.9);
  --accent: #f59e0b;
  --accent-2: #38bdf8;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 20%, #1b263a 0%, #0d1117 60%);
  min-height: 100vh;
}

.bg-orbit {
  position: fixed;
  inset: -20% -10% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2), transparent 70%);
  filter: blur(0px);
  pointer-events: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.85));
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand-mark {
  background: var(--accent);
  color: #1f2937;
  padding: 12px 16px;
  font-weight: 700;
  border-radius: 12px;
  font-family: "Fraunces", serif;
  letter-spacing: 0.08em;
}

.brand-title {
  font-family: "Fraunces", serif;
  font-size: 20px;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

.btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.btn.primary {
  background: var(--accent);
  color: #1f2937;
}

.btn.ghost:hover {
  border-color: var(--accent-2);
}

.layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 24px 32px 48px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  text-align: left;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 500;
}

.nav-item.active,
.nav-item:hover {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.08);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: var(--panel);
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.panel.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

h2 {
  margin-top: 0;
  font-family: "Fraunces", serif;
}

.grid-3 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid-2 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--card);
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.card.tall {
  margin-top: 16px;
}

.metric {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent-2);
}

.code {
  margin: 0;
  font-family: "IBM Plex Sans", monospace;
  font-size: 12px;
  color: #cbd5f5;
  white-space: pre-wrap;
}

.muted {
  color: var(--muted);
}

.progress-chart {
  width: 100%;
  height: 280px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.08), rgba(15, 23, 42, 0.16));
}

.chart-axis-line {
  stroke: rgba(148, 163, 184, 0.45);
  stroke-width: 1;
}

.chart-grid {
  stroke: rgba(148, 163, 184, 0.16);
  stroke-width: 1;
}

.chart-y-label {
  fill: var(--muted);
  font-size: 11px;
}

.chart-x-label {
  fill: var(--muted);
  font-size: 11px;
}

.chart-area {
  fill: rgba(56, 189, 248, 0.14);
}

.chart-line {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  fill: #f59e0b;
  stroke: rgba(15, 23, 42, 0.9);
  stroke-width: 1.2;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.timeline-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.timeline-table th,
.timeline-table td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  padding: 10px 12px;
  font-size: 12px;
  text-align: left;
  vertical-align: top;
}

.timeline-table th {
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.55);
  position: sticky;
  top: 0;
  z-index: 1;
}

.timeline-table td {
  color: #d1d5db;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: var(--panel);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  width: 320px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0;
}

.field input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    flex-direction: row;
    overflow-x: auto;
  }
  .nav-item {
    white-space: nowrap;
  }
}
