:root {
  --ocean: #0f6e7a;
  --sand: #f6efe4;
  --ink: #1d2b2f;
}

/* ---------- Availability calendar ---------- */

.av {
  color: var(--ink, #1d2b2f);
  font-size: 1rem;
  line-height: 1.4;
}

.av-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.av-prev,
.av-next {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--ocean, #0f6e7a);
  background: #fff;
  color: var(--ocean, #0f6e7a);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.av-prev:hover,
.av-next:hover {
  background: var(--ocean, #0f6e7a);
  color: #fff;
}

.av-prev:focus-visible,
.av-next:focus-visible {
  outline: 2px solid var(--ocean, #0f6e7a);
  outline-offset: 2px;
}

.av-prev:disabled,
.av-next:disabled {
  opacity: 0.45;
  cursor: default;
  background: #fff;
  color: var(--ocean, #0f6e7a);
}

.av-months {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.av-month {
  min-width: 0;
}

.av-title {
  font-weight: 700;
  text-align: center;
  margin: 0 0 8px;
  font-size: 0.95rem;
}

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

.av-wd {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7a7e;
  text-align: center;
  padding: 2px 0;
}

.av-day {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e3e7e8;
  font-size: 0.85rem;
  color: var(--ink, #1d2b2f);
  box-sizing: border-box;
  user-select: none;
}

.av-empty {
  background: transparent;
  border-color: transparent;
}

.av-booked {
  background: #e9b3a8;
  color: #5b1f14;
  text-decoration: line-through;
}

.av-blocked {
  background: #d5d9db;
  color: #555;
  text-decoration: line-through;
}

.av-past {
  opacity: 0.35;
}

.av-today {
  outline: 2px solid var(--ocean, #0f6e7a);
  outline-offset: -2px;
}

.av-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  font-size: 0.8rem;
  color: #4a5a5e;
}

.av-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.av-sw {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  flex: 0 0 auto;
  box-sizing: border-box;
}

.av-sw-free {
  background: #fff;
  border: 1px solid #e3e7e8;
}

.av-sw-booked {
  background: #e9b3a8;
}

.av-sw-blocked {
  background: #d5d9db;
}

.av-note {
  font-size: 0.78rem;
  color: #6b7a7e;
  margin-top: 8px;
}

.av[data-compact] .av-day {
  font-size: 0.75rem;
}

.av[data-compact] .av-wd {
  font-size: 0.65rem;
}

/* ---------- Staff block manager ---------- */

.sb-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.sb-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: #4a5a5e;
}

.sb-form input,
.sb-form select,
.sb-form textarea {
  font: inherit;
  font-size: 0.9rem;
  padding: 7px 9px;
  border: 1px solid #cfd6d8;
  border-radius: 6px;
  background: #fff;
  color: var(--ink, #1d2b2f);
  box-sizing: border-box;
  width: 100%;
}

.sb-form input:focus,
.sb-form select:focus,
.sb-form textarea:focus {
  outline: 2px solid var(--ocean, #0f6e7a);
  outline-offset: -1px;
  border-color: var(--ocean, #0f6e7a);
}

.sb-form button {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--ocean, #0f6e7a);
  background: var(--ocean, #0f6e7a);
  color: #fff;
  cursor: pointer;
}

.sb-form button:hover {
  filter: brightness(1.08);
}

.sb-form button:disabled {
  opacity: 0.5;
  cursor: default;
  filter: none;
}

.sb-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.sb-list th,
.sb-list td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid #e3e7e8;
  vertical-align: middle;
}

.sb-list th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7a7e;
  font-weight: 600;
}

.sb-list tbody tr:hover {
  background: #fafcfc;
}

.sb-del {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: 0.75rem;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #b3261e;
  background: #fff;
  color: #b3261e;
  cursor: pointer;
}

.sb-del:hover {
  background: #b3261e;
  color: #fff;
}

.sb-del:disabled {
  opacity: 0.4;
  cursor: default;
  background: #fff;
  color: #b3261e;
}

.sb-tag-booking,
.sb-tag-block {
  display: inline-block;
  font-size: 0.7rem;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.sb-tag-booking {
  background: #e9b3a8;
  color: #5b1f14;
}

.sb-tag-block {
  background: #d5d9db;
  color: #555;
}

.sb-warn {
  font-size: 0.8rem;
  color: #7a4a00;
  background: #fdf3d8;
  border: 1px solid #f0dca6;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 10px 0;
}

@media (max-width: 480px) {
  .av-months {
    grid-template-columns: 1fr;
  }

  .sb-list th,
  .sb-list td {
    padding: 6px 5px;
  }
}