* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  background: #111827;
  color: #e5e7eb;
  margin: 0;
  padding: 20px;
}
.container { max-width: 1100px; margin: 0 auto; }
h1 { text-align: center; }

.layout { display: flex; gap: 30px; flex-wrap: wrap; }
.hall-wrap { flex: 1 1 600px; }
.cart {
  flex: 0 0 280px;
  background: #1f2937;
  padding: 20px;
  border-radius: 12px;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.screen {
  background: linear-gradient(to bottom, #374151, #1f2937);
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  letter-spacing: 8px;
  color: #9ca3af;
  margin-bottom: 24px;
  font-size: 13px;
}

.hall { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 6px; align-items: center; justify-content: center; }
.row-label { width: 20px; text-align: center; color: #6b7280; font-size: 12px; }

.seat {
  width: 32px;
  height: 32px;
  border-radius: 6px 6px 3px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s;
}
.seat.free { background: #10b981; color: #052e16; }
.seat.free:hover { transform: scale(1.12); }
.seat.reserved { background: #f59e0b; color: #451a03; cursor: not-allowed; }
.seat.sold { background: #ef4444; color: #450a0a; cursor: not-allowed; }
.seat.selected { background: #3b82f6; color: #fff; box-shadow: 0 0 0 2px #93c5fd; }

.legend { margin-top: 24px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend .seat { width: 18px; height: 18px; cursor: default; }

.cart h2 { margin-top: 0; }
.cart ul { list-style: none; padding: 0; margin: 0 0 16px; max-height: 320px; overflow-y: auto; }
.cart li { padding: 6px 0; border-bottom: 1px solid #374151; font-size: 14px; }
.cart li.empty { color: #6b7280; font-style: italic; }
.total { font-size: 18px; margin: 16px 0; }
#reserve-btn {
  width: 100%; padding: 12px;
  background: #3b82f6; color: white; border: none;
  border-radius: 8px; font-size: 15px; cursor: pointer;
}
#reserve-btn:disabled { background: #4b5563; cursor: not-allowed; }

.modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal.hidden { display: none; }
.modal-content {
  background: #1f2937; padding: 24px;
  border-radius: 12px; width: 90%; max-width: 420px;
}
.modal-content h2 { margin-top: 0; }
.modal-content label { display: block; margin-bottom: 12px; font-size: 14px; }
.modal-content input {
  width: 100%; padding: 8px 10px; margin-top: 4px;
  background: #111827; border: 1px solid #374151;
  border-radius: 6px; color: white; font-size: 14px;
}
.actions { display: flex; gap: 10px; margin-top: 16px; }
.actions button {
  flex: 1; padding: 10px; border: none;
  border-radius: 8px; cursor: pointer; font-size: 14px;
}
.actions button[type=button] { background: #4b5563; color: white; }
.actions button[type=submit] { background: #3b82f6; color: white; }
.error { color: #f87171; font-size: 13px; margin: 8px 0; min-height: 16px; }

/* admin */
.admin-wrap { max-width: 1100px; margin: 0 auto; }
.admin-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 16px;
}
.logout-link { color: #93c5fd; text-decoration: none; }
table {
  width: 100%; border-collapse: collapse;
  background: #1f2937; border-radius: 8px; overflow: hidden;
}
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #374151; }
th { background: #111827; font-size: 13px; text-transform: uppercase; color: #9ca3af; }
tr:last-child td { border-bottom: none; }
.status-paid { color: #10b981; font-weight: 600; }
.status-reserved { color: #f59e0b; font-weight: 600; }
.btn-confirm {
  padding: 6px 12px; background: #10b981; color: white;
  border: none; border-radius: 6px; cursor: pointer; font-size: 13px;
}
.btn-confirm:hover { background: #059669; }
.empty-note { color: #6b7280; font-style: italic; }