:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface2: #334155;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --primary-dim: #1d4ed8;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  --teal: #14b8a6;
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: #93c5fd; }
a:hover { color: #bfdbfe; }

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: relative !important; height: auto !important; }
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--surface2);
  padding: 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar h1 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
  font-weight: 700;
}
.sidebar .tagline { font-size: 0.75rem; color: var(--muted); margin-bottom: 1rem; }

.nav-group { margin-bottom: 1rem; }
.nav-group-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.nav-link {
  display: block;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 2px;
}
.nav-link:hover, .nav-link.active { background: var(--primary-dim); color: white; }

.main { padding: 1.5rem 2rem 3rem; max-width: 920px; }

.hero {
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.hero h2 { margin: 0 0 0.5rem; font-size: 1.75rem; }
.hero p { margin: 0; opacity: 0.95; }

.track-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.track-card {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.track-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}
.track-card .icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.track-card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.track-card p { margin: 0; font-size: 0.8rem; color: var(--muted); }

.box {
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  border-left: 4px solid;
}
.box.info { background: #1e3a5f; border-color: var(--primary); }
.box.step { background: #2e1065; border-color: var(--purple); }
.box.success { background: #14532d; border-color: var(--success); }
.box.warning { background: #422006; border-color: var(--warning); }
.box.danger { background: #450a0a; border-color: var(--danger); }
.box.link { background: #134e4a; border-color: var(--teal); }
.box strong { display: block; margin-bottom: 0.35rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }

section { margin-bottom: 2.5rem; scroll-margin-top: 1rem; }
section h2 {
  font-size: 1.35rem;
  border-bottom: 1px solid var(--surface2);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
section h3 { font-size: 1.05rem; color: #cbd5e1; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0;
}
th, td {
  border: 1px solid var(--surface2);
  padding: 0.5rem 0.65rem;
  text-align: left;
}
th { background: var(--surface); }

/* Wizard */
.wizard { margin: 1.5rem 0; }
.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.wizard-step-btn {
  flex: 1;
  min-width: 70px;
  padding: 0.5rem;
  border: 1px solid var(--surface2);
  background: var(--surface);
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.7rem;
}
.wizard-step-btn.done { border-color: var(--success); color: var(--success); }
.wizard-step-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.wizard-panel { display: none; background: var(--surface); border-radius: var(--radius); padding: 1.25rem; border: 1px solid var(--surface2); }
.wizard-panel.active { display: block; }
.wizard-nav { display: flex; gap: 0.5rem; margin-top: 1rem; }
.wizard-nav button {
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: var(--surface2); color: var(--text); }
.btn-success { background: var(--success); color: #052e16; }

.progress-bar {
  height: 6px;
  background: var(--surface2);
  border-radius: 3px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.progress-bar fill { display: block; height: 100%; background: var(--success); transition: width 0.3s; }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--teal)); transition: width 0.3s; }

.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0;
  cursor: pointer;
  font-size: 0.9rem;
}
.checklist input { margin-top: 0.25rem; accent-color: var(--success); }

.tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tab-btn {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--surface2);
  background: var(--surface);
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
}
.tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.toolbar {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 100;
}
.toolbar button, .toolbar a {
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: none;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: none;
}

.acc-item { border: 1px solid var(--surface2); border-radius: 8px; margin-bottom: 0.5rem; overflow: hidden; }
.acc-head {
  padding: 0.75rem 1rem;
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}
.acc-body { display: none; padding: 1rem; background: #0f172a; font-size: 0.9rem; }
.acc-item.open .acc-body { display: block; }

@media print {
  .sidebar, .toolbar, .wizard-nav { display: none !important; }
  .layout { grid-template-columns: 1fr; }
  body { background: white; color: black; }
  .box { border: 1px solid #ccc; background: #f8fafc !important; color: black !important; }
}
