:root {
  --bg: #0f172a;
  --panel: #111827;
  --card: #0b1220;
  --accent: #38bdf8;
  --accent-2: #22c55e;
  --warn: #f59e0b;
  --error: #ef4444;
  --text: #e5e7eb;
  --muted: #94a3b8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  padding: 16px 24px;
  border-bottom: 1px solid #1f2937;
  display: flex;
  align-items: center;
  gap: 12px;
}

header h1 {
  margin: 0;
  font-size: 18px;
}

main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  padding: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 12px;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

button, select, input, textarea {
  background: #0b1220;
  color: var(--text);
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 6px 10px;
}

button.primary { border-color: var(--accent); }
button.success { border-color: var(--accent-2); }
button.warn { border-color: var(--warn); }
button.error { border-color: var(--error); }

.grid {
  display: grid;
  gap: 6px;
  background: #0b1220;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #1f2937;
}

.seat {
  min-height: 56px;
  border: 1px dashed #2b3647;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  position: relative;
}

.seat.occupied { border-style: solid; color: var(--text); }
.seat.disabled { opacity: 0.2; border-style: solid; }
.seat.error { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.seat.warn { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }

.student {
  background: var(--card);
  border: 1px solid #243043;
  border-radius: 8px;
  padding: 6px 8px;
  margin-bottom: 6px;
  cursor: grab;
  font-size: 12px;
}

.student .tags {
  color: var(--muted);
  font-size: 11px;
}

.section-title {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0;
}

.rules {
  display: grid;
  gap: 8px;
}

.rule-item {
  background: var(--card);
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 6px;
  font-size: 12px;
}

.footer {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 1100px) {
  main { grid-template-columns: 1fr; }
}
