/* =========================
   Global layout (Option A)
   ========================= */

html, body {
  height: 100%;
}

body {
  font-family: system-ui, sans-serif;
  margin: 0;
  background: #f6f7fb;

  /* stránka přes flex */
  display: flex;
  flex-direction: column;
}

/* main wrapper přes celou dostupnou výšku */
main.page {
  flex: 1;
  display: flex;
  flex-direction: column;

  padding: 24px;
  box-sizing: border-box;
}

/* klasický obsah do "karty" */
.wrap {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 16px;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,.06);
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

label {
  display: block;
  font-size: 14px;
  margin: 10px 0 6px;
}

input, textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d9dbe7;
  border-radius: 10px;
  box-sizing: border-box;
}

select {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #d9dbe7;
  box-sizing: border-box;
}

button {
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.btn {
  background: #2f6fed;
  color: white;
}

a {
  color: #2f6fed;
  text-decoration: none;
}

.muted {
  color: #667;
  font-size: 14px;
}

.error {
  background: #ffe8e8;
  border: 1px solid #ffb3b3;
  padding: 10px;
  border-radius: 10px;
  margin: 10px 0;
}

/* =========================
   Booking list (index)
   ========================= */

/* hlavička nahoře */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;

  margin-bottom: 14px;
}

.page-title {
  margin: 0 0 4px;
}

.btn-link {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  background: #2f6fed;
  color: #fff;
}

.btn-link:hover {
  opacity: .92;
}

/* wrapper tabulky vyplní zbytek výšky stránky */
.table-wrapper {
  flex: 1;              /* zabere zbytek místa pod topbar */
  overflow: auto;       /* scroll jen v tabulce */
  width: 100%;
  border-radius: 14px;

  /* aby pozadí za sticky headerem vypadalo hezky */
  background: white;
  border: 1px solid #e7e9f3;
}

/* tabulka */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid #e7e9f3;
  vertical-align: top;
}

/* hlavička tabulky "přilepená" při scrollu */
th {
  text-align: left;
  color: #334;
  background: #f3f5ff;
  font-weight: 600;

  position: sticky;
  top: 0;
  z-index: 1;
}

tr:hover td {
  background: #fafbff;
}

/* akce v tabulce */
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-small {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d9dbe7;
  background: #fff;
  cursor: pointer;
}

.btn-danger {
  border-color: #ffb3b3;
  background: #fff5f5;
}

.form-inline {
  margin: 0;
}

/* =========================
   Small utility helpers
   ========================= */

.flex-1 { flex: 1; }
.minw-220 { min-width: 220px; }
.mt-14 { margin-top: 14px; }

/* =========================
   Booking step1 calendar
   ========================= */

.calendar {
  max-width: 420px;
  margin: 0 auto;
}

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  margin-bottom: 10px;
}

.cal-header button {
  background: none;
  border: 0;
  font-size: 20px;
  cursor: pointer;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day, .cal-week {
  text-align: center;
  padding: 8px;
  font-size: 14px;
}

.cal-week {
  font-weight: 600;
  color: #555;
}

.cal-day {
  border-radius: 10px;
  cursor: pointer;
}

.cal-day:hover {
  background: #eef2ff;
}

.cal-day.selected {
  background: #2f6fed;
  color: white;
}

.cal-day.disabled {
  color: #bbb;
  cursor: not-allowed;
}

.section {
  margin-top: 20px;
}

.times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.time-btn {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  cursor: pointer;
  background: #fff;
}

.time-btn.active {
  background: #2f6fed;
  color: white;
  border-color: #2f6fed;
}

/* pozor: .actions už používáš v tabulce, takže pro tlačítka dole radši jiný název */
.actions-right {
  margin-top: 20px;
  text-align: right;
}

button.next {
  background: #2f6fed;
  color: white;
  border: 0;
  padding: 12px 16px;
  border-radius: 12px;
}