body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: #111827;
  color: #f9fafb;
  padding: 1rem;
  box-sizing: border-box;
}

.sidebar h1 {
  font-size: 1.3rem;
  margin: 0 0 1rem 0;
}

.sidebar nav button {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 0.375rem;
  background: #1f2937;
  color: #f9fafb;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
}

.sidebar nav button:hover {
  background: #374151;
}

#main-content {
  flex: 1;
  padding: 1rem;
  box-sizing: border-box;
}

.main-panel {
  background: white;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.submenu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.submenu-card {
  border-radius: 0.5rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  background: #f9fafb;
}

.submenu-card:hover {
  background: #eef2ff;
  border-color: #6366f1;
}

.mc-question-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mc-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.mc-option {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
  text-align: left;
}

.mc-option.correct {
  background: #dcfce7;
  border-color: #22c55e;
}

.mc-option.wrong {
  background: #fee2e2;
  border-color: #ef4444;
}

.secondary-button {
  padding: 0.35rem 0.8rem;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  cursor: pointer;
}

.sequence-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.sequence-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.6rem;
  border-radius: 0.375rem;
  border: 1px solid #e5e7eb;
  margin-bottom: 0.3rem;
  cursor: pointer;
}

.sequence-item.selected {
  background: #e0f2fe;
  border-color: #3b82f6;
}

.sequence-item.correct {
  background: #dcfce7;
  border-color: #22c55e;
}

.sequence-item.incorrect {
  background: #fee2e2;
  border-color: #ef4444;
}

.seq-step {
  font-weight: 600;
  color: #4b5563;
  min-width: 1.5rem;
  text-align: right;
}

.asana-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.92rem;
}

.asana-table th,
.asana-table td {
  border: 1px solid #e5e7eb;
  padding: 0.35rem 0.5rem;
  text-align: left;
}

.asana-table th {
  background: #f3f4f6;
  cursor: pointer;
  white-space: nowrap;
}

.asana-table th.sort-asc::after {
  content: " ▲";
}
.asana-table th.sort-desc::after {
  content: " ▼";
}
