:root {
  --bg: linear-gradient(160deg, #f7f9ff 0%, #e8efff 100%);
  --card-bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #cbd5e1;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #475569;
  --secondary-hover: #334155;
  --available: #16a34a;
  --available-hover: #15803d;
  --pending: #f59e0b;
  --confirmed: #dc2626;
  --selected: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.card {
  width: 100%;
  max-width: 920px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
  padding: 20px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 64px;
  height: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.1;
  font-weight: 800;
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--secondary);
}

.auth-actions {
  display: flex;
  gap: 8px;
}

button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  background: var(--primary);
  transition: transform 0.08s ease, background 0.2s ease;
}

button:hover:enabled {
  background: var(--primary-hover);
}

button:active:enabled {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.secondary {
  background: var(--secondary);
}

button.secondary:hover:enabled {
  background: var(--secondary-hover);
}

.profile-card {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
}

.profile-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.profile-card p {
  margin: 5px 0;
}

.legend {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #334155;
  font-size: 0.92rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.dot.available {
  background: var(--available);
}

.dot.pending {
  background: var(--pending);
}

.dot.confirmed {
  background: var(--confirmed);
}

.dot.selected {
  background: var(--selected);
}

.seat-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.seat {
  min-height: 48px;
  border-radius: 10px;
  border: none;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--available);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.seat-num {
  font-size: 0.86rem;
  font-weight: 700;
}

.seat-time {
  font-size: 0.67rem;
  line-height: 1;
}

.seat:hover:enabled {
  background: var(--available-hover);
  transform: translateY(-1px);
}

.seat.pending {
  background: var(--pending);
  cursor: not-allowed;
}

.seat.confirmed {
  background: var(--confirmed);
  cursor: not-allowed;
}

.seat.selected {
  background: var(--selected);
  cursor: not-allowed;
}

.message {
  margin: 16px 0 0;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 12px;
  font-weight: 600;
}

.message.info {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.message.success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.message.error {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.admin-panel {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px;
}

.admin-panel h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 8px;
  text-align: left;
  vertical-align: middle;
}

.admin-table thead th {
  background: #eef2ff;
  color: #1e293b;
  font-weight: 700;
}

.admin-actions-cell {
  display: flex;
  gap: 6px;
}

.admin-action-btn {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-action-btn.approve {
  background: #1d4ed8;
}

.admin-action-btn.approve:hover:enabled {
  background: #1e40af;
}

.admin-action-btn.reject {
  background: #dc2626;
}

.admin-action-btn.reject:hover:enabled {
  background: #b91c1c;
}

.admin-empty {
  margin: 10px 0 0;
  color: #475569;
  font-weight: 600;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop.hidden,
.hidden {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 390px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.25);
  padding: 16px;
}

.modal-card h2 {
  margin: 0;
  font-size: 1.2rem;
}

.modal-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.modal-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.phone-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-form label {
  font-weight: 600;
}

.phone-form input {
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0 10px;
  font-size: 0.95rem;
}

.phone-form input:focus {
  outline: 2px solid #93c5fd;
  border-color: #60a5fa;
}

@media (max-width: 720px) {
  .seat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-logo {
    width: 56px;
  }

  .brand-title {
    font-size: 1.5rem;
  }

  .brand-subtitle {
    font-size: 0.94rem;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-table {
    min-width: 720px;
  }
}
