* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f4f5;
  color: #111827;
}

.topbar {
  background: #111827;
  color: #f9fafb;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
}

.nav a {
  color: #e5e7eb;
  margin-left: 16px;
  text-decoration: none;
  font-size: 14px;
}

.nav a:hover {
  text-decoration: underline;
}

.container {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 16px;
}

.card {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  margin-bottom: 20px;
}

.card h2 {
  margin-top: 0;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.form label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.form-group label {
  font-size: 14px;
  margin-bottom: 4px;
}

input, select, textarea {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

textarea {
  resize: vertical;
}

button, .btn {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  background: #2563eb;
  color: #ffffff;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

button:hover, .btn:hover {
  background: #1d4ed8;
}

.error, .alert-error {
  color: #b91c1c;
  padding: 8px 12px;
  background: #fee2e2;
  border-radius: 6px;
  margin-bottom: 12px;
}

.success, .alert-success {
  color: #15803d;
  padding: 8px 12px;
  background: #dcfce7;
  border-radius: 6px;
  margin-bottom: 12px;
}

.muted {
  color: #6b7280;
  font-size: 13px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 6px;
  text-align: left;
}

.table th {
  background: #f9fafb;
}

.table tr:nth-child(even) {
  background: #f9fafb;
}

.table tr.clickable {
  cursor: pointer;
}

.stats {
  list-style: none;
  padding-left: 0;
}

.stats li {
  margin-bottom: 4px;
}

.list {
  list-style: none;
  padding-left: 0;
}

.badge {
  padding: 2px 6px;
  border-radius: 999px;
  background: #e5e7eb;
  font-size: 12px;
  margin-left: 8px;
}

/* Popup */
.popup {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup.hidden {
  display: none;
}

.popup-content {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px 20px;
  min-width: 280px;
  max-width: 400px;
  position: relative;
}

.popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.calendar {
  margin-top: 12px;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 4px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.day {
  min-height: 80px;
  background: #f9fafb;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  position: relative;
}

.day-number {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 2px;
}

.day-content {
  margin-top: 2px;
}

.day--empty {
  background: transparent;
}

.day--service.clickable,
.day--shooting.clickable {
  cursor: pointer;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.form-inline-group {
  min-width: 220px;
}

.pagination {
  margin-top: 15px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.page-link {
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  text-decoration: none;
  color: #111;
  font-size: 13px;
}

.page-link--active {
  background: #2563eb;
  border-color: #2563eb;
  color: white;
}

.btn-disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.queue-info {
  margin-bottom: 12px;
  font-size: 14px;
}

.slot {
  border-top: 1px solid #e5e7eb;
  padding-top: 4px;
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px 32px;
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.1);
  max-width: 360px;
  width: 100%;
}

.login-card h1 {
  margin-top: 0;
  font-size: 24px;
}

.login-card h2 {
  margin-top: 4px;
  font-size: 18px;
}
