* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  color: #222;
}
header {
  background: #0d6efd;
  padding: 24px 0 28px;
  color: white;
  display: block;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  text-align: center;
  gap: 14px;
}

.header-content h1 {
  margin: 0;
  font-size: 52px;
  line-height: 1;
  font-weight: 700;
}

.header-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-buttons button {
  background: white;
  color: #0d6efd;
  border: none;
  border-radius: 8px;
  padding: 11px 24px;
  font-weight: 700;
  cursor: pointer;
}
header h1 {
  margin: 0;
  font-size: 42px;
  text-align: center;
}
header p {
  margin: 0;
}
button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 9px 13px;
  background: #0d6efd;
  color: white;
  font-weight: 600;
}
header button {
  background: white;
  color: #0d6efd;
}
button:hover {
  opacity: 0.9;
}
main {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 12px;
}
.card {
  background: white;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.week-controls,
.week-jump,
.info-row,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
#week-label {
  font-weight: bold;
  font-size: 18px;
}
input,
select {
  padding: 9px;
  border: 1px solid #bbb;
  border-radius: 6px;
  width: 100%;
}
.week-jump input {
  max-width: 180px;
}
.table-wrapper {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 900px;
}
th,
td {
  border: 1px solid #ccd6dd;
  text-align: center;
  padding: 5px;
  font-size: 14px;
}
th {
  background: #e9ecef;
  position: sticky;
  top: 0;
  z-index: 1;
}
.time-cell {
  font-weight: bold;
  background: #f1f1f1;
  width: 70px;
}
.slot {
  cursor: pointer;
  min-width: 110px;
}
.slot:hover {
  outline: 2px solid #0d6efd;
}
.free-even {
  background: #ddf8dd;
}
.free-odd {
  background: #bdf0bd;
}
.slot.booked {
  font-weight: bold;
  color: white;
}
.booked.blue {
  background: #0d6efd;
}
.booked.yellow {
    background: #ffeb3b;
    color: #222;
}
.booked.orange {
  background: #f59f00;
  color: #111;
}
.booked.purple {
  background: #7950f2;
}
.booked.gray {
  background: #6c757d;
}
.booked.red {
  background: #dc3545;
}
.legend {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid #aaa;
  margin-left: 8px;
}
.legend.free-light {
  background: #ddf8dd;
}
.legend.free-dark {
  background: #bdf0bd;
}
.legend.booked.blue {
  background: #0d6efd;
}

.legend.booked.orange {
  background: #f59f00;
}
.legend.booked.yellow {
    background: #ffeb3b;
}
.legend.booked.purple {
  background: #7950f2;
}

.legend.booked.gray {
  background: #6c757d;
}

.legend.booked.red {
  background: #dc3545;
}
.form-row {
  margin-bottom: 12px;
}
.form-row label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}
small {
  display: block;
  margin-top: 4px;
  color: #666;
}
#form-message,
#login-message {
  font-weight: bold;
}
.booking-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  background: #fafafa;
}
.booking-item strong {
  display: block;
  margin-bottom: 4px;
}
.booking-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.delete-btn {
  background: #dc3545;
}
.group-delete-btn {
  background: #9c1c2b;
}
.mobile-days {
  display: none;
}
.mobile-day {
  border: 1px solid #ddd;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.mobile-day h3 {
  margin: 0;
  padding: 12px;
  background: #e9ecef;
}
.mobile-slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid #ddd;
  cursor: pointer;
}
.mobile-slot.booked {
  color: white;
  font-weight: bold;
}
.mobile-slot .time {
  font-weight: bold;
}
.mobile-slot .name {
  margin-left: 10px;
  text-align: right;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;

  z-index: 99999; /* EZ AZ ÚJ */
}

.modal-box {
  background: white;
  border-radius: 10px;
  padding: 20px;
  width: 100%;
  max-width: 420px;

  position: relative; /* EZ AZ ÚJ */
  z-index: 100000; /* EZ AZ ÚJ */
}
@media (max-width: 700px) {
  header {
    align-items: flex-start;
  }
  header h1 {
    font-size: 20px;
  }
  .card {
    padding: 12px;
  }
  .desktop-table {
    display: none;
  }
  .mobile-days {
    display: block;
  }
}
.delete-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.delete-modal-box {
  background: white;
  padding: 22px;
  border-radius: 12px;
  width: 95%;
  max-width: 430px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.delete-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

#delete-single {
  background: #0d6efd;
}

#delete-group {
  background: #dc3545;
}

#delete-cancel {
  background: #6c757d;
}