:root {
  --ink: #20252b;
  --muted: #667078;
  --line: #dde3e7;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --cedar: #8a5f3d;
  --cedar-dark: #68472d;
  --indigo: #263d63;
  --moss: #516f5a;
  --warn: #a85b19;
  --danger: #a33b3b;
  --shadow: 0 18px 45px rgba(32, 37, 43, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  line-height: 1.6;
  -webkit-tap-highlight-color: rgba(138, 95, 61, 0.14);
}

body > main {
  flex: 1 0 auto;
}

body[data-lang="zh"] {
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

body[data-lang="ja"] {
  font-family: "Yu Gothic", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
}

body[data-lang="en"] {
  font-family: Calibri, Arial, Helvetica, sans-serif;
}

body.admin-app {
  --paper: #f5f8fc;
  --cedar: #0759a8;
  --cedar-dark: #06457f;
  --indigo: #0759a8;
  --moss: #3d6f5a;
  background: #f5f8fc;
}

.admin-app .site-header {
  background: rgba(245, 248, 252, 0.96);
}

.admin-app .admin-brand-logo {
  width: 78px;
  height: 78px;
  border-radius: 8px;
  background: #fff;
}

.admin-app .brand-title {
  color: #06457f;
}

.admin-app .brand-copy > span {
  color: #39709f;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding:
    calc(16px + env(safe-area-inset-top, 0px))
    max(clamp(18px, 4vw, 52px), env(safe-area-inset-right, 0px))
    16px
    max(clamp(18px, 4vw, 52px), env(safe-area-inset-left, 0px));
  background: rgba(251, 250, 246, 0.94);
  border-bottom: 1px solid rgba(221, 227, 231, 0.8);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-logo {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-title {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a {
  text-decoration: none;
}

.language-switcher {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.language-switcher button {
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.language-switcher button:hover,
.language-switcher button.is-active {
  background: var(--ink);
  color: #fff;
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--cedar-dark);
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  color: #fff;
  background: #20252b;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #20252b;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(18, 27, 33, 0.74), rgba(18, 27, 33, 0.18));
}

.hero-slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  animation: heroCrossFade 32s infinite;
  transform: scale(1.03);
}

.hero-slide-1 {
  background-image: url("https://images.unsplash.com/photo-1493976040374-85c8e12f0c0e?auto=format&fit=crop&w=1800&q=80");
  animation-delay: 0s;
}

.hero-slide-2 {
  background-image: url("https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1800&q=80");
  animation-delay: 8s;
}

.hero-slide-3 {
  background-image: url("https://images.unsplash.com/photo-1501785888041-af3ef285b470?auto=format&fit=crop&w=1800&q=80");
  animation-delay: 16s;
}

.hero-slide-4 {
  background-image: url("https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=1800&q=80");
  animation-delay: 24s;
}

@keyframes heroCrossFade {
  0% {
    opacity: 0;
    transform: scale(1.03);
  }
  8% {
    opacity: 1;
  }
  26% {
    opacity: 1;
  }
  34% {
    opacity: 0;
    transform: scale(1.08);
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(84px, 14vw, 150px) 0 56px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--moss);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(40px, 8vw, 82px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero h1 {
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.38);
}

h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.hero-copy {
  max-width: 560px;
  margin: 18px 0 34px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.quick-booking {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 12px;
  align-items: end;
  max-width: 920px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(38, 61, 99, 0.22);
  border-color: var(--indigo);
}

.password-input-wrap {
  position: relative;
  display: block;
  color: inherit;
  font: inherit;
}

.password-input-wrap > input {
  display: block;
  padding-right: 50px;
}

.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}

.password-visibility-toggle svg {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible {
  border: 0;
  background: #eef2f5;
  color: var(--ink);
}

.password-visibility-toggle:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: -2px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

button:hover,
.button:hover {
  background: var(--ink);
  color: #fff;
}

.button.primary,
.quick-booking button {
  border-color: var(--cedar);
  background: var(--cedar);
  color: #fff;
}

.button.primary:hover,
.quick-booking button:hover {
  border-color: var(--cedar-dark);
  background: var(--cedar-dark);
}

.button.full {
  width: 100%;
}

.button.small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
}

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

.section {
  padding: 76px 0;
}

.intro,
.split-band,
.room-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(28px, 6vw, 84px);
  align-items: start;
}

.intro p,
.body-text {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

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

.section-heading.compact {
  margin-bottom: 16px;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.room-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(32, 37, 43, 0.05);
}

.room-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.room-card-content {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.room-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf3ef;
  color: #34513c;
  font-size: 12px;
  font-weight: 700;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.split-band {
  margin-bottom: 76px;
  padding: 36px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-chat {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
  margin-bottom: 76px;
  border-top: 1px solid var(--line);
}

.contact-copy > p:not(.eyebrow) {
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 17px;
}

.contact-methods {
  display: grid;
  gap: 12px;
}

.contact-methods div {
  display: grid;
  gap: 3px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.contact-methods strong {
  color: var(--ink);
}

.contact-methods span {
  color: var(--muted);
}

.chat-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(32, 37, 43, 0.05);
}

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

.chat-form {
  display: grid;
  gap: 14px;
}

.chat-thread,
.staff-chat-list {
  display: grid;
  gap: 12px;
}

.chat-message {
  max-width: 86%;
  padding: 10px 13px 8px;
  border-radius: 8px;
  background: #f4f7f6;
  color: var(--ink);
}

.chat-message.staff {
  justify-self: end;
  background: #edf3ef;
  border: 1px solid #cfe3d3;
}

.chat-message.guest {
  justify-self: start;
  background: #f6f8fb;
  border: 1px solid #dbe5ef;
}

.chat-message-sender {
  display: block;
  margin-bottom: 3px;
  color: color-mix(in srgb, var(--ink) 76%, var(--muted));
  font-size: 11px;
  font-weight: 700;
}

.chat-message-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: 3px;
}

.chat-message-meta time {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.chat-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.chat-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.chat-card-head small {
  color: var(--muted);
}

.chat-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding:
    34px
    max(clamp(18px, 4vw, 52px), env(safe-area-inset-right, 0px))
    calc(34px + env(safe-area-inset-bottom, 0px))
    max(clamp(18px, 4vw, 52px), env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  text-decoration: none;
}

.page-shell {
  padding: 58px 0 86px;
}

.page-shell.narrow {
  width: min(780px, calc(100% - 36px));
}

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

.page-title p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
}

.room-page {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 86px;
}

.room-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 58px 0 34px;
}

.room-hero p:not(.eyebrow) {
  max-width: 650px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-auto-rows: 210px;
  gap: 10px;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.gallery img:first-child {
  grid-row: span 2;
}

.booking-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 24px;
  align-items: start;
}

.form-surface,
.booking-panel,
.payment-surface,
.dashboard,
.admin-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(32, 37, 43, 0.05);
}

.form-surface {
  display: grid;
  gap: 16px;
  padding: 22px;
}

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

.booking-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.booking-panel.sticky {
  position: sticky;
  top: 92px;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 800;
}

.price-line span {
  font-size: 32px;
}

.price-line small,
.hint {
  color: var(--muted);
}

.availability-calendar {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.room-availability-overview {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.room-availability-overview h2 {
  font-size: 20px;
}

.room-availability-overview .hint:empty {
  display: none;
}

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

.room-availability-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}

.room-availability-item strong {
  color: var(--ink);
}

.room-availability-item span {
  text-align: right;
}

.room-availability-item.is-booked {
  background: #f8eaea;
  border-color: #ecc6c6;
  color: var(--danger);
}

.room-availability-item.is-available {
  background: #f4faf5;
  border-color: #cfe3d3;
  color: #2d6a3d;
}

.calendar-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
}

.calendar-head h3 {
  text-align: center;
  font-size: 16px;
}

.calendar-nav {
  min-height: 34px;
  padding: 0;
  border-color: var(--line);
  font-size: 22px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  position: relative;
  display: grid;
  min-height: 48px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.calendar-day:hover {
  border-color: var(--indigo);
}

.calendar-day.is-muted {
  opacity: 0.38;
  cursor: default;
}

.calendar-day.is-booked {
  background: #f8eaea;
  border-color: #ecc6c6;
  color: var(--danger);
  cursor: not-allowed;
}

.calendar-day.is-available {
  background: #f4faf5;
  border-color: #cfe3d3;
}

.calendar-day.is-selected {
  outline: 2px solid var(--indigo);
  outline-offset: 1px;
}

.calendar-day.is-today::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cedar);
}

.calendar-day small {
  align-self: end;
  color: inherit;
  font-size: 10px;
  font-weight: 800;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: #f4faf5;
}

.legend-dot.booked {
  background: #f8eaea;
  border-color: #ecc6c6;
}

.legend-dot.selected {
  background: #fff;
  border-color: var(--indigo);
}

.quote-list,
.booking-panel dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.quote-list div,
.booking-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.quote-list dt,
.booking-panel dt {
  color: var(--muted);
}

.quote-list dd,
.booking-panel dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.total-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
  font-size: 18px;
}

.optional-account {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f4f7f6;
  border-radius: 8px;
}

.check-line {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
}

.check-line input {
  width: 18px;
  min-height: 18px;
}

.region-checkbox-list {
  display: grid;
  gap: 8px;
  min-width: 220px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.account-password {
  display: none;
}

.optional-account.is-open .account-password {
  display: grid;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--warn);
  font-weight: 700;
}

.form-message.success {
  color: var(--moss);
}

.payment-surface {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.status-pill {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef3f7;
  color: var(--indigo);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.paid,
.status-pill.confirmed,
.status-pill.completed {
  background: #edf6ef;
  color: #3d6646;
}

.status-pill.awaiting_payment,
.status-pill.pending {
  background: #fff4e8;
  color: var(--warn);
}

.status-pill.cancelled {
  background: #f8eaea;
  color: var(--danger);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

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

.admin-section.is-readonly {
  background: #fbfcfd;
}

.dashboard {
  padding: 22px;
}

.hidden {
  display: none !important;
}

.dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

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

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

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td input,
td select {
  min-width: 110px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

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

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
}

.admin-section {
  margin-top: 18px;
  padding: 20px;
}

.notification-center-section {
  min-width: 0;
}

.notification-center-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.notification-center-head h3,
.notification-center-head p {
  margin: 0;
}

.notification-center-head h3 {
  margin-top: 5px;
}

.notification-center-head .hint {
  margin-top: 5px;
}

.notification-summary {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--indigo) 9%, var(--surface));
  color: var(--indigo);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.notification-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 68%, var(--surface));
}

.notification-filter-group {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.notification-filter-group button {
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.notification-filter-group button:hover {
  color: var(--indigo);
}

.notification-filter-group button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--indigo) 9%, var(--surface));
  color: var(--indigo);
  box-shadow: 0 2px 6px rgba(34, 58, 74, .08);
}

.notification-filter-group button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--indigo) 28%, transparent);
  outline-offset: 1px;
}

.notification-toolbar .button:disabled {
  cursor: not-allowed;
  opacity: .46;
}

.notification-result-meta {
  min-height: 20px;
  margin: 10px 2px 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.notice-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--indigo) 22%);
  border-left: 4px solid var(--indigo);
  border-radius: 10px;
  background: color-mix(in srgb, var(--indigo) 3%, var(--surface));
}

.notice-item.is-read {
  border-color: var(--line);
  border-left-color: var(--line);
  background: color-mix(in srgb, var(--paper) 48%, var(--surface));
}

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

.notice-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.notice-title-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-read-state {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--indigo) 10%, var(--surface));
  color: var(--indigo);
  font-size: 11px;
  font-weight: 750;
}

.notice-item.is-read .notice-read-state {
  background: color-mix(in srgb, var(--line) 46%, var(--surface));
  color: var(--muted);
}

.notice-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notice-meta {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.notification-footer {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.notification-footer .button {
  min-width: 150px;
}

@media (max-width: 620px) {
  .notification-center-head,
  .notification-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-summary {
    align-self: flex-start;
  }

  .notification-filter-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .notification-filter-group button,
  .notification-toolbar .button {
    min-height: 44px;
  }

  .notice-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .notice-meta {
    white-space: normal;
  }

  .notification-footer .button {
    width: 100%;
    min-height: 44px;
  }
}

.inline-form,
.filter-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

/* Booking workspace: daily processing stays primary; manual creation is secondary. */
.booking-management-section {
  --booking-accent: #24566f;
  --booking-soft: #edf4f5;
}

.booking-section-heading {
  display: flex !important;
  justify-content: space-between !important;
  gap: 20px !important;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.booking-section-heading .hint {
  margin-top: 6px !important;
}

.booking-heading-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid color-mix(in srgb, var(--booking-accent) 24%, var(--line));
  border-radius: 999px;
  background: var(--booking-soft);
  color: var(--booking-accent);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.booking-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(160px, .8fr) minmax(170px, .8fr);
  gap: 12px;
  align-items: end;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, var(--booking-accent) 12%);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 70%, var(--surface) 30%);
}

.booking-toolbar label,
.booking-create-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.booking-toolbar label > span,
.booking-create-form label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.booking-toolbar input,
.booking-toolbar select,
.booking-create-form input,
.booking-create-form select {
  width: 100%;
  min-height: 44px;
}

.booking-search-field input {
  padding-left: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2365747d' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 13px center;
  background-size: 18px;
}

.booking-result-meta {
  min-height: 20px;
  margin: 12px 2px 8px;
  color: var(--muted);
  font-size: 13px;
}

.booking-table-wrap {
  border: 1px solid var(--line) !important;
  border-radius: 12px;
  background: var(--surface);
  overflow: auto;
}

.booking-table-wrap:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--booking-accent) 34%, transparent);
  outline-offset: 2px;
}

.booking-management-table {
  min-width: 1080px;
  table-layout: fixed;
}

.booking-management-table th {
  padding: 12px 11px;
  background: #f2f6f7;
  color: #4d626e;
  font-size: 12px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.booking-management-table th:nth-child(1) { width: 13%; }
.booking-management-table th:nth-child(2) { width: 15%; }
.booking-management-table th:nth-child(3) { width: 10%; }
.booking-management-table th:nth-child(4) { width: 17%; }
.booking-management-table th:nth-child(5) { width: 9%; }
.booking-management-table th:nth-child(6) { width: 10%; }
.booking-management-table th:nth-child(7) { width: 13%; }
.booking-management-table th:nth-child(8) { width: 13%; }

.booking-management-table td {
  padding: 15px 11px;
  vertical-align: top;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.booking-management-table tbody tr {
  transition: background-color .18s ease;
}

.booking-management-table tbody tr:hover {
  background: color-mix(in srgb, var(--booking-soft) 46%, transparent);
}

.booking-order-cell,
.booking-guest-cell,
.booking-date-cell,
.booking-payment-cell {
  display: table-cell;
}

.booking-order-cell strong,
.booking-order-cell small,
.booking-guest-cell strong,
.booking-guest-cell small,
.booking-date-cell > span,
.booking-date-cell > small,
.booking-payment-cell > small {
  display: block;
}

.booking-order-cell small,
.booking-guest-cell small,
.booking-date-cell > small,
.booking-payment-cell > small {
  margin-top: 4px;
}

.booking-order-cell strong,
.booking-room-name,
.booking-amount-cell strong {
  color: var(--ink);
  font-weight: 750;
}

.booking-order-cell small,
.booking-guest-cell small,
.booking-date-cell small,
.booking-payment-cell small {
  color: var(--muted);
  font-size: 11px;
}

.booking-payment-cell .status-pill {
  display: inline-flex;
}

.status-pill.payment-paid {
  border-color: #b9d9c7;
  background: #edf7f1;
  color: #246243;
}

.status-pill.payment-unpaid,
.status-pill.payment-pending,
.status-pill.payment-processing {
  border-color: #e2d2aa;
  background: #fbf6e9;
  color: #745c1f;
}

.status-pill.payment-failed,
.status-pill.payment-expired,
.status-pill.payment-refunded,
.status-pill.payment-partially_refunded {
  border-color: #e5c6c0;
  background: #fbefed;
  color: #8a4339;
}

.booking-status-cell select {
  width: 100%;
  min-height: 38px;
  margin-bottom: 6px;
}

.booking-status-cell > small,
.booking-status-cell > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.booking-reschedule-note {
  margin-top: 5px;
  padding: 6px 8px;
  border-left: 3px solid #bf8f48;
  background: #fbf6eb;
  color: #6d552f !important;
}

.booking-action-cell .action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.booking-action-cell .button {
  min-height: 36px;
}

.booking-action-cell .button:disabled,
.booking-create-action .button:disabled {
  opacity: .55;
  cursor: progress;
}

.booking-review-notice {
  display: grid;
  gap: 5px;
  margin: 0 0 9px;
  padding: 10px;
  border-radius: 9px;
  font-size: 12px;
}

.booking-review-notice p {
  margin: 0;
}

.booking-empty-row td {
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
}

.booking-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.booking-pagination span {
  min-width: 90px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.booking-pagination button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.booking-create-disclosure {
  margin-top: 22px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, #9a7c5d 16%);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 72%, var(--surface) 28%);
  overflow: clip;
}

.booking-create-disclosure > summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 22px;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  transition: background-color .18s ease;
}

.booking-create-disclosure > summary::-webkit-details-marker { display: none; }
.booking-create-disclosure > summary:hover { background: rgba(154, 124, 93, .07); }
.booking-create-disclosure > summary:focus-visible { outline: 3px solid rgba(154, 124, 93, .28); outline-offset: -3px; }

.booking-create-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 10px;
  background: #f1e9df;
  color: #76583e;
}

.booking-create-icon svg { width: 20px; height: 20px; }

.booking-create-copy {
  display: grid;
  gap: 2px;
}

.booking-create-copy .eyebrow { margin: 0; color: #8a684b; font-size: 10px; }
.booking-create-copy strong { color: var(--ink); font-size: 16px; }
.booking-create-copy small { color: var(--muted); font-size: 12px; }

.booking-create-chevron {
  width: 20px;
  color: var(--muted);
  transition: transform .2s ease;
}

.booking-create-disclosure[open] .booking-create-chevron { transform: rotate(90deg); }

.booking-create-body {
  padding: 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.booking-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.booking-create-action {
  display: flex;
  align-items: flex-end;
  min-height: 44px;
}

.booking-create-action .button { width: 100%; min-height: 44px; }
.booking-create-body .form-message { margin: 12px 0 0; }

/* Staff accounts: keep the account list primary and reveal creation on demand. */
.staff-permission-hint {
  max-width: 720px;
  margin-bottom: 16px;
}

.staff-create-disclosure {
  margin-bottom: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, var(--moss) 18%);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 96%, var(--paper) 4%);
  overflow: clip;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.staff-create-disclosure[open] {
  border-color: color-mix(in srgb, var(--line) 62%, var(--moss) 38%);
  box-shadow: 0 14px 30px rgba(48, 61, 49, .08);
}

.staff-create-disclosure > summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px 16px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: background-color .2s ease;
}

.staff-create-disclosure > summary::-webkit-details-marker {
  display: none;
}

.staff-create-disclosure > summary:hover {
  background: color-mix(in srgb, var(--moss) 5%, transparent);
}

.staff-create-disclosure > summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--moss) 38%, transparent);
  outline-offset: -3px;
}

.staff-create-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  color: var(--moss);
  background: color-mix(in srgb, var(--moss) 10%, var(--surface));
}

.staff-create-icon svg {
  width: 22px;
  height: 22px;
}

.staff-create-copy {
  display: grid;
  gap: 2px;
}

.staff-create-copy strong {
  font-size: 15px;
}

.staff-create-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.staff-create-chevron {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform .2s ease;
}

.staff-create-disclosure[open] .staff-create-chevron {
  transform: rotate(90deg);
}

.staff-create-body {
  padding: 18px;
  border-top: 1px solid var(--line);
  background: linear-gradient(145deg, color-mix(in srgb, var(--paper) 48%, var(--surface)), var(--surface));
}

#ownerStaffForm {
  display: grid;
  gap: 18px;
}

.staff-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.staff-form-grid > label {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
}

.staff-form-grid > label > span,
.staff-region-fieldset legend {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

#ownerStaffForm input {
  min-width: 0;
  min-height: 44px;
  border-color: color-mix(in srgb, var(--line) 88%, var(--moss) 12%);
  background: var(--surface);
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

#ownerStaffForm input::placeholder {
  color: color-mix(in srgb, var(--muted) 74%, transparent);
}

#ownerStaffForm input:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--moss) 16%, transparent);
}

#ownerStaffForm input[readonly] {
  color: var(--muted);
  background: color-mix(in srgb, var(--paper) 72%, var(--surface));
  cursor: default;
}

.staff-form-grid small.hint {
  min-height: 18px;
  font-size: 12px;
  line-height: 1.5;
}

.staff-region-fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.staff-region-fieldset legend {
  padding: 0 5px;
}

.staff-region-fieldset > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

#ownerStaffForm .region-checkbox-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 176px;
  padding: 10px;
  border-color: color-mix(in srgb, var(--line) 80%, var(--moss) 20%);
  background: var(--surface);
}

#ownerStaffForm .check-line {
  min-height: 44px;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  transition: background-color .2s ease;
}

#ownerStaffForm .check-line:hover {
  background: color-mix(in srgb, var(--moss) 7%, transparent);
}

.staff-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.staff-form-actions > span {
  color: var(--muted);
  font-size: 12px;
}

.staff-form-actions .button {
  min-width: 158px;
  min-height: 44px;
  box-shadow: 0 8px 18px rgba(67, 83, 64, .16);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.staff-form-actions .button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(67, 83, 64, .22);
}

.staff-form-actions .button:active {
  transform: translateY(0) scale(.985);
}

#ownerStaffMessage:not(:empty) {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--warn) 36%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--warn) 7%, var(--surface));
  font-size: 13px;
  font-weight: 600;
}

#ownerStaffMessage.success:not(:empty) {
  border-color: color-mix(in srgb, var(--moss) 35%, var(--line));
  background: color-mix(in srgb, var(--moss) 8%, var(--surface));
}

.staff-account-list-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 12px;
}

.staff-account-list-head h4,
.staff-account-list-head p {
  margin: 0;
}

.staff-account-list-head h4 {
  color: var(--ink);
  font-size: 17px;
}

.staff-account-list-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.staff-account-count {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--paper) 60%, var(--surface));
  font-size: 12px;
}

.staff-account-count strong {
  color: var(--ink);
  font-size: 14px;
}

.staff-account-table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
}

.staff-account-table {
  min-width: 840px;
}

.staff-account-table th {
  color: var(--muted);
  background: color-mix(in srgb, var(--paper) 72%, var(--surface));
  font-size: 12px;
  letter-spacing: .02em;
}

.staff-account-table tbody tr {
  transition: background-color .2s ease;
}

.staff-account-table tbody tr:hover {
  background: color-mix(in srgb, var(--moss) 4%, transparent);
}

.staff-account-name {
  color: var(--ink);
}

.staff-account-username {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.staff-account-actions {
  flex-wrap: nowrap;
}

.staff-account-actions .button {
  min-height: 36px;
  white-space: nowrap;
}

.staff-account-actions .button.danger {
  color: #8c3d36;
  border-color: rgba(140, 61, 54, .3);
  background: transparent;
}

.staff-account-actions .button.danger:hover {
  background: rgba(140, 61, 54, .08);
}

.filter-row {
  grid-template-columns: repeat(2, minmax(160px, 220px));
  margin-bottom: 12px;
}

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

.amenity {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 700;
}

.map-wrap {
  overflow: hidden;
  margin-top: 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.admin-module-nav {
  position: sticky;
  top: 10px;
  z-index: 8;
  display: flex;
  overflow-x: auto;
  margin: 0 -2px 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(32, 37, 43, 0.08);
  scrollbar-width: thin;
}

.admin-module-nav a {
  flex: 1 0 auto;
  min-width: 120px;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.admin-module-nav a:hover,
.admin-module-nav a:focus-visible {
  background: #f0f3f5;
  color: var(--ink);
}

.operations-section {
  scroll-margin-top: 80px;
}

.operations-heading {
  margin-bottom: 16px;
}

.operations-heading h3,
.section-subhead h4,
.dialog-section h4 {
  margin: 0;
}

.operations-heading .hint,
.section-subhead .hint {
  margin: 3px 0 0;
}

.operations-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 18px;
  border-block: 1px solid var(--line);
}

.operation-stat {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.operation-stat:last-child {
  border-right: 0;
}

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

.operation-stat strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 3px;
  font-size: 21px;
}

.operations-toolbar {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.operations-toolbar > strong {
  text-align: center;
}

.calendar-controls,
.company-contact-row,
.settlement-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--indigo);
  background: #f4f7fa;
}

.operations-filters {
  grid-template-columns: repeat(2, minmax(150px, 190px));
  margin: 0;
}

.manual-cleaning-add-button {
  gap: 7px;
  white-space: nowrap;
}

.manual-cleaning-add-button svg {
  width: 16px;
  height: 16px;
}

.cleaning-calendar-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.cleaning-calendar {
  min-width: 850px;
}

.cleaning-weekdays,
.cleaning-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cleaning-weekdays {
  background: #f5f7f8;
  border-bottom: 1px solid var(--line);
}

.cleaning-weekdays span {
  padding: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.cleaning-calendar-day {
  position: relative;
  min-height: 118px;
  padding: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.cleaning-calendar-day:nth-child(7n) {
  border-right: 0;
}

.cleaning-calendar-day.is-outside {
  background: #fafbfb;
  color: #a5adb3;
}

.cleaning-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px var(--indigo);
}

.calendar-date-number {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
}

.calendar-task-stack {
  display: grid;
  gap: 5px;
}

.calendar-task {
  display: grid;
  gap: 1px;
  width: 100%;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid #d4dce2;
  border-radius: 4px;
  background: #eef3f7;
  color: var(--indigo);
  text-align: left;
  cursor: pointer;
}

.calendar-task strong,
.calendar-task span {
  overflow: hidden;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-task.cleaning-contacting,
.calendar-task.cleaning-awaiting_reply,
.calendar-task.cleaning-needs_change {
  border-color: #ebc99d;
  background: #fff4e8;
  color: var(--warn);
}

.calendar-task.cleaning-scheduled,
.calendar-task.cleaning-completed {
  border-color: #c9dfce;
  background: #edf6ef;
  color: #3d6646;
}

.calendar-task.cleaning-cancelled {
  border-color: #ecc6c6;
  background: #f8eaea;
  color: var(--danger);
}

.section-subhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 22px 0 10px;
}

.operations-table {
  min-width: 860px;
}

.compact-table {
  min-width: 620px;
}

.operations-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
  margin-top: 24px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.payment-settings-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

/* Property workspace: compact region controls and strictly aligned room columns. */
.property-management-section {
  min-width: 0;
}

.property-management-section .section-heading {
  margin-bottom: 16px;
}

.region-create-form {
  grid-template-columns: minmax(240px, 1fr) auto;
  max-width: 720px;
  align-items: end;
}

.property-table-wrap {
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 12px;
}

.property-table-wrap table {
  width: 100%;
  margin: 0;
}

.property-table-wrap th {
  background: color-mix(in srgb, var(--paper) 72%, var(--surface));
  color: var(--muted);
  font-size: 12px;
}

.property-table-wrap input,
.property-table-wrap select {
  width: 100%;
  min-height: 42px;
  background: var(--surface);
}

.region-management-table {
  min-width: 620px;
  table-layout: fixed;
}

.region-management-table th:first-child {
  width: 56%;
}

.region-management-table th:nth-child(2) {
  width: 18%;
}

.region-management-table th:last-child {
  width: 26%;
}

.region-row-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.region-row-actions .button {
  min-width: 66px;
}

.room-management-table {
  min-width: 1030px;
  table-layout: fixed;
}

.room-management-table th:nth-child(1) { width: 18%; }
.room-management-table th:nth-child(2) { width: 13%; }
.room-management-table th:nth-child(3) { width: 13%; }
.room-management-table th:nth-child(4) { width: 22%; }
.room-management-table th:nth-child(5) { width: 11%; }
.room-management-table th:nth-child(6) { width: 13%; }
.room-management-table th:nth-child(7) { width: 10%; }

.property-room-name {
  display: block;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 620px) {
  .region-create-form {
    grid-template-columns: 1fr;
  }

  .region-create-form .button {
    width: 100%;
    min-height: 44px;
  }

  .region-management-section .property-table-wrap {
    overflow: visible;
    border: 0;
  }

  .region-management-table,
  .region-management-table tbody,
  .region-management-table tr,
  .region-management-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .region-management-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .region-management-table tr {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
  }

  .region-management-table td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 6px 0;
    border: 0;
  }

  .region-management-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
  }

  .region-management-table td[data-label="操作"] {
    grid-template-columns: 1fr;
    padding-top: 10px;
  }

  .region-management-table td[data-label="操作"]::before {
    display: none;
  }

  .region-row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .region-row-actions .button {
    width: 100%;
    min-height: 44px;
  }
}

/* Cleaning workspace: one operational view at a time, scalable feedback on demand. */
.cleaning-management-section .operations-stat-grid {
  margin-bottom: 22px;
}

.cleaning-workspace-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 96%, var(--paper) 4%);
  box-shadow: 0 8px 22px rgba(34, 58, 74, .045);
}

.cleaning-workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.cleaning-workspace-head h4,
.cleaning-workspace-head p {
  margin: 0;
}

.cleaning-workspace-head h4 {
  font-size: 17px;
}

.cleaning-workspace-head .hint {
  margin-top: 4px;
}

.cleaning-view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 72%, var(--surface));
}

.cleaning-view-switch button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.cleaning-view-switch button svg {
  width: 17px;
  height: 17px;
}

.cleaning-view-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--indigo);
  box-shadow: 0 2px 8px rgba(34, 58, 74, .1);
}

.cleaning-view-switch button:hover {
  color: var(--indigo);
}

.cleaning-view-switch button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--indigo) 28%, transparent);
  outline-offset: 1px;
}

.cleaning-toolbar {
  margin: 0 0 12px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.cleaning-filters {
  margin: 0;
}

.cleaning-filters select {
  min-height: 42px;
  background: var(--surface);
}

.cleaning-view-panel {
  min-width: 0;
}

.cleaning-list-intro {
  margin: 0 0 10px;
}

.cleaning-table-wrap {
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 11px;
}

.cleaning-table-wrap table {
  margin: 0;
}

.cleaning-table-wrap th {
  background: color-mix(in srgb, var(--paper) 72%, var(--surface));
  color: var(--muted);
  font-size: 12px;
}

.cleaning-config-area {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.payment-config-disclosure.cleaning-config-disclosure > summary {
  grid-template-columns: 42px minmax(0, 1fr) auto 22px;
}

.cleaning-config-disclosure > summary .integration-state {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cleaning-config-body .section-subhead:first-child {
  margin-top: 0;
}

.cleaning-config-body .security-note {
  margin-bottom: 0;
}

.cleaning-feedback-section {
  padding: 0;
  overflow: hidden;
}

.cleaning-feedback-disclosure > summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 22px;
  gap: 13px;
  align-items: center;
  min-height: 86px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  transition: background-color .2s ease;
}

.cleaning-feedback-disclosure > summary::-webkit-details-marker {
  display: none;
}

.cleaning-feedback-disclosure > summary:hover {
  background: color-mix(in srgb, var(--indigo) 4%, transparent);
}

.cleaning-feedback-disclosure > summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--indigo) 28%, transparent);
  outline-offset: -3px;
}

.cleaning-feedback-summary-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cleaning-feedback-summary-copy .eyebrow,
.cleaning-feedback-summary-copy strong,
.cleaning-feedback-summary-copy small {
  margin: 0;
}

.cleaning-feedback-summary-copy strong {
  color: var(--ink);
  font-size: 17px;
}

.cleaning-feedback-summary-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cleaning-feedback-count {
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--indigo) 8%, var(--surface));
  color: var(--indigo);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.cleaning-feedback-disclosure[open] .payment-config-chevron {
  transform: rotate(90deg);
}

.cleaning-feedback-body {
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
  background: linear-gradient(145deg, color-mix(in srgb, var(--paper) 28%, var(--surface)), var(--surface));
}

.cleaning-feedback-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(140px, 180px) minmax(140px, 180px);
  gap: 12px;
  align-items: end;
}

.cleaning-feedback-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.cleaning-feedback-toolbar label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.cleaning-feedback-toolbar input,
.cleaning-feedback-toolbar select {
  width: 100%;
  min-height: 44px;
  background: var(--surface);
}

.cleaning-feedback-result-meta {
  min-height: 20px;
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.cleaning-feedback-table {
  min-width: 1020px;
}

.cleaning-feedback-comment {
  display: -webkit-box;
  max-width: 320px;
  overflow: hidden;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cleaning-feedback-rating {
  color: #8b6914;
  white-space: nowrap;
}

.cleaning-feedback-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
}

.cleaning-feedback-pagination span {
  min-width: 82px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.cleaning-feedback-pagination button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

@media (max-width: 900px) {
  .cleaning-workspace-head {
    align-items: stretch;
    flex-direction: column;
  }

  .cleaning-view-switch {
    align-self: flex-start;
  }

  .cleaning-feedback-toolbar {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(130px, .55fr));
  }
}

@media (max-width: 620px) {
  .cleaning-workspace-panel {
    padding: 14px;
  }

  .cleaning-view-switch {
    width: 100%;
  }

  .cleaning-view-switch button {
    min-height: 44px;
  }

  .cleaning-toolbar {
    grid-template-columns: 1fr;
  }

  .cleaning-filters {
    grid-template-columns: 1fr;
  }

  .payment-config-disclosure.cleaning-config-disclosure > summary {
    grid-template-columns: 42px minmax(0, 1fr) 22px;
  }

  .cleaning-config-disclosure > summary .integration-state {
    display: none;
  }

  .cleaning-feedback-disclosure > summary {
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    padding: 14px;
  }

  .cleaning-feedback-count {
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
  }

  .cleaning-feedback-disclosure > summary .payment-config-chevron {
    grid-column: 3;
    grid-row: 1;
  }

  .cleaning-feedback-body {
    padding: 14px;
  }

  .cleaning-feedback-toolbar {
    grid-template-columns: 1fr;
  }

  .cleaning-feedback-pagination {
    justify-content: space-between;
  }

  .cleaning-feedback-pagination .button {
    min-height: 44px;
  }
}

/* Payment workspace: daily reconciliation first, low-frequency settings on demand. */
.payment-management-section .operations-stat-grid {
  margin-bottom: 22px;
}

.payment-primary-stack {
  display: grid;
  gap: 18px;
}

.payment-overview-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 96%, var(--paper) 4%);
  box-shadow: 0 8px 22px rgba(34, 58, 74, .045);
}

.payment-section-head {
  align-items: end;
  margin: 0 0 12px;
}

.payment-section-head h4 {
  color: var(--ink);
  font-size: 17px;
}

.payment-filters {
  flex: 0 1 auto;
  margin: 0;
}

.payment-filters select {
  min-height: 42px;
  background: var(--surface);
}

.payment-table-wrap {
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 11px;
}

.payment-table-wrap table {
  margin: 0;
}

.payment-table-wrap th {
  background: color-mix(in srgb, var(--paper) 72%, var(--surface));
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .01em;
}

.payment-config-area {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.payment-config-heading {
  margin-bottom: 12px;
}

.payment-config-heading h4,
.payment-config-heading p {
  margin: 0;
}

.payment-config-heading h4 {
  color: var(--ink);
  font-size: 17px;
}

.payment-config-heading .hint {
  margin-top: 4px;
}

.payment-disclosure-stack {
  display: grid;
  gap: 10px;
}

.payment-config-disclosure {
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--indigo) 16%);
  border-radius: 13px;
  background: var(--surface);
  overflow: clip;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.payment-config-disclosure[open] {
  border-color: color-mix(in srgb, var(--line) 62%, var(--indigo) 38%);
  box-shadow: 0 12px 28px rgba(34, 58, 74, .07);
}

.payment-config-disclosure > summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px 16px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: background-color .2s ease;
}

.payment-config-disclosure > summary::-webkit-details-marker {
  display: none;
}

.payment-config-disclosure > summary:hover {
  background: color-mix(in srgb, var(--indigo) 4%, transparent);
}

.payment-config-disclosure > summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--indigo) 28%, transparent);
  outline-offset: -3px;
}

.payment-config-disclosure > summary > span:nth-child(2) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.payment-config-disclosure > summary strong {
  font-size: 14px;
}

.payment-config-disclosure > summary small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-config-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--indigo) 8%, var(--surface));
  color: var(--indigo);
}

.payment-config-icon svg {
  width: 21px;
  height: 21px;
}

.payment-config-chevron {
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform .2s ease;
}

.payment-config-disclosure[open] .payment-config-chevron {
  transform: rotate(90deg);
}

.payment-config-body {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  background: linear-gradient(145deg, color-mix(in srgb, var(--paper) 34%, var(--surface)), var(--surface));
}

.payment-config-body > .hint:first-child {
  margin: 0 0 14px;
}

.payment-config-body > .action-row {
  justify-content: flex-end;
  margin-top: 12px;
}

.payment-channel-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--indigo) 7%, var(--surface));
}

.payment-channel-intro > div {
  display: grid;
  gap: 3px;
}

.payment-channel-intro strong {
  color: var(--ink);
  font-size: 14px;
}

.payment-channel-intro span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.payment-channel-list {
  display: grid;
  gap: 10px;
}

.payment-channel-empty {
  display: grid;
  gap: 5px;
  padding: 26px 18px;
  border: 1px dashed color-mix(in srgb, var(--line) 72%, var(--indigo) 28%);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.payment-channel-empty strong {
  color: var(--ink);
}

.payment-channel-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.payment-channel-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--line) 58%, var(--indigo) 42%);
  box-shadow: 0 9px 22px rgba(34, 58, 74, .07);
}

.payment-channel-card.is-ready {
  border-left: 3px solid var(--moss);
}

.payment-channel-card-main {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.payment-channel-card-main > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.payment-channel-card-main > div > span,
.payment-channel-card-main small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.payment-channel-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--indigo) 10%, var(--paper));
  color: var(--indigo);
  font-weight: 800;
}

.payment-channel-title {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.payment-channel-title strong {
  color: var(--ink);
  font-size: 14px;
}

.payment-channel-mode {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.payment-channel-error {
  color: var(--danger) !important;
}

.payment-channel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  max-width: 360px;
}

.payment-channel-form {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 65%, var(--indigo) 35%);
  border-radius: 13px;
  background: color-mix(in srgb, var(--paper) 50%, var(--surface));
}

.payment-channel-form-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 2px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.payment-channel-form-heading h5,
.payment-channel-form-heading .eyebrow {
  margin: 0;
}

.payment-channel-form-heading h5 {
  margin-top: 3px;
  color: var(--ink);
  font-size: 16px;
}

.payment-room-scope {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.payment-room-scope legend {
  padding: 0 5px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.payment-room-scope > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.payment-room-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.payment-room-checklist > label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--paper) 58%, var(--surface));
  cursor: pointer;
}

.payment-room-checklist > label:has(input:checked) {
  border-color: color-mix(in srgb, var(--indigo) 58%, var(--line));
  background: color-mix(in srgb, var(--indigo) 7%, var(--surface));
}

.payment-room-checklist input {
  width: 17px;
  height: 17px;
}

.payment-room-checklist label > span {
  display: grid;
  min-width: 0;
}

.payment-room-checklist strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-room-checklist small {
  color: var(--muted);
  font-size: 10px;
}

.payment-policy-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
}

.payment-policy-form > label,
.payment-account-form > label,
.payment-account-form .compact-fieldset label {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}

.payment-policy-form > label > span,
.payment-account-form > label > span,
.payment-account-form .compact-fieldset label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payment-policy-form input,
.payment-policy-form select,
.payment-account-form input,
.payment-account-form select {
  min-width: 0;
  min-height: 44px;
}

.payment-form-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.payment-form-actions > span {
  color: var(--muted);
  font-size: 12px;
}

.payment-form-actions .button {
  min-width: 132px;
  min-height: 44px;
}

.payment-account-form {
  align-items: start;
  min-width: 0;
  width: 100%;
}

.payment-form-wide {
  grid-column: 1 / -1;
  min-width: 0;
}

.payment-account-form .compact-fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.payment-account-form .compact-fieldset legend {
  padding: 0 5px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.payment-account-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 112px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  resize: vertical;
}

.payment-account-form > .check-line {
  display: flex;
  min-height: 44px;
  align-items: center;
  align-self: end;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.payment-readonly-disclosure {
  margin-top: 18px;
}

@media (max-width: 900px) {
  .payment-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-filters {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-filters select {
    width: 100%;
  }

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

  .payment-channel-card {
    grid-template-columns: 1fr;
  }

  .payment-channel-actions {
    justify-content: flex-start;
    max-width: none;
    padding-left: 50px;
  }

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

@media (max-width: 620px) {
  .payment-overview-panel {
    padding: 14px;
    border-radius: 12px;
  }

  .payment-filters,
  .payment-policy-form,
  .payment-account-form .compact-fieldset {
    grid-template-columns: 1fr;
  }

  .payment-config-disclosure > summary {
    grid-template-columns: 40px minmax(0, 1fr) 20px;
    min-height: 64px;
    padding: 10px 12px;
  }

  .payment-config-disclosure > summary small {
    white-space: normal;
  }

  .payment-config-body {
    padding: 14px 12px;
  }

  .payment-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-form-actions .button {
    width: 100%;
  }

  .payment-channel-intro,
  .payment-channel-form-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-channel-intro .button {
    width: 100%;
  }

  .payment-channel-actions {
    padding-left: 0;
  }

  .payment-channel-actions .button {
    flex: 1 1 auto;
  }

  .payment-channel-form {
    padding: 14px 11px;
  }

  .payment-room-checklist {
    grid-template-columns: 1fr;
  }
}

.reporting-section .reporting-filters {
  align-items: end;
  flex-wrap: wrap;
}

.reporting-section .reporting-filters label:not(.check-line) {
  display: grid;
  gap: 0.35rem;
  min-width: 150px;
}

.reporting-section .operations-panel {
  margin-top: 1.25rem;
}

.operations-panel {
  min-width: 0;
}

.operations-panel + .operations-panel {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.compact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.compact-form > label,
.email-record > label,
.dialog-section > label {
  display: grid;
  gap: 5px;
}

.compact-form > label > span,
.email-record > label > span,
.dialog-section > label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-form .span-full {
  grid-column: 1 / -1;
}

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

.security-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--indigo);
  background: #f5f7f9;
  color: var(--muted);
  font-size: 12px;
}

.integration-state,
.direction-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.integration-state.is-ready {
  border-color: #c9dfce;
  background: #edf6ef;
  color: #3d6646;
}

.regional-gmail-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.gmail-region-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.gmail-region-card > div:first-child {
  display: grid;
  gap: 3px;
}

.gmail-region-card span,
.gmail-region-card small {
  color: var(--muted);
  font-size: 12px;
}

.status-pill.cleaning-scheduled,
.status-pill.cleaning-completed,
.status-pill.cleaning-in_progress,
.status-pill.provider-ready,
.status-pill.settlement-settled {
  background: #edf6ef;
  color: #3d6646;
}

.status-pill.cleaning-contacting,
.status-pill.cleaning-awaiting_reply,
.status-pill.cleaning-needs_change,
.status-pill.provider-testing,
.status-pill.settlement-unsettled {
  background: #fff4e8;
  color: var(--warn);
}

.status-pill.cleaning-cancelled,
.status-pill.cleaning-local_unavailable,
.status-pill.cleaning-no_company,
.status-pill.cleaning-internal_cleaning,
.status-pill.provider-disabled {
  background: #f8eaea;
  color: var(--danger);
}

.status-pill.cleaning-unassigned,
.status-pill.cleaning-payment_hold,
.status-pill.provider-planned,
.status-pill.settlement-review {
  background: #eef3f7;
  color: var(--indigo);
}

.operations-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 25, 31, 0.28);
}

.operations-dialog::backdrop {
  background: rgba(24, 31, 36, 0.58);
}

.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.dialog-head h3 {
  margin: 0;
}

#cleaningTaskDialogBody {
  padding: 0 20px 22px;
}

#preStayCleaningDialogBody {
  padding: 0 20px 22px;
}

#manualCleaningDialogBody {
  padding: 0 20px 22px;
}

.manual-cleaning-dialog {
  width: min(820px, calc(100vw - 32px));
}

.manual-cleaning-dialog-section {
  gap: 18px;
}

.manual-cleaning-guidance {
  padding: 14px 16px;
  border-left: 3px solid var(--moss);
  border-radius: 6px;
  background: #f5f8f3;
}

.manual-cleaning-guidance strong {
  display: block;
}

.manual-cleaning-guidance p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.manual-cleaning-form {
  display: grid;
  gap: 18px;
}

.manual-cleaning-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.manual-cleaning-form-grid label {
  display: grid;
  align-content: start;
  gap: 6px;
}

.manual-cleaning-form-grid label > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.manual-cleaning-form-grid label > small {
  color: var(--muted);
  line-height: 1.45;
}

.manual-cleaning-form-grid .span-full {
  grid-column: 1 / -1;
}

.manual-cleaning-form-grid textarea {
  resize: vertical;
}

.pre-stay-dialog-section {
  gap: 18px;
}

.pre-stay-guidance {
  padding: 14px 16px;
  border-left: 3px solid var(--moss);
  border-radius: 6px;
  background: #f5f8f3;
}

.pre-stay-guidance strong,
.pre-stay-empty-state strong {
  display: block;
}

.pre-stay-guidance p,
.pre-stay-empty-state p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.pre-stay-cleaning-form {
  display: grid;
  gap: 18px;
}

.pre-stay-candidate-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.pre-stay-candidate-fieldset legend,
.pre-stay-reason-field > span {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.pre-stay-candidate-list {
  display: grid;
  max-height: 280px;
  overflow: auto;
  gap: 8px;
  padding: 2px;
}

.pre-stay-candidate-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.pre-stay-candidate-option:has(input:checked) {
  border-color: var(--moss);
  background: #f5f8f3;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--moss) 18%, transparent);
}

.pre-stay-candidate-option input {
  margin-top: 3px;
}

.pre-stay-candidate-option strong,
.pre-stay-candidate-option small {
  display: block;
  overflow-wrap: anywhere;
}

.pre-stay-candidate-option small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.pre-stay-reason-field {
  display: grid;
}

.pre-stay-reason-field textarea {
  width: 100%;
  resize: vertical;
}

.pre-stay-reason-field small {
  margin-top: 6px;
  color: var(--muted);
}

.pre-stay-loading {
  margin: 20px 0 0;
}

.task-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.task-summary-grid > div {
  min-width: 0;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
}

.task-summary-grid > div:last-child {
  border-right: 0;
}

.task-summary-grid span:not(.status-pill) {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.task-summary-grid strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 3px;
  font-size: 14px;
}

.dialog-section {
  display: grid;
  gap: 12px;
  padding-top: 20px;
}

.dialog-section + .dialog-section {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.dialog-section .section-subhead {
  margin: 0;
}

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

.company-contact-row select {
  min-width: min(320px, 55vw);
}

.cleaning-reminder-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fc;
}

.cleaning-reminder-panel.is-due {
  border-color: color-mix(in srgb, var(--warn) 42%, var(--line));
  background: #fbf6eb;
}

.cleaning-reminder-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.cleaning-reminder-panel .button {
  flex: 0 0 auto;
  min-height: 44px;
}

.email-history {
  display: grid;
  gap: 10px;
}

.email-record {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.email-record.inbound {
  border-left: 4px solid var(--moss);
  background: #fbfdfb;
}

.email-record.outbound {
  border-left: 4px solid var(--indigo);
}

.email-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.email-record-head strong,
.email-record-head span:not(.direction-badge) {
  display: block;
}

.email-record-head span:not(.direction-badge) {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.email-record details {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.email-record summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.email-body {
  margin: 10px 0 0;
  padding: 12px;
  overflow: auto;
  background: #f6f8f9;
  font: inherit;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.settlement-control {
  align-items: stretch;
}

.settlement-control select {
  min-width: 100px;
}

@media (max-width: 900px) {
  .room-hero,
  .dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .quick-booking,
  .intro,
  .split-band,
  .contact-chat,
  .room-layout,
  .booking-grid,
  .portal-grid,
  .portal-grid.single {
    grid-template-columns: 1fr;
  }

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

  .booking-panel.sticky {
    position: static;
  }

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

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

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

  .operation-stat:nth-child(2) {
    border-right: 0;
  }

  .operation-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .operations-toolbar {
    grid-template-columns: auto minmax(120px, 1fr);
  }

  .operations-toolbar .operations-filters {
    grid-column: 1 / -1;
  }

  .operations-settings-grid,
  .payment-settings-grid {
    grid-template-columns: 1fr;
  }

  .operations-panel + .operations-panel {
    padding-top: 22px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

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

  .task-summary-grid > div:nth-child(2) {
    border-right: 0;
  }

  .task-summary-grid > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .site-header {
    display: grid;
    grid-template-areas:
      "brand nav"
      "brand language";
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px 12px;
    padding:
      calc(10px + env(safe-area-inset-top, 0px))
      max(14px, env(safe-area-inset-right, 0px))
      10px
      max(14px, env(safe-area-inset-left, 0px));
  }

  .brand {
    grid-area: brand;
    gap: 8px;
    min-width: 0;
  }

  .brand-logo {
    width: 52px;
    height: 52px;
  }

  .admin-app .admin-brand-logo {
    width: 64px;
    height: 64px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand span {
    font-size: 11px;
  }

  .site-nav {
    grid-area: nav;
    justify-content: flex-end;
    gap: 6px 12px;
    font-size: 13px;
  }

  .language-switcher {
    grid-area: language;
    justify-self: end;
    padding: 2px;
  }

  .language-switcher button {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 11px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding-top: 74px;
  }

  .room-grid,
  .portal-grid,
  .portal-grid.single,
  .form-row,
  .gallery,
  .stat-grid,
  .amenities,
  .inline-form,
  .chat-reply-form,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .staff-form-grid,
  #ownerStaffForm .region-checkbox-list {
    grid-template-columns: 1fr;
  }

  .staff-create-disclosure > summary {
    grid-template-columns: 40px minmax(0, 1fr) 20px;
    min-height: 64px;
    padding: 10px 12px;
  }

  .staff-create-body {
    padding: 14px 12px;
  }

  .staff-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .staff-form-actions .button {
    width: 100%;
  }

  .staff-account-list-head {
    align-items: center;
  }

  .staff-account-list-head p {
    display: none;
  }

  .staff-account-table-wrap {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .staff-account-table,
  .staff-account-table tbody,
  .staff-account-table tr,
  .staff-account-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .staff-account-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .staff-account-table tbody {
    display: grid;
    gap: 12px;
  }

  .staff-account-table tbody tr {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(48, 61, 49, .05);
  }

  .staff-account-table td {
    display: grid;
    grid-template-columns: minmax(76px, .38fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    text-align: left;
    overflow-wrap: anywhere;
  }

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

  .staff-account-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }

  .staff-account-table td[data-label="操作"] {
    display: block;
    padding-top: 12px;
  }

  .staff-account-table td[data-label="操作"]::before {
    display: block;
    margin-bottom: 8px;
  }

  .staff-account-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .staff-account-actions .button {
    width: 100%;
    min-height: 44px;
  }

  .staff-account-actions .button.danger {
    grid-column: 1 / -1;
  }

  .dashboard {
    padding: 14px;
  }

  .admin-section {
    padding: 15px;
  }

  .admin-module-nav {
    top: 4px;
  }

  .admin-module-nav a {
    min-width: 104px;
    padding: 8px 10px;
  }

  .operations-toolbar {
    grid-template-columns: 1fr;
  }

  .operations-toolbar > strong {
    text-align: left;
  }

  .calendar-controls {
    justify-content: space-between;
  }

  .operations-filters,
  .compact-form,
  .company-form,
  .dialog-form {
    grid-template-columns: 1fr;
  }

  .compact-form .span-full {
    grid-column: auto;
  }

  .operations-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .dialog-head {
    padding: 14px;
  }

  #cleaningTaskDialogBody {
    padding: 0 14px 18px;
  }

  #manualCleaningDialogBody {
    padding: 0 14px 18px;
  }

  .manual-cleaning-form-grid {
    grid-template-columns: 1fr;
  }

  .manual-cleaning-form-grid .span-full {
    grid-column: auto;
  }

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

  .task-summary-grid > div,
  .task-summary-grid > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .task-summary-grid > div:last-child {
    border-bottom: 0;
  }

  .company-contact-row,
  .cleaning-reminder-panel,
  .email-record-head,
  .section-subhead,
  .settlement-control {
    align-items: stretch;
    flex-direction: column;
  }

  .company-contact-row select {
    min-width: 0;
    width: 100%;
  }

  .operation-stat {
    padding: 11px;
  }

  .operation-stat strong {
    font-size: 18px;
  }

  .gallery {
    grid-auto-rows: 220px;
  }

  .gallery img:first-child {
    grid-row: span 1;
  }

  table {
    min-width: 700px;
  }
}

/* Admin workspace: show one task group at a time instead of one endless page. */
.admin-app .page-shell {
  padding-top: clamp(34px, 5vw, 64px);
}

.admin-app .page-title {
  margin-bottom: 30px;
}

.admin-app .page-title h1 {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.04;
}

.admin-workspace-shell {
  display: grid;
  grid-template-columns: minmax(210px, 238px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 18px;
  scroll-margin-top: 104px;
}

.admin-workspace-rail {
  position: sticky;
  z-index: 7;
  top: 96px;
  min-width: 0;
}

.admin-view-picker {
  display: none;
}

.admin-app .admin-module-nav {
  position: static;
  display: grid;
  overflow: visible;
  gap: 4px;
  margin: 0;
  padding: 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 30px rgba(29, 44, 55, .09);
}

.admin-app .admin-module-nav a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  min-width: 0;
  min-height: 58px;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  text-align: left;
  transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.admin-app .admin-module-nav a svg {
  width: 21px;
  height: 21px;
  color: currentColor;
}

.admin-app .admin-module-nav a > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admin-app .admin-module-nav a strong {
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-app .admin-module-nav a small {
  overflow: hidden;
  color: color-mix(in srgb, currentColor 76%, transparent);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-app .admin-module-nav a:hover,
.admin-app .admin-module-nav a:focus-visible {
  border-color: color-mix(in srgb, var(--indigo) 18%, var(--line));
  background: #edf3f7;
  color: var(--ink);
}

.admin-app .admin-module-nav a.is-active {
  border-color: #173e59;
  background: #173e59;
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 62, 89, .18);
}

.admin-app .admin-module-nav a.is-active small {
  color: rgba(255, 255, 255, .72);
}

.admin-workspace-main {
  min-width: 0;
}

.admin-view-intro {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background:
    radial-gradient(circle at 100% 0, rgba(14, 95, 142, .09), transparent 18rem),
    rgba(255, 255, 255, .92);
}

.admin-view-intro .eyebrow {
  margin-bottom: 5px;
  color: var(--indigo);
}

.admin-view-intro h3 {
  color: var(--ink);
  font-size: clamp(22px, 2.4vw, 30px);
}

.admin-view-intro h3:focus {
  outline: none;
}

.admin-view-intro p:last-child {
  max-width: 64ch;
  margin: 7px 0 0;
  color: var(--muted);
}

.admin-workspace-main > .admin-section {
  margin-top: 14px;
  scroll-margin-top: 108px;
}

.admin-workspace-main > .admin-section + .admin-section:not([hidden]) {
  margin-top: 16px;
}

.admin-workspace-main > [data-admin-view][hidden] {
  display: none !important;
}

.admin-workspace-main .section-heading.compact {
  display: grid;
  align-items: start;
  justify-content: start;
  gap: 4px;
}

.admin-workspace-main .section-heading.compact .eyebrow {
  margin-bottom: 2px;
}

.admin-workspace-main .section-heading.compact .hint {
  max-width: 68ch;
  margin: 3px 0 0;
}

.reporting-section {
  padding: clamp(20px, 2.4vw, 30px);
}

.reporting-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.reporting-heading-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 8px;
  background: #e9f1f6;
  color: var(--indigo);
}

.reporting-heading-icon svg {
  width: 22px;
  height: 22px;
}

.reporting-heading .eyebrow {
  margin-bottom: 4px;
  color: var(--indigo);
}

.reporting-heading h3 {
  color: var(--ink);
  font-size: clamp(22px, 2.2vw, 28px);
}

.reporting-heading .hint {
  max-width: 72ch;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.reporting-scope-badge,
.reporting-data-scope {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #c7d9e2;
  border-radius: 999px;
  background: #edf4f7;
  color: #315c70;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.reporting-scope-badge svg {
  width: 16px;
  height: 16px;
}

.reporting-section .reporting-filters {
  display: grid;
  gap: 16px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafb;
}

.reporting-filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.reporting-filter-head h4,
.reporting-summary-head h4,
.reporting-channel-head h4 {
  color: var(--ink);
  font-size: 17px;
}

.reporting-filter-head p,
.reporting-summary-head p,
.reporting-channel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.reporting-presets {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.reporting-presets .button {
  min-height: 36px;
  border-radius: 999px;
}

.reporting-presets .button[aria-pressed="true"] {
  border-color: #315c70;
  background: #315c70;
  color: #fff;
}

.reporting-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.reporting-section .reporting-filter-grid label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.reporting-section .reporting-filter-grid label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.reporting-section .reporting-filter-grid input,
.reporting-section .reporting-filter-grid select {
  width: 100%;
  min-height: 44px;
}

.reporting-filter-footer {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.reporting-filter-footer .check-line {
  width: auto;
  min-height: 44px;
  align-content: center;
}

.reporting-filter-footer .action-row {
  justify-content: flex-end;
}

.reporting-filter-footer .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
}

.reporting-filter-footer .button svg {
  width: 17px;
  height: 17px;
}

.reporting-filter-footer .button:disabled {
  opacity: .55;
  cursor: progress;
}

.reporting-section #reportingMessage:empty {
  display: none;
}

.reporting-section #reportingMessage:not(:empty) {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafb;
}

.reporting-section #reportingMessage[data-state="error"] {
  border-color: #e0beb8;
  background: #fbefed;
  color: #874339;
}

.reporting-section #reportingMessage[data-state="success"] {
  border-color: #b9d9c7;
  background: #edf7f1;
  color: #246243;
}

.reporting-section #reportingMessage[data-state="info"] {
  border-color: #bfd4e6;
  background: #eef6fc;
  color: #285d86;
}

.reporting-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
}

.reporting-metric-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.reporting-loading-state {
  grid-column: 1 / -1;
}

.reporting-metric-group {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(34, 58, 74, .045);
}

.reporting-metric-group > header {
  min-height: 58px;
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.reporting-metric-group h5 {
  color: var(--ink);
  font-size: 15px;
}

.reporting-metric-group header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.reporting-metric-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.reporting-metric {
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 88px;
  padding: 11px;
  border-radius: 8px;
  background: #f4f7f8;
}

.reporting-metric:nth-child(odd):last-child {
  grid-column: 1 / -1;
}

.reporting-metric > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.reporting-metric > strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: clamp(18px, 2vw, 22px);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.reporting-metric > small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.reporting-channel-head {
  margin-top: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.reporting-channel-panel {
  margin-top: 20px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.reporting-channel-list {
  display: grid;
}

.reporting-channel-item {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto minmax(170px, 230px);
  gap: 18px;
  align-items: center;
  min-height: 64px;
  padding: 11px 2px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
}

.reporting-channel-item:last-child {
  border-bottom: 0;
}

.reporting-channel-copy {
  display: grid;
  gap: 3px;
}

.reporting-channel-copy strong,
.reporting-channel-amount,
.reporting-channel-share > strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.reporting-channel-copy span {
  color: var(--muted);
  font-size: 11px;
}

.reporting-channel-amount {
  font-size: 14px;
  white-space: nowrap;
}

.reporting-channel-share {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) 48px;
  gap: 10px;
  align-items: center;
}

.reporting-channel-share > strong {
  font-size: 12px;
  text-align: right;
}

.reporting-channel-track {
  height: 8px;
  border-radius: 999px;
  background: #e4ecef;
  overflow: hidden;
}

.reporting-channel-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #4c7689;
}

@media (max-width: 1180px) {
  .reporting-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .reporting-metric-group:last-child {
    grid-column: 1 / -1;
  }

  .reporting-metric-group:last-child .reporting-metric-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .reporting-metric-group:last-child .reporting-metric:nth-child(odd):last-child {
    grid-column: auto;
  }
}

@media (max-width: 1080px) {
  .admin-workspace-shell {
    grid-template-columns: minmax(184px, 210px) minmax(0, 1fr);
    gap: 14px;
  }
}

@media (max-width: 900px) {
  .admin-workspace-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-workspace-rail {
    position: static;
  }

  .admin-view-picker {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 20px rgba(29, 44, 55, .07);
  }

  .admin-view-picker > span {
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
  }

  .admin-app .admin-module-nav {
    display: none;
  }
}

@media (max-width: 620px) {
  .admin-app .page-shell {
    padding-top: 30px;
  }

  .admin-app .page-title {
    margin-bottom: 22px;
    padding-bottom: 18px;
  }

  .admin-app .page-title h1 {
    font-size: 36px;
  }

  .admin-workspace-shell {
    gap: 12px;
    margin-top: 14px;
  }

  .admin-view-picker,
  .admin-view-intro {
    padding: 14px;
  }

  .admin-view-intro h3 {
    font-size: 22px;
  }

  .admin-view-intro p:last-child {
    font-size: 13px;
  }

  .admin-workspace-main > .admin-section {
    margin-top: 12px;
  }

  .admin-workspace-main .button.small,
  .admin-workspace-main button.button.small {
    min-height: 44px;
  }

  .reporting-heading {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
  }

  .reporting-heading-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .reporting-section .reporting-filters {
    padding: 14px;
  }

  .reporting-scope-badge {
    grid-column: 1 / -1;
    justify-self: start;
    margin-left: 51px;
  }

  .reporting-filter-head,
  .reporting-summary-head {
    display: grid;
  }

  .reporting-presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .reporting-presets .button {
    min-height: 44px;
    padding-inline: 8px;
  }

  .reporting-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .reporting-metric-groups {
    grid-template-columns: minmax(0, 1fr);
  }

  .reporting-metric-group:last-child { grid-column: auto; }

  .reporting-metric-group:last-child .reporting-metric-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reporting-metric-group:last-child .reporting-metric:nth-child(odd):last-child {
    grid-column: 1 / -1;
  }

  .reporting-filter-footer {
    display: grid;
  }

  .reporting-filter-footer .action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reporting-filter-footer .button {
    min-height: 44px;
    padding-inline: 10px;
  }

  .reporting-channel-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 14px;
  }

  .reporting-channel-share {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .reporting-scope-badge {
    margin-left: 0;
  }

  .reporting-filter-footer .action-row,
  .reporting-presets,
  .reporting-metric-list,
  .reporting-metric-group:last-child .reporting-metric-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .reporting-metric:nth-child(odd):last-child,
  .reporting-metric-group:last-child .reporting-metric:nth-child(odd):last-child {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .reporting-filter-footer .action-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (display-mode: standalone) {
  body {
    overscroll-behavior-y: none;
  }
}

/* --------------------------------------------------------------------------
   2026 redesign: calm Japanese stay, operational clarity for the admin app.
   This layer deliberately preserves the existing DOM and JavaScript hooks.
   -------------------------------------------------------------------------- */
:root {
  --ink: #242821;
  --muted: #687066;
  --line: #ddd9ce;
  --paper: #f5f2ea;
  --surface: #fffdf8;
  --cedar: #8a6143;
  --cedar-dark: #61402a;
  --indigo: #2e493d;
  --moss: #4f6e57;
  --shadow: 0 18px 48px rgba(67, 57, 43, 0.10);
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(222, 210, 184, 0.34), transparent 27rem),
    var(--paper);
  letter-spacing: 0.01em;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.26;
  background-image: radial-gradient(rgba(68, 58, 45, 0.16) 0.45px, transparent 0.55px);
  background-size: 6px 6px;
}

body.admin-app {
  --paper: #f3f6f8;
  --surface: #ffffff;
  --ink: #1d2c37;
  --muted: #60707d;
  --line: #d7e0e6;
  --cedar: #0e5f8e;
  --cedar-dark: #07466c;
  --indigo: #0e5f8e;
  background: #f3f6f8;
}

body.admin-app::before { opacity: 0.13; }

.site-header {
  position: sticky;
  top: 0;
  min-height: 84px;
  padding-top: max(14px, env(safe-area-inset-top, 0px));
  padding-bottom: 14px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border-bottom-color: color-mix(in srgb, var(--line) 78%, transparent);
  backdrop-filter: blur(18px) saturate(125%);
}

.brand { gap: 12px; }
.brand-logo { width: 50px; height: 50px; }
.brand-title { font-size: 17px; letter-spacing: 0.04em; }
.brand span { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }

.site-nav { gap: 4px; font-size: 13px; font-weight: 700; }
.site-nav a {
  position: relative;
  padding: 8px 10px;
  border-radius: 4px;
  transition: color .22s ease, background .22s ease, transform .22s ease;
}
.site-nav a:hover { background: rgba(138, 97, 67, 0.10); color: var(--cedar-dark); transform: translateY(-1px); }
.site-nav a:focus-visible, button:focus-visible, .button:focus-visible, .calendar-day:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cedar) 35%, transparent);
  outline-offset: 3px;
}

h1, h2, h3 { text-wrap: balance; }
h1 { max-width: 14ch; letter-spacing: -0.045em; font-weight: 800; }
h2 { letter-spacing: -0.032em; font-weight: 750; }
.eyebrow {
  color: var(--cedar);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.body-text, .intro p, .page-title p:not(.eyebrow), .contact-copy > p:not(.eyebrow) { max-width: 62ch; }

button, .button {
  border-radius: 5px;
  font-weight: 700;
  transition: transform .18s ease, background .22s ease, border-color .22s ease, color .22s ease, box-shadow .22s ease;
}
button:hover, .button:hover { transform: translateY(-1px); }
button:active, .button:active { transform: translateY(1px) scale(.985); }
.button.primary, .quick-booking button {
  box-shadow: 0 8px 18px rgba(97, 64, 42, 0.18);
}
.button.primary:hover, .quick-booking button:hover { box-shadow: 0 11px 22px rgba(97, 64, 42, 0.24); }

.hero {
  min-height: min(780px, calc(100dvh - 84px));
  isolation: isolate;
  background: #27312d;
}
.hero-media::after {
  background: linear-gradient(100deg, rgba(25, 34, 29, .88) 0%, rgba(25, 34, 29, .54) 48%, rgba(25, 34, 29, .18) 100%);
}
.hero-content {
  width: min(1280px, calc(100% - 48px));
  padding-top: clamp(110px, 16vw, 190px);
  padding-bottom: clamp(64px, 8vw, 106px);
}
.hero h1 { max-width: 10ch; font-size: clamp(48px, 7.4vw, 92px); letter-spacing: -0.06em; }
.hero-copy { max-width: 43ch; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.8; }
.quick-booking {
  grid-template-columns: minmax(190px, 1.25fr) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  max-width: 970px;
  margin-top: 42px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.46);
  border-radius: 10px;
  box-shadow: 0 20px 42px rgba(18, 26, 20, .26), inset 0 1px rgba(255,255,255,.5);
  backdrop-filter: blur(18px);
}

.section, .page-shell, .room-page { width: min(1280px, calc(100% - 48px)); }
.section { padding-top: clamp(84px, 10vw, 142px); padding-bottom: clamp(92px, 11vw, 158px); }
.intro { grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr); }
.intro p, .body-text { font-size: 18px; line-height: 1.9; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }

.room-grid { grid-template-columns: 1.28fr .72fr; grid-template-rows: repeat(2, minmax(205px, 1fr)); gap: 16px; }
.room-card { display: grid; grid-template-columns: minmax(46%, 1.08fr) minmax(0, .92fr); border: 0; border-radius: 10px; background: var(--surface); box-shadow: none; }
.room-card:first-child { grid-row: span 2; grid-template-columns: 1fr; }
.room-card img { height: 100%; min-height: 220px; }
.room-card:first-child img { min-height: 390px; }
.room-card-content { align-content: start; padding: clamp(20px, 3vw, 38px); }
.room-card-content .action-row { margin-top: auto; padding-top: 6px; }
.room-card:first-child .room-card-content { min-height: 210px; }
.room-card h3 { font-size: clamp(21px, 2vw, 29px); }
.room-card p { line-height: 1.7; }
.chip, .status-pill { border-radius: 4px; font-variant-numeric: tabular-nums; }

.contact-chat { margin-bottom: 0; padding-top: clamp(84px, 10vw, 142px); border-top: 1px solid var(--line); }
.contact-methods div { padding: 16px 0; }
.chat-panel, .form-surface, .booking-panel, .payment-surface, .dashboard, .admin-section {
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.chat-panel { padding: clamp(22px, 3.5vw, 38px); background: rgba(255,253,248,.76); }
.site-footer { padding-top: 46px; padding-bottom: calc(44px + env(safe-area-inset-bottom, 0px)); background: rgba(255,253,248,.34); }

.page-shell { padding-top: clamp(56px, 8vw, 106px); }
.page-shell.narrow { width: min(900px, calc(100% - 48px)); }
.page-title { max-width: 800px; margin-bottom: 48px; }
.page-title h1 { font-size: clamp(42px, 6vw, 72px); }
.page-title p:not(.eyebrow) { margin-top: 18px; font-size: 18px; line-height: 1.8; }

.room-hero { padding-top: clamp(64px, 9vw, 120px); padding-bottom: 42px; }
.room-hero p:not(.eyebrow) { line-height: 1.8; }
.gallery { grid-template-columns: 1.35fr .75fr .75fr; grid-auto-rows: minmax(180px, 19vw); gap: 12px; }
.gallery img { border-radius: 8px; }
.room-layout { grid-template-columns: minmax(0, 1.1fr) minmax(310px, .9fr); }
.room-layout .booking-panel { position: sticky; top: 102px; }
.amenity { border: 0; border-radius: 5px; background: rgba(255,253,248,.7); }
.map-wrap { border: 0; border-radius: 10px; box-shadow: var(--shadow); }

.booking-grid { grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); gap: 34px; }
.form-surface, .booking-panel, .payment-surface { padding: clamp(22px, 3.5vw, 38px); }
.booking-panel.sticky { top: 102px; }
.availability-calendar { margin-top: 8px; }
.calendar-day { border-radius: 5px; }
.total-line { font-variant-numeric: tabular-nums; }
.optional-account { border-radius: 6px; background: #f1eee6; }

.portal-grid { grid-template-columns: 1.08fr .96fr .82fr; gap: 18px; }
.portal-grid.single { grid-template-columns: minmax(0, 620px); justify-content: center; }
.portal-grid .form-surface { display: flex; flex-direction: column; }
.portal-grid .button { margin-top: auto; }
.dashboard { padding: clamp(20px, 3vw, 34px); }
.table-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
th { letter-spacing: .08em; }
td, th { font-variant-numeric: tabular-nums; }

/* Admin: denser, calmer and task-first without changing module behavior. */
.admin-app .site-header { background: rgba(243,246,248,.9); }
.admin-app .page-shell { width: min(1440px, calc(100% - 48px)); }
.admin-app .page-title { display: flex; align-items: end; justify-content: space-between; max-width: none; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.admin-app .page-title > p:not(.eyebrow) { max-width: 52ch; margin: 0; }
.admin-app .dashboard { padding: 14px; border: 0; box-shadow: none; background: transparent; }
.admin-app .dashboard-head { padding: 18px 20px; border-radius: 9px; background: #173e59; color: #fff; box-shadow: 0 14px 28px rgba(23,62,89,.16); }
.admin-app .dashboard-head .eyebrow, .admin-app .dashboard-head .hint { color: rgba(255,255,255,.68); }
.admin-app .dashboard-head .button { border-color: rgba(255,255,255,.45); color: #fff; }
.admin-app .dashboard-head .button:hover { background: #fff; color: #173e59; }
.stat-grid { gap: 1px; padding: 1px; border-radius: 8px; background: var(--line); }
.stat { border: 0; border-radius: 7px; background: #fff; }
.admin-section { margin-top: 18px; padding: clamp(18px, 2.2vw, 30px); box-shadow: 0 8px 22px rgba(34,58,74,.06); }
.admin-module-nav { top: 96px; border-radius: 7px; box-shadow: 0 8px 18px rgba(34,58,74,.09); }
.admin-module-nav a { border-radius: 5px; }
.operations-stat-grid { border-radius: 7px; overflow: hidden; background: #f7fafb; }
.notice-item { border-left-width: 3px; }
.operations-dialog { border-radius: 10px; }

.empty-state { border-radius: 6px; background: rgba(255,253,248,.52); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 900px) {
  .booking-grid,
  .portal-grid,
  .portal-grid.single,
  .room-layout,
  .contact-chat,
  .intro,
  .split-band {
    grid-template-columns: 1fr;
  }

  .room-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .room-card, .room-card:first-child { grid-column: auto; grid-row: auto; grid-template-columns: minmax(42%, .82fr) minmax(0, 1.18fr); }
  .room-card:first-child img, .room-card img { min-height: 210px; }
  .room-card:first-child .room-card-content { min-height: 0; }
  .section-heading { align-items: start; flex-direction: column; }
  .admin-app .page-title { display: block; }
  .admin-app .page-title > p:not(.eyebrow) { margin-top: 14px; }
}

@media (max-width: 620px) {
  .site-header { min-height: 74px; }
  .hero-content, .section, .page-shell, .room-page, .page-shell.narrow, .admin-app .page-shell { width: min(100% - 28px, 1280px); }
  .hero-content { padding-top: 94px; }
  .hero h1 { font-size: clamp(43px, 13vw, 62px); }
  .quick-booking { margin-top: 30px; padding: 12px; border-radius: 8px; }
  .section { padding-top: 72px; padding-bottom: 84px; }
  .room-card, .room-card:first-child { grid-template-columns: 1fr; }
  .room-card img, .room-card:first-child img { min-height: 220px; max-height: 290px; }
  .room-card-content { min-height: 0; padding: 22px; }
  .gallery { grid-auto-rows: 160px; gap: 8px; }
  .room-layout .booking-panel { position: static; }
  .form-surface, .booking-panel, .payment-surface, .chat-panel { padding: 20px; }
  .admin-app .dashboard { padding: 0; }
  .admin-app .dashboard-head { padding: 18px; }
  .admin-module-nav { top: 78px; }
}

/* Home room selection: each destination receives equal visual weight. */
.room-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: none;
  gap: clamp(16px, 2vw, 26px);
  align-items: stretch;
}

.room-card,
.room-card:first-child {
  grid-column: auto;
  grid-row: auto;
  grid-template-columns: 1fr;
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.74);
}

.room-card img,
.room-card:first-child img {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  object-fit: initial;
  background: #eae4d9;
}

.room-card-content,
.room-card:first-child .room-card-content {
  min-height: 0;
  padding: clamp(20px, 2.2vw, 30px);
}

.room-card h3 { font-size: clamp(20px, 1.7vw, 25px); }

@media (max-width: 900px) {
  .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .room-card,
  .room-card:first-child { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .room-grid { grid-template-columns: 1fr; }
}
.payment-qr {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  margin: 1rem 0;
  text-align: center;
}

.payment-qr-image {
  width: min(280px, 82vw);
  padding: 12px;
  border: 1px solid var(--line, #d9d9d9);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.payment-qr-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Home guest chat: calm service desk with a clear thread/composer hierarchy. */
body[data-page="home"] .contact-chat {
  grid-template-columns: minmax(250px, .7fr) minmax(0, 1.3fr);
  gap: clamp(32px, 6vw, 84px);
}

body[data-page="home"] .contact-copy {
  position: sticky;
  top: 116px;
}

body[data-page="home"] .chat-panel {
  gap: 0;
  overflow: hidden;
  padding: 0;
  border-color: color-mix(in srgb, var(--cedar) 18%, var(--line));
  background: color-mix(in srgb, var(--surface) 96%, #eee6d7 4%);
  box-shadow: 0 24px 60px rgba(68, 54, 38, .12);
}

body[data-page="home"] .chat-head {
  align-items: center;
  padding: clamp(20px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 100% 0, rgba(138, 97, 67, .12), transparent 13rem),
    rgba(255, 253, 248, .92);
}

.chat-head-main {
  display: flex;
  min-width: 0;
  gap: 14px;
  align-items: center;
}

.chat-head-icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--cedar) 28%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--cedar) 10%, var(--surface));
  color: var(--cedar-dark);
}

.chat-head-icon svg {
  width: 23px;
  height: 23px;
}

.chat-head-main .eyebrow {
  margin-bottom: 4px;
}

.chat-head-main h3 {
  font-size: clamp(21px, 2.3vw, 27px);
}

.chat-head-caption {
  max-width: 42ch;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.chat-head-status {
  display: grid;
  flex: 0 0 auto;
  gap: 5px;
  justify-items: end;
  text-align: right;
}

.chat-head-status .status-pill {
  position: relative;
  min-height: 30px;
  padding: 5px 9px 5px 24px;
  border: 1px solid color-mix(in srgb, var(--moss) 32%, transparent);
  background: color-mix(in srgb, var(--moss) 9%, var(--surface));
  color: var(--moss);
}

.chat-head-status .status-pill::before {
  position: absolute;
  left: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.chat-head-status small {
  color: var(--muted);
  font-size: 11px;
}

.guest-chat-thread {
  padding: clamp(18px, 3vw, 28px);
  padding-bottom: 12px;
  background: color-mix(in srgb, var(--paper) 60%, var(--surface));
}

.guest-chat-thread .chat-card > .chat-thread,
.staff-chat-thread {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--cedar) 38%, var(--line)) transparent;
}

.guest-chat-thread .chat-card > .chat-thread::-webkit-scrollbar,
.staff-chat-thread::-webkit-scrollbar {
  width: 10px;
}

.guest-chat-thread .chat-card > .chat-thread::-webkit-scrollbar-thumb,
.staff-chat-thread::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cedar) 38%, var(--line));
  background-clip: padding-box;
}

.chat-empty-state {
  display: grid;
  min-height: 142px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 22px;
  border: 1px dashed color-mix(in srgb, var(--cedar) 25%, var(--line));
  border-radius: 8px;
  background: rgba(255, 253, 248, .62);
  color: var(--muted);
  text-align: center;
}

.chat-empty-state svg {
  width: 30px;
  height: 30px;
  color: var(--cedar);
}

.chat-empty-state p {
  max-width: 48ch;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

body[data-page="home"] .chat-form {
  gap: 18px;
  padding: 16px clamp(22px, 3.5vw, 32px) clamp(22px, 3.5vw, 32px);
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, .96);
}

.chat-field-group {
  display: grid;
  min-width: 0;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.chat-field-group legend {
  margin-bottom: 9px;
  padding: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
}

.chat-route-disclosure {
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 54%, transparent);
}

.chat-route-disclosure summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
  touch-action: manipulation;
}

.chat-route-disclosure summary::-webkit-details-marker {
  display: none;
}

.chat-route-disclosure summary > span {
  display: grid;
  gap: 2px;
}

.chat-route-disclosure summary strong {
  color: var(--ink);
  font-size: 13px;
}

.chat-route-disclosure summary small {
  color: var(--muted);
  font-size: 11px;
}

.chat-route-disclosure summary svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: var(--cedar);
  transition: transform .2s ease;
}

.chat-route-disclosure[open] summary {
  border-bottom: 1px solid var(--line);
}

.chat-route-disclosure[open] summary svg {
  transform: rotate(180deg);
}

.chat-route-disclosure summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cedar) 35%, transparent);
  outline-offset: 3px;
}

.chat-route-group {
  padding: 16px;
}

.chat-route-hint,
.chat-booking-context {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.chat-booking-context:not(.hidden) {
  display: block;
  padding: 12px 14px;
  border-left: 3px solid var(--cedar);
  border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--cedar) 7%, var(--surface));
}

.required-mark {
  color: var(--danger);
  font: inherit;
}

.chat-message-field textarea {
  min-height: 124px;
  line-height: 1.65;
}

.chat-composer-meta {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-top: -11px;
  color: var(--muted);
}

.chat-composer-meta small:last-child {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

body[data-page="home"] .chat-form .form-message:empty {
  display: none;
}

body[data-page="home"] .chat-form .form-message:not(:empty) {
  min-height: 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--warn) 8%, var(--surface));
  font-size: 13px;
}

body[data-page="home"] .chat-form .form-message.success:not(:empty) {
  background: color-mix(in srgb, var(--moss) 9%, var(--surface));
}

.chat-submit {
  position: relative;
  gap: 9px;
}

.chat-submit svg {
  width: 18px;
  height: 18px;
}

.chat-submit:disabled {
  cursor: wait;
  opacity: .68;
  transform: none;
}

.chat-submit.is-loading svg {
  opacity: 0;
}

.chat-submit.is-loading::before {
  position: absolute;
  left: calc(50% - 48px);
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .42);
  border-top-color: #fff;
  border-radius: 50%;
  content: "";
  animation: chatSubmitSpin .7s linear infinite;
}

@keyframes chatSubmitSpin {
  to { transform: rotate(360deg); }
}

.guest-chat-thread .chat-card {
  gap: 16px;
  padding: 0;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--cedar) 16%, var(--line));
  background: rgba(255, 253, 248, .88);
}

.guest-chat-thread .chat-card + .chat-card {
  margin-top: 16px;
}

.guest-chat-thread .chat-card-head {
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, .88);
}

.guest-chat-thread .chat-card-head .eyebrow {
  margin-bottom: 2px;
}

.guest-chat-thread .chat-card-head h3 {
  font-size: 17px;
}

.guest-chat-thread .chat-card-head time,
.guest-chat-thread .chat-card-head small {
  color: var(--muted);
  font-size: 11px;
}

.guest-chat-thread .chat-card > .chat-thread {
  height: clamp(240px, 38vh, 360px);
  align-content: start;
  grid-auto-rows: max-content;
  gap: 6px;
  padding: 2px 18px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.guest-chat-thread .chat-message {
  display: grid;
  align-self: start;
  width: fit-content;
  max-width: min(82%, 540px);
  gap: 3px;
  padding: 9px 12px 7px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(68, 54, 38, .05);
}

.guest-chat-thread .chat-message.is-group-start:not(:first-child) {
  margin-top: 9px;
}

.guest-chat-thread .chat-message.guest {
  justify-self: end;
  border-bottom-right-radius: 4px;
  border-color: color-mix(in srgb, var(--cedar) 24%, var(--line));
  background: color-mix(in srgb, var(--cedar) 10%, var(--surface));
}

.guest-chat-thread .chat-message.staff {
  justify-self: start;
  border-bottom-left-radius: 4px;
  border-color: var(--line);
  background: var(--surface);
}

.guest-chat-thread .chat-message-sender {
  margin: 0 0 1px;
}

.guest-chat-thread .chat-message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

@media (max-width: 900px) {
  body[data-page="home"] .contact-chat {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  body[data-page="home"] .contact-copy {
    position: static;
  }
}

@media (max-width: 620px) {
  body[data-page="home"] .chat-head {
    align-items: flex-start;
    padding: 18px;
  }

  .chat-head-status {
    gap: 4px;
  }

  .chat-head-status small,
  .chat-head-caption {
    display: none;
  }

  .chat-head-status .status-pill {
    padding-right: 8px;
    font-size: 11px;
  }

  .guest-chat-thread,
  body[data-page="home"] .chat-form {
    padding: 18px;
  }

  .guest-chat-thread .chat-card > .chat-thread { height: clamp(220px, 42vh, 320px); }

  .chat-route-group {
    padding: 14px;
  }

  .chat-composer-meta {
    display: grid;
    gap: 4px;
  }

  .chat-composer-meta small:last-child {
    justify-self: end;
  }

  .guest-chat-thread .chat-message {
    max-width: 90%;
  }
}

/* Customer conversations: a focused, two-pane workspace for staff and owners. */
.staff-chat-list { display: block; }

.staff-chat-workspace {
  display: grid;
  grid-template-columns: minmax(236px, .72fr) minmax(0, 1.78fr);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.staff-chat-sidebar {
  display: flex;
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #f7fafb;
}

.staff-chat-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 650;
}

.staff-chat-sidebar-head small { color: var(--muted); font-variant-numeric: tabular-nums; }
.staff-chat-customers { min-height: 0; overflow-y: auto; }

.staff-chat-customer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease;
}

.staff-chat-customer:hover { background: rgba(23, 62, 89, .055); }
.staff-chat-customer:focus-visible { outline: 2px solid #0759a8; outline-offset: -2px; }
.staff-chat-customer.is-active { background: #e8f0f5; box-shadow: inset 3px 0 #0759a8; }

.staff-chat-avatar {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: #d7e5ee;
  color: #173e59;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
}

.staff-chat-customer-copy { min-width: 0; }
.staff-chat-customer-copy strong, .staff-chat-customer-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-chat-customer-copy strong { color: var(--ink); font-size: 14px; }
.staff-chat-customer-copy small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.staff-chat-customer time { align-self: start; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.staff-chat-conversation { display: grid; min-width: 0; min-height: 0; grid-template-rows: auto minmax(240px, 1fr) auto auto auto; background: #fff; }
.staff-chat-conversation-head { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.staff-chat-person { display: flex; min-width: 0; gap: 11px; align-items: center; }
.staff-chat-person h4 { margin: 1px 0 2px; color: var(--ink); font-size: 17px; }
.staff-chat-person .eyebrow { margin: 0; font-size: 10px; }
.staff-chat-person small, .staff-chat-context small { display: block; color: var(--muted); font-size: 12px; }
.staff-chat-context { display: grid; gap: 3px; flex: 0 0 auto; text-align: right; }
.staff-chat-context > span { color: #173e59; font-size: 13px; font-weight: 650; }
.staff-chat-thread { height: clamp(300px, 48vh, 510px); min-height: 0; align-content: start; gap: 6px; padding: 20px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; background: #fcfdfd; }
.staff-chat-thread .chat-message { display: grid; width: fit-content; max-width: min(78%, 620px); gap: 3px; padding: 9px 12px 7px; border-radius: 13px; }
.staff-chat-thread .chat-message.is-group-start:not(:first-child) { margin-top: 9px; }
.staff-chat-thread .chat-message.staff { border-bottom-right-radius: 4px; }
.staff-chat-thread .chat-message.guest { border-bottom-left-radius: 4px; }
.staff-chat-thread .chat-message.staff .chat-message-sender { text-align: right; }
.staff-chat-conversation > .chat-assignment-form { margin: 0 20px 14px; }
.staff-chat-reply-form { margin: 14px 20px 0; }
.staff-chat-reply-form .button,
.staff-chat-conversation > .chat-assignment-form .button { min-height: 44px; }
.staff-chat-conversation > .form-message { min-height: 20px; margin: 7px 20px 12px; }

@media (max-width: 760px) {
  .staff-chat-workspace { grid-template-columns: 1fr; min-height: 0; }
  .staff-chat-sidebar { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .staff-chat-conversation { min-height: 470px; }
  .staff-chat-thread { height: clamp(280px, 46vh, 420px); }
}

@media (max-width: 480px) {
  .staff-chat-conversation-head { align-items: start; padding: 14px; }
  .staff-chat-context { max-width: 36%; overflow: hidden; }
  .staff-chat-context small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .staff-chat-thread { padding: 14px; }
  .staff-chat-thread .chat-message { max-width: 90%; }
  .staff-chat-reply-form, .staff-chat-conversation > .chat-assignment-form { margin-right: 14px; margin-left: 14px; }
  .staff-chat-conversation > .form-message { margin-right: 14px; margin-left: 14px; }
}

/* Customer portal accessibility, responsive layout and interaction feedback. */
.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;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: max(8px, env(safe-area-inset-top, 0px));
  left: max(8px, env(safe-area-inset-left, 0px));
  padding: 10px 14px;
  transform: translateY(calc(-100% - 20px));
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--cedar-dark);
  outline-offset: 3px;
}

.required-mark {
  color: var(--danger);
  font-size: 1em;
}

.field-hint {
  margin: -9px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

body[data-page="customer"] .page-title,
body[data-page="customer"] .form-surface,
body[data-page="customer"] .dashboard {
  scroll-margin-top: 110px;
}

body[data-page="customer"] .site-nav a,
body[data-page="customer"] .language-switcher button,
body[data-page="customer"] .site-footer a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

body[data-page="customer"] .site-nav a[aria-current="page"] {
  background: color-mix(in srgb, var(--cedar) 14%, transparent);
  color: var(--cedar-dark);
  box-shadow: inset 0 -2px var(--cedar);
}

body[data-page="customer"] :where(a, button, input, select, textarea):focus-visible,
body[data-page="customer"] .table-wrap:focus-visible {
  outline: 3px solid var(--cedar-dark);
  outline-offset: 3px;
}

body[data-page="customer"] :where(input, select, textarea):focus-visible {
  border-color: var(--cedar-dark);
  box-shadow: 0 0 0 1px var(--surface);
}

body[data-page="customer"] :where(input, select, textarea):user-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

body[data-page="customer"] .password-input-wrap > input {
  padding-right: 56px;
}

body[data-page="customer"] .password-visibility-toggle {
  right: 2px;
  width: 44px;
  height: 44px;
  min-height: 44px;
}

body[data-page="customer"] .portal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-page="customer"] .portal-grid .form-surface {
  min-width: 0;
}

body[data-page="customer"] .form-message {
  min-height: 24px;
  border-left: 3px solid transparent;
  font-size: 14px;
  line-height: 1.55;
}

body[data-page="customer"] .form-message:not(:empty) {
  padding: 8px 10px;
  border-left-color: var(--warn);
  background: #fff7ed;
}

body[data-page="customer"] .form-message.success:not(:empty) {
  border-left-color: var(--moss);
  background: #edf6ef;
}

body[data-page="customer"] button:disabled,
body[data-page="customer"] .button:disabled {
  cursor: not-allowed;
  opacity: .58;
  transform: none;
  box-shadow: none;
}

body[data-page="customer"] form.is-submitting button[type="submit"]::after {
  width: 16px;
  height: 16px;
  margin-left: 9px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: customer-submit-spin .7s linear infinite;
}

body[data-page="customer"] .table-wrap {
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

@keyframes customer-submit-spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 701px) and (max-width: 1050px) {
  body[data-page="customer"] .portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="customer"] #guestLookupForm {
    grid-column: 1 / -1;
    width: min(100%, 620px);
    justify-self: center;
  }
}

@media (max-width: 700px) {
  body[data-page="customer"] .portal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  body[data-page="customer"] .site-header {
    grid-template-areas:
      "brand brand"
      "nav language";
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
  }

  body[data-page="customer"] .brand {
    justify-self: start;
  }

  body[data-page="customer"] .site-nav {
    justify-content: flex-start;
    gap: 2px;
  }

  body[data-page="customer"] .site-nav a {
    padding-inline: 8px;
  }

  body[data-page="customer"] .language-switcher {
    gap: 2px;
  }

  body[data-page="customer"] .language-switcher button {
    min-height: 44px;
    padding: 6px;
    font-size: 11px;
  }

  body[data-page="customer"] .page-title {
    margin-bottom: 34px;
  }

  body[data-page="customer"] .page-title h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  body[data-page="customer"] .page-title p:not(.eyebrow) {
    font-size: 16px;
    line-height: 1.75;
  }

  body[data-page="customer"] .form-surface {
    padding: 20px;
  }

  body[data-page="customer"] .dashboard-head .action-row,
  body[data-page="customer"] .dashboard-head .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link { transition: none; }
  body[data-page="customer"] form.is-submitting button[type="submit"]::after { animation: none; }
}

@media (forced-colors: active) {
  body[data-page="customer"] .site-nav a[aria-current="page"] {
    border: 2px solid Highlight;
  }

  body[data-page="customer"] .form-message:not(:empty) {
    border: 2px solid CanvasText;
  }
}

/* Customer portal redesign: one clear task with progressive disclosure. */
body[data-page="customer"] .page-shell {
  width: min(920px, calc(100% - 48px));
  padding-top: clamp(48px, 7vw, 88px);
}

body[data-page="customer"] .page-title {
  max-width: 680px;
  margin-right: auto;
  margin-bottom: clamp(34px, 5vw, 52px);
  margin-left: auto;
  text-align: center;
}

body[data-page="customer"] .page-title h1 {
  max-width: none;
  font-size: clamp(42px, 6vw, 66px);
}

body[data-page="customer"] .page-title p:not(.eyebrow) {
  max-width: 54ch;
  margin-right: auto;
  margin-left: auto;
  color: var(--muted);
  font-size: 17px;
}

.customer-auth-shell {
  width: min(100%, 620px);
  margin-inline: auto;
  scroll-margin-top: 110px;
}

.customer-auth-card {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 50px);
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, .98), rgba(252, 248, 238, .96));
  box-shadow:
    0 24px 60px rgba(75, 60, 41, .11),
    inset 0 1px rgba(255, 255, 255, .72);
}

.customer-auth-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cedar-dark), var(--cedar) 54%, #b99b74);
  content: "";
}

.customer-auth-card::after {
  position: absolute;
  z-index: 0;
  top: -72px;
  right: -74px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(138, 97, 67, .10);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.customer-auth-accent,
.customer-auth-panels,
.customer-auth-trust {
  position: relative;
  z-index: 1;
}

.customer-auth-accent {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
  color: var(--cedar);
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-size: 12px;
  letter-spacing: .16em;
}

.customer-auth-accent::before {
  width: 28px;
  height: 1px;
  background: currentColor;
  content: "";
}

body[data-page="customer"] .customer-auth-panel {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: customer-panel-enter .22s ease-out both;
}

body[data-page="customer"] .customer-auth-panel[hidden] {
  display: none !important;
}

.customer-form-head {
  display: grid;
  gap: 7px;
  margin-bottom: 3px;
}

.customer-form-head .eyebrow,
.customer-form-head h2,
.customer-form-description {
  margin: 0;
}

.customer-form-head h2 {
  color: var(--ink);
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.2;
}

.customer-form-description {
  max-width: 42ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

body[data-page="customer"] .customer-auth-panel label {
  gap: 8px;
}

body[data-page="customer"] .customer-auth-panel label > span:first-child {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

body[data-page="customer"] .customer-auth-panel input {
  min-height: 50px;
  border-color: #d8d1c3;
  border-radius: 7px;
  background: rgba(255, 255, 255, .78);
}

body[data-page="customer"] .customer-auth-panel .form-message {
  min-height: 10px;
}

.customer-entry-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.customer-entry-divider::before,
.customer-entry-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.customer-entry-options {
  display: grid;
  gap: 12px;
}

.customer-entry-prompt {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

body[data-page="customer"] .customer-register-trigger {
  border-color: color-mix(in srgb, var(--cedar) 68%, var(--line));
  background: transparent;
  color: var(--cedar-dark);
}

body[data-page="customer"] .customer-register-trigger:hover {
  border-color: var(--cedar);
  background: rgba(138, 97, 67, .08);
  color: var(--cedar-dark);
}

body[data-page="customer"] .customer-lookup-option {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 18px;
  width: 100%;
  min-height: 78px;
  padding: 14px 15px;
  gap: 12px;
  align-items: center;
  border: 1px solid #ded5c6;
  border-radius: 8px;
  background: rgba(239, 232, 217, .52);
  color: var(--ink);
  box-shadow: none;
  text-align: left;
}

body[data-page="customer"] .customer-lookup-option:hover {
  border-color: color-mix(in srgb, var(--cedar) 58%, var(--line));
  background: rgba(235, 225, 206, .72);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(75, 60, 41, .08);
}

.customer-lookup-option > svg:first-child {
  width: 25px;
  color: var(--cedar);
}

.customer-lookup-option > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.customer-lookup-option strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.customer-lookup-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.customer-option-arrow {
  width: 18px;
  color: var(--cedar);
  transition: transform .18s ease;
}

.customer-lookup-option:hover .customer-option-arrow {
  transform: translateX(2px);
}

body[data-page="customer"] .customer-panel-back {
  display: inline-flex;
  width: max-content;
  min-height: 44px;
  margin: -10px 0 -1px -10px;
  padding: 8px 10px;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--cedar-dark);
  box-shadow: none;
  font-size: 13px;
}

body[data-page="customer"] .customer-panel-back:hover {
  background: rgba(138, 97, 67, .08);
  color: var(--cedar-dark);
}

.customer-panel-back svg {
  width: 18px;
}

.customer-auth-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.customer-auth-trust svg {
  width: 16px;
  flex: 0 0 auto;
}

@keyframes customer-panel-enter {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 620px) {
  body[data-page="customer"] .page-shell {
    width: min(100% - 28px, 920px);
    padding-top: 42px;
  }

  body[data-page="customer"] .page-title {
    margin-bottom: 30px;
    text-align: left;
  }

  body[data-page="customer"] .page-title p:not(.eyebrow) {
    margin-left: 0;
    font-size: 16px;
  }

  .customer-auth-card {
    padding: 26px 20px 22px;
    border-radius: 10px;
  }

  .customer-auth-accent {
    margin-bottom: 21px;
  }

  body[data-page="customer"] .customer-auth-panel {
    gap: 16px;
    padding: 0;
  }

  .customer-form-head h2 {
    font-size: 28px;
  }

  body[data-page="customer"] .customer-lookup-option {
    min-height: 82px;
    padding: 13px;
    gap: 10px;
  }

  .customer-auth-trust {
    align-items: flex-start;
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="customer"] .customer-auth-panel {
    animation: none;
  }

  .customer-option-arrow {
    transition: none;
  }
}

/* Guest lookup result stays inside the auth card as a dedicated view. */
.customer-lookup-result {
  gap: 22px;
}

.customer-result-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

body[data-page="customer"] .customer-result-nav .customer-panel-back {
  margin: -8px 0 -8px -10px;
}

body[data-page="customer"] .customer-result-login {
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 13px;
}

body[data-page="customer"] .customer-result-login:hover {
  background: rgba(138, 97, 67, .08);
  color: var(--cedar-dark);
}

.customer-result-head {
  display: grid;
  gap: 18px;
}

.customer-result-head .eyebrow,
.customer-result-head h2 {
  margin: 0;
}

.customer-result-head h2 {
  margin-top: 5px;
  font-size: clamp(27px, 4vw, 34px);
}

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

body[data-page="customer"] .customer-result-actions .button,
body[data-page="customer"] .customer-result-actions button {
  width: 100%;
  min-height: 44px;
}

body[data-page="customer"] .customer-lookup-result .booking-panel {
  display: grid;
  gap: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.customer-lookup-result .price-line {
  justify-content: space-between;
  padding: 16px 18px;
  border: 1px solid #ded5c6;
  border-radius: 8px;
  background: rgba(239, 232, 217, .52);
}

.customer-lookup-result .price-line span {
  color: var(--cedar-dark);
  font-size: 22px;
}

.customer-lookup-result .price-line small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.customer-lookup-result .booking-panel dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

.customer-lookup-result .booking-panel dl div {
  display: grid;
  min-width: 0;
  gap: 3px;
  align-content: start;
  padding: 11px 0;
}

.customer-lookup-result .booking-panel dt {
  font-size: 12px;
  font-weight: 700;
}

.customer-lookup-result .booking-panel dd {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  text-align: left;
}

.customer-lookup-result .order-state-details {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .48);
}

.customer-lookup-result .order-state-details summary {
  min-height: 44px;
  padding: 11px 13px;
  cursor: pointer;
}

@media (max-width: 620px) {
  .customer-result-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  body[data-page="customer"] .customer-result-nav .customer-panel-back,
  body[data-page="customer"] .customer-result-login {
    width: auto;
    margin: 0;
  }

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

  .customer-lookup-result .booking-panel dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-lookup-result .price-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

/* Customer cleaning review: focused modal flow with an accessible star control. */
.customer-feedback-dialog {
  width: min(580px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  margin: auto;
  overflow: hidden;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line) 88%, var(--cedar));
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 76px rgba(39, 31, 23, .28);
}

.customer-feedback-dialog::backdrop {
  background: rgba(27, 25, 22, .56);
  backdrop-filter: blur(3px);
}

.customer-feedback-dialog[open] {
  animation: customer-feedback-enter .2s ease-out both;
}

.customer-feedback-dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

.customer-feedback-dialog-head .eyebrow,
.customer-feedback-dialog-head h2 {
  margin: 0;
}

.customer-feedback-dialog-head h2 {
  margin-top: 5px;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.25;
}

.customer-feedback-dialog-head h2:focus {
  outline: none;
}

body[data-page="customer"] .customer-feedback-dialog-close {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  margin: -5px -6px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

body[data-page="customer"] .customer-feedback-dialog-close:hover {
  border-color: color-mix(in srgb, var(--cedar) 60%, var(--line));
  background: rgba(138, 97, 67, .08);
  color: var(--cedar-dark);
}

.customer-feedback-dialog-close svg {
  width: 22px;
  height: 22px;
}

.customer-feedback-dialog-body {
  max-height: calc(100vh - 118px);
  max-height: calc(100dvh - 118px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px;
  scrollbar-gutter: stable;
}

.cleaning-feedback-booking {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid #ded5c6;
  border-radius: 8px;
  background: rgba(239, 232, 217, .46);
}

.cleaning-feedback-booking > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 13px 14px;
  border-left: 1px solid #ded5c6;
}

.cleaning-feedback-booking > div:first-child {
  border-left: 0;
}

.cleaning-feedback-booking span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cleaning-feedback-booking strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.45;
}

.cleaning-feedback-form {
  display: grid;
  gap: 21px;
}

.cleaning-feedback-rating-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.cleaning-feedback-rating-field legend,
.customer-feedback-comment-field > span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.cleaning-feedback-rating-hint {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.cleaning-star-rating {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 7px;
  align-items: center;
}

.cleaning-star-option {
  position: relative;
  display: block;
}

body[data-page="customer"] .cleaning-star-option label {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #9b9285;
  cursor: pointer;
  touch-action: manipulation;
  transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.cleaning-star-option label:hover {
  background: rgba(174, 119, 36, .09);
}

.cleaning-star-option label.is-active {
  color: #a76512;
}

.cleaning-star-option label.is-selected {
  border-color: rgba(167, 101, 18, .18);
  background: rgba(204, 144, 48, .12);
}

.cleaning-star-option svg {
  width: 34px;
  height: 34px;
  overflow: visible;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: fill .18s ease, transform .15s ease;
}

.cleaning-star-option label.is-active svg {
  fill: #e7aa45;
}

.cleaning-star-option label:active svg {
  transform: scale(.9);
}

body[data-page="customer"] .cleaning-star-option input:focus-visible + label {
  outline: 3px solid var(--cedar-dark);
  outline-offset: 2px;
}

.cleaning-feedback-star-status {
  min-height: 22px;
  margin: 9px 0 0;
  color: var(--cedar-dark);
  font-size: 13px;
  font-weight: 800;
}

.customer-feedback-comment-field {
  display: grid;
  max-width: none;
  gap: 8px;
  overflow: visible;
}

body[data-page="customer"] .customer-feedback-comment-field textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  border-color: #d8d1c3;
  border-radius: 8px;
  background: #fff;
}

.cleaning-feedback-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 10px;
}

body[data-page="customer"] .cleaning-feedback-actions .button {
  width: 100%;
  min-height: 48px;
}

.cleaning-feedback-success {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 8px 18px;
  text-align: center;
}

.cleaning-feedback-success-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  border-radius: 50%;
  background: #e6f0e7;
  color: var(--moss);
}

.cleaning-feedback-success-icon svg {
  width: 29px;
  height: 29px;
}

.cleaning-feedback-success h3,
.cleaning-feedback-success p {
  margin: 0;
}

.cleaning-feedback-success p {
  color: var(--muted);
}

.cleaning-feedback-success .button {
  min-width: 180px;
  min-height: 48px;
  margin-top: 14px;
}

@keyframes customer-feedback-enter {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 620px) {
  .customer-feedback-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 10px;
  }

  .customer-feedback-dialog-head {
    padding: 17px 18px 14px;
  }

  .customer-feedback-dialog-body {
    max-height: calc(100dvh - 101px);
    padding: 18px;
  }

  .cleaning-feedback-booking {
    grid-template-columns: minmax(0, 1fr);
  }

  .cleaning-feedback-booking > div,
  .cleaning-feedback-booking > div:first-child {
    border-top: 1px solid #ded5c6;
    border-left: 0;
  }

  .cleaning-feedback-booking > div:first-child {
    border-top: 0;
  }

  body[data-page="customer"] .cleaning-star-option label {
    width: 44px;
    height: 44px;
  }

  .cleaning-star-option svg {
    width: 31px;
    height: 31px;
  }
}

@media (max-width: 360px) {
  .cleaning-feedback-dialog-body {
    padding-inline: 14px;
  }

  .cleaning-star-rating {
    gap: 3px;
  }

  .cleaning-feedback-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-feedback-dialog[open] {
    animation: none;
  }

  .cleaning-star-option label,
  .cleaning-star-option svg {
    transition: none;
  }
}

@media (max-width: 760px) {
  .booking-section-heading {
    align-items: flex-start !important;
  }

  .booking-toolbar {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
  }

  .booking-table-wrap {
    border: 0 !important;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .booking-management-table,
  .booking-management-table tbody,
  .booking-management-table tr,
  .booking-management-table td {
    display: block;
    width: 100%;
  }

  .booking-management-table {
    min-width: 0;
  }

  .booking-management-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .booking-management-table tbody tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 7px 18px rgba(34, 58, 74, .05);
    overflow: hidden;
  }

  .booking-management-table tbody tr:hover {
    background: var(--surface);
  }

  .booking-management-table td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 13px;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  }

  .booking-management-table td:last-child {
    border-bottom: 0;
  }

  .booking-management-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
  }

  .booking-order-cell,
  .booking-guest-cell,
  .booking-date-cell,
  .booking-payment-cell {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .booking-order-cell > *,
  .booking-guest-cell > *,
  .booking-date-cell > *,
  .booking-payment-cell > * {
    grid-column: 2;
  }

  .booking-order-cell::before,
  .booking-guest-cell::before,
  .booking-date-cell::before,
  .booking-payment-cell::before {
    grid-column: 1;
    grid-row: 1 / span 4;
  }

  .booking-status-cell select {
    margin: 0;
  }

  .booking-status-cell > small,
  .booking-status-cell > span {
    grid-column: 2;
  }

  .booking-action-cell .booking-review-notice,
  .booking-action-cell .action-row {
    grid-column: 2;
  }

  .booking-action-cell .button {
    min-height: 44px;
  }

  .booking-empty-row td {
    display: block;
    padding: 34px 18px;
    text-align: center;
  }

  .booking-empty-row td::before {
    content: none;
  }

  .booking-pagination {
    justify-content: stretch;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .booking-pagination .button {
    min-height: 44px;
  }

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

@media (max-width: 520px) {
  .booking-section-heading {
    display: grid !important;
  }

  .booking-heading-count {
    justify-self: start;
  }

  .booking-create-disclosure > summary {
    grid-template-columns: 38px minmax(0, 1fr) 20px;
    padding: 11px 13px;
  }

  .booking-create-copy small {
    line-height: 1.4;
  }

  .booking-create-body {
    padding: 14px;
  }

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

  .booking-management-table td {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 9px;
  }

  .booking-order-cell,
  .booking-guest-cell,
  .booking-date-cell,
  .booking-payment-cell {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}
