body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f7f7fa;
  color: #1f2937;
}

.container {
  max-width: 1800px;
  margin: 24px auto;
  padding: 0 20px 24px;
}

.tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

h1 {
  margin-bottom: 6px;
}

.sub {
  margin-top: 0;
  color: #4b5563;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  margin-top: 14px;
}

label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 600;
}

input[type="file"] {
  width: 100%;
}

input[type="number"] {
  width: 100%;
  padding: 8px;
}

select {
  width: 100%;
  padding: 8px;
}

textarea {
  width: 100%;
  padding: 8px;
  font-family: inherit;
  box-sizing: border-box;
}

.btn {
  display: inline-block;
  margin-top: 14px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: #1d4ed8;
}

.hidden {
  display: none;
}

.result-wrap {
  margin-top: 12px;
}

.result-wrap p {
  margin: 0 0 8px;
}

.mapping-wrap {
  margin-top: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  background: #fafafa;
}

.mapping-row {
  margin-bottom: 8px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.tiny {
  margin-top: 8px;
  font-size: 12px;
  color: #4b5563;
}

.review-wrap {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
}

.review-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.review-stats {
  margin: 0 0 10px;
  font-weight: 600;
}

.btn.secondary {
  background: #4b5563;
}

.btn.secondary:hover {
  background: #374151;
}

.cabin-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
}

.cabin-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.cabin-card.cabin-girl {
  background: #fff2f7;
}

.cabin-card.cabin-boy {
  background: #eef7ff;
}

.cabin-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.cabin-card ul {
  margin: 0;
  padding-left: 16px;
}

.cabin-card li.camper-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: grab;
}

.cabin-card li.camper-row:active {
  cursor: grabbing;
}

.cabin-card ul.drop-hover {
  outline: 2px dashed #2563eb;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.06);
}

.unassigned-wrap ul.drop-hover {
  outline: 2px dashed #2563eb;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.06);
}

.counselor-matrix {
  table-layout: auto;
  width: max-content;
  min-width: 100%;
}

.counselor-matrix th,
.counselor-matrix td {
  font-size: 12px;
  vertical-align: middle;
  min-width: 150px;
  white-space: normal;
}

.counselor-matrix th:first-child,
.counselor-matrix td:first-child {
  width: 90px;
  min-width: 90px;
  font-weight: 700;
}

.counselor-matrix .slot-status-row td {
  background: #f3f4f6;
  color: #374151;
  font-weight: 700;
}

.counselor-matrix .slot-cell {
  min-height: 28px;
  min-width: 150px;
  background: #ffffff;
}

.counselor-matrix .slot-cell.slot-disabled {
  background: #f3f4f6;
}

.counselor-matrix .slot-cell.drop-hover {
  outline: 2px dashed #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.counselor-chip {
  display: block;
  width: auto;
  cursor: grab;
  position: relative;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.2;
  padding: 2px 18px 2px 4px;
  border-radius: 4px;
  background: #eff6ff;
}

.counselor-delete-btn {
  display: none;
  margin-left: 6px;
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.counselor-chip .counselor-delete-btn {
  position: absolute;
  right: 4px;
  top: 2px;
  margin-left: 0;
}

.counselor-chip:hover .counselor-delete-btn,
.camper-row:hover .counselor-delete-btn {
  display: inline-block;
}

.camp-col-head-short {
  font-weight: 700;
  color: #111827;
}

.camp-col-head-full {
  margin-top: 2px;
  font-size: 10px;
  color: #4b5563;
  line-height: 1.2;
  word-break: break-word;
}

.counselor-camp-rows {
  table-layout: fixed;
}

.counselor-camp-rows th,
.counselor-camp-rows td {
  vertical-align: top;
}

.camp-name-cell {
  width: 220px;
  font-weight: 700;
}

.camp-drop-cell {
  min-height: 48px;
}

.camp-drop-cell .counselor-chip {
  display: block;
  margin-bottom: 3px;
}

.camp-drop-cell.drop-hover {
  outline: 2px dashed #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.camp-pref-cell div {
  margin-bottom: 4px;
}

.camper-name {
  flex: 1 1 auto;
}

.camper-flag {
  white-space: nowrap;
}

.camper-roommate-status {
  white-space: nowrap;
}

.roommate-emoji {
  cursor: help;
}

.requested-by-emoji {
  cursor: help;
}

.camper-grade {
  margin-left: auto;
  text-align: right;
  font-size: calc(1em - 2pt);
  white-space: nowrap;
}

.unassigned-wrap {
  margin-top: 12px;
  border-top: 1px dashed #d1d5db;
  padding-top: 10px;
}

.unassigned-wrap h4 {
  margin: 0 0 6px;
}

.unassigned-wrap ul {
  margin: 0;
  padding-left: 18px;
}

.unassigned-wrap li.camper-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: grab;
}

.unassigned-wrap li.camper-row:active {
  cursor: grabbing;
}

.ok {
  color: #065f46;
}

.error {
  color: #b91c1c;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid #e5e7eb;
}
