:root {
  --bg-deep: #0d1829;
  --bg-mid: #13233d;
  --panel: rgba(14, 26, 46, 0.82);
  --panel-border: rgba(117, 182, 255, 0.22);
  --text: #ecf5ff;
  --muted: #a7bfd8;
  --accent: #21dfa6;
  --accent-strong: #14b787;
  --accent-soft: rgba(33, 223, 166, 0.16);
  --warn: #ff7a6c;
  --footer-height: 110px;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
  width: 100%;
}

html {
  background: #090f1b;
}

body {
  background: radial-gradient(circle at 10% 0%, #1d3459 0%, var(--bg-deep) 42%, #090f1b 100%);
  color: var(--text);
  font-family: "Outfit", "Segoe UI", sans-serif;
  line-height: 1.4;
  max-width: 100vw;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(var(--footer-height) + env(safe-area-inset-bottom, 0px) + 16px);
  position: relative;
  touch-action: pan-y;
}

.bg-orb {
  display: none;
  border-radius: 999px;
  filter: blur(60px);
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

.orb-1 {
  background: rgba(87, 127, 255, 0.36);
  height: 210px;
  left: -50px;
  top: -30px;
  width: 210px;
}

.orb-2 {
  background: rgba(33, 223, 166, 0.28);
  bottom: 120px;
  height: 230px;
  right: -70px;
  width: 230px;
}

.page-shell {
  margin: 0 auto;
  max-width: 760px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero {
  margin-bottom: 12px;
  padding: 8px 2px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  margin: 0;
}

h1 {
  font-size: clamp(1.65rem, 5vw, 2.35rem);
  margin-bottom: 6px;
}

.lead {
  color: var(--muted);
  margin: 0;
}

.booking-banner {
  background: rgba(255, 122, 108, 0.12);
  border: 1px solid rgba(255, 160, 146, 0.42);
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
}

.booking-banner-title {
  color: #ffd7d1;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-size: 0.98rem;
  margin: 0;
}

.booking-banner-message {
  color: #ffd7d1;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.panel {
  backdrop-filter: blur(10px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  margin-top: 12px;
  padding: 14px;
}

.panel-header {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.panel-header h2 {
  font-size: 1.05rem;
}

.panel-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.choice-grid,
.days-grid,
.slots-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

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

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

.choice-btn,
.day-btn,
.slot-btn {
  background: rgba(123, 161, 210, 0.08);
  border: 1px solid rgba(159, 200, 255, 0.24);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  padding: 12px;
  text-align: left;
  transition: transform 130ms ease, border-color 130ms ease, background 130ms ease;
}

.choice-btn:hover,
.day-btn:hover,
.slot-btn:hover {
  border-color: rgba(129, 229, 200, 0.66);
  transform: translateY(-1px);
}

.choice-btn.active,
.day-btn.active,
.slot-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(33, 223, 166, 0.42) inset;
}

.choice-name {
  display: block;
  font-weight: 600;
}

.choice-sub {
  color: var(--muted);
  display: block;
  font-size: 0.86rem;
  margin-top: 3px;
}

.choice-btn.disabled,
.day-btn.disabled,
.slot-btn.disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

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

.day-btn {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  min-height: 82px;
}

.day-top {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  opacity: 0.9;
  text-transform: uppercase;
}

.day-date {
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-size: 1rem;
  margin-top: 3px;
}

.day-sub {
  color: var(--muted);
  font-size: 0.79rem;
  margin-top: 7px;
}

.day-btn.open .day-sub {
  color: #7df0cc;
}

.day-btn.closed {
  background: rgba(83, 95, 118, 0.2);
  border-color: rgba(113, 127, 151, 0.32);
}

.extend-days-btn {
  background: rgba(18, 49, 79, 0.88);
  border: 1px solid rgba(96, 164, 255, 0.42);
  border-radius: 10px;
  color: #c5e4ff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  margin-top: 10px;
  min-height: 42px;
  padding: 0 14px;
}

.extend-days-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.field-label {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
  margin-top: 12px;
}

.lookup-actions {
  margin-top: 10px;
}

.lookup-results {
  margin-top: 12px;
}

.form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  color: var(--muted);
  font-size: 0.9rem;
}

.field input,
.field textarea {
  background: rgba(17, 35, 61, 0.95);
  border: 1px solid rgba(137, 172, 222, 0.33);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  min-height: 44px;
  padding: 10px 12px;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.sticky-footer {
  background: linear-gradient(180deg, rgba(9, 15, 27, 0.88) 0%, rgba(5, 10, 20, 0.97) 100%);
  border-top: 1px solid rgba(132, 174, 228, 0.24);
  bottom: 0;
  left: 0;
  min-height: var(--footer-height);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  position: fixed;
  right: 0;
  transition: transform 170ms ease, opacity 170ms ease;
  z-index: 10;
}

@media (max-width: 679px) {
  body.form-editing .sticky-footer {
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + env(safe-area-inset-bottom, 0px)));
  }
}

.footer-content {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 760px;
  position: relative;
  width: 100%;
}

.booking-summary {
  min-width: 0;
}

#summaryTitle {
  font-size: 0.96rem;
  font-weight: 600;
  margin: 0;
  overflow-wrap: anywhere;
}

.status-message {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.status-message.error {
  color: var(--warn);
}

.status-message.ok {
  color: #7df0cc;
}

.confirm-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #64ffca 100%);
  border: none;
  border-radius: 12px;
  color: #032a21;
  cursor: pointer;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-size: 0.98rem;
  min-height: 50px;
  min-width: 0;
  padding: 0 18px;
  width: 100%;
}

.confirm-btn:disabled {
  background: linear-gradient(135deg, #587288 0%, #6f879c 100%);
  color: rgba(245, 255, 255, 0.82);
  cursor: not-allowed;
}

.confirm-btn.failed {
  background: linear-gradient(135deg, #ff5c5c 0%, #e13f3f 100%);
  color: #fff;
}

body.success-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.success-card {
  backdrop-filter: blur(10px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  margin-top: 14px;
  padding: 18px;
}

.success-title {
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  margin: 0 0 8px;
}

.success-copy {
  color: var(--muted);
  margin: 0 0 16px;
}

.detail-list {
  display: grid;
  gap: 8px;
}

.detail-item {
  background: rgba(16, 40, 66, 0.9);
  border: 1px solid rgba(121, 168, 227, 0.24);
  border-radius: 10px;
  padding: 10px 12px;
}

.detail-label {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.detail-value {
  font-size: 0.97rem;
  font-weight: 600;
}

.secondary-btn {
  align-items: center;
  background: rgba(116, 141, 167, 0.24);
  border: 1px solid rgba(136, 171, 207, 0.4);
  border-radius: 12px;
  color: var(--text);
  display: inline-flex;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  justify-content: center;
  margin-top: 14px;
  min-height: 44px;
  padding: 0 16px;
  text-decoration: none;
}

.admin-link {
  align-items: center;
  background: rgba(9, 26, 45, 0.82);
  border: 1px solid rgba(136, 171, 207, 0.26);
  border-radius: 999px;
  color: #cfe6ff;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 600;
  justify-content: center;
  line-height: 1;
  min-height: 24px;
  padding: 0 9px;
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + 8px);
  text-decoration: none;
  bottom: calc(var(--footer-height) + env(safe-area-inset-bottom, 0px) + 8px);
  z-index: 13;
}

.admin-link:hover {
  border-color: rgba(129, 229, 200, 0.5);
  color: #e8f8ff;
}

@media (max-width: 679px) {
  .admin-link {
    bottom: calc(var(--footer-height) + env(safe-area-inset-bottom, 0px) + 20px);
  }
}

.manage-card {
  background: rgba(9, 26, 45, 0.92);
  border: 1px solid rgba(129, 175, 229, 0.32);
  border-radius: 12px;
  margin-top: 14px;
  padding: 12px;
}

.manage-title {
  font-size: 1rem;
  margin: 0;
}

.manage-copy {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 6px 0 12px;
}

.manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.manage-btn {
  background: rgba(116, 141, 167, 0.24);
  border: 1px solid rgba(136, 171, 207, 0.4);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  min-height: 42px;
  padding: 0 14px;
}

.manage-btn.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #64ffca 100%);
  border: none;
  color: #032a21;
}

.manage-btn.danger {
  background: rgba(255, 122, 108, 0.16);
  border-color: rgba(255, 138, 126, 0.58);
  color: #ffd4cf;
}

.manage-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.edit-panel {
  border-top: 1px solid rgba(121, 168, 227, 0.24);
  margin-top: 12px;
  padding-top: 12px;
}

.hidden {
  display: none;
}

body.settings-page {
  padding-bottom: 26px;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.settings-actions > * {
  flex: 1 1 170px;
}

.settings-actions .secondary-btn,
.settings-actions .manage-btn {
  margin-top: 0;
  width: 100%;
}

.sticky-footer .secondary-btn {
  margin-top: 0;
  width: 100%;
}

@media (min-width: 680px) {
  .bg-orb {
    display: block;
  }

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

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

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

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

  .field-full {
    grid-column: 1 / -1;
  }

  .footer-content {
    flex-wrap: nowrap;
  }

  .confirm-btn {
    min-width: 170px;
    width: auto;
  }

  .sticky-footer .secondary-btn {
    width: auto;
  }

  .settings-actions {
    align-items: center;
    justify-content: flex-start;
  }

  .settings-actions > * {
    flex: 0 0 auto;
  }

  .settings-actions .confirm-btn {
    min-width: 240px;
    width: auto;
  }

  .settings-actions .secondary-btn,
  .settings-actions .manage-btn {
    width: auto;
  }
}
