/* PowerOTA SoftStay UI reusable theme classes */
:root {
  --color-primary: var(--po-primary, #2563EB);
  --color-secondary: #F59E0B;
  --color-accent: #10B981;
  --color-background: var(--po-admin-bg, #F8FAFC);
  --color-surface: #FFFFFF;
  --color-text: #111827;
  --color-muted: #6B7280;
  --color-border: #E5E7EB;
  --color-success: #22C55E;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-info: #3B82F6;
  --font-heading: "Plus Jakarta Sans", "Outfit", sans-serif;
  --font-body: "Inter", "Manrope", sans-serif;
  --radius-card: 20px;
  --radius-button: 14px;
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-button: 0 8px 18px rgba(37, 99, 235, 0.22);
  --softstay-focus-ring: 0 0 0 4px color-mix(in srgb, var(--color-primary) 18%, transparent);
  --mobile-page-gutter: 1rem;
  --mobile-section-gap: 1rem;
  --mobile-card-padding: 1rem;
  --mobile-control-height: 3.25rem;
  --mobile-sticky-height: 4.5rem;
  --mobile-radius-card: 18px;
  --mobile-bottom-safe-area: env(safe-area-inset-bottom, 0px);

  /* Compact admin density tokens. These are consumed only by .admin-main and
     #app-sidebar; public booking and guest surfaces keep their existing scale. */
  --admin-base-font-size: 14px;
  --admin-page-title-size: 24px;
  --admin-header-title-size: 16px;
  --admin-section-heading-size: 17px;
  --admin-card-heading-size: 15px;
  --admin-body-size: 14px;
  --admin-secondary-size: 13px;
  --admin-table-body-size: 13px;
  --admin-table-heading-size: 11px;
  --admin-label-size: 12px;
  --admin-control-text-size: 13px;
  --admin-button-text-size: 13px;
  --admin-sidebar-text-size: 13px;
  --admin-sidebar-label-size: 10px;
  --admin-badge-size: 11px;
  --admin-kpi-number-size: 24px;
  --admin-kpi-label-size: 12px;
  --admin-helper-size: 11px;
  --admin-body-line-height: 1.45;
  --admin-heading-line-height: 1.2;
  --admin-header-height: 56px;
  --admin-page-padding: 20px;
  --admin-page-padding-large: 24px;
  --admin-section-gap: 16px;
  --admin-grid-gap: 16px;
  --admin-card-padding: 16px;
  --admin-card-padding-compact: 14px;
  --admin-table-padding-y: 10px;
  --admin-table-padding-x: 12px;
  --admin-control-height: 38px;
  --admin-button-height: 38px;
  --admin-small-button-height: 32px;
  --admin-sidebar-item-height: 38px;
  --admin-sidebar-gap: 3px;
  --admin-card-radius: 16px;
  --admin-button-radius: 10px;
  --admin-input-radius: 10px;
  --admin-table-radius: 12px;
  --admin-modal-radius: 16px;
  --admin-sidebar-item-radius: 10px;
  --admin-button-font-weight: 600;
  --admin-input-font-weight: 500;
  --admin-label-font-weight: 600;
}

.soft-card,
.bento-card,
.room-card,
.guest-step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  color: var(--color-text);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.soft-card {
  padding: 1.25rem;
}

.bento-card {
  min-height: 100%;
  padding: 1.25rem;
}

.room-card {
  overflow: hidden;
}

.guest-step-card {
  padding: 1.25rem;
}

.soft-card:hover,
.bento-card:hover,
.room-card:hover,
.guest-step-card:hover {
  border-color: color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.glass-panel,
.booking-widget {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  color: var(--color-text);
}

@supports (backdrop-filter: blur(18px)) {
  .glass-panel,
  .booking-widget {
    backdrop-filter: blur(18px);
  }
}

.booking-widget {
  padding: 1rem;
}

.booking-search-widget {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
  padding: 1.15rem;
}

.booking-widget .theme-label {
  color: var(--color-text);
  font-size: 0.92rem;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 0.55rem;
  text-transform: none;
}

.booking-widget .theme-input,
.booking-widget .theme-select {
  background: rgba(255, 255, 255, 0.96);
  border-color: transparent;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-border) 58%, #FFFFFF);
  font-size: 1rem;
  min-height: 3.65rem;
  padding: 0.8rem 1rem;
}

.booking-widget .theme-input:focus,
.booking-widget .theme-select:focus {
  border-color: transparent;
  box-shadow: inset 0 0 0 1px var(--color-primary), var(--softstay-focus-ring);
}

.booking-widget input[type="date"].theme-input {
  -webkit-appearance: none;
  appearance: none;
  color-scheme: light;
  cursor: pointer;
  letter-spacing: 0;
  min-width: 0;
  padding-right: 0.75rem;
}

.booking-widget input[type="date"].theme-input::-webkit-date-and-time-value {
  min-height: 1.5rem;
  text-align: left;
}

.booking-widget input[type="date"].theme-input::-webkit-calendar-picker-indicator {
  background-color: color-mix(in srgb, var(--color-primary) 8%, #FFFFFF);
  border-radius: 10px;
  cursor: pointer;
  margin-left: 0.4rem;
  opacity: 0.9;
  padding: 0.35rem;
}

.booking-widget input[type="date"].theme-input:hover::-webkit-calendar-picker-indicator {
  background-color: color-mix(in srgb, var(--color-primary) 14%, #FFFFFF);
}

.booking-widget input[type="number"].theme-input {
  -moz-appearance: textfield;
}

.booking-widget input[type="number"].theme-input::-webkit-outer-spin-button,
.booking-widget input[type="number"].theme-input::-webkit-inner-spin-button {
  margin: 0;
}

.softstay-date-field {
  position: relative;
}

.softstay-date-input {
  cursor: pointer;
  padding-right: 3rem !important;
}

.softstay-date-icon {
  align-items: center;
  background: color-mix(in srgb, var(--color-primary) 8%, #FFFFFF);
  border: 1px solid color-mix(in srgb, var(--color-border) 60%, #FFFFFF);
  border-radius: 12px;
  bottom: 0.62rem;
  color: var(--color-text);
  display: inline-flex;
  height: 2.15rem;
  justify-content: center;
  pointer-events: none;
  position: absolute;
  right: 0.65rem;
  width: 2.15rem;
  z-index: 2;
}

.softstay-date-icon svg {
  display: block;
  height: 1rem;
  width: 1rem;
}

.softstay-date-picker {
  background: #FFFFFF;
  border: 1px solid color-mix(in srgb, var(--color-border) 72%, #FFFFFF);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
  color: var(--color-text);
  font-family: var(--font-body);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 0.85rem;
  position: fixed;
  width: min(21rem, calc(100vw - 2rem));
  z-index: 2147483000;
}

#powerota-booking-embed.softstay-datepicker-open {
  min-height: 42rem;
  overflow-y: visible;
}

.softstay-date-picker__head {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.softstay-date-picker__month {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
}

.softstay-date-picker__nav {
  align-items: center;
  background: color-mix(in srgb, var(--color-background) 78%, #FFFFFF);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text);
  cursor: pointer;
  display: inline-flex;
  height: 2.25rem;
  justify-content: center;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
  width: 2.25rem;
}

.softstay-date-picker__nav:hover {
  border-color: color-mix(in srgb, var(--color-primary) 36%, var(--color-border));
  color: var(--color-primary);
}

.softstay-date-picker__week,
.softstay-date-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
}

.softstay-date-picker__week {
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  text-align: center;
  text-transform: uppercase;
}

.softstay-date-picker__day {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: var(--color-text);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 700;
  height: 2.35rem;
  justify-content: center;
  transition: background .14s ease, color .14s ease, transform .12s ease;
}

.softstay-date-picker__day:hover {
  background: color-mix(in srgb, var(--color-primary) 10%, #FFFFFF);
  color: var(--color-primary);
}

.softstay-date-picker__day.is-selected {
  background: var(--color-primary);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--color-primary) 24%, transparent);
  color: #FFFFFF;
}

.softstay-date-picker__day.is-muted {
  color: color-mix(in srgb, var(--color-muted) 42%, #FFFFFF);
}

.softstay-date-picker__day:disabled {
  color: color-mix(in srgb, var(--color-muted) 38%, #FFFFFF);
  cursor: not-allowed;
  opacity: 0.55;
}

.softstay-date-picker__foot {
  align-items: center;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.softstay-date-picker__link {
  background: transparent;
  border: 0;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.25rem;
}

@media (max-width: 640px) {
  .softstay-date-picker {
    left: 1rem !important;
    right: 1rem;
    width: auto;
  }
}

.clay-empty-state {
  background: linear-gradient(145deg, #FFFFFF 0%, color-mix(in srgb, var(--color-background) 72%, #FFFFFF) 100%);
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, #FFFFFF);
  border-radius: 28px;
  box-shadow: 10px 14px 30px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: var(--color-text);
  padding: 1.5rem;
}

.neumorphic-control {
  background: color-mix(in srgb, var(--color-background) 80%, #FFFFFF);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-button);
  box-shadow: 8px 8px 18px rgba(15, 23, 42, 0.08), -8px -8px 18px rgba(255, 255, 255, 0.78);
  color: var(--color-text);
}

.theme-button-primary,
.theme-button-secondary,
.theme-button-outline,
.theme-button-danger,
.theme-button-ghost {
  align-items: center;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  gap: 0.5rem;
  justify-content: center;
  line-height: 1.2;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .12s ease;
}

.theme-button-primary {
  background: var(--color-primary);
  box-shadow: var(--shadow-button);
  color: #FFFFFF;
}

.theme-button-primary:hover {
  background: color-mix(in srgb, var(--color-primary) 88%, #000);
}

.theme-button-secondary {
  background: var(--color-secondary);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--color-secondary) 24%, transparent);
  color: #111827;
}

.theme-button-secondary:hover {
  background: color-mix(in srgb, var(--color-secondary) 88%, #FFFFFF);
}

.theme-button-outline {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
}

.theme-button-outline:hover {
  border-color: color-mix(in srgb, var(--color-primary) 42%, var(--color-border));
  color: var(--color-primary);
}

.theme-button-danger {
  background: var(--color-danger);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--color-danger) 22%, transparent);
  color: #FFFFFF;
}

.theme-button-danger:hover {
  background: color-mix(in srgb, var(--color-danger) 88%, #000);
}

.theme-button-ghost {
  background: transparent;
  color: var(--color-muted);
}

.theme-button-ghost:hover {
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  color: var(--color-primary);
}

.theme-button-primary:active,
.theme-button-secondary:active,
.theme-button-outline:active,
.theme-button-danger:active,
.theme-button-ghost:active {
  transform: translateY(1px);
}

.theme-button-primary:focus-visible,
.theme-button-secondary:focus-visible,
.theme-button-outline:focus-visible,
.theme-button-danger:focus-visible,
.theme-button-ghost:focus-visible {
  box-shadow: var(--softstay-focus-ring);
  outline: none;
}

.theme-input,
.theme-select {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-sizing: border-box;
  color: var(--color-text);
  display: block;
  font-family: var(--font-body);
  font-size: 0.875rem;
  min-height: 2.75rem;
  padding: 0.65rem 0.8rem;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
  width: 100%;
}

.theme-input::placeholder {
  color: color-mix(in srgb, var(--color-muted) 72%, #FFFFFF);
}

.theme-input:focus,
.theme-select:focus {
  border-color: var(--color-primary);
  box-shadow: var(--softstay-focus-ring);
  outline: none;
}

.theme-input[aria-invalid="true"],
.theme-select[aria-invalid="true"],
.theme-input.is-error,
.theme-select.is-error {
  border-color: var(--color-danger);
}

.theme-label {
  color: var(--color-text);
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.theme-help {
  color: var(--color-muted);
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

.theme-error {
  color: var(--color-danger);
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 0.35rem;
}

.theme-table {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-collapse: separate;
  border-radius: var(--radius-card);
  border-spacing: 0;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  width: 100%;
}

.theme-table-header {
  background: color-mix(in srgb, var(--color-background) 72%, #FFFFFF);
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.theme-table th,
.theme-table td {
  border-bottom: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
  padding: 0.85rem 1rem;
  vertical-align: middle;
}

.theme-table-row {
  background: var(--color-surface);
  color: var(--color-text);
  transition: background .16s ease;
}

.theme-table-row:hover {
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
}

/* Admin Guests — Soft Bento SaaS, per the PowerOTA SoftStay design language. */
.admin-guests-header-icon {
  align-items: center;
  background: color-mix(in srgb, var(--color-primary) 11%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
  border-radius: var(--radius-button);
  color: var(--color-primary);
  display: inline-flex;
  flex: 0 0 auto;
  height: 3rem;
  justify-content: center;
  width: 3rem;
}

.admin-guests-tabs {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-guests-tab {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: 0 7px 22px rgb(15 23 42 / .05);
  color: var(--color-muted);
  display: flex;
  gap: .8rem;
  min-height: 4.75rem;
  padding: .9rem 1rem;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.admin-guests-tab:hover {
  border-color: color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.admin-guests-tab.is-active {
  background: linear-gradient(145deg, var(--color-primary), color-mix(in srgb, var(--color-primary) 82%, #000));
  border-color: var(--color-primary);
  box-shadow: var(--shadow-button);
  color: #fff;
}

.admin-guests-tab-icon {
  align-items: center;
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
  border-radius: var(--radius-button);
  color: var(--color-primary);
  display: inline-flex;
  flex: 0 0 auto;
  height: 2.65rem;
  justify-content: center;
  width: 2.65rem;
}

.admin-guests-tab.is-active .admin-guests-tab-icon { background: rgb(255 255 255 / .16); color: #fff; }
.admin-guests-tab-copy { min-width: 0; }
.admin-guests-tab-label { color: inherit; display: block; font-size: .875rem; font-weight: 800; line-height: 1.2; }
.admin-guests-tab-description { color: inherit; display: block; font-size: .7rem; margin-top: .25rem; opacity: .78; }
.admin-guests-tab-count {
  align-items: center;
  background: color-mix(in srgb, var(--color-primary) 9%, var(--color-surface));
  border-radius: 9999px;
  color: var(--color-primary);
  display: inline-flex;
  font-size: .72rem;
  font-weight: 800;
  justify-content: center;
  margin-left: auto;
  min-height: 1.75rem;
  min-width: 1.75rem;
  padding: .25rem .5rem;
}
.admin-guests-tab.is-active .admin-guests-tab-count { background: rgb(255 255 255 / .18); color: #fff; }

.admin-guests-filter {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: 0 7px 22px rgb(15 23 42 / .045);
  display: flex;
  gap: .75rem;
  padding: .8rem 1rem;
}
.admin-guests-filter > i { color: var(--color-muted); }
.admin-guests-filter .form-input { background: transparent; border: 0; box-shadow: none; min-height: 2.75rem; padding-inline: 0; }
.admin-guests-filter .form-input:focus { box-shadow: none; }

.admin-guests-empty {
  background: color-mix(in srgb, var(--color-background) 72%, var(--color-surface));
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-card);
  color: var(--color-muted);
  padding: 2rem 1rem;
  text-align: center;
}

@media (max-width: 900px) {
  .admin-guests-tabs { grid-template-columns: 1fr; }
  .admin-guests-tab { min-height: 4.25rem; }
}

.status-badge {
  align-items: center;
  border-radius: 9999px;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 800;
  gap: 0.35rem;
  line-height: 1;
  min-height: 1.65rem;
  padding: 0.35rem 0.7rem;
  transition: background .16s ease, color .16s ease, transform .16s ease;
  white-space: nowrap;
}

.status-badge:hover {
  transform: translateY(-1px);
}

.status-available {
  background: #DCFCE7;
  color: #166534;
}

.status-occupied {
  background: #DBEAFE;
  color: #1E40AF;
}

.status-dirty {
  background: #FEF3C7;
  color: #92400E;
}

.status-maintenance {
  background: #FEE2E2;
  color: #991B1B;
}

.status-reserved {
  background: #EDE9FE;
  color: #5B21B6;
}

.status-checked-in {
  background: #D1FAE5;
  color: #065F46;
}

.status-checked-out {
  background: #E5E7EB;
  color: #374151;
}

.status-payment-pending {
  background: #FEF3C7;
  color: #92400E;
}

.status-paid {
  background: #DCFCE7;
  color: #166534;
}

.status-cancelled {
  background: #F3F4F6;
  color: #6B7280;
}

.status-refunded {
  background: #FCE7F3;
  color: #9D174D;
}

@media (max-width: 640px) {
  .theme-button-primary,
  .theme-button-secondary,
  .theme-button-outline,
  .theme-button-danger,
  .theme-button-ghost {
    min-height: 2.9rem;
  }

  .booking-widget {
    border-radius: 20px;
  }
}

/* Admin PMS compatibility layer for existing PHP pages */
body {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
  font-family: var(--font-heading);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  color: var(--color-text);
}

.btn-primary,
.btn-secondary,
.btn-danger {
  align-items: center;
  border-radius: var(--radius-button);
  box-sizing: border-box;
  display: inline-flex;
  font-family: var(--font-body);
  font-weight: 700;
  gap: 0.5rem;
  justify-content: center;
  min-height: 2.5rem;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .12s ease;
}

.btn-primary {
  background: var(--color-primary);
  box-shadow: var(--shadow-button);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--color-primary) 88%, #000);
}

.btn-secondary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface));
  border-color: color-mix(in srgb, var(--color-primary) 32%, var(--color-border));
  color: var(--color-primary);
}

.btn-danger {
  background: var(--color-danger);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--color-danger) 22%, transparent);
  color: #FFFFFF;
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--color-danger) 88%, #000);
}

.btn-primary:active,
.btn-secondary:active,
.btn-danger:active {
  transform: translateY(1px);
}

.form-input,
.form-select,
.form-textarea {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-sizing: border-box;
  color: var(--color-text);
  font-family: var(--font-body);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: var(--softstay-focus-ring);
  outline: none;
}

.form-label {
  color: var(--color-text);
  font-weight: 700;
}

.table-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}

.table-wrap th {
  background: color-mix(in srgb, var(--color-background) 72%, #FFFFFF);
  color: var(--color-muted);
}

.table-wrap td {
  border-bottom-color: color-mix(in srgb, var(--color-border) 72%, transparent);
  color: var(--color-text);
}

.table-wrap tr:hover td {
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
}

.badge {
  border: 0;
  border-radius: 9999px;
  font-weight: 800;
  min-height: 1.6rem;
  padding: 0.35rem 0.7rem;
}

.badge-Available,
.badge-Paid,
.badge-success {
  background: #DCFCE7;
  color: #166534;
}

.badge-Occupied,
.badge-info,
.badge-Booked {
  background: #DBEAFE;
  color: #1E40AF;
}

.badge-Dirty,
.badge-Pending,
.badge-Partial,
.badge-warning,
.badge-Open {
  background: #FEF3C7;
  color: #92400E;
}

.badge-Maintenance,
.badge-Out-of-Order,
.badge-Out-of-Service,
.badge-danger,
.badge-Failed,
.badge-Rejected {
  background: #FEE2E2;
  color: #991B1B;
}

.badge-Reserved,
.badge-Confirmed {
  background: #EDE9FE;
  color: #5B21B6;
}

.badge-Checked-In {
  background: #D1FAE5;
  color: #065F46;
}

.badge-Checked-Out,
.badge-neutral {
  background: #E5E7EB;
  color: #374151;
}

.badge-Cancelled,
.badge-Inactive {
  background: #F3F4F6;
  color: #6B7280;
}

.badge-Refunded {
  background: #FCE7F3;
  color: #9D174D;
}

.admin-nav-item {
  color: var(--color-muted);
}

.admin-nav-item:hover {
  background: color-mix(in srgb, var(--color-primary) 6%, #FFFFFF);
  color: var(--color-text);
}

.admin-nav-active {
  background: color-mix(in srgb, var(--color-primary) 10%, #FFFFFF);
  border: 1px solid color-mix(in srgb, var(--color-primary) 18%, #FFFFFF);
  color: var(--color-primary);
}

/* Compact admin visual layer -------------------------------------------------
   Deliberately scoped below the real admin shell. The extra wrapper specificity
   lets these declarations beat compiled Tailwind sizing utilities without
   redefining utilities globally or requiring !important. */
.admin-main {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-interface);
  font-size: var(--admin-base-font-size);
  line-height: var(--admin-body-line-height);
}

.admin-main > header {
  height: var(--admin-header-height);
  min-height: var(--admin-header-height);
  padding-inline: var(--admin-page-padding);
  background: var(--admin-header-background);
  border-bottom-color: var(--admin-header-border);
  border-bottom-width: var(--admin-border-width);
  box-shadow: var(--shadow-header);
}

.admin-main > header h1 {
  font-size: var(--admin-header-title-size);
  line-height: var(--admin-heading-line-height);
}

.admin-main > main {
  padding: var(--admin-page-padding);
}

.admin-main > main h1 {
  font-size: var(--admin-page-title-size);
  line-height: var(--admin-heading-line-height);
}

.admin-main > main h2 {
  font-size: var(--admin-section-heading-size);
  line-height: var(--admin-heading-line-height);
}

.admin-main > main h3,
.admin-main > main h4,
.admin-main :is(.soft-card, .bento-card, .card) :is(h2, h3, h4) {
  font-size: var(--admin-card-heading-size);
  line-height: var(--admin-heading-line-height);
}

.admin-main > main > .mb-6,
.admin-main > main > .mb-5 {
  margin-bottom: var(--admin-section-gap);
}

.admin-main :is(.gap-6, .gap-5) {
  gap: var(--admin-grid-gap);
}

.admin-main :is(.soft-card, .bento-card, .card) {
  border-radius: var(--admin-card-radius);
  box-shadow: var(--shadow-card);
  transition: transform var(--admin-transition-speed) ease, box-shadow var(--admin-transition-speed) ease;
}

.admin-main :is(.soft-card, .bento-card, .card):is(.p-6, .p-5),
.admin-main :is(.soft-card, .bento-card):not(.p-0):not(.p-3):not(.p-4) {
  padding: var(--admin-card-padding);
}

.admin-main :is(.soft-card, .bento-card, .card).p-4 {
  padding: var(--admin-card-padding-compact);
}

.admin-main :is(.soft-card, .bento-card, .card) :is(.p-6, .p-5) {
  padding: var(--admin-card-padding);
}

.admin-main :is(.theme-input, .theme-select, .form-input, .form-select) {
  background: var(--color-surface);
  border-width: var(--admin-border-width);
  color: var(--color-text);
  border-radius: var(--admin-input-radius);
  font-size: var(--admin-control-text-size);
  font-weight: var(--admin-input-font-weight);
  min-height: var(--admin-control-height);
  padding-inline: var(--admin-control-padding-x);
  padding-block: 0.5rem;
}

.admin-main :is(input.theme-input, select.theme-select, input.form-input, select.form-select) {
  height: var(--admin-control-height);
  line-height: 1.2;
  padding-block: 0.4rem;
}

.admin-main :is(textarea.theme-input, .theme-textarea, .form-textarea) {
  background: var(--color-surface);
  border-width: var(--admin-border-width);
  border-radius: var(--admin-input-radius);
  font-size: var(--admin-control-text-size);
  font-weight: var(--admin-input-font-weight);
  padding: 0.55rem var(--admin-control-padding-x);
}

.admin-main :is(.theme-input, .theme-select, .theme-textarea, .form-input, .form-select, .form-textarea):focus {
  outline: 0;
  box-shadow: 0 0 0 var(--admin-focus-ring-width) color-mix(in srgb, var(--color-primary) calc(var(--admin-focus-ring-opacity) * 100%), transparent);
}

.admin-main :is(.theme-label, .form-label, label:not(:has(input))) {
  font-size: var(--admin-label-size);
  font-weight: var(--admin-label-font-weight);
}

.admin-main :is(.theme-help, .theme-error, .help-text, small) {
  font-size: var(--admin-helper-size);
}

.admin-main :is(.theme-button-primary, .theme-button-secondary, .theme-button-outline, .theme-button-danger, .theme-button-ghost, .btn-primary, .btn-secondary, .btn-danger) {
  border-radius: var(--admin-button-radius);
  font-size: var(--admin-button-text-size);
  font-weight: var(--admin-button-font-weight);
  min-height: var(--admin-button-height);
  padding-inline: var(--admin-button-padding-x);
  padding-block: 0.55rem;
  box-shadow: var(--shadow-button);
}

.admin-main :is(.theme-button-primary, .theme-button-secondary, .theme-button-outline, .theme-button-danger, .theme-button-ghost, .btn-primary, .btn-secondary, .btn-danger) i {
  font-size: var(--admin-icon-size);
}

.admin-main :is(.theme-button-primary, .theme-button-secondary, .theme-button-outline, .theme-button-danger, .theme-button-ghost, .btn-primary, .btn-secondary, .btn-danger).min-h-0 {
  min-height: var(--admin-small-button-height);
}

.admin-main .neumorphic-control {
  border-radius: var(--admin-table-radius);
}

.admin-main .admin-property-switcher {
  border-radius: var(--admin-input-radius);
  font-size: var(--admin-control-text-size);
  height: var(--admin-property-switcher-height);
  min-height: var(--admin-property-switcher-height);
  padding-inline: var(--admin-control-padding-x);
}

.admin-main .admin-header-icon {
  align-items: center;
  display: inline-flex;
  font-size: var(--admin-header-icon-size);
  height: var(--admin-icon-button-size);
  justify-content: center;
  width: var(--admin-icon-button-size);
}

.admin-main .admin-header-icon > i { font-size: var(--admin-header-icon-size); }
.admin-main [data-testid="user-menu-btn"] > div:first-child { height: var(--admin-avatar-size); width: var(--admin-avatar-size); }
.admin-main #user-menu { box-shadow: var(--shadow-dropdown); }

.admin-main .table-wrap {
  border-color: var(--admin-table-border);
  border-width: var(--admin-border-width);
  border-radius: var(--admin-table-radius);
  overflow: hidden;
}

.admin-main :is(.table-wrap table, .theme-table) {
  font-size: var(--admin-table-body-size);
}

.admin-main :is(.table-wrap th, .theme-table th) {
  background: var(--admin-table-header-background);
  font-size: var(--admin-table-heading-size);
  padding: var(--admin-table-padding-y) var(--admin-table-padding-x);
}

.admin-main :is(.table-wrap td, .theme-table td) {
  border-color: var(--admin-table-border);
  height: var(--admin-table-row-min-height);
  padding: var(--admin-table-padding-y) var(--admin-table-padding-x);
}

.admin-main :is(.table-wrap tr:hover td, .theme-table tr:hover td) { background: var(--admin-table-row-hover); }

.admin-main :is(.status-badge, .badge) {
  font-size: var(--admin-badge-size);
}

.admin-main [data-testid^="kpi-"] :is(.text-2xl, .text-3xl),
.admin-main [data-testid^="kpi-"]:is(.text-2xl, .text-3xl) {
  font-size: var(--admin-kpi-number-size);
  line-height: var(--admin-heading-line-height);
}

.admin-main [data-testid^="kpi-"] .text-xs {
  font-size: var(--admin-kpi-label-size);
}

.admin-main .admin-kpi-card .admin-kpi-value {
  font-size: var(--admin-kpi-number-size);
  line-height: var(--admin-heading-line-height);
}

.admin-main .admin-kpi-card .admin-kpi-label {
  font-size: var(--admin-kpi-label-size);
}

.admin-main [data-testid^="kpi-"] > .flex { gap: var(--admin-kpi-gap); }
.admin-main [data-testid^="kpi-"] > .flex > div:last-child {
  height: var(--admin-kpi-icon-size);
  width: var(--admin-kpi-icon-size);
}

.admin-main :is(.text-sm.text-slate-400, .text-sm.text-slate-500, .text-sm.text-slate-600) {
  font-size: var(--admin-secondary-size);
}

.admin-main :is([id$="-modal"], [id^="edit-payment-"], #inv-edit) > :is(div, section),
.admin-main [role="dialog"] > :is(div, section) {
  background: var(--color-surface);
  border-color: var(--color-border);
  border-radius: var(--admin-modal-radius);
  color: var(--color-text);
  box-shadow: var(--shadow-modal);
}

.admin-main :is([id$="-modal"], [id^="edit-payment-"], #inv-edit) :is(.px-6.py-4, .p-6),
.admin-main [role="dialog"] :is(.px-6.py-4, .p-6) {
  padding: var(--admin-card-padding);
}

.admin-main .settings-tab {
  background: color-mix(in srgb, var(--color-background) 72%, var(--color-surface));
  border-color: var(--color-border);
  color: var(--color-text);
  font-size: var(--admin-button-text-size);
  min-height: var(--admin-button-height);
  padding: 0.55rem 0.9rem;
  transition-duration: var(--admin-transition-speed);
}

.admin-main .settings-tab:hover { background: var(--color-surface); color: var(--color-text); }

.admin-main .settings-tab.is-active {
  background: var(--color-surface);
  border-color: var(--color-primary);
  color: var(--color-text);
  min-height: calc(var(--admin-button-height) + 2px);
}

.admin-main .settings-tab i { color: var(--color-muted); }
.admin-main .settings-tab.is-active i { color: var(--color-primary); }

.admin-main .settings-tab-panels > .card {
  background: var(--color-surface);
  border-color: var(--color-border);
  padding: var(--admin-page-padding-large);
}

#app-sidebar {
  background: var(--admin-sidebar-background);
  border-color: var(--admin-sidebar-divider);
  box-shadow: var(--shadow-sidebar);
  color: var(--admin-sidebar-text);
  width: var(--admin-sidebar-width, 240px);
}

#app-sidebar .sidebar-brand-row {
  height: var(--admin-header-height);
  min-height: var(--admin-header-height);
}

#app-sidebar nav {
  padding-block: var(--admin-card-padding-compact);
}

#app-sidebar nav > div + div {
  margin-top: var(--admin-sidebar-section-spacing);
}

#app-sidebar .admin-nav-item {
  border-radius: var(--admin-sidebar-item-radius);
  font-size: var(--admin-sidebar-text-size);
  min-height: var(--admin-sidebar-item-height);
  padding-block: 0.45rem;
}

#app-sidebar .admin-nav-item + .admin-nav-item {
  margin-top: var(--admin-sidebar-gap);
}

#app-sidebar .sidebar-section-title {
  color: var(--admin-sidebar-muted-text);
  font-size: var(--admin-sidebar-label-size);
}

#app-sidebar.admin-sidebar .admin-nav-item { color: var(--admin-sidebar-text); }
#app-sidebar.admin-sidebar .admin-nav-item i { font-size: var(--admin-sidebar-icon-size); }
#app-sidebar.admin-sidebar .admin-nav-item:hover { background: var(--admin-sidebar-hover-background); color: var(--admin-sidebar-text); }
#app-sidebar.admin-sidebar .admin-nav-active { background: var(--admin-sidebar-active-background); color: var(--admin-sidebar-active-text); }
#app-sidebar .sidebar-brand-row,#app-sidebar .sidebar-footer { border-color: var(--admin-sidebar-divider); }

#app-sidebar .sidebar-brand-text > div:first-child {
  font-size: var(--admin-header-title-size);
}

@media (min-width: 1280px) {
  .admin-main > main {
    padding: var(--admin-page-padding-large);
  }
}

/* Mobile-first responsive utilities shared by booking, guest, and admin surfaces. */
.mobile-page-shell {
  box-sizing: border-box;
  margin-inline: auto;
  max-width: 100%;
  padding-inline: var(--mobile-page-gutter);
  width: 100%;
}

.mobile-stack {
  display: flex;
  flex-direction: column;
  gap: var(--mobile-section-gap);
  min-width: 0;
}

.mobile-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--mobile-radius-card);
  box-shadow: var(--shadow-card);
  color: var(--color-text);
  min-width: 0;
  padding: var(--mobile-card-padding);
}

.mobile-scroll-row {
  display: flex;
  gap: 0.5rem;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-block-end: 0.25rem;
  scroll-snap-type: inline proximity;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.mobile-scroll-row > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.mobile-touch-target {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 3rem;
  min-width: 3rem;
  touch-action: manipulation;
}

.mobile-visually-hidden-label-safe {
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.mobile-sticky-action {
  align-items: center;
  background: color-mix(in srgb, var(--color-surface) 94%, transparent);
  border-top: 1px solid var(--color-border);
  bottom: 0;
  box-sizing: border-box;
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.1);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  min-height: calc(var(--mobile-sticky-height) + var(--mobile-bottom-safe-area));
  padding: 0.625rem var(--mobile-page-gutter) calc(0.625rem + var(--mobile-bottom-safe-area));
  position: sticky;
  width: 100%;
  z-index: 40;
}

.mobile-sticky-action > * {
  min-width: 0;
}

.mobile-sticky-action :is(button, a, input, select) {
  min-height: 3rem;
}

.mobile-drawer-backdrop {
  background: rgba(15, 23, 42, 0.48);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 180ms ease;
  visibility: hidden;
  z-index: 69;
}

.mobile-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.mobile-bottom-drawer {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-bottom: 0;
  border-radius: var(--mobile-radius-card) var(--mobile-radius-card) 0 0;
  bottom: 0;
  box-sizing: border-box;
  box-shadow: 0 -20px 55px rgba(15, 23, 42, 0.18);
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  left: 0;
  max-height: 80vh;
  max-height: 80dvh;
  max-width: 100%;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  right: 0;
  transform: translateY(100%);
  transition: transform 220ms ease, opacity 180ms ease;
  visibility: hidden;
  width: 100%;
  z-index: 70;
}

.mobile-bottom-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.mobile-bottom-drawer__header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex: 0 0 auto;
  padding: var(--mobile-card-padding);
}

.mobile-bottom-drawer__content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--mobile-card-padding);
  -webkit-overflow-scrolling: touch;
}

.mobile-bottom-drawer__footer {
  align-items: center;
  background: color-mix(in srgb, var(--color-surface) 96%, transparent);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
  padding: 0.75rem var(--mobile-card-padding) calc(0.75rem + var(--mobile-bottom-safe-area));
  position: sticky;
  bottom: 0;
  z-index: 1;
}

body.mobile-drawer-open {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

@supports (backdrop-filter: blur(10px)) {
  .mobile-sticky-action,
  .mobile-bottom-drawer__footer {
    backdrop-filter: blur(10px);
  }
}

@media (min-width: 769px) {
  .mobile-page-shell {
    padding-inline: 0;
  }

  .mobile-card {
    border-radius: var(--radius-card);
    padding: 1.25rem;
  }
}

@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
  }

  body {
    overflow-x: hidden;
    overflow-x: clip;
  }

  img,
  video,
  canvas,
  svg,
  iframe {
    max-width: 100%;
  }

  .soft-card,
  .bento-card,
  .guest-step-card,
  .card {
    border-radius: var(--mobile-radius-card);
  }

  .soft-card,
  .bento-card,
  .guest-step-card {
    padding: var(--mobile-card-padding);
  }

  .booking-widget,
  .booking-search-widget {
    border-radius: var(--mobile-radius-card);
    padding: var(--mobile-card-padding);
  }

  .booking-widget,
  .checkout-page-shell,
  .guest-portal-card {
    font-size: 1rem;
  }

  .booking-widget :is(input, select, textarea, button),
  .checkout-page-shell :is(input, select, textarea, button),
  .guest-portal-card :is(input, select, textarea, button),
  .theme-input,
  .theme-select,
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 1rem;
  }

  .theme-button-primary,
  .theme-button-secondary,
  .theme-button-outline,
  .theme-button-danger,
  .theme-button-ghost,
  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .theme-input,
  .theme-select,
  .form-input,
  .form-select {
    min-height: var(--mobile-control-height);
  }

  textarea.theme-input,
  .form-textarea {
    min-height: 6rem;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap table {
    min-width: max-content;
  }

  .table-wrap th,
  .table-wrap td {
    padding: 0.75rem;
  }
}

/* Mobile checkout: the desktop card/sidebar composition remains unchanged above 768px. */
.checkout-mobile-price-summary,
.checkout-mobile-payable-bar {
  display: none;
}

.checkout-field-error {
  margin-top: 0.35rem;
  color: #b91c1c;
  font-size: 0.8125rem;
}

.checkout-page-shell [aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgb(220 38 38 / 0.1);
}

@media (max-width: 768px) {
  body:has(.checkout-mobile-payable-bar) {
    padding-bottom: calc(var(--mobile-sticky-height) + var(--mobile-bottom-safe-area) + 1rem);
  }

  .checkout-page-shell {
    overflow: clip;
  }

  .checkout-layout-grid {
    display: flex;
    flex-direction: column;
    gap: var(--mobile-section-gap);
    min-width: 0;
  }

  details[data-testid="checkout-status-card"] > summary { display: none; }
  details[data-testid="checkout-status-card"] > .checkout-status-grid { display: flex; flex-direction: column; }
  details[data-testid="checkout-status-card"] #hold-status-card { order: -1; }

  .checkout-mobile-stay-summary {
    display: block;
    order: 1;
    width: 100%;
  }

  .checkout-mobile-stay-summary > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 44px;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
  }

  .checkout-mobile-stay-summary > summary::-webkit-details-marker { display: none; }
  .checkout-mobile-stay-summary > summary span:last-child { color: #64748b; font-size: 0.8125rem; font-weight: 600; text-align: right; }
  .checkout-mobile-stay-details { display: flex; justify-content: space-between; gap: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgb(226 232 240); font-size: 0.875rem; }
  .checkout-mobile-stay-details a { color: var(--color-primary); font-weight: 700; }

  .checkout-main-column { order: 2; width: 100%; min-width: 0; }
  .checkout-summary-column { order: 3; width: 100%; min-width: 0; }
  .checkout-desktop-stay-summary { display: none; }

  .checkout-bill-content { display: flex; flex-direction: column; }
  .checkout-coupon-panel { order: 1; }
  .checkout-mobile-price-summary { display: block; order: 2; }
  .checkout-room-breakdown,
  .checkout-extra-breakdown { display: none; }
  .checkout-bill-content > :last-child { order: 3; }

  .checkout-price-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    color: #475569;
  }

  .checkout-price-row > :last-child { white-space: nowrap; color: #0f172a; }
  .checkout-tax-details { margin-top: 0.6rem; border-top: 1px solid #e2e8f0; padding-top: 0.6rem; }
  .checkout-tax-details > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--color-primary); font-weight: 700; }

  .checkout-mobile-payable-bar {
    position: fixed;
    z-index: 70;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(8.5rem, auto);
    align-items: center;
    gap: 0.75rem;
    min-height: var(--mobile-sticky-height);
    padding: 0.65rem var(--mobile-page-gutter) calc(0.65rem + var(--mobile-bottom-safe-area));
    border-top: 1px solid rgb(226 232 240 / 0.9);
    background: rgb(255 255 255 / 0.96);
    box-shadow: 0 -8px 24px rgb(15 23 42 / 0.1);
  }

  .checkout-mobile-payable-copy { min-width: 0; display: grid; grid-template-columns: auto auto; column-gap: 0.45rem; align-items: baseline; }
  .checkout-mobile-payable-copy > span { grid-column: 1 / -1; color: #64748b; font-size: 0.75rem; }
  .checkout-mobile-payable-copy > strong { font-size: 1.125rem; white-space: nowrap; }
  .checkout-mobile-payable-copy > small { color: #92400e; font-size: 0.75rem; white-space: nowrap; }
  .checkout-mobile-payable-action { width: 100%; min-width: 0; padding-inline: 1rem; }

  .checkout-page-shell .soft-card { min-width: 0; }
  .checkout-page-shell .flex { min-width: 0; }
  .checkout-page-shell input,
  .checkout-page-shell textarea,
  .checkout-page-shell select { max-width: 100%; }
}

@media (max-width: 340px) {
  .checkout-mobile-payable-bar { grid-template-columns: minmax(0, 1fr) 8rem; gap: 0.5rem; padding-inline: 0.75rem; }
  .checkout-mobile-payable-copy > strong { font-size: 1rem; }
  .checkout-mobile-payable-copy > small { grid-column: 1 / -1; }
}

@media (max-width: 768px) and (prefers-reduced-transparency: reduce) {
  .checkout-mobile-payable-bar { background: #fff; }
}

/* Guest portal mobile shell and card presentation. */
.guest-mobile-nav {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  gap: 0.5rem;
  margin: -0.25rem -0.25rem 1.25rem;
  padding: 0.25rem 0.25rem 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  background: linear-gradient(180deg, rgb(248 250 252) 78%, transparent);
  -webkit-overflow-scrolling: touch;
}

.guest-mobile-nav::-webkit-scrollbar { display: none; }

.guest-mobile-nav-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.625rem 0.875rem;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.guest-booking-mobile-actions { display: none; }

@media (max-width: 768px) {
  .guest-portal-shell {
    width: 100% !important;
    max-width: 100%;
    padding: 1rem var(--mobile-page-gutter) 2rem;
  }

  .guest-portal-shell > .flex { display: block; }
  .guest-portal-shell h1 { overflow-wrap: anywhere; }
  .guest-portal-card { border-radius: var(--mobile-radius-card); box-shadow: 0 8px 22px rgb(15 23 42 / 0.05); }

  .guest-dashboard-content {
    display: flex;
    flex-direction: column;
  }

  .guest-dashboard-content > * { order: 3; }
  .guest-dashboard-primary-booking { order: 1; margin-top: 0; }
  .guest-dashboard-stats { order: 2; margin-top: var(--mobile-section-gap); grid-template-columns: 1fr 1fr; }
  .guest-dashboard-stats .guest-portal-card { min-width: 0; padding: 0.875rem; }
  .guest-dashboard-stats .text-2xl { font-size: 1.25rem; line-height: 1.4; overflow-wrap: anywhere; }

  [data-testid="guest-booking-card"] { padding: var(--mobile-card-padding); }
  [data-testid="guest-booking-card"] > a { grid-template-columns: 1fr 1fr; }
  [data-testid="guest-booking-card"] .guest-portal-action-link {
    min-height: 44px;
    padding: 0.625rem 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
  }

  [data-testid="guest-booking-card"] > div:last-child,
  .guest-portal-card .theme-button-primary,
  .guest-portal-card .theme-button-outline,
  .guest-portal-card .theme-button-danger,
  .soft-card .theme-button-primary,
  .soft-card .theme-button-outline,
  .soft-card .theme-button-danger {
    min-height: 48px;
  }

  .guest-booking-desktop-actions { display: none; }
  body:has(.guest-booking-mobile-actions) { padding-bottom: calc(var(--mobile-sticky-height) + var(--mobile-bottom-safe-area) + 1rem); }
  .guest-booking-mobile-actions {
    position: fixed;
    z-index: 65;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0.5rem;
    padding: 0.625rem var(--mobile-page-gutter) calc(0.625rem + var(--mobile-bottom-safe-area));
    border-top: 1px solid rgb(226 232 240 / 0.9);
    background: rgb(255 255 255 / 0.97);
    box-shadow: 0 -8px 24px rgb(15 23 42 / 0.1);
  }

  .guest-booking-mobile-actions > a {
    min-width: 0;
    min-height: 48px;
    padding-inline: 0.5rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .guest-portal-shell :is(a, button, input, select, textarea):focus-visible,
  .guest-mobile-nav-chip:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
    outline-offset: 2px;
  }

  .guest-portal-shell .grid-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
  .guest-portal-shell .clay-empty-state { padding: 1.25rem; }
}

@media (max-width: 360px) {
  [data-testid="guest-booking-card"] > a { grid-template-columns: 1fr; }
  .guest-dashboard-stats { grid-template-columns: 1fr; }
  .guest-booking-mobile-actions > a { font-size: 0.75rem; }
}

/* Admin PMS mobile shell and operational card views. */
.hk-column-header { min-height: 3rem; }
.hk-column-count {
  min-width: 1.5rem;
  min-height: 1.5rem;
  border: 1px solid currentColor;
  background: rgb(255 255 255 / 0.72);
}
.hk-status-badge,
.hk-priority-badge { border-width: 1px; }
.hk-status-badge > span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.hk-task-type { text-transform: capitalize; }
.hk-tone-amber { border-color: #fcd34d !important; background: #fffbeb !important; color: #92400e !important; }
.hk-tone-indigo { border-color: #c7d2fe !important; background: #eef2ff !important; color: #4338ca !important; }
.hk-tone-blue { border-color: #bfdbfe !important; background: #eff6ff !important; color: #1d4ed8 !important; }
.hk-tone-emerald { border-color: #a7f3d0 !important; background: #ecfdf5 !important; color: #047857 !important; }
.hk-tone-teal { border-color: #99f6e4 !important; background: #f0fdfa !important; color: #0f766e !important; }
.hk-tone-red { border-color: #fecaca !important; background: #fef2f2 !important; color: #b91c1c !important; }
.hk-tone-orange { border-color: #fed7aa !important; background: #fff7ed !important; color: #c2410c !important; }
.hk-tone-slate { border-color: #cbd5e1 !important; background: #f8fafc !important; color: #475569 !important; }
.hk-priority-edge-red { border-left-color: #ef4444 !important; }
.hk-priority-edge-orange { border-left-color: #f97316 !important; }
.hk-priority-edge-blue { border-left-color: #60a5fa !important; }
.hk-priority-edge-slate { border-left-color: #cbd5e1 !important; }

.admin-sidebar-backdrop { display: none; }
.admin-sidebar-mobile-close { display: none; }

@media (max-width: 767px) {
  body.admin-sidebar-scroll-lock { overflow: hidden; }

  .admin-main :is(.theme-button-primary, .theme-button-secondary, .theme-button-outline, .theme-button-danger, .theme-button-ghost, .btn-primary, .btn-secondary, .btn-danger, button),
  .admin-main :is(.theme-input, .theme-select, .form-input, .form-select, input:not([type="hidden"]), select),
  .admin-main :is(.admin-header-icon, .admin-sidebar-toggle, .mobile-touch-target) {
    min-height: 44px;
  }

  .admin-main .settings-tab.is-active { min-height: 44px; }

  .admin-main :is(.admin-header-icon, .admin-sidebar-toggle, .mobile-touch-target),
  .admin-main :is([id$="-modal"], [id^="edit-payment-"], #inv-edit) button[aria-label] {
    min-width: 44px;
  }

  .admin-main :is([id$="-modal"], [id^="edit-payment-"], #inv-edit) > :is(div, section) {
    max-height: calc(100dvh - (2 * var(--mobile-page-gutter)));
    max-width: calc(100vw - (2 * var(--mobile-page-gutter)));
    overflow-y: auto;
  }

  .admin-sidebar-backdrop {
    position: fixed;
    z-index: 45;
    inset: 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    border: 0;
    background: rgb(15 23 42 / 0.48);
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  #app-shell.sidebar-open .admin-sidebar-backdrop { visibility: visible; opacity: 1; }
  #app-sidebar { z-index: 50; width: min(84vw, 280px); box-shadow: 18px 0 38px rgb(15 23 42 / 0.18); }
  .admin-sidebar-mobile-close { display: inline-flex; }
  #app-sidebar .admin-nav-item { min-height: 44px; }
  .admin-sidebar-toggle,
  .admin-header-icon,
  [data-testid="user-menu-btn"] { min-width: 44px; min-height: 44px; justify-content: center; }

  .admin-main > header {
    height: 3.75rem;
    min-height: 3.75rem;
    gap: 0.5rem;
    padding-inline: 0.75rem;
  }

  .admin-main > header > div:first-child { min-width: 0; flex: 1 1 auto; gap: 0.5rem; }
  .admin-main > header > div:last-child { flex: 0 0 auto; gap: 0.25rem; }
  #property-switch-form { min-width: 0; max-width: min(48vw, 13rem); }
  .admin-property-switcher { width: 100%; min-width: 0 !important; max-width: 100%; height: 44px; padding-left: 0.65rem; padding-right: 1.75rem; text-overflow: ellipsis; }
  [data-testid="user-menu-btn"] { padding-left: 0.5rem; border-left: 0; gap: 0; }
  [data-testid="user-menu-btn"] > i { display: none; }

  .admin-main > main { min-width: 0; padding: 1rem var(--mobile-page-gutter); }
  .admin-main > main h1.text-3xl { font-size: var(--admin-page-title-size); line-height: var(--admin-heading-line-height); }
  .admin-main .neumorphic-control { max-width: 100%; }
  .admin-main > main > .flex.justify-between { flex-wrap: wrap; gap: 0.75rem; }
  .admin-main > main > .mb-5 form.flex,
  .admin-main > main > .mb-4 form.flex,
  .admin-main > main > .mb-6 form.flex { flex-wrap: wrap; max-width: 100%; }
  .admin-main > main > .mb-5 form.flex input[type="date"],
  .admin-main > main > .mb-4 form.flex input[type="date"] { flex: 1 1 10rem; min-width: 0 !important; }

  .admin-main .table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .admin-main .table-wrap:has(.admin-responsive-table) { overflow: visible; }

  .admin-responsive-table,
  .admin-responsive-table tbody { display: block; width: 100%; min-width: 0 !important; }
  .admin-responsive-table thead { display: none; }
  .admin-responsive-table tbody { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
  .admin-responsive-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.7rem 1rem;
    width: 100%;
    padding: var(--mobile-card-padding);
    border: 1px solid var(--color-border);
    border-radius: var(--mobile-radius-card);
    background: var(--color-surface);
    box-shadow: 0 7px 20px rgb(15 23 42 / 0.05);
  }

  .admin-responsive-table tbody td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  .admin-responsive-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    color: var(--color-muted);
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
  }

  .admin-responsive-table tbody td:has(form),
  .admin-responsive-table tbody td:last-child { grid-column: 1 / -1; }
  .admin-responsive-table tbody td:last-child a { display: inline-flex; align-items: center; min-height: 44px; }
  .admin-responsive-table .admin-table-empty-row { display: block; }
  .admin-responsive-table .admin-table-empty-row td { text-align: center; padding: 1rem; }
  .admin-responsive-table .admin-table-empty-row td::before { display: none; }
  .admin-responsive-table select,
  .admin-responsive-table button,
  .admin-responsive-table .theme-button-outline { min-height: 46px !important; font-size: 0.875rem; }

  .admin-main [data-testid="hk-task"] { border-radius: var(--mobile-radius-card); padding: var(--mobile-card-padding); }
  .admin-main [data-testid="hk-task"] button { min-height: 44px; padding: 0.55rem 0.75rem; font-size: 0.8125rem; }
  .admin-main [data-testid^="hk-col-"] { min-width: 0; }
  .admin-main [data-testid^="hk-col-"] > div:first-child { min-height: 44px; }

  .admin-main .room-card { border-radius: var(--mobile-radius-card); }
  .admin-main .room-card .status-badge { min-height: 32px; display: inline-flex; align-items: center; padding-inline: 0.75rem; font-size: 0.75rem; }
  .admin-main .room-card :is(button, a.theme-button-outline, a.theme-button-primary, select) { min-height: 46px !important; }
  .admin-main .room-card form.flex { align-items: stretch; }

  body:has(.admin-booking-action-controls) { padding-bottom: calc(var(--mobile-sticky-height) + var(--mobile-bottom-safe-area) + 1rem); }
  .admin-booking-action-controls {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    padding: 0.625rem var(--mobile-page-gutter) calc(0.625rem + var(--mobile-bottom-safe-area));
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    border-top: 1px solid var(--color-border);
    background: rgb(255 255 255 / 0.97);
    box-shadow: 0 -8px 24px rgb(15 23 42 / 0.1);
    scrollbar-width: none;
  }

  .admin-booking-action-controls::-webkit-scrollbar { display: none; }
  .admin-booking-action-controls > :is(a, button, form) { flex: 0 0 auto; }
  .admin-booking-action-controls form button,
  .admin-booking-action-controls > a,
  .admin-booking-action-controls > button { min-height: 48px; white-space: nowrap; }
  .admin-booking-action-controls .text-red-600 { margin-left: 0.5rem; }

  .admin-main :is(a, button, input, select, textarea):focus-visible,
  #app-sidebar :is(a, button):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--color-primary) 38%, transparent);
    outline-offset: 2px;
  }
}

@media (max-width: 340px) {
  .admin-responsive-table tbody tr { grid-template-columns: 1fr; }
  .admin-responsive-table tbody td { grid-column: 1 !important; }
  #property-switch-form { max-width: 43vw; }
}

/* Third-party iframe containment. Activated only by the embed resize bridge. */
body.powerota-is-embedded,
body.powerota-is-embedded #powerota-booking-embed {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body.powerota-is-embedded :is(.booking-widget, .booking-search-widget, .checkout-page-shell, .booking-results-page) {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
}

@media (max-width: 768px) {
  body.powerota-is-embedded .booking-search-widget > .theme-button-primary,
  body.powerota-is-embedded .booking-search-form-grid > .theme-button-primary {
    width: 100%;
    min-height: var(--mobile-control-height);
  }
  body.powerota-is-embedded .booking-results-page { padding-inline: var(--mobile-page-gutter); }
  body.powerota-is-embedded .child-age-picker--dropdown { max-width: calc(100vw - 2rem); }
  body.powerota-is-embedded .child-age-picker--sheet,
  body.powerota-is-embedded .allocation-modal,
  body.powerota-is-embedded .booking-selected-rooms-backdrop { width: 100vw; max-width: 100%; }
  body.powerota-is-embedded .checkout-mobile-payable-bar {
    position: sticky;
    right: auto;
    bottom: 0;
    left: auto;
    width: 100%;
  }
}

@media (max-width: 414px) {
  .mobile-sticky-action {
    gap: 0.5rem;
  }

  .mobile-sticky-action :is(.theme-button-primary, .theme-button-secondary, .theme-button-outline, .btn-primary, .btn-secondary) {
    flex: 1 1 auto;
  }
}

@media (hover: none), (pointer: coarse) {
  .soft-card:hover,
  .bento-card:hover,
  .room-card:hover,
  .guest-step-card:hover {
    border-color: var(--color-border);
    box-shadow: var(--shadow-card);
    transform: none;
  }

  .mobile-touch-target,
  button,
  [role="button"],
  a {
    -webkit-tap-highlight-color: transparent;
  }
}

@media (max-width: 640px) and (hover: none) {
  .glass-panel,
  .booking-widget,
  .booking-search-widget {
    backdrop-filter: none;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  }

  .mobile-sticky-action,
  .mobile-bottom-drawer__footer {
    backdrop-filter: none;
  }

  .mobile-card,
  .soft-card,
  .bento-card,
  .guest-step-card,
  .card {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .admin-main :is(.soft-card, .bento-card, .card),
  :is(.booking-page-shell, .booking-results-page, .booking-room-detail-page, .checkout-page-shell, .booking-widget) :is(.soft-card, .bento-card, .card),
  :is(.guest-portal-shell, .guest-auth-card, .guest-portal-card) {
    animation: none !important;
    transform: none !important;
  }
}

/* Shared public booking/guest header. Desktop keeps the existing layout. */
.public-booking-header__mobile-actions,
.public-booking-header__drawer,
.public-booking-header__backdrop {
  display: none;
}

@media (max-width: 768px) {
  .public-booking-header {
    height: 3.75rem;
    min-height: 3.75rem;
    position: relative;
    z-index: 60;
  }

  .public-booking-header__inner {
    box-sizing: border-box;
    flex-wrap: nowrap;
    gap: 0.5rem;
    height: 3.75rem;
    max-width: 100%;
    min-height: 3.75rem !important;
    padding: 0.5rem var(--mobile-page-gutter);
    width: 100%;
  }

  .public-booking-header__brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .public-booking-header__brand .public-header-logo__mark {
    height: 2.5rem !important;
    max-height: 2.5rem;
    max-width: 2.5rem;
    width: 2.5rem !important;
  }

  .public-booking-header__property-name {
    flex: 1 1 auto;
    font-size: 0.9375rem;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .public-booking-header__desktop-actions {
    display: none;
  }

  .public-booking-header__mobile-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
  }

  .public-booking-header__cart-pill,
  .public-booking-header__menu-button,
  .public-booking-header__drawer-close {
    align-items: center;
    border-radius: var(--radius-button);
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    min-height: 2.75rem;
    min-width: 2.75rem;
    touch-action: manipulation;
  }

  .public-booking-header__cart-pill {
    background: var(--color-primary);
    box-shadow: 0 5px 14px color-mix(in srgb, var(--color-primary) 20%, transparent);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 800;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    white-space: nowrap;
  }

  .public-booking-header__menu-button,
  .public-booking-header__drawer-close {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 1rem;
  }

  .public-booking-header__menu-button:focus-visible,
  .public-booking-header__drawer-close:focus-visible,
  .public-booking-header__cart-pill:focus-visible,
  .public-booking-header__drawer-link:focus-visible {
    box-shadow: var(--softstay-focus-ring);
    outline: none;
  }

  .public-booking-header__backdrop {
    background: rgba(15, 23, 42, 0.48);
    display: block;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 180ms ease;
    visibility: hidden;
    z-index: 68;
  }

  .public-booking-header__backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .public-booking-header__drawer {
    background: var(--color-surface);
    border-left: 1px solid var(--color-border);
    bottom: 0;
    box-shadow: -20px 0 55px rgba(15, 23, 42, 0.18);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    max-width: calc(100vw - 2.5rem);
    opacity: 0;
    overflow: hidden;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(100%);
    transition: transform 220ms ease, opacity 180ms ease;
    visibility: hidden;
    width: 22rem;
    z-index: 69;
  }

  .public-booking-header__drawer.is-open {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
  }

  .public-booking-header__drawer-head {
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex: 0 0 auto;
    gap: 1rem;
    justify-content: space-between;
    min-height: 4rem;
    padding: max(0.625rem, env(safe-area-inset-top, 0px)) var(--mobile-page-gutter) 0.625rem;
  }

  .public-booking-header__drawer-nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem var(--mobile-page-gutter) calc(1rem + var(--mobile-bottom-safe-area));
    -webkit-overflow-scrolling: touch;
  }

  .public-booking-header__drawer-link {
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius-button);
    color: var(--color-text);
    display: flex;
    font-size: 1rem;
    font-weight: 700;
    gap: 0.75rem;
    min-height: var(--mobile-control-height);
    padding: 0.75rem 1rem;
    text-decoration: none;
  }

  .public-booking-header__drawer-link:hover {
    background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface));
  }

  .public-booking-header__drawer-link--accent {
    background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface));
    border-color: color-mix(in srgb, var(--color-primary) 18%, var(--color-border));
    color: var(--color-primary);
  }

  .public-booking-header__drawer-link--muted {
    color: var(--color-muted);
  }

  body.public-booking-menu-open {
    overflow: hidden;
    overscroll-behavior: none;
  }
}

@media (max-width: 360px) {
  .public-booking-header__cart-label {
    display: none;
  }

  .public-booking-header__cart-pill {
    padding-inline: 0.625rem;
  }
}

@media (min-width: 769px) {
  .public-booking-header__drawer,
  .public-booking-header__backdrop {
    display: none !important;
  }
}

/* Booking search mobile grid and child-age picker. */
.booking-child-age-error {
  color: var(--color-danger);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 0.375rem;
}

.child-age-picker {
  color: var(--color-text);
  font-family: var(--font-body);
}

.child-age-picker.hidden {
  display: none !important;
}

.child-age-picker--dropdown {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
  padding: 0.75rem;
}

.child-age-picker__dropdown-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 800;
  margin-bottom: 0.625rem;
}

.child-age-picker__row {
  align-items: center;
  background: color-mix(in srgb, var(--color-background) 62%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-border) 82%, transparent);
  border-radius: 12px;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  min-width: 0;
  padding: 0.5rem;
}

.child-age-picker__label {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.child-age-picker__label strong {
  font-size: 0.8125rem;
}

.child-age-picker__label span {
  color: var(--color-muted);
  font-size: 0.6875rem;
}

.child-age-picker__control {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  display: flex;
  flex: 0 0 auto;
  gap: 0.25rem;
  padding: 0.125rem;
}

.child-age-picker__step,
.child-age-picker__close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: var(--color-text);
  display: inline-flex;
  font-size: 1.125rem;
  font-weight: 800;
  justify-content: center;
  min-height: 2.5rem;
  min-width: 2.5rem;
  touch-action: manipulation;
}

.child-age-picker__step:hover,
.child-age-picker__close:hover {
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface));
  color: var(--color-primary);
}

.child-age-picker__step:focus-visible,
.child-age-picker__close:focus-visible,
.child-age-picker__input:focus-visible {
  box-shadow: var(--softstay-focus-ring);
  outline: none;
}

.child-age-picker__input {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 800;
  height: 2.5rem;
  padding: 0;
  text-align: center;
  width: 3rem;
}

.child-age-picker__help {
  color: var(--color-muted);
  font-size: 0.75rem;
  line-height: 1.4;
  margin: 0.625rem 0;
}

.child-age-picker--sheet {
  box-sizing: border-box;
  display: block;
  inset: 0;
  max-width: 100vw;
  position: fixed;
  width: 100vw;
  z-index: 2147483647;
}

.child-age-picker__backdrop {
  background: rgba(15, 23, 42, 0.52);
  border: 0;
  height: 100%;
  inset: 0;
  padding: 0;
  position: absolute;
  width: 100%;
}

.child-age-sheet {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-bottom: 0;
  border-radius: var(--mobile-radius-card) var(--mobile-radius-card) 0 0;
  bottom: 0;
  box-shadow: 0 -20px 55px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  left: 0;
  box-sizing: border-box;
  max-height: min(80vh, var(--child-age-sheet-max-height, 80vh));
  max-height: min(80dvh, var(--child-age-sheet-max-height, 80dvh));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: 100%;
}

.child-age-sheet__header {
  align-items: flex-start;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex: 0 0 auto;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem var(--mobile-page-gutter) 0.75rem;
}

.child-age-sheet__header h2 {
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}

.child-age-sheet__header p {
  color: var(--color-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
  margin: 0.25rem 0 0;
}

.child-age-sheet__content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.75rem var(--mobile-page-gutter);
  -webkit-overflow-scrolling: touch;
}

.child-age-sheet__footer {
  background: color-mix(in srgb, var(--color-surface) 96%, transparent);
  border-top: 1px solid var(--color-border);
  bottom: 0;
  display: grid;
  flex: 0 0 auto;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  padding: 0.75rem var(--mobile-page-gutter) calc(0.75rem + var(--mobile-bottom-safe-area));
  position: sticky;
  z-index: 1;
}

body.child-age-sheet-open {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (max-width: 640px) {
  .booking-search-form-grid {
    align-items: end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .booking-search-widget__brand {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .booking-search-field {
    min-width: 0;
  }

  .booking-search-field--date {
    grid-column: span 3;
  }

  .booking-search-field--count {
    grid-column: span 2;
  }

  .booking-search-action {
    grid-column: 1 / -1;
  }

  .booking-search-action .theme-button-primary {
    min-height: 3rem;
    width: 100%;
  }

  .booking-search-form-grid .theme-label {
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
  }

  .booking-search-form-grid .theme-input {
    min-width: 0;
    padding-inline: 0.625rem;
  }

  .child-age-picker__row {
    margin-bottom: 0.625rem;
    padding: 0.625rem;
  }

  .child-age-picker__step,
  .child-age-picker__close {
    min-height: 3rem;
    min-width: 3rem;
  }

  .child-age-picker__input {
    height: 3rem;
  }
}

@media (max-width: 340px) {
  .booking-search-field--date {
    grid-column: 1 / -1;
  }

  .booking-search-field--count {
    grid-column: span 3;
  }

  .booking-search-field--rooms {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .child-age-picker__row {
    align-items: stretch;
    flex-direction: column;
    gap: 0.5rem;
  }

  .child-age-picker__control {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) 3rem;
    width: 100%;
  }

  .child-age-picker__input {
    min-width: 0;
    width: 100%;
  }
}

@media (hover: none), (pointer: coarse) {
  .child-age-sheet,
  .child-age-picker--dropdown {
    box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.14);
  }
}
