.booking-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 72px;
}

.booking-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 30px 0 26px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 28px;
  background-image:
    linear-gradient(135deg, rgba(7, 42, 59, .94), rgba(0, 92, 115, .76)),
    url('assets/images/hero-pesaro-coastal-rowing-2026.webp');
  background-size: cover;
  background-position: center 46%;
  color: #fff;
  box-shadow: 0 16px 40px rgba(8, 45, 60, .16);
}

.booking-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: clamp(20px, 5vw, 70px);
  top: 50%;
  width: clamp(120px, 16vw, 210px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  opacity: .12;
  background:
    linear-gradient(#fff, #fff) 30% 24% / 40% 8% no-repeat,
    linear-gradient(#fff, #fff) 30% 42% / 40% 8% no-repeat,
    linear-gradient(#fff, #fff) 30% 60% / 26% 8% no-repeat,
    radial-gradient(circle at 71% 69%, transparent 0 17%, #fff 18% 23%, transparent 24%),
    linear-gradient(135deg, transparent 44%, #fff 45% 55%, transparent 56%),
    linear-gradient(#fff, #fff) center / 72% 72% no-repeat;
  border-radius: 28px;
  mask: linear-gradient(#000 0 0);
}

.booking-hero > * {
  position: relative;
  z-index: 1;
}

.booking-hero .eyebrow { color: rgba(255,255,255,.78); }
.booking-hero h1 { margin: 8px 0 14px; max-width: 820px; }
.booking-hero p { max-width: 800px; margin-bottom: 0; }
.booking-hero__meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.booking-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  font-size: .9rem;
  font-weight: 700;
}
.booking-chip--light {
  color: #155264;
  background: #edf8fa;
  border-color: #c6e2e8;
}

.booking-shell { display: grid; gap: 22px; }
.booking-card {
  background: #fff;
  border: 1px solid rgba(17, 52, 70, .13);
  border-radius: 22px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 12px 34px rgba(20, 58, 74, .07);
}
.booking-card h2, .booking-card h3 { margin-top: 0; }
.booking-card__intro { margin-top: -4px; color: #54636b; }
.booking-section-number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 8px;
  border-radius: 50%;
  background: #0b6478;
  color: #fff;
  font-size: .88rem;
  vertical-align: .1em;
}

.booking-lookup {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
  gap: 24px 32px;
  align-items: end;
  margin-bottom: 22px;
}
.booking-lookup__copy h2 { margin-bottom: 8px; }
.booking-lookup__copy p:last-child { margin-bottom: 0; color: #596d75; }
.booking-lookup__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}
.booking-lookup__form .booking-status { grid-column: 1 / -1; }
.lookup-result {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 18px;
  border-radius: 16px;
  background: #f3f8f9;
  border: 1px solid #d3e1e5;
}
.lookup-result__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.lookup-result__head small,
.lookup-result__head strong { display: block; }
.lookup-result__head small { color: #64767d; margin-bottom: 2px; }
.lookup-result__head strong { font-size: 1.25rem; color: #153d4a; letter-spacing: .04em; }
.lookup-result__details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.lookup-result__details p { margin: 0; }
.lookup-result__boats {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #d6e2e5;
}
.lookup-result__boats ul,
.booking-success__boats ul { margin: 8px 0 0; padding-left: 20px; }
.lookup-result__boats li,
.booking-success__boats li { margin: 5px 0; }
.lookup-result__boats li span,
.booking-success__boats li span { display: block; color: #536b74; margin-top: 2px; }

.booking-closed {
  margin: 0 0 22px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid #e0bd71;
  background: #fff8e8;
  color: #6f5314;
}
.booking-closed strong { display: block; font-size: 1.05rem; }
.booking-closed p { margin: 5px 0 0; }

.booking-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.booking-mode-button {
  padding: 18px;
  text-align: left;
  border: 2px solid #d9e2e5;
  border-radius: 16px;
  background: #fff;
  color: #153845;
  cursor: pointer;
  font: inherit;
}
.booking-mode-button strong { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.booking-mode-button span { color: #61727a; font-size: .92rem; }
.booking-mode-button.is-active { border-color: #0b6f84; background: #f0f9fb; box-shadow: inset 0 0 0 1px #0b6f84; }

.booking-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.booking-field { display: grid; gap: 7px; }
.booking-field--full { grid-column: 1 / -1; }
.booking-field label, .booking-field > span { font-weight: 700; color: #203f4b; }
.booking-field input, .booking-field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #bdcbd0;
  border-radius: 11px;
  background: #fff;
  color: #18343f;
  font: inherit;
}
.booking-field input:focus, .booking-field select:focus { outline: 3px solid rgba(11,111,132,.14); border-color: #0b6f84; }
.booking-field input:disabled, .booking-field select:disabled { background: #f3f5f6; color: #6a777c; }
.booking-help { color: #687980; font-size: .88rem; }

.boat-first-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.slot-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.slot-option {
  border: 1px solid #ccd8dc;
  border-radius: 13px;
  padding: 13px 10px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  color: #1b3d49;
  font: inherit;
}
.slot-option strong, .slot-option span { display: block; }
.slot-option span { margin-top: 4px; font-size: .82rem; color: #65777e; }
.slot-option.is-selected { border-color: #0b6f84; background: #edf8fa; box-shadow: inset 0 0 0 1px #0b6f84; }
.slot-option:disabled { cursor: not-allowed; opacity: .48; background: #f3f5f6; }

.inventory-head { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 16px; }
.inventory-head p { margin: 4px 0 0; color: #687980; }
.inventory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inventory-card { border: 1px solid #d3dee2; border-radius: 16px; padding: 16px; background: #fff; }
.inventory-card.is-full { background: #f5f6f6; opacity: .76; }
.inventory-card__top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.inventory-card__name strong { display: block; color: #153b47; }
.inventory-card__name small { display: block; color: #687980; margin-top: 2px; }
.inventory-remaining {
  border-radius: 999px;
  padding: 5px 9px;
  background: #e9f5f7;
  color: #0a6578;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}
.inventory-remaining.is-full { background: #ececec; color: #626262; }
.inventory-assigned {
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f0f8fa;
  color: #375b67;
  font-size: .86rem;
}
.inventory-qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.inventory-qty label { font-size: .9rem; font-weight: 700; }
.inventory-qty select { min-width: 76px; min-height: 40px; border: 1px solid #bccbd0; border-radius: 9px; padding: 6px; background: #fff; font: inherit; }

.booking-summary { display: grid; gap: 7px; margin: 18px 0 0; padding: 16px; background: #f4f8f9; border-radius: 14px; }
.booking-summary p { margin: 0; }

.booking-privacy { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0 20px; }
.booking-privacy input { margin-top: 4px; }
.booking-privacy label { color: #465c65; }
.booking-privacy a { font-weight: 700; }
.booking-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.booking-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.booking-status { min-height: 24px; font-weight: 700; }
.booking-status.is-error { color: #a22525; }
.booking-status.is-ok { color: #176233; }
.booking-status.is-warning { color: #885f09; }
.booking-loading { padding: 18px; border-radius: 14px; background: #f4f8f9; color: #50656e; }
.booking-success { margin-top: 22px; padding: 22px; border: 1px solid #9bc9ad; border-radius: 18px; background: #f0faf3; }
.booking-success.is-warning { border-color: #e0bd71; background: #fff8e8; }
.booking-success h2 { margin-top: 0; color: #245d38; }
.booking-success__link { display: inline-block; margin-top: 14px; overflow-wrap: anywhere; }
.booking-success__code {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin: 6px 0 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #bdd8c5;
}
.booking-success__code span { color: #5d6e64; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.booking-success__code strong { color: #174a2a; font-size: 1.25rem; letter-spacing: .05em; }
.booking-success__boats { margin-top: 2px; }
.booking-empty { padding: 16px; text-align: center; color: #65767d; background: #f5f7f8; border-radius: 12px; }

.admin-page { max-width: 1380px; margin: 0 auto; padding: 30px 24px 72px; }
.admin-page__title { margin: 0 0 6px; }
.admin-login { max-width: 520px; margin: 40px auto; }
.admin-dashboard { display: grid; gap: 22px; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.admin-filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px; }

.admin-settings-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 26px;
  align-items: start;
}
.cutoff-form { display: grid; gap: 14px; }
.cutoff-state {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
  padding: 10px 13px;
  border-radius: 11px;
  background: #f4f6f7;
  color: #53636a;
}
.cutoff-state.is-open { background: #eef8f1; color: #245d38; }
.cutoff-state.is-closed { background: #fff1ed; color: #8b3228; }
.cutoff-state span { font-size: .86rem; }

.boat-registry-form {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin: 18px 0 22px;
}
.admin-boats-wrap { overflow-x: auto; }
.admin-boats-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.admin-boats-table th,
.admin-boats-table td { padding: 11px 10px; border-bottom: 1px solid #dce4e7; text-align: left; }
.admin-boats-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.boat-state {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
}
.boat-state.is-active { background: #eaf6ed; color: #23613a; }
.boat-state.is-inactive { background: #eeeeee; color: #646464; }

.admin-matrix-wrap { overflow-x: auto; }
.admin-matrix { width: 100%; border-collapse: collapse; min-width: 880px; }
.admin-matrix th, .admin-matrix td { padding: 10px 8px; border-bottom: 1px solid #dce4e7; text-align: center; font-size: .88rem; }
.admin-matrix th:first-child, .admin-matrix td:first-child { text-align: left; position: sticky; left: 0; background: #fff; }
.admin-matrix__cell strong { display: block; }
.admin-matrix__cell small { color: #65777e; }
.admin-matrix__cell.is-full { background: #f7e9e9; color: #8b2222; }
.admin-matrix__cell.is-empty { background: #f5f6f6; color: #777; }

.admin-bookings { display: grid; gap: 12px; }
.admin-booking { border: 1px solid #d7e1e4; border-radius: 16px; padding: 16px; }
.admin-booking__head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.admin-booking__head h3 { margin: 3px 0 4px; }
.admin-booking__code { color: #0b6478; font-size: .82rem; font-weight: 800; letter-spacing: .05em; }
.admin-booking__meta { color: #687980; font-size: .88rem; }
.admin-booking__details { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 10px 18px; margin-top: 14px; }
.admin-booking__details p { margin: 0; }
.admin-booking__boats { grid-column: 1 / -1; padding-top: 8px; }
.admin-booking__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-button {
  border: 1px solid #aebfc5;
  border-radius: 9px;
  background: #fff;
  padding: 8px 11px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.admin-button:disabled { cursor: not-allowed; opacity: .5; }
.admin-button--danger { color: #9a2424; border-color: #d8aaaa; }
.admin-button--primary { background: #0b6478; border-color: #0b6478; color: #fff; }

.booking-dialog { width: min(900px, calc(100vw - 32px)); max-height: 90vh; overflow: auto; border: 0; border-radius: 20px; padding: 0; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
.booking-dialog::backdrop { background: rgba(0,25,35,.58); }
.booking-dialog__inner { padding: 24px; }
.booking-dialog__head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.booking-dialog__close { border: 0; background: transparent; font-size: 1.6rem; cursor: pointer; }

@media (max-width: 1000px) {
  .booking-lookup,
  .admin-settings-card { grid-template-columns: 1fr; }
  .lookup-result__details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boat-registry-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boat-registry-form .admin-button { align-self: stretch; min-height: 48px; }
}

@media (max-width: 900px) {
  .inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slot-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-booking__details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .booking-page, .admin-page { padding-left: 14px; padding-right: 14px; }
  .booking-hero { border-radius: 22px; background-position: center; }
  .booking-hero::after { display: none; }
  .booking-mode-switch,
  .booking-grid,
  .boat-first-picker,
  .inventory-grid,
  .admin-filters,
  .lookup-result__details,
  .boat-registry-form { grid-template-columns: 1fr; }
  .booking-lookup__form { grid-template-columns: 1fr; }
  .inventory-head { align-items: start; flex-direction: column; }
  .slot-options { grid-template-columns: 1fr 1fr; }
  .admin-booking__head { flex-direction: column; }
  .admin-booking__details { grid-template-columns: 1fr; }
  .admin-booking__boats { grid-column: auto; }
  .lookup-result__head { align-items: flex-start; flex-direction: column; }
}
