:root {
  color-scheme: dark;
  --bg: #0a100e;
  --bg-soft: #0f1714;
  --surface: #141e1a;
  --surface-2: #192520;
  --surface-3: #202e28;
  --text: #f5f2e9;
  --muted: #9ca9a2;
  --line: #293830;
  --green: #b9f26c;
  --green-deep: #73a53f;
  --green-soft: rgba(185, 242, 108, .11);
  --blue: #8db9ff;
  --red: #ff8b8b;
  --amber: #f6c970;
  --shadow: 0 22px 60px rgba(0, 0, 0, .24);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% -10%, rgba(75, 120, 86, .2), transparent 32rem),
    radial-gradient(circle at 85% 0, rgba(185, 242, 108, .07), transparent 30rem),
    var(--bg);
  color: var(--text);
}
button, input, textarea, select { font: inherit; }
button { border: 0; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(185, 242, 108, .55);
  outline-offset: 2px;
}
button:disabled { opacity: .48; cursor: not-allowed; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: .5rem;
  letter-spacing: -.045em;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1;
}
h2 { margin-bottom: .35rem; font-size: 1.3rem; letter-spacing: -.02em; }
h3 { margin-bottom: .25rem; letter-spacing: -.015em; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  padding: max(.8rem, env(safe-area-inset-top)) max(1rem, calc((100vw - 1180px) / 2)) .8rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  background: rgba(10, 16, 14, .86);
  border-bottom: 1px solid rgba(41, 56, 48, .75);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; width: fit-content; align-items: center; color: var(--text); text-decoration: none; }
.brand-logo {
  display: block;
  width: clamp(12.5rem, 20vw, 16rem);
  height: auto;
  mix-blend-mode: screen;
}
.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #14200f;
  font-family: Georgia, serif;
  font-weight: 900;
}
.brand > span:last-child { display: grid; gap: .05rem; }
.brand strong { font-size: .82rem; letter-spacing: .13em; }
.brand small { color: var(--muted); font-size: .68rem; }
.tabs {
  display: flex;
  gap: .25rem;
  padding: .28rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #101915;
}
.tab {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .68rem .95rem;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
  transition: .18s ease;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
.tab-icon { color: var(--green); }
.icon-button {
  justify-self: end;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 1.15rem;
  border: 1px solid var(--line);
}

.app-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 2.2rem 1rem max(4rem, env(safe-area-inset-bottom));
}
.tab-panel { display: grid; gap: 1rem; }
.tab-panel[hidden] { display: none; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: .7rem; }
.page-intro { max-width: 640px; margin: 0; color: var(--muted); line-height: 1.55; }
.heading-actions, .button-row { display: flex; align-items: center; gap: .65rem; }
.cleaning-statusbar {
  width: fit-content;
  max-width: 100%;
  margin-top: .75rem;
  padding: .36rem .42rem;
  display: flex;
  align-items: center;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 20, .82);
  color: var(--muted);
  white-space: nowrap;
  scrollbar-width: none;
  font-size: .68rem;
}
.cleaning-statusbar::-webkit-scrollbar { display: none; }
.statusbar-item { padding: 0 .5rem; display: inline-flex; align-items: center; gap: .3rem; }
.statusbar-item + .statusbar-item { border-left: 1px solid var(--line); }
.statusbar-item strong { color: var(--text); font-size: .72rem; }
.statusbar-lodgify > strong { color: var(--amber); }
.statusbar-lodgify > strong.good { color: var(--green); }
.statusbar-lodgify > strong::before {
  content: "";
  width: .42rem;
  height: .42rem;
  margin-right: .3rem;
  display: inline-block;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

button:not(.tab):not(.icon-button):not(.settings-row):not(.booking-row):not(.close-button):not(.square-button) {
  padding: .82rem 1rem;
  border-radius: 12px;
  background: var(--green);
  color: #13200e;
  font-weight: 800;
}
button.secondary {
  color: var(--text) !important;
  background: var(--surface-2) !important;
  border: 1px solid var(--line) !important;
}
button.text-button {
  padding-inline: .3rem !important;
  background: transparent !important;
  color: var(--muted) !important;
}
button.danger {
  background: transparent !important;
  color: var(--red) !important;
  border: 1px solid rgba(255, 139, 139, .35) !important;
}
.small-button { padding: .62rem .8rem !important; font-size: .82rem; }
.eyebrow {
  margin-bottom: .42rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .65rem;
  font-weight: 850;
}
.muted { color: var(--muted); margin-bottom: 0; line-height: 1.5; }
.hint { margin: .8rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }

.surface, .overview-card {
  background: linear-gradient(145deg, rgba(22, 32, 28, .96), rgba(17, 26, 22, .96));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.surface { padding: 1.2rem; }
.overview-grid { display: block; }
.overview-card { min-width: 0; min-height: 132px; padding: 1.1rem; display: flex; flex-direction: column; justify-content: flex-end; }
.accent-card { background: linear-gradient(145deg, rgba(48, 76, 56, .58), rgba(20, 31, 25, .98)); border-color: #3d5847; }
.overview-value { display: block; overflow: hidden; margin-bottom: .15rem; font-size: clamp(1.55rem, 4vw, 2.15rem); letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
.overview-detail { display: block; overflow: hidden; color: var(--muted); font-size: .78rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.next-checkout-card {
  min-height: auto;
  padding: .8rem 1rem;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  justify-content: start;
  gap: .8rem 1rem;
}
.next-checkout-card .eyebrow,
.next-checkout-card .overview-value { margin: 0; }
.next-checkout-card .overview-value { font-size: 1.55rem; }

.cleaning-layout { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(290px, .78fr); gap: 1rem; align-items: start; }
.bookings-surface { padding: 0; overflow: hidden; }
.surface-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.bookings-surface > .surface-heading { padding: 1.2rem; border-bottom: 1px solid var(--line); }
.surface-heading.compact { align-items: flex-start; }
.surface-heading h2, .surface-heading h3 { margin: 0; }
.segmented { display: flex; padding: .22rem; border-radius: 10px; background: #0f1714; border: 1px solid var(--line); }
.segmented button { padding: .5rem .72rem; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 750; font-size: .76rem; }
.segmented button.active { background: var(--surface-3); color: var(--text); }
.booking-list { min-height: 350px; }
.booking-row {
  width: 100%;
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  text-align: left;
  color: var(--text);
  background: transparent;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.booking-row:last-child { border-bottom: 0; }
.booking-row:hover { background: rgba(255, 255, 255, .025); }
.date-block { width: 3rem; height: 3rem; display: grid; place-items: center; align-content: center; border-radius: 13px; background: var(--surface-3); color: var(--green); }
.date-block strong { font-size: 1.15rem; line-height: 1; font-variant-numeric: tabular-nums; }
.date-block small { margin-top: .2rem; color: var(--muted); text-transform: uppercase; font-size: .61rem; }
.booking-main { min-width: 0; display: grid; gap: .25rem; }
.booking-main > strong { overflow: hidden; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.booking-meta { display: flex; align-items: center; gap: .45rem; color: var(--muted); }
.booking-meta small { font-size: .68rem; }
.booking-dates { color: var(--muted); font-size: .75rem; }
.booking-note { overflow: hidden; color: #bac4bf; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.booking-action { color: var(--muted); font-size: 1.6rem; }
.edited-label { color: var(--blue); font-size: .64rem; font-weight: 800; }
.status-badge { display: inline-flex; width: fit-content; padding: .25rem .5rem; border-radius: 999px; background: rgba(156,169,162,.11); color: var(--muted); font-size: .62rem; font-weight: 850; }
.status-badge.ok { color: var(--green); background: var(--green-soft); }
.status-badge.bad { color: var(--red); background: rgba(255,139,139,.1); }
.empty-state { min-height: 350px; padding: 3rem 1rem; display: grid; place-items: center; align-content: center; gap: .55rem; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--text); font-size: 1.05rem; }
.empty-state p { max-width: 330px; margin-bottom: .6rem; font-size: .84rem; line-height: 1.5; }
.empty-icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: .4rem; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.skeleton-row { height: 96px; margin: 1px 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.03), transparent); background-size: 220% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }

.sidebar-stack { display: grid; gap: 1rem; }
.feed-heading { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; }
.feed-heading h3 { margin: 0; }
.round-icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; flex: none; border-radius: 11px; color: var(--green); background: var(--green-soft); font-weight: 900; }
.calendar-icon { font-size: 1.15rem; }
.feed-card > .muted { margin: .9rem 0; font-size: .8rem; }
.compact-field { gap: .45rem; font-size: .7rem; }
.copy-field { display: grid; grid-template-columns: 1fr auto; gap: .35rem; }
.copy-field input { min-width: 0; padding: .72rem; font-size: .72rem; }
.square-button { width: 2.65rem; border-radius: 10px; background: var(--surface-3); color: var(--text); border: 1px solid var(--line); }
.feed-card .button-row { margin-top: .75rem; }
.feed-mode-setting { margin: .85rem 0; }
.bed-rules { list-style: none; margin: 1rem 0 0; padding: 0; }
.bed-rules li { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); font-size: .78rem; }
.bed-rules span { color: var(--muted); }
.bed-rules strong { font-size: .76rem; }
.settings-card { padding: .45rem; }
.settings-card > .eyebrow { padding: .75rem .75rem .2rem; }
.settings-row {
  width: 100%;
  padding: .75rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .7rem;
  text-align: left;
  background: transparent;
  color: var(--text);
  border-radius: 12px;
}
.settings-row:hover { background: rgba(255,255,255,.025); }
.settings-row > span:nth-child(2) { display: grid; gap: .16rem; }
.settings-row small { color: var(--muted); font-size: .7rem; }
.settings-row > span:last-child { color: var(--muted); font-size: 1.2rem; }

.automation-panel { display: grid; gap: 1.2rem; transition: border-color .2s; }
.automation-panel.enabled { border-color: #456b4d; }
.automation-heading { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; }
.automation-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.range-control { display: grid; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); color: var(--text); }
.range-control > span { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.range-control output { color: var(--green); font-size: 1.05rem; font-weight: 800; }
.range-control small { color: var(--muted); line-height: 1.45; }
input[type="range"] { appearance: none; height: .45rem; padding: 0; border: 0; border-radius: 999px; background: #344139; accent-color: var(--green); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.switch { display: flex; align-items: center; gap: .7rem; color: var(--text); cursor: pointer; }
.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.switch input:focus-visible + .switch-track {
  outline: 3px solid rgba(185, 242, 108, .55);
  outline-offset: 2px;
}
.switch-track { width: 3.5rem; height: 2rem; padding: .2rem; border-radius: 999px; background: #3b4741; transition: background .2s; }
.switch-track span { display: block; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 8px #0007; }
.switch input:checked + .switch-track { background: var(--green-deep); }
.switch input:checked + .switch-track span { transform: translateX(1.5rem); }
.switch input:disabled + .switch-track { opacity: .5; }
.switch-label { font-size: .72rem; font-weight: 800; color: var(--muted); }
.compact-switch .switch-track { width: 3rem; height: 1.7rem; padding: .18rem; }
.compact-switch .switch-track span { width: 1.34rem; height: 1.34rem; }
.compact-switch input:checked + .switch-track span { transform: translateX(1.3rem); }
.option-progress { color: var(--blue); font-size: .82rem; font-weight: 700; margin: .25rem 0 0; }
.status-line { display: flex; align-items: center; gap: .65rem; }
.dot { width: .7rem; height: .7rem; background: #67717c; border-radius: 50%; box-shadow: 0 0 0 5px rgba(103,113,124,.12); flex: none; }
.dot.ok { background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.intercom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.metric { font-size: 2.4rem; font-variant-numeric: tabular-nums; margin-bottom: .3rem; }
.metric small { font-size: .9rem; color: var(--muted); }
.manual { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
dl { margin: 1rem 0 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
dl div { padding: .9rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
dl div:nth-child(odd) { border-right: 1px solid var(--line); }
dl div:nth-last-child(-n+2) { border-bottom: 0; }
dt { color: var(--muted); font-size: .76rem; margin-bottom: .35rem; }
dd { margin: 0; overflow-wrap: anywhere; }
.events article { padding: 1rem 0; display: grid; grid-template-columns: 1fr auto; gap: .45rem 1rem; border-top: 1px solid var(--line); }
.events article > div { display: flex; align-items: center; gap: .8rem; }
.events article time { color: var(--muted); font-size: .75rem; }
.events article p { grid-column: 1 / -1; color: #bdc6cf; margin: 0; }

.modal {
  width: min(680px, calc(100% - 1.5rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 100px #000b;
}
.wide-modal { width: min(1080px, calc(100% - 1.5rem)); }
.modal::backdrop { background: rgba(3, 7, 5, .78); backdrop-filter: blur(5px); }
.modal form { padding: 1.25rem; display: grid; gap: 1.1rem; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.modal-heading h2 { font-size: 1.5rem; }
.close-button { width: 2.2rem; height: 2.2rem; border-radius: 10px; background: var(--surface-3); color: var(--muted); font-size: 1.35rem; }
.source-banner, .connection-summary { padding: .8rem; border-radius: 12px; background: rgba(141,185,255,.08); color: #b9d4ff; border: 1px solid rgba(141,185,255,.2); font-size: .78rem; line-height: 1.45; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 1.1rem; min-height: 0; }
.editor-fields { display: grid; gap: .9rem; max-height: min(66vh, 760px); overflow: auto; padding-right: .25rem; }
fieldset { margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 15px; display: grid; gap: .9rem; }
legend { padding: 0 .45rem; color: var(--text); font-weight: 800; font-size: .82rem; }
label { display: grid; gap: .42rem; color: var(--muted); font-size: .76rem; }
label > span:first-child { font-weight: 700; }
label small { color: var(--muted); font-size: .7rem; line-height: 1.4; }
input, textarea, select {
  width: 100%;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0e1612;
  color: var(--text);
}
textarea { resize: vertical; line-height: 1.5; }
select { appearance: auto; }
.form-grid { display: grid; gap: .75rem; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.inline-setting { padding: .8rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.inline-setting > span:first-child { display: grid; gap: .2rem; }
.inline-setting small { color: var(--muted); font-size: .7rem; }
.check-card { display: flex; align-items: center; gap: .7rem; padding: .7rem; border: 1px solid var(--line); border-radius: 11px; background: #0e1612; }
.check-card input { width: 1rem; height: 1rem; accent-color: var(--green); }
.check-card span { display: grid; gap: .12rem; }
.manual-bed-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.bed-choice {
  min-width: 0;
  padding: .72rem;
  display: flex;
  align-items: center;
  gap: .62rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0e1612;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.bed-choice:has(input:checked) {
  border-color: #597b4a;
  background: var(--green-soft);
  color: var(--text);
}
.bed-choice input { width: 1.05rem; height: 1.05rem; flex: none; accent-color: var(--green); }
.bed-choice span { min-width: 0; }
.bed-choice strong { white-space: nowrap; }
.preview-panel { min-width: 0; display: flex; flex-direction: column; }
.calendar-preview { min-height: 0; flex: 1; padding: 1rem; border: 1px solid #3b4b42; border-radius: 15px; background: #0c1410; overflow: hidden; }
.preview-date { display: block; margin-bottom: .7rem; color: var(--green); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.calendar-preview h3 { margin-bottom: 1rem; line-height: 1.35; }
.calendar-preview pre { max-height: min(51vh, 570px); margin: 0; overflow: auto; white-space: pre-wrap; color: #bac5be; font: 400 .72rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.preview-note { margin: .75rem 0 0; color: var(--muted); font-size: .69rem; }
.preview-note span { color: var(--green); }
.modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .2rem; }
.modal-actions > div { display: flex; gap: .6rem; }
.modal-actions.end { justify-content: flex-end; }
.text-danger { border: 0 !important; padding-inline: .25rem !important; }

#toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 1.4rem;
  width: max-content;
  max-width: calc(100% - 2rem);
  transform: translate(-50%, 120px);
  opacity: 0;
  background: #e9ffd1;
  color: #23410d;
  padding: .8rem 1rem;
  border-radius: 12px;
  transition: .25s;
  box-shadow: 0 12px 35px #0009;
  font-weight: 750;
  font-size: .82rem;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast.error-toast { background: #ffdce0; color: #6e1c27; }

.login-page { display: grid; place-items: center; padding: 1rem; }
.login-card { width: min(100%, 420px); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 1.5rem; box-shadow: var(--shadow); }
.login-logo { display: block; width: 100%; height: auto; margin-bottom: 1.5rem; mix-blend-mode: screen; }
.login-card form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.error { color: var(--red); min-height: 1.2rem; margin: 0; }

@media (max-width: 900px) {
  .cleaning-layout { grid-template-columns: 1fr; }
  .sidebar-stack { grid-template-columns: 1fr 1fr; }
  .settings-card { grid-column: 1 / -1; }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-fields { max-height: none; overflow: visible; }
  .preview-panel { max-height: 420px; }
  .modal { overflow: auto; }
}

@media (max-width: 640px) {
  .app-header { grid-template-columns: 1fr auto; background: #0a100e; backdrop-filter: none; }
  .brand-logo { width: min(12.8rem, 62vw); }
  .tabs { position: fixed; z-index: 30; left: 1rem; right: 1rem; bottom: max(.8rem, env(safe-area-inset-bottom)); justify-content: stretch; box-shadow: 0 15px 50px #000b; }
  .tab { flex: 1; justify-content: center; }
  .icon-button { grid-column: 2; }
  .app-shell { padding-top: 1.4rem; padding-bottom: 7rem; }
  .page-heading, .automation-heading, .manual { align-items: stretch; flex-direction: column; }
  .heading-actions { width: 100%; }
  .heading-actions button { flex: 1; }
  .cleaning-statusbar { width: 100%; }
  .statusbar-item { flex: 1 0 auto; justify-content: center; }
  .next-checkout-card { grid-template-columns: auto 1fr; gap: .3rem .8rem; }
  .next-checkout-card .overview-detail { grid-column: 1 / -1; }
  .cleaning-layout, .sidebar-stack, .automation-controls, .intercom-grid, dl, .form-grid.two { grid-template-columns: 1fr; }
  .settings-card { grid-column: auto; }
  .booking-row { grid-template-columns: 2.7rem minmax(0, 1fr) auto; padding-inline: .9rem; gap: .7rem; }
  .date-block { width: 2.7rem; height: 2.7rem; }
  .booking-note { display: none; }
  dl div, dl div:nth-child(odd) { border-right: 0; border-bottom: 1px solid var(--line); }
  dl div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .modal { width: 100%; max-width: none; max-height: calc(100vh - .5rem); margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .modal form { padding: 1rem; }
  .editor-layout { display: block; }
  .manual-bed-fields { grid-template-columns: 1fr; }
  .preview-panel { margin-top: 1rem; max-height: none; }
  .calendar-preview pre { max-height: 340px; }
  .modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .modal-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .modal-actions > div:only-child { width: 100%; }
}
