:root {
  --sand: #efe4d1;
  --sand-deep: #d7c4a4;
  --foam: #f8f5ef;
  --timber: #b6aea1;
  --timber-deep: #8b8276;
  --rust: #7b4a2e;
  --rust-deep: #5f341d;
  --sea: #2e6971;
  --sea-deep: #173f47;
  --ink: #2d261f;
  --muted: #6d6358;
  --line: rgba(45, 38, 31, 0.12);
  --line-strong: rgba(95, 52, 29, 0.18);
  --danger: #973f2d;
  --success: #2b6652;
  --panel: rgba(252, 249, 243, 0.9);
  --panel-strong: rgba(255, 252, 247, 0.96);
  --shadow: 0 24px 60px rgba(44, 31, 21, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(46, 105, 113, 0.16), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(123, 74, 46, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 20%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.12) 0,
      rgba(255, 255, 255, 0.12) 2px,
      transparent 2px,
      transparent 98px
    ),
    linear-gradient(180deg, #c6c0b5 0%, #dfd8ca 18%, #eee6d7 56%, #efe4d1 100%);
}

body[data-page="customer"],
body[data-page="cancel"] {
  background:
    linear-gradient(180deg, rgba(246, 238, 224, 0.56), rgba(236, 223, 201, 0.66)),
    url("/images/customer_background.jpg") center center / cover no-repeat fixed;
}

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

body[data-page="admin"] .shell {
  width: min(1480px, calc(100% - 32px));
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 26px;
  padding: 18px 22px;
  border-radius: 28px;
  border: 1px solid rgba(95, 52, 29, 0.18);
  box-shadow: var(--shadow);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(
      0deg,
      rgba(182, 174, 161, 0.52) 0,
      rgba(182, 174, 161, 0.52) 1px,
      rgba(239, 228, 209, 0.72) 1px,
      rgba(239, 228, 209, 0.72) 52px
    );
  position: relative;
  overflow: hidden;
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto -40px -32px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 105, 113, 0.15), transparent 62%);
  pointer-events: none;
}

body[data-page="customer"] .site-header,
body[data-page="cancel"] .site-header {
  padding: 24px 28px;
  border-color: rgba(95, 52, 29, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.06)),
    repeating-linear-gradient(
      0deg,
      rgba(176, 168, 156, 0.62) 0,
      rgba(176, 168, 156, 0.62) 1px,
      rgba(245, 236, 223, 0.86) 1px,
      rgba(245, 236, 223, 0.86) 58px
    );
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--sea-deep);
}

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

h1,
h2,
h3 {
  color: var(--rust-deep);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
}

body[data-page="customer"] h1,
body[data-page="cancel"] h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.nav-links a,
.button,
button {
  border: 1px solid rgba(95, 52, 29, 0.22);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--rust) 0%, var(--rust-deep) 100%);
  color: #fff9f1;
  text-decoration: none;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(95, 52, 29, 0.18);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.nav-links a:hover,
.button:hover,
button:hover {
  background: linear-gradient(180deg, #8f5737 0%, #6a3a21 100%);
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(95, 52, 29, 0.22);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.page-grid {
  display: grid;
  grid-template-columns: 1.28fr 0.72fr;
  gap: 22px;
}

body[data-page="admin"] .page-grid {
  grid-template-columns: 1fr;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  border-radius: 28px;
  padding: 22px;
  backdrop-filter: blur(8px);
}

.panel.alt {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.14)),
    var(--panel-strong);
}

.staff-stack,
.admin-stack {
  display: grid;
  gap: 18px;
}

.staff-top-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(300px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.staff-top-grid > .panel,
.admin-controls-grid > .panel,
.admin-management-grid > .panel {
  height: 100%;
}

body[data-page="customer"] .panel.alt:first-child,
body[data-page="cancel"] .panel.alt:first-child {
  border-color: rgba(46, 105, 113, 0.18);
  background:
    radial-gradient(circle at top right, rgba(46, 105, 113, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.18)),
    rgba(255, 251, 245, 0.94);
}

form {
  display: grid;
  gap: 14px;
}

.form-grid,
.two-col,
.admin-grid,
.admin-controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body[data-page="admin"] .admin-grid,
body[data-page="admin"] .admin-controls-grid {
  align-items: start;
}

body[data-page="admin"] .admin-controls-grid {
  grid-template-columns: repeat(2, minmax(320px, 1fr));
}

.admin-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 18px;
}

.admin-report-panel {
  padding: 18px 20px;
}

body[data-page="staff"] .panel,
body[data-page="admin"] .panel {
  padding: 18px 20px;
}

body[data-page="staff"] .card,
body[data-page="admin"] .card {
  padding: 14px 16px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--rust-deep);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(46, 105, 113, 0.14);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

input[type="checkbox"] {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(46, 105, 113, 0.18);
  border-color: rgba(46, 105, 113, 0.4);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

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

.checkbox-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  line-height: 1.3;
}

.service-list-grid {
  align-items: end;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 12px 18px;
}

.inline-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
}

.inline-checkbox input {
  width: auto;
  margin: 0;
}

.checkbox-row-inline {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 14px;
}

.checkbox-row-inline label {
  flex: 1 1 0;
  justify-content: center;
  white-space: nowrap;
}

body[data-page="customer"] .checkbox-row {
  gap: 12px 18px;
}

body[data-page="customer"] .checkbox-row label {
  flex: 0 1 auto;
}

body[data-page="staff"] .checkbox-row-inline,
body[data-page="customer"] .checkbox-row-inline {
  align-items: center;
}

.status,
.card,
.booking-row,
.result-block,
.staff-summary-card,
.staff-table-wrap {
  border: 1px solid rgba(45, 38, 31, 0.11);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.status,
.card,
.booking-row,
.result-block {
  padding: 14px;
}

.status.success {
  border-color: rgba(43, 102, 82, 0.3);
  color: var(--success);
}

.status.error {
  border-color: rgba(151, 63, 45, 0.28);
  color: var(--danger);
}

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="admin"] .inline-actions {
  align-items: center;
  gap: 8px;
}

body[data-page="admin"] button,
body[data-page="admin"] .button {
  padding: 8px 14px;
  min-height: 40px;
  font-size: 0.9rem;
  line-height: 1.1;
  box-shadow: 0 8px 18px rgba(95, 52, 29, 0.14);
}

body[data-page="admin"] button:hover,
body[data-page="admin"] .button:hover {
  box-shadow: 0 10px 20px rgba(95, 52, 29, 0.16);
}

body[data-page="admin"] .panel .inline-actions button,
body[data-page="admin"] .panel .inline-actions .button {
  align-self: center;
}

body[data-page="admin"] .staff-table td button,
body[data-page="admin"] .staff-table td .button {
  padding: 6px 12px;
  min-height: 34px;
  font-size: 0.82rem;
  box-shadow: none;
}

body[data-page="admin"] .staff-table td button:hover,
body[data-page="admin"] .staff-table td .button:hover {
  box-shadow: 0 6px 14px rgba(95, 52, 29, 0.14);
}

body[data-page="admin"] label .button,
body[data-page="admin"] label button {
  justify-self: start;
}

body[data-page="admin"] .report-actions {
  display: grid;
  grid-template-columns: minmax(220px, 280px) auto auto;
  gap: 10px;
  align-items: end;
}

body[data-page="admin"] .report-date-field {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

body[data-page="admin"] .report-date-field span {
  font-size: 0.92rem;
  color: var(--rust-deep);
}

body[data-page="admin"] .report-actions button,
body[data-page="admin"] .report-actions .button {
  align-self: end;
}

body[data-page="admin"] .report-bookings-table-wrap {
  margin-top: 8px;
  border-radius: 18px;
}

body[data-page="admin"] .report-bookings-table th,
body[data-page="admin"] .report-bookings-table td {
  padding: 7px 9px;
  font-size: 0.86rem;
}

body[data-page="admin"] .report-bookings-table th:nth-child(1) {
  width: 88px;
}

body[data-page="admin"] .report-bookings-table th:nth-child(2),
body[data-page="admin"] .report-bookings-table th:nth-child(3),
body[data-page="admin"] .report-bookings-table td:nth-child(2),
body[data-page="admin"] .report-bookings-table td:nth-child(3) {
  white-space: nowrap;
  width: 72px;
}

body[data-page="admin"] .report-bookings-table th:nth-child(6),
body[data-page="admin"] .report-bookings-table td:nth-child(6) {
  white-space: nowrap;
  width: 86px;
}

body[data-page="admin"] .report-bookings-table td:nth-child(5) {
  color: var(--muted);
}

body[data-page="admin"] .admin-report-booking-panel {
  margin-top: 12px;
  border-color: rgba(46, 105, 113, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.18)),
    rgba(255, 252, 247, 0.95);
}

.booking-group {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.booking-row {
  display: grid;
  gap: 8px;
}

.booking-meta,
.small-meta,
.hero-copy,
.muted-inline {
  color: var(--muted);
}

.booking-meta,
.small-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.92rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(46, 105, 113, 0.12);
  color: var(--sea-deep);
  border: 1px solid rgba(46, 105, 113, 0.14);
  font-size: 0.84rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.84rem;
  border: 1px solid transparent;
}

.status-pill-confirmed {
  background: rgba(46, 105, 113, 0.12);
  color: var(--sea-deep);
  border-color: rgba(46, 105, 113, 0.16);
}

.status-pill-seated {
  background: rgba(43, 102, 82, 0.14);
  color: var(--success);
  border-color: rgba(43, 102, 82, 0.22);
}

.status-pill-completed {
  background: rgba(52, 86, 125, 0.14);
  color: #34567d;
  border-color: rgba(52, 86, 125, 0.22);
}

.status-pill-cancelled {
  background: rgba(127, 56, 56, 0.14);
  color: #7f3838;
  border-color: rgba(127, 56, 56, 0.22);
}

.status-pill-no_show {
  background: rgba(110, 80, 54, 0.14);
  color: #6e5036;
  border-color: rgba(110, 80, 54, 0.22);
}

.hero-copy {
  font-size: 1rem;
  line-height: 1.55;
}

.staff-summary-grid {
  display: grid;
  gap: 10px;
}

.staff-summary-card {
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.staff-summary-header,
.staff-summary-line,
.staff-summary-flags,
.staff-table td,
.staff-table th {
  font-size: 0.92rem;
}

.staff-summary-header,
.staff-summary-line,
.staff-summary-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.staff-summary-line strong {
  font-size: 1rem;
}

.staff-table-wrap {
  overflow-x: auto;
}

.staff-table {
  width: 100%;
  border-collapse: collapse;
}

.staff-table th,
.staff-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(45, 38, 31, 0.08);
  text-align: left;
  vertical-align: top;
}

.staff-table th {
  color: var(--sea-deep);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

.staff-table tr:last-child td {
  border-bottom: 0;
}

.staff-table tr.hold-warning td {
  background: rgba(215, 196, 164, 0.24);
}

.staff-table tr.hold-urgent td {
  background: rgba(151, 63, 45, 0.16);
}

.staff-table tr.hold-expired td {
  background: rgba(109, 99, 88, 0.12);
}

.table-notes-input {
  width: 100%;
  min-width: 150px;
  max-width: 190px;
  min-height: 36px;
  padding: 6px 8px;
  resize: vertical;
  font: inherit;
  font-size: 0.84rem;
}

.table-customer-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.staff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-actions-table {
  gap: 6px;
}

.staff-actions-table button {
  padding: 8px 10px;
  font-size: 0.8rem;
  box-shadow: none;
}

.status-action-seated,
.status-action-seated:disabled {
  background: linear-gradient(180deg, #4c8a72 0%, #2b6652 100%);
  border-color: rgba(43, 102, 82, 0.4);
  color: #f6fff9;
  opacity: 1;
  cursor: default;
  box-shadow: 0 12px 24px rgba(43, 102, 82, 0.2);
}

.status-action-completed,
.status-action-completed:disabled {
  background: linear-gradient(180deg, #5277a4 0%, #34567d 100%);
  border-color: rgba(52, 86, 125, 0.42);
  color: #f5f9ff;
  opacity: 1;
  cursor: default;
  box-shadow: 0 12px 24px rgba(52, 86, 125, 0.2);
}

.status-action-no-show,
.status-action-no-show:disabled {
  background: linear-gradient(180deg, #8a6a4c 0%, #6e5036 100%);
  border-color: rgba(110, 80, 54, 0.42);
  color: #fff8ef;
  opacity: 1;
  cursor: default;
  box-shadow: 0 12px 24px rgba(110, 80, 54, 0.2);
}

.status-action-cancelled,
.status-action-cancelled:disabled {
  background: linear-gradient(180deg, #a45454 0%, #7f3838 100%);
  border-color: rgba(127, 56, 56, 0.42);
  color: #fff7f7;
  opacity: 1;
  cursor: default;
  box-shadow: 0 12px 24px rgba(127, 56, 56, 0.2);
}

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

.staff-edit-grid textarea {
  min-height: 84px;
}

a {
  color: var(--sea-deep);
}

@media (max-width: 980px) {
  .page-grid,
  .form-grid,
  .two-col,
  .admin-grid,
  .admin-controls-grid,
  .admin-management-grid,
  .staff-top-grid,
  .site-header,
  .staff-edit-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .site-header {
    align-items: start;
  }

  .checkbox-row-inline {
    flex-wrap: wrap;
  }

  .checkbox-row-inline label {
    flex: 1 1 100%;
    justify-content: flex-start;
    white-space: normal;
  }

  body[data-page="customer"] .checkbox-row label,
  body[data-page="staff"] .checkbox-row-inline label {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

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

  .inline-actions button,
  .inline-actions .button {
    width: 100%;
    justify-content: center;
  }

  .shell,
  body[data-page="admin"] .shell {
    width: min(100%, calc(100% - 20px));
  }

  .staff-table {
    min-width: 720px;
  }

  .staff-summary-line,
  .staff-summary-flags,
  .staff-summary-header {
    gap: 8px;
  }

  .panel,
  body[data-page="staff"] .panel,
  body[data-page="admin"] .panel {
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 16px 18px;
  }

  .nav-links,
  .nav-links a {
    width: 100%;
  }

  button,
  .button {
    width: 100%;
  }

  input,
  select,
  textarea {
    padding: 11px 12px;
  }
}


body[data-page="customer"]::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(239, 228, 209, 0.24));
}

.customer-header {
  align-items: center;
}

.brand-lockup {
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.logo-plank {
  position: relative;
  width: min(900px, 100%);
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(95, 52, 29, 0.18);
  box-shadow: 0 22px 42px rgba(44, 31, 21, 0.18);
  background: rgba(255, 251, 245, 0.28);
}

.logo-image {
  display: block;
  width: 100%;
  height: auto;
}

body[data-page="customer"] .site-header h1 {
  margin: 0;
  color: var(--sea-deep);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-page="customer"] .page-grid {
  align-items: start;
}

body[data-page="customer"] .panel:first-child {
  position: relative;
  overflow: hidden;
}

body[data-page="customer"] .panel:first-child::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: linear-gradient(90deg, var(--sea) 0%, var(--rust) 56%, var(--timber-deep) 100%);
}

body[data-page="customer"] .panel aside,
body[data-page="customer"] .panel .card {
  background: rgba(255, 252, 247, 0.82);
}

@media (max-width: 980px) {
  .logo-plank {
    width: 100%;
  }
}
