:root {
  color-scheme: light;
  --ink: #17312f;
  --muted: #64746f;
  --line: #d9e5e1;
  --panel: #ffffff;
  --bg: #edf4f1;
  --accent: #0f7d7e;
  --accent-dark: #075b62;
  --warm: #e8b45f;
  --danger: #a93838;
  --shadow: 0 20px 60px rgba(19, 53, 48, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(rgba(8, 42, 43, 0.5), rgba(8, 42, 43, 0.3)),
    url("https://images.unsplash.com/photo-1544551763-46a013bb70d5?auto=format&fit=crop&w=1800&q=80") center / cover fixed;
  color: var(--ink);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.admin-shell {
  width: min(1240px, calc(100% - 32px));
}

.panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 28px;
}

.brand-strip {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
}

.page-title {
  margin-bottom: 18px;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
}

.status-pill,
.admin-link {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--accent-dark);
  background: #f7fbfa;
  font-size: 14px;
  text-decoration: none;
}

.guest-logo {
  display: block;
  width: min(360px, 100%);
  height: auto;
  margin: 0 0 14px;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.5;
}

.guest-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.grid {
  display: grid;
  gap: 18px;
}

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.travel-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
  padding: 16px 16px 0;
  margin-bottom: 18px;
}

.travel-block h3 {
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #c7d8d3;
  border-radius: 6px;
  padding: 11px 12px;
  background: #fbfefd;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(15, 125, 126, 0.15);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 22px;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary {
  border: 1px solid var(--line);
  background: #f8fbfa;
  color: var(--accent-dark);
}

button.secondary:hover {
  background: #e7f0ed;
}

.text-button {
  padding: 0;
  background: transparent;
  color: var(--accent-dark);
}

.text-button:hover {
  background: transparent;
  color: var(--accent);
}

.danger {
  color: var(--danger);
}

.guest-list {
  display: grid;
  gap: 18px;
}

.guest-card,
.metric,
.booking-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
}

.guest-card {
  padding: 18px;
}

.guest-card-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.check-row {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 12px;
  font-weight: 600;
}

.check-row input {
  width: 18px;
  margin-top: 2px;
}

.waiver-list {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.waiver-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
  padding: 16px;
}

.waiver-card p {
  color: var(--ink);
  line-height: 1.5;
}

.waiver-card h3 {
  margin-bottom: 12px;
}

.waiver-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
}

.waiver-section:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.waiver-section h4 {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 16px;
}

.waiver-document {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  margin-bottom: 12px;
  overflow: hidden;
}

.waiver-document summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 800;
  padding: 14px 16px;
}

.waiver-document[open] summary {
  border-bottom: 1px solid var(--line);
  background: #edf8f5;
}

.waiver-text {
  max-height: 320px;
  overflow: auto;
  padding: 14px 16px 16px;
}

.waiver-text p {
  margin: 0 0 12px;
}

.waiver-text ul,
.waiver-text ol {
  margin: 0 0 12px 20px;
  padding: 0;
}

.waiver-text li {
  margin: 7px 0;
  line-height: 1.45;
}

.waiver-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.waiver-grid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding: 10px;
}

.waiver-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.waiver-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.admin-tools {
  display: flex;
  gap: 12px;
  align-items: end;
  margin: 24px 0;
}

.admin-tools label {
  margin: 0;
  min-width: 220px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  padding: 16px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.notice {
  min-height: 22px;
  color: var(--muted);
  margin-bottom: 14px;
}

.guest-checklist {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefd;
  padding: 16px;
  margin-bottom: 18px;
}

.checklist-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.checklist-head h2 {
  margin-bottom: 4px;
}

.checklist-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.checklist-table-wrap {
  overflow: auto;
}

.checklist-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.checklist-table th,
.checklist-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}

.checklist-table th {
  color: var(--accent-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.checklist-table td {
  color: var(--ink);
  font-size: 14px;
}

.booking-list {
  display: grid;
  gap: 14px;
}

.date-group {
  display: grid;
  gap: 10px;
}

.date-group-head {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr 0.7fr 0.7fr;
  gap: 10px;
  border: 1px solid rgba(15, 125, 126, 0.28);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #eaf7f5;
  padding: 12px;
}

.date-group-head span {
  display: block;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.date-group-head strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: clamp(18px, 2.4vw, 26px);
}

.booking-card {
  padding: 16px;
}

.booking-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.stay-summary {
  display: grid;
  grid-template-columns: 1.25fr 1.25fr 0.7fr;
  gap: 10px;
  margin: 14px 0 18px;
}

.stay-summary div {
  border: 1px solid rgba(15, 125, 126, 0.28);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #eef8f6;
  padding: 13px 14px;
}

.stay-summary span {
  display: block;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.stay-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.05;
}

.booking-top p,
.booking-card p {
  margin-bottom: 6px;
  color: var(--muted);
}

.guest-detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.print-guest-summary {
  display: none;
}

.guest-detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.guest-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.guest-detail-head h4 {
  margin: 0;
  font-size: 17px;
}

.guest-detail-head span {
  color: var(--accent-dark);
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-section {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.detail-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-section h5 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 14px;
}

.detail-item {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.detail-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-item strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  .panel {
    padding: 20px;
  }

  .brand-strip,
  .guest-heading,
  .booking-top,
  .admin-tools {
    display: grid;
  }

  .two,
  .three,
  .four,
  .waiver-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .stay-summary {
    grid-template-columns: 1fr;
  }

  .date-group-head {
    grid-template-columns: 1fr;
  }

  .actions {
    display: grid;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .guest-detail-head {
    display: grid;
  }

  button {
    width: 100%;
  }

  .admin-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
  }

  .admin-tools label {
    min-width: 0;
  }

  .admin-tools button {
    width: auto;
    min-width: 0;
    padding: 10px 12px;
    font-size: 14px;
  }

  .guest-detail-list {
    grid-template-columns: 1fr;
  }

  .guest-checklist {
    padding: 12px;
  }

  .checklist-table {
    min-width: 640px;
  }
}

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

  .admin-tools label {
    grid-column: 1 / -1;
  }

  .admin-tools button {
    white-space: normal;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 16mm 7mm 7mm;
  }

  :root {
    --ink: #102c2a;
    --muted: #4e615d;
    --line: #bfd2cd;
    --accent: #0f7d7e;
    --accent-dark: #075b62;
  }

  body {
    min-height: auto;
    background: #ffffff;
    color: var(--ink);
  }

  .shell,
  .admin-shell {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .panel {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    background: #ffffff;
  }

  .admin-tools,
  .admin-link,
  .guest-checklist,
  #adminNotice {
    display: none;
  }

  .brand-strip {
    display: none;
  }

  h1 {
    font-size: 20px;
    line-height: 1.1;
  }

  .eyebrow {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .summary-grid {
    display: none;
  }

  .metric {
    padding: 6px 8px;
  }

  .metric strong {
    margin-top: 2px;
    font-size: 16px;
  }

  .booking-list {
    display: block;
  }

  .date-group {
    display: block;
    margin-bottom: 8px;
  }

  .date-group-head {
    display: none;
  }

  .booking-card {
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 6px;
    margin-bottom: 6px;
    background: #ffffff;
  }

  .booking-top {
    margin-bottom: 4px;
  }

  .booking-top h3 {
    font-size: 14px;
  }

  .booking-top p,
  .booking-card p {
    margin-bottom: 2px;
    font-size: 10px;
    line-height: 1.2;
  }

  .stay-summary {
    grid-template-columns: 1.25fr 1.25fr 0.7fr;
    gap: 5px;
    margin: 4px 0;
  }

  .stay-summary div {
    padding: 5px 7px;
    border-width: 2px;
    border-left-width: 6px;
    background: #eaf7f5;
  }

  .stay-summary strong {
    margin-top: 1px;
    font-size: 22px;
  }

  .stay-summary span {
    font-size: 9px;
  }

  .print-guest-summary {
    display: none;
  }

  .guest-detail-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 6px;
  }

  .guest-detail-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px;
    overflow: hidden;
  }

  .guest-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 3px;
    margin-bottom: 4px;
    font-size: 11px;
  }

  .guest-detail-head h4 {
    font-size: 11px;
  }

  .guest-detail-head span {
    color: var(--accent-dark);
    font-weight: 700;
    white-space: nowrap;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px 6px;
  }

  .detail-section {
    gap: 3px;
    padding: 3px 0;
  }

  .detail-section h5 {
    font-size: 9px;
  }

  .detail-item span {
    font-size: 7px;
  }

  .detail-item strong {
    font-size: 8px;
    line-height: 1.15;
  }
}
