/* Base styling for the admin app */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
  background-color: #f7f7f9;
  color: #333;
  padding: 1rem;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* Layout for login screen */
#login-container {
  max-width: 400px;
  margin: 3rem auto;
  padding: 2rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
#login-container h1 {
  margin-top: 0;
}
#login-container input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
#login-container button {
  padding: 0.5rem 1rem;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
}

/* Board grid */
#board-container {
  max-width: 1000px;
  margin: 0 auto;
}

#board {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  margin-top: 1rem;
}

.cell {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 2px;
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 12px;
  padding: 3px;
  overflow: hidden;
}

.cell.filled {
  background: #e0f7fa;
}

.cell .number {
  font-weight: bold;
  font-size: 0.75rem;
  color: #555;
}

.cell .names {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  font-size: 0.65rem;
  line-height: 1.1;
  color: #222;
}
.cell .names span.teacher {
  color: #777;
}

/* Probabilities display */
#probabilities {
  display: flex;
  flex-direction: column;
  max-width: 1000px;
  margin: 1rem auto;
}
table.prob-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
table.prob-table th,
table.prob-table td {
  border: 1px solid #ccc;
  padding: 4px 6px;
  font-size: 0.75rem;
  text-align: center;
}

#controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem auto;
  max-width: 1000px;
}

#controls button {
  padding: 0.5rem 0.75rem;
  border: none;
  background: #333;
  color: #fff;
  border-radius: 4px;
  font-size: 0.75rem;
}

#message {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #c00;
}