:root {
  color-scheme: light;
  --ink: #202326;
  --muted: #687076;
  --line: #d9dedc;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --forest: #164237;
  --mint: #e4f3ec;
  --gold: #b78b47;
  --gold-text: #8d672f;
  --stone: #e9e4d8;
  --danger: #9f2d20;
  --shadow: 0 24px 80px rgba(32, 35, 38, 0.14);
}

html {
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(145deg, rgba(247, 245, 239, 0.96), rgba(228, 243, 236, 0.82)),
    repeating-linear-gradient(90deg, rgba(22, 66, 55, 0.045) 0 1px, transparent 1px 44px),
    var(--paper);
}

button,
input {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.access-panel {
  width: min(100%, 460px);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: white;
  background: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  line-height: 1;
}

.brand-name {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.brand-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.hero-copy {
  margin: 28px 0 22px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 8px;
  max-width: 100%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 8vw, 48px);
  line-height: 1.02;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.hero-copy p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

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

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

input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfaf7;
  outline: none;
}

input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(29, 74, 58, 0.12);
}

button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  background: var(--forest);
  transition:
    transform 140ms ease,
    filter 140ms ease;
}

button:hover {
  filter: brightness(1.05);
}

button:active {
  transform: translateY(1px);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(183, 139, 71, 0.72);
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.guest-screen {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.stay-welcome {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.stay-welcome:focus,
.guest-screen:focus {
  outline: none;
}

.stay-intro h1 {
  margin-top: 12px;
  max-width: none;
  font-family: inherit;
  font-size: clamp(26px, 4.5vw, 32px);
  line-height: 1.12;
  font-weight: 780;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.stay-confirmed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(22, 66, 55, 0.12);
  border-radius: 7px;
  color: var(--forest);
  background: var(--mint);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
}

.stay-confirmed-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: white;
  background: var(--forest);
  font-size: 12px;
  line-height: 1;
}

.stay-timeline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.stay-date {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.stay-date-divider {
  width: 1px;
  background: var(--line);
}

.stay-date-label,
.stay-room-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stay-date-value {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.08;
}

.stay-date-time {
  color: var(--forest);
  font-size: 15px;
  font-weight: 750;
}

.stay-room-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 2px 2px 16px;
  border-bottom: 1px solid var(--line);
}

.stay-room-item {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.stay-room-item strong {
  color: var(--forest);
  font-size: 19px;
  line-height: 1.3;
}

.stay-policy {
  padding-left: 14px;
  border-left: 3px solid var(--gold);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.stay-checkin-note {
  display: grid;
  gap: 7px;
  padding: 15px 16px;
  border: 1px solid rgba(183, 139, 71, 0.3);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  color: var(--ink);
  background: #fbf7ee;
}

.stay-checkin-note strong {
  font-size: 15px;
  line-height: 1.3;
}

.stay-checkin-note p {
  color: #585f62;
  font-size: 14px;
  line-height: 1.55;
}

.guest-contact-card {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 8px;
  color: white;
  background: var(--forest);
}

.guest-contact-card > span,
.guest-contact-card small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  line-height: 1.4;
}

.guest-contact-card > span {
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.guest-contact-card a {
  width: fit-content;
  color: white;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.guest-contact-card a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.guest-contact-card-access {
  margin-top: 2px;
}

.guest-address-card {
  display: grid;
  gap: 6px;
  padding: 15px 16px;
  border: 1px solid rgba(183, 139, 71, 0.32);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  color: var(--ink);
  background: #fbf7ee;
}

.guest-address-card > span {
  color: #6b5a3d;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.guest-address-card address {
  color: var(--ink);
  font-size: 15px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.5;
}

.stay-continue {
  width: 100%;
  font-size: 17px;
  font-weight: 750;
}

.stay-access-status {
  min-height: 21px;
  color: var(--forest);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.stay-continue:disabled {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.84);
  background: #597068;
  opacity: 1;
}

.stay-continue:disabled:hover {
  filter: none;
}

.stay-access-status + .stay-policy {
  margin-top: -4px;
}

.wifi-access-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(22, 66, 55, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background: #f2f7f4;
}

.wifi-access-card-codes {
  margin-top: 2px;
}

.wifi-access-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.wifi-access-heading > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wifi-access-heading strong {
  color: var(--forest);
  font-size: 16px;
  line-height: 1.3;
}

.wifi-access-heading small {
  color: #4b625b;
  font-size: 12px;
  line-height: 1.4;
}

.wifi-access-badge {
  display: grid;
  min-width: 52px;
  height: 34px;
  place-items: center;
  padding: 0 8px;
  border-radius: 6px;
  color: #fff;
  background: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.wifi-credentials {
  display: grid;
  gap: 8px;
  margin: 0;
}

.wifi-credentials > div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(22, 66, 55, 0.14);
}

.wifi-credentials dt {
  color: #4b625b;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wifi-credentials dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
  user-select: all;
}

.eyebrow {
  color: var(--gold-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-copy h1 {
  margin-top: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 8vw, 46px);
  line-height: 1.02;
  font-weight: 600;
}

.welcome-copy p:not(.eyebrow) {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.guest-name {
  color: var(--forest);
  font-weight: 750;
}

.access-meta {
  font-size: 14px;
}

.entry-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 16px 0 16px 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.entry-steps li {
  padding-left: 4px;
  color: var(--muted);
  line-height: 1.42;
}

.entry-steps li::marker {
  color: var(--gold);
  font-weight: 800;
}

.guest-actions {
  display: grid;
  gap: 10px;
}

.gate-access-section {
  display: grid;
  gap: 12px;
}

.gate-access-section h2 {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 750;
}

.block-1-route-guide {
  display: grid;
  gap: 8px;
  margin: 0;
}

.block-1-route-guide video {
  display: block;
  width: min(100%, 320px);
  height: auto;
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 8px;
  background: var(--stone);
  object-fit: cover;
}

.block-1-route-guide figcaption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.block-2-route-guide {
  display: grid;
  gap: 8px;
  margin: 0;
}

.block-2-route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.block-2-route-option {
  display: grid;
  min-width: 0;
  gap: 8px;
  margin: 0;
}

.block-2-route-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--stone);
  object-fit: cover;
}

.block-2-route-guide figcaption {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 650;
  text-align: center;
}

.door-actions {
  display: grid;
  gap: 14px;
}

.access-status-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 18px;
  border: 1px solid rgba(22, 66, 55, 0.18);
  border-radius: 8px;
  color: var(--forest);
  background: var(--mint);
}

.access-status-card > span:last-child {
  display: grid;
  gap: 3px;
}

.access-status-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.access-status-card small {
  color: #3f6459;
  font-size: 13px;
  line-height: 1.35;
}

.gate-icon {
  position: relative;
  justify-self: center;
  width: 24px;
  height: 27px;
  border: 2px solid currentColor;
  border-top: 0;
  border-bottom: 0;
}

.gate-icon::before,
.gate-icon::after {
  content: "";
  position: absolute;
  inset: 4px 5px auto;
  height: 2px;
  background: currentColor;
  box-shadow: 0 7px 0 currentColor, 0 14px 0 currentColor;
}

.navigation-guide {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.navigation-guide h2 {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 750;
}

.navigation-guide > img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--stone);
}

.navigation-button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 0 16px;
  border: 1px solid rgba(22, 66, 55, 0.18);
  border-radius: 12px;
  color: #fff;
  background: var(--forest);
  font-size: 16px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(22, 66, 55, 0.16);
}

.navigation-button:hover {
  color: #fff;
  background: #0e332a;
  transform: translateY(-1px);
}

.navigation-button:focus-visible {
  outline: 3px solid rgba(183, 139, 71, 0.52);
  outline-offset: 3px;
}

.navigation-button-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: #fc3f1d;
  font-size: 18px;
  font-weight: 850;
}

.navigation-button-arrow {
  font-size: 20px;
  text-align: right;
}

.door-action-item {
  display: grid;
  gap: 8px;
}

.guest-action {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 0 18px;
  border: 1px solid rgba(22, 66, 55, 0.14);
  color: var(--forest);
  background: #fbfaf7;
  text-align: left;
  font-size: 17px;
  font-weight: 750;
}

.code-reveal-button {
  position: relative;
  padding-right: 46px;
}

.code-reveal-button::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  color: var(--gold-text);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-52%);
}

.code-reveal-button[aria-expanded="true"]::after {
  content: "−";
}

.guest-action span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.guest-action:hover {
  filter: none;
  border-color: rgba(22, 66, 55, 0.35);
  background: #f4f8f4;
}

.guest-action:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.guest-action-primary {
  color: white;
  background: #0f3328;
}

.guest-action-primary:hover {
  filter: brightness(1.05);
  background: #0f3328;
}

.open-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  font-size: 20px;
  background: #0f3328;
}

.lock-icon {
  position: relative;
  justify-self: center;
  width: 18px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.lock-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 11px;
  width: 12px;
  height: 11px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  transform: translateX(-50%);
}

.door-icon,
.room-icon {
  position: relative;
  justify-self: center;
  width: 22px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 4px 4px 2px 2px;
}

.door-icon::after,
.room-icon::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 13px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.room-icon {
  height: 24px;
  border-radius: 5px;
}

.room-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -8px;
  width: 10px;
  height: 8px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
}

.door-note {
  padding: 12px 14px;
  border: 1px solid rgba(159, 45, 32, 0.18);
  border-radius: 8px;
  color: var(--danger);
  background: rgba(159, 45, 32, 0.06);
  font-size: 14px;
  line-height: 1.42;
}

.door-fallback {
  margin: 0;
  padding: 0 4px 0 46px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.door-fallback code {
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--forest);
  background: rgba(22, 66, 55, 0.08);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.door-code-reveal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 8px;
  color: white;
  background: #0f3328;
  box-shadow: 0 10px 24px rgba(15, 51, 40, 0.14);
}

.door-code-reveal span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.4;
}

.door-code-reveal code {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.door-code-reveal.is-waiting {
  grid-template-columns: 1fr;
  border: 1px solid rgba(183, 139, 71, 0.32);
  color: var(--ink);
  background: #fbf7ee;
  box-shadow: none;
}

.door-code-reveal.is-waiting span {
  color: #665637;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.message {
  min-height: 24px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

.hotel-details {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hotel-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  background: var(--stone);
  box-shadow: 0 14px 34px rgba(32, 35, 38, 0.12);
}

.hotel-copy {
  display: grid;
  gap: 10px;
}

.hotel-copy h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 600;
}

.hotel-summary {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.contact-list {
  display: grid;
  gap: 0;
  margin: 4px 0 0;
}

.contact-list div {
  display: grid;
  gap: 4px;
  padding: 11px 0;
  border-top: 1px solid rgba(217, 222, 220, 0.9);
}

.contact-list dt {
  color: var(--gold-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.contact-list .contact-detail {
  margin-top: 4px;
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  color: #565f61;
  background: #fbf7ee;
  font-size: 13px;
  line-height: 1.5;
}

.contact-list a {
  color: var(--forest);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.faq-section {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.faq-section h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 600;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 245, 239, 0.62);
}

.faq-item summary {
  padding: 15px 16px;
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
}

.faq-item summary:focus-visible {
  outline: 3px solid rgba(183, 139, 71, 0.48);
  outline-offset: 3px;
}

.faq-item p {
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.hidden {
  display: none !important;
}

.footer-note {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-body {
  background: #f5f7f6;
}

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

.admin-header,
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.admin-header h1 {
  margin-top: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 750;
  line-height: 1;
}

.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-actions input {
  width: min(42vw, 280px);
  min-height: 44px;
  background: white;
}

.admin-actions button {
  min-height: 44px;
  padding: 0 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.stat-card {
  min-height: 92px;
  padding: 14px;
  border: 1px solid #dce2df;
  border-radius: 8px;
  background: white;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1;
}

.admin-section {
  padding: 18px;
  border: 1px solid #dce2df;
  border-radius: 8px;
  background: white;
}

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

.section-heading h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 22px;
}

.section-heading p {
  color: var(--muted);
  font-size: 14px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #e5e9e7;
  border-radius: 8px;
}

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

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0ee;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #52605a;
  background: #f8faf9;
  font-size: 12px;
  text-transform: uppercase;
}

td strong {
  display: block;
  max-width: 300px;
  overflow-wrap: anywhere;
}

td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.sms-pill {
  display: inline-block;
  margin: 0;
  padding: 5px 8px;
  border-radius: 999px;
  color: #14352d;
  background: #e4f3ec;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .admin-header,
  .section-heading,
  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions input {
    width: 100%;
  }

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

@media (max-width: 380px) {
  .page {
    padding: 14px;
  }

  .access-panel {
    padding: 20px;
  }

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

  .stay-intro h1 {
    font-size: 26px;
    line-height: 1.12;
  }

  .stay-welcome {
    gap: 14px;
  }

  .stay-timeline {
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    gap: 10px;
    padding: 13px;
  }

  .stay-date-divider {
    width: 1px;
    height: auto;
  }

  .stay-date-value {
    font-size: 19px;
  }

  .stay-date-time {
    font-size: 14px;
  }

  .stay-room-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stay-room-item + .stay-room-item {
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .guest-contact-card a {
    font-size: 20px;
  }

  .door-code-reveal {
    grid-template-columns: 1fr;
  }

  .door-code-reveal code {
    width: fit-content;
  }
}

@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}

/* Private guest check-in links */
.checkin-links-panel {
  overflow: hidden;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #ffffff;
}

.checkin-links-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  border-bottom: 1px solid #e5e9e7;
}

.checkin-links-toolbar h2 {
  margin-top: 4px;
  font-size: 24px;
}

.checkin-links-toolbar p:last-child {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

.checkin-links-date-form {
  min-width: 320px;
}

.checkin-links-date-form > div {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 104px;
  gap: 8px;
}

.checkin-links-date-form input,
.checkin-links-date-form button {
  min-height: 44px;
}

.checkin-links-date-form button {
  padding: 0 14px;
}

.checkin-links-status {
  padding: 12px 22px;
  border-bottom: 1px solid #edf0ee;
  color: #365d51;
  background: #f1f7f4;
  font-size: 14px;
}

.checkin-links-status.is-error {
  color: var(--danger);
  background: #fff2ef;
}

.checkin-links-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.checkin-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid #edf0ee;
}

.checkin-link-row:last-child {
  border-bottom: 0;
}

.checkin-link-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.checkin-link-copy strong {
  font-size: 17px;
}

.checkin-link-meta {
  color: #66737c;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.checkin-link-url {
  width: fit-content;
  max-width: 100%;
  color: #1f5a49;
  font-size: 14px;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

.checkin-link-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 6px;
  color: #ffffff;
  background: #1f493d;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.checkin-link-open:hover {
  background: #163b31;
}

@media (max-width: 720px) {
  .checkin-links-shell {
    width: min(100% - 20px, 1360px);
  }

  .checkin-links-toolbar,
  .checkin-link-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .checkin-links-toolbar {
    display: grid;
  }

  .checkin-links-date-form {
    min-width: 0;
  }

  .checkin-link-open {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .checkin-links-date-form > div {
    grid-template-columns: 1fr;
  }
}

/* Admin cockpit */
.admin-body {
  color: #171b1f;
  background:
    linear-gradient(180deg, #f7f8fa 0, #eef2f4 100%),
    #f4f6f8;
}

.admin-shell {
  width: min(100% - 36px, 1360px);
  margin: 0 auto;
  padding: 28px 0 42px;
}

.admin-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 2px 0 20px;
}

.admin-header h1 {
  margin-top: 6px;
  color: #11161b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 44px;
  font-weight: 800;
  line-height: 0.98;
}

.admin-subtitle {
  margin-top: 10px;
  color: #64717c;
  font-size: 14px;
}

.admin-actions {
  display: grid;
  grid-template-columns: 92px 104px 104px;
  gap: 10px;
  align-items: stretch;
  --admin-control-height: 46px;
}

.admin-actions input {
  width: 100%;
  min-height: var(--admin-control-height);
  border-color: #d8dee4;
  background: #ffffff;
}

.admin-actions button,
.admin-actions .admin-link-button,
.panel-link-button {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #1f493d;
  color: #ffffff;
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
}

.admin-actions .secondary-button,
.panel-link-button.secondary-button {
  border: 1px solid #d0d8dd;
  color: #3f4b54;
  background: #ffffff;
}

.admin-header-copy {
  min-width: 0;
}

.admin-header-copy .admin-subtitle {
  min-height: 20px;
}

.admin-actions.admin-topbar-actions {
  grid-template-columns: 292px 104px 92px;
}

.admin-topbar-actions > button {
  min-height: var(--admin-control-height);
}

.admin-primary-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 4px;
  min-height: var(--admin-control-height);
  padding: 4px;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #ffffff;
}

.admin-primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  color: #3f4b54;
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.admin-primary-link:hover {
  background: #eef4f1;
}

.admin-primary-link.is-active {
  color: #ffffff;
  background: #1f493d;
}

.admin-primary-link:focus-visible {
  outline: 3px solid rgba(31, 73, 61, 0.2);
  outline-offset: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.data-status-panel {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #d8e5dd;
  border-radius: 8px;
  color: #244a3a;
  background: #edf8f1;
}

.data-status-panel:not(:empty) {
  display: flex;
}

.data-status-panel.is-warning {
  border-color: #efd3a2;
  color: #6e4710;
  background: #fff6df;
}

.data-status-panel strong {
  flex: 0 0 auto;
  color: inherit;
  font-size: 14px;
}

.data-status-panel span {
  min-width: 0;
  color: inherit;
  font-size: 13px;
  line-height: 1.35;
}

.stat-card {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(23, 27, 31, 0.06);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #84919b;
}

.stat-card.tone-blue::before {
  background: #2f73c8;
}

.stat-card.tone-ink::before {
  background: #20252a;
}

.stat-card.tone-amber::before {
  background: #c8902b;
}

.stat-card.tone-green::before {
  background: #24745a;
}

.stat-card.tone-red::before {
  background: #c74b42;
}

.stat-card.tone-violet::before {
  background: #7561b8;
}

.stat-card span,
.stat-card small {
  display: block;
  color: #63717b;
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin: 11px 0 8px;
  color: #11161b;
  font-size: 32px;
  line-height: 1;
}

.ops-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0 0 16px;
}

.pricing-snapshot-panel {
  margin: 0 0 16px;
  padding: 16px;
}

.pricing-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(280px, 1.35fr);
  gap: 12px;
  margin-top: 14px;
}

.price-snapshot-card,
.price-snapshot-list {
  position: relative;
  overflow: hidden;
  border: 1px solid #e0e6ea;
  border-radius: 8px;
  background: #fbfcfd;
}

.price-snapshot-card {
  min-height: 118px;
  padding: 14px 14px 14px 17px;
}

.price-snapshot-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #84919b;
}

.price-snapshot-card.tone-blue::before {
  background: #2f73c8;
}

.price-snapshot-card.tone-ink::before {
  background: #20252a;
}

.price-snapshot-card.tone-amber::before {
  background: #c8902b;
}

.price-snapshot-card.tone-green::before {
  background: #24745a;
}

.price-snapshot-card span,
.price-snapshot-card small,
.price-snapshot-list span,
.price-snapshot-list small {
  display: block;
  color: #63717b;
  font-size: 13px;
}

.price-snapshot-card strong {
  display: block;
  margin: 12px 0 8px;
  color: #11161b;
  font-size: 24px;
  line-height: 1.05;
}

.price-snapshot-list {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.price-snapshot-list strong {
  display: block;
  margin-top: 8px;
  color: #11161b;
  font-size: 22px;
}

.price-snapshot-list ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.price-snapshot-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: baseline;
  padding-bottom: 7px;
  border-bottom: 1px solid #e8edf0;
}

.price-snapshot-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.price-snapshot-list li > strong {
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-snapshot-list li > span {
  color: #151b20;
  font-weight: 780;
}

.price-snapshot-list li > small {
  grid-column: 1 / -1;
}

.ops-panel,
.admin-section {
  border: 1px solid #dce3e7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 34px rgba(23, 27, 31, 0.06);
}

.ops-panel {
  min-height: 302px;
  padding: 16px;
}

.panel-title,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-title h2,
.section-heading h2 {
  margin-top: 4px;
  color: #171b1f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 20px;
  font-weight: 780;
  line-height: 1.12;
}

.panel-title > strong {
  min-width: 42px;
  padding: 7px 9px;
  border-radius: 8px;
  color: #17201c;
  background: #eef3f0;
  text-align: center;
  font-size: 20px;
}

.signal-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.signal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 11px;
  border: 1px solid #e5eaee;
  border-radius: 8px;
  background: #fbfcfd;
}

.signal-item strong {
  display: block;
  overflow: hidden;
  color: #171b1f;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-item span {
  display: block;
  margin-top: 3px;
  color: #65737d;
  font-size: 12px;
}

.signal-item b,
.sms-pill,
.state-pill {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.empty-state {
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed #cdd6dc;
  border-radius: 8px;
  color: #65737d;
  background: #fbfcfd;
  font-size: 14px;
}

.source-bars {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.source-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(92px, 0.7fr) 34px;
  align-items: center;
  gap: 10px;
}

.source-row strong {
  display: block;
  color: #171b1f;
  font-size: 14px;
}

.source-row span {
  display: block;
  margin-top: 3px;
  color: #65737d;
  font-size: 12px;
}

.source-row b {
  color: #29323a;
  text-align: right;
}

.source-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f3;
}

.source-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f73c8, #24745a);
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.room-chip {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 0.72;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  color: #242c33;
  background: #f9fbfc;
  font-size: 17px;
  font-weight: 800;
}

.room-chip.is-occupied {
  border-color: #a8d3c3;
  color: #154b39;
  background: #e8f6f0;
}

.room-chip.is-arrival {
  border-color: #efd29c;
  color: #6d4610;
  background: #fff4dc;
}

.rooms-panel {
  grid-column: 1 / -1;
}

.room-date-label {
  margin-top: 5px;
  color: #65737d;
  font-size: 13px;
}

.week-day {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  color: #3f4b54;
  background: #ffffff;
  font-size: 13px;
  font-weight: 760;
}

.week-day.is-active {
  border-color: #1f493d;
  color: #ffffff;
  background: #1f493d;
}

.week-controls {
  display: none;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: stretch;
  margin-top: 10px;
}

.week-controls.is-visible {
  display: grid;
}

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

.week-nav {
  min-height: 50px;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  color: #1f493d;
  background: #ffffff;
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
}

.week-nav:hover {
  filter: none;
  background: #f3f7f5;
}

.week-day {
  display: grid;
  gap: 2px;
  min-height: 50px;
  padding: 7px 4px;
  text-align: center;
}

.week-day span,
.week-day strong {
  display: block;
  line-height: 1;
}

.week-day span {
  font-size: 11px;
  text-transform: uppercase;
}

.week-day strong {
  font-size: 13px;
}

.rooms-panel .room-grid {
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.rooms-panel .room-chip {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  place-items: initial;
  align-content: start;
  aspect-ratio: auto;
  min-height: 116px;
  padding: 10px;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  color: #20272d;
  background: #f9fbfc;
  text-align: left;
  cursor: pointer;
}

.rooms-panel .room-chip:hover {
  transform: translateY(-1px);
  filter: none;
  box-shadow: 0 12px 26px rgba(23, 27, 31, 0.1);
}

.rooms-panel .room-chip.is-selected {
  outline: 3px solid rgba(31, 73, 61, 0.2);
  border-color: #1f493d;
}

.room-number {
  color: inherit;
  font-size: 28px;
  font-weight: 850;
  line-height: 0.95;
}

.room-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  color: currentColor;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 780;
}

.room-guest {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 9px;
  color: #20272d;
  max-width: 100%;
  padding-right: 0;
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-guest i {
  position: relative;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.room-guest i::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  bottom: -7px;
  height: 7px;
  border-radius: 8px 8px 2px 2px;
  background: currentColor;
}

.room-guest.is-empty {
  color: #7c8992;
  font-weight: 650;
}

.room-people {
  position: absolute;
  right: 8px;
  top: 8px;
  bottom: auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 800;
}

.rooms-panel .room-chip.is-quiet {
  border-color: #dde4e8;
  color: #28313a;
  background: #f8fafb;
}

.rooms-panel .room-chip.is-arrival {
  border-color: #f0c879;
  color: #70480b;
  background: #fff3d8;
}

.rooms-panel .room-chip.is-occupied {
  border-color: #98d2be;
  color: #12513c;
  background: #e5f5ee;
}

.rooms-panel .room-chip.is-departure {
  border-color: #a7c0dc;
  color: #244b78;
  background: #e8f1fb;
}

.rooms-panel .room-chip.is-turnover {
  border-color: #d9bd6d;
  color: #60420c;
  background: repeating-linear-gradient(
    135deg,
    #fff3d8 0 10px,
    #f8e7bd 10px 20px
  );
}

.room-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 13px;
  color: #65737d;
  font-size: 12px;
}

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

.room-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-free {
  background: #dde4e8;
}

.legend-arrival {
  background: #f0c879;
}

.legend-occupied {
  background: #98d2be;
}

.legend-departure {
  background: #a7c0dc;
}

.booking-table-panel {
  padding: 16px;
}

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

.section-heading p,
.result-count {
  color: #65737d;
  font-size: 13px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.filter-tab {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #dce3e7;
  color: #3f4b54;
  background: #ffffff;
  font-size: 13px;
  font-weight: 720;
}

.filter-tab.is-active {
  border-color: #1f493d;
  color: #ffffff;
  background: #1f493d;
}

.result-count {
  margin: 0 0 10px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #e5eaee;
  border-radius: 8px;
}

.bookings-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  table-layout: fixed;
}

.col-status {
  width: 94px;
}

.col-arrival {
  width: 150px;
}

.col-guest {
  width: 285px;
}

.col-contact {
  width: 138px;
}

.col-room {
  width: 78px;
}

.col-source {
  width: 145px;
}

.col-sms {
  width: 500px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f3;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #65737d;
  background: #f8fafb;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

td strong {
  display: block;
  overflow-wrap: anywhere;
}

td span {
  display: block;
  margin-top: 4px;
  color: #65737d;
  font-size: 12px;
}

.apartment-cell {
  width: 42px;
  padding: 5px 7px;
  border-radius: 7px;
  background: #edf1f3;
  text-align: center;
}

.source-cell strong {
  font-size: 13px;
  line-height: 1.2;
}

.source-cell span {
  color: #81909a;
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.state-active,
.sms-delivered,
.sms-received {
  color: #12523d;
  background: #dff3eb;
}

.state-today,
.sms-queued {
  color: #6d4610;
  background: #fff1d1;
}

.state-future,
.sms-sent {
  color: #214d88;
  background: #e5effc;
}

.state-past {
  color: #65737d;
  background: #eef1f3;
}

.sms-waiting {
  color: #4f3b83;
  background: #eeeafd;
}

.sms-draft {
  color: #4f3b83;
  background: #eeeafd;
}

.sms-blocked,
.sms-failed {
  color: #8f281f;
  background: #ffe4e0;
}

.sms-cell {
  display: grid;
  gap: 7px;
  max-width: 100%;
}

.sms-cell-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sms-cell .sms-pill {
  flex: 0 0 auto;
  margin-top: 0;
}

.sms-to {
  min-width: 0;
  overflow: hidden;
  color: #65737d;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sms-preview {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #2d353c;
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

tr.is-sms-expanded td {
  background: #fbfcfd;
}

tr.is-sms-expanded .sms-preview {
  display: block;
  overflow: visible;
  padding: 10px;
  border: 1px solid #e0e6eb;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
}

.sms-actions {
  display: flex;
  gap: 6px;
}

.sms-action {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #dce3e7;
  border-radius: 7px;
  color: #3f4b54;
  background: #ffffff;
  font-size: 12px;
  font-weight: 760;
}

.sms-action:disabled {
  cursor: default;
  opacity: 0.55;
}

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

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

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

  .price-snapshot-list {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .admin-shell {
    width: min(100% - 36px, 1360px);
    padding-top: 18px;
  }

  .admin-header {
    grid-template-columns: 1fr;
  }

  .admin-header h1 {
    font-size: 34px;
  }

  .admin-actions {
    grid-template-columns: minmax(240px, 1fr) 104px 104px;
  }

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

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

  .panel-title,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-tabs {
    justify-content: flex-start;
  }

  .rooms-panel {
    grid-column: 1 / -1;
  }

  .rooms-panel .room-grid {
    grid-template-columns: repeat(6, minmax(96px, 1fr));
  }
}

@media (max-width: 560px) {
  .admin-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .stats-grid,
  .ops-grid,
  .pricing-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .data-status-panel {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .rooms-panel {
    grid-column: auto;
  }

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

  .week-controls {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .week-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  color: #171b1f;
  background:
    radial-gradient(circle at 20% 10%, rgba(47, 115, 200, 0.12), transparent 28%),
    linear-gradient(180deg, #f7f8fa 0, #eef2f4 100%);
}

.login-shell {
  width: min(100%, 420px);
}

.login-card {
  padding: 26px;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(23, 27, 31, 0.12);
}

.login-card h1 {
  margin-top: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 42px;
  font-weight: 820;
}

.login-note {
  margin-top: 10px;
  color: #65737d;
  line-height: 1.45;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.login-form button {
  font-weight: 780;
  background: #1f493d;
}

/* SMS operations */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-actions-main {
  grid-template-columns: repeat(4, minmax(92px, auto));
}

.sms-admin-shell {
  width: min(100% - 36px, 1360px);
}

.sms-view-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #ffffff;
}

.sms-view-tab {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  color: #46535c;
  background: transparent;
  font-size: 13px;
  font-weight: 780;
}

.sms-view-tab:hover {
  filter: none;
  background: #eef4f1;
}

.sms-view-tab.is-active {
  color: #ffffff;
  background: #1f493d;
}

.sms-view-tab:focus-visible {
  outline: 3px solid rgba(31, 73, 61, 0.2);
  outline-offset: 2px;
}

.sms-integration {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid #efd3a2;
  border-radius: 8px;
  color: #6e4710;
  background: #fff6df;
}

.sms-integration > div {
  display: grid;
  grid-template-columns: 10px auto;
  gap: 2px 10px;
  align-items: center;
}

.sms-integration strong {
  font-size: 14px;
}

.sms-integration p {
  grid-column: 2;
  color: inherit;
  font-size: 13px;
  line-height: 1.4;
}

.sms-integration.is-live {
  border-color: #c8e0d5;
  color: #18513d;
  background: #edf8f1;
}

.sms-integration.is-error {
  border-color: #efc4bf;
  color: #8f281f;
  background: #fff0ee;
}

.sms-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c8902b;
}

.sms-integration.is-live .sms-live-dot {
  background: #24745a;
}

.sms-provider-badge,
.sms-count-badge,
.sms-conversation-state {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
}

.sms-stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.sms-payment-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  background: #fff;
}

.sms-payment-heading,
.sms-payment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.sms-payment-heading h2 {
  margin-top: 3px;
  font-size: 20px;
}

.sms-payment-heading > span {
  color: #617079;
  font-size: 13px;
  font-weight: 700;
}

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

.sms-payment-card {
  padding: 12px 14px;
  border-radius: 7px;
  background: #f7f9fa;
}

.sms-payment-card > div {
  display: grid;
  gap: 4px;
}

.sms-payment-card span,
.sms-payment-card small {
  color: #617079;
  font-size: 13px;
}

.sms-payment-card-state {
  justify-items: end;
  text-align: right;
}

.sms-payment-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 760;
}

.sms-payment-status.is-waiting {
  color: #75500f;
  background: #fff0c9;
}

.sms-payment-status.is-paid {
  color: #18513d;
  background: #dff2e8;
}

.sms-payment-status.is-review {
  color: #8f281f;
  background: #ffe5e1;
}

.sms-payment-empty {
  color: #617079;
  font-size: 14px;
}

.sms-workspace {
  display: grid;
  grid-template-columns: minmax(270px, 0.78fr) minmax(440px, 1.45fr) minmax(290px, 0.82fr);
  min-height: 690px;
  overflow: hidden;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(23, 27, 31, 0.06);
}

.sms-thread-panel,
.sms-conversation-panel,
.sms-automation-panel {
  min-width: 0;
}

.sms-thread-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  border-right: 1px solid #e2e7ea;
  background: #f8fafb;
}

.sms-thread-toolbar,
.sms-conversation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #e2e7ea;
}

.sms-thread-toolbar h2,
.sms-conversation-header h2,
.sms-automation-panel h2 {
  margin-top: 4px;
  color: #171b1f;
  font-size: 20px;
  line-height: 1.12;
}

.sms-search-label {
  padding: 12px 12px 0;
}

.sms-search-label input {
  min-height: 42px;
  border-color: #dce3e7;
  background: #ffffff;
  font-size: 14px;
}

.sms-filter-tabs {
  justify-content: flex-start;
  padding: 10px 12px 12px;
  border-bottom: 1px solid #e2e7ea;
}

.sms-filter-tabs .filter-tab {
  min-height: 30px;
  padding: 0 8px;
  font-size: 11px;
}

.sms-thread-list {
  min-height: 0;
  overflow-y: auto;
}

.sms-thread-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-height: 88px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #e7ebee;
  border-radius: 0;
  color: #252d33;
  background: transparent;
  text-align: left;
}

.sms-thread-item:hover,
.sms-thread-item.is-active {
  filter: none;
  background: #eef4f1;
}

.sms-thread-item.is-active {
  box-shadow: inset 4px 0 #1f493d;
}

.sms-thread-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #1f493d;
  background: #dfece6;
  font-size: 14px;
  font-weight: 820;
}

.sms-thread-copy,
.sms-thread-name-row,
.sms-thread-meta {
  min-width: 0;
}

.sms-thread-name-row,
.sms-thread-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sms-thread-name-row {
  justify-content: space-between;
}

.sms-thread-name-row strong,
.sms-thread-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sms-thread-name-row strong {
  font-size: 14px;
}

.sms-thread-name-row time,
.sms-thread-meta small {
  flex: 0 0 auto;
  color: #7a8790;
  font-size: 11px;
}

.sms-thread-preview {
  display: block;
  margin-top: 6px;
  color: #5f6c76;
  font-size: 12px;
}

.sms-thread-meta {
  margin-top: 7px;
}

.sms-thread-meta b,
.sms-thread-meta i {
  font-size: 10px;
  font-style: normal;
  font-weight: 780;
}

.sms-thread-meta b {
  padding: 2px 5px;
  border-radius: 999px;
  color: #6d4610;
  background: #fff0cc;
}

.sms-thread-meta small {
  margin-left: auto;
}

.sms-thread-empty,
.sms-empty-conversation {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 180px;
  padding: 24px;
  color: #65737d;
  text-align: center;
}

.sms-thread-empty strong,
.sms-empty-conversation strong {
  color: #303a42;
  font-size: 14px;
}

.sms-thread-empty span,
.sms-empty-conversation span {
  max-width: 350px;
  font-size: 13px;
  line-height: 1.45;
}

.sms-conversation-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #ffffff;
}

.sms-conversation-header p:not(.eyebrow) {
  margin-top: 6px;
  color: #65737d;
  font-size: 12px;
}

.sms-conversation-state {
  display: none;
  color: #6d4610;
  background: #fff6df;
}

.sms-conversation-state.has-status {
  display: inline-block;
  color: #53616b;
  background: #f5f7f8;
}

.sms-conversation-state.has-status.is-delivered {
  color: #176048;
  background: #edf8f3;
}

.sms-conversation-state.has-status.is-failed {
  color: #9f2d20;
  background: #fff0ee;
}

.sms-message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 360px;
  overflow-y: auto;
  padding: 18px;
  background:
    linear-gradient(rgba(247, 249, 250, 0.94), rgba(247, 249, 250, 0.94)),
    repeating-linear-gradient(135deg, #eef2f3 0 1px, transparent 1px 16px);
}

.sms-bubble {
  align-self: flex-start;
  width: fit-content;
  max-width: min(78%, 560px);
  padding: 11px 12px 8px;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  background: #ffffff;
}

.sms-bubble.is-outbound {
  align-self: flex-end;
  border-color: #c9ded5;
  background: #eaf5f0;
}

.sms-bubble.is-inbound {
  align-self: flex-start;
  border-color: #d7dfe4;
  background: #ffffff;
}

.sms-bubble p {
  color: #20272d;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.sms-bubble footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 7px;
  color: #71808a;
  font-size: 10px;
}

.sms-message-status,
.sms-thread-meta i {
  color: #5b6871;
}

.sms-message-status.is-delivered,
.sms-message-status.is-received,
.sms-thread-meta i.is-received,
.sms-thread-meta i.is-delivered {
  color: #176048;
}

.sms-message-status.is-failed,
.sms-thread-meta i.is-failed,
.sms-message-error {
  color: #9f2d20;
}

.sms-message-status.is-simulated,
.sms-thread-meta i.is-simulated {
  color: #6d4610;
}

.sms-message-error {
  flex-basis: 100%;
  text-align: right;
}

.sms-composer {
  display: grid;
  gap: 8px;
  padding: 14px 16px 12px;
  border-top: 1px solid #e2e7ea;
  background: #ffffff;
}

.sms-composer > label,
.sms-automation-form > label:not(.sms-switch-row) {
  color: #53616b;
  font-size: 12px;
  font-weight: 720;
}

.sms-composer textarea,
.sms-automation-form textarea,
.sms-automation-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  color: #20272d;
  background: #ffffff;
  font: inherit;
  line-height: 1.45;
  outline: none;
  resize: vertical;
}

.sms-automation-form select {
  min-height: 42px;
  resize: none;
}

.sms-automation-timing {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid #d8dee4;
  border-radius: 8px;
  background: #f7f9f8;
}

.sms-automation-timing span,
.sms-automation-timing small {
  color: #65737d;
  font-size: 12px;
}

.sms-automation-timing strong {
  color: #174b3c;
  font-size: 14px;
}

.sms-composer textarea:focus,
.sms-automation-form textarea:focus,
.sms-automation-form select:focus,
.sms-thread-item:focus-visible,
.sms-secondary-action:focus-visible {
  border-color: #1f493d;
  box-shadow: 0 0 0 3px rgba(31, 73, 61, 0.13);
  outline: none;
}

.sms-composer-footer,
.sms-composer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sms-composer-tools {
  color: #6d7982;
  font-size: 11px;
}

.sms-composer-footer > button,
.sms-automation-form > button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 780;
}

.sms-secondary-action {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #d5dde1;
  border-radius: 6px;
  color: #3f4b54;
  background: #ffffff;
  font-size: 11px;
  font-weight: 760;
}

.sms-compose-status {
  min-height: 18px;
  color: #47705e;
  font-size: 12px;
  line-height: 1.4;
}

.sms-compose-status.is-error {
  color: #9f2d20;
}

.sms-automation-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
  border-left: 1px solid #e2e7ea;
  background: #fbfcfd;
}

.sms-panel-note {
  margin-top: 8px;
  color: #65737d;
  font-size: 13px;
  line-height: 1.45;
}

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

.sms-switch-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  color: #283139;
  background: #ffffff;
}

.sms-switch-row strong,
.sms-switch-row small {
  display: block;
}

.sms-switch-row strong {
  font-size: 13px;
}

.sms-switch-row small {
  margin-top: 3px;
  color: #6b7881;
  font-size: 11px;
  line-height: 1.35;
}

.sms-switch-row input {
  appearance: none;
  flex: 0 0 auto;
  width: 40px;
  min-height: 22px;
  border: 0;
  border-radius: 999px;
  background: #c6cfd4;
  box-shadow: inset 0 0 0 1px rgba(34, 43, 49, 0.08);
  cursor: pointer;
  transition: background 140ms ease;
}

.sms-switch-row input::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 2px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(25, 31, 35, 0.24);
  transition: transform 140ms ease;
}

.sms-switch-row input:checked {
  background: #1f493d;
}

.sms-switch-row input:checked::before {
  transform: translateX(18px);
}

.sms-switch-row input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.sms-template-help {
  color: #6b7881;
  font-size: 11px;
  line-height: 1.6;
}

.sms-template-help code {
  padding: 2px 4px;
  border-radius: 4px;
  color: #36574a;
  background: #eaf1ee;
  font: inherit;
}

.sms-archive-panel {
  overflow: hidden;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(23, 27, 31, 0.06);
}

#sms-send-view[hidden],
.sms-archive-panel[hidden],
.sms-archive-empty[hidden] {
  display: none;
}

.sms-archive-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border-bottom: 1px solid #e2e7ea;
}

.sms-archive-heading h2 {
  margin-top: 4px;
  font-size: 22px;
}

.sms-archive-heading p:not(.eyebrow) {
  margin-top: 6px;
  color: #65737d;
  font-size: 13px;
}

.sms-archive-tools {
  display: grid;
  grid-template-columns: minmax(260px, 340px) auto;
  align-items: center;
  gap: 6px 12px;
}

.sms-archive-tools label {
  grid-column: 1 / -1;
  color: #53616b;
  font-size: 12px;
  font-weight: 720;
}

.sms-archive-tools input {
  min-height: 42px;
  background: #ffffff;
}

.sms-archive-tools strong {
  color: #53616b;
  font-size: 12px;
  white-space: nowrap;
}

.sms-archive-table-wrap {
  border: 0;
  border-radius: 0;
}

.sms-archive-table {
  min-width: 1120px;
}

.sms-archive-table th:nth-child(1),
.sms-archive-table td:nth-child(1) {
  width: 150px;
}

.sms-archive-table th:nth-child(2),
.sms-archive-table td:nth-child(2) {
  width: 190px;
}

.sms-archive-table th:nth-child(3),
.sms-archive-table td:nth-child(3) {
  width: 110px;
}

.sms-archive-table th:nth-child(4),
.sms-archive-table td:nth-child(4) {
  width: 150px;
}

.sms-archive-table th:nth-child(6),
.sms-archive-table td:nth-child(6),
.sms-archive-table th:nth-child(7),
.sms-archive-table td:nth-child(7) {
  width: 110px;
}

.sms-archive-table time,
.sms-archive-table td {
  color: #354149;
}

.sms-archive-text {
  display: -webkit-box;
  max-width: 460px;
  overflow: hidden;
  color: #2d373e;
  line-height: 1.45;
  white-space: pre-wrap;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.sms-archive-source,
.sms-archive-status {
  display: inline-block;
  margin: 0;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 780;
  white-space: nowrap;
}

.sms-archive-source {
  color: #42515a;
  background: #edf1f3;
}

.sms-archive-status {
  color: #53616b;
  background: #f1f4f5;
}

.sms-archive-status.is-delivered {
  color: #176048;
  background: #edf8f3;
}

.sms-archive-status.is-failed {
  color: #9f2d20;
  background: #fff0ee;
}

.sms-archive-status.is-simulated {
  color: #6d4610;
  background: #fff6df;
}

.sms-archive-empty {
  padding: 48px 20px;
  color: #65737d;
  text-align: center;
}

@media (max-width: 1180px) {
  .sms-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sms-workspace {
    grid-template-columns: minmax(260px, 0.72fr) minmax(430px, 1.28fr);
  }

  .sms-automation-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(220px, 0.65fr) minmax(440px, 1.35fr);
    border-top: 1px solid #e2e7ea;
    border-left: 0;
  }
}

@media (max-width: 820px) {
  .admin-actions.admin-topbar-actions {
    grid-template-columns: minmax(284px, 1fr) 104px 92px;
  }

  .sms-integration {
    align-items: flex-start;
    flex-direction: column;
  }

  .sms-workspace {
    grid-template-columns: 1fr;
  }

  .sms-thread-panel {
    max-height: 440px;
    border-right: 0;
    border-bottom: 1px solid #e2e7ea;
  }

  .sms-message-list {
    min-height: 430px;
  }

  .sms-automation-panel {
    grid-template-columns: 1fr;
  }

  .sms-archive-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .admin-actions.admin-topbar-actions,
  .sms-stats-grid {
    grid-template-columns: 1fr;
  }

  .sms-admin-shell {
    width: min(100% - 20px, 1360px);
  }

  .admin-primary-nav,
  .sms-view-tabs {
    width: 100%;
  }

  .sms-archive-tools {
    grid-template-columns: 1fr;
  }

  .sms-archive-tools label {
    grid-column: auto;
  }

  .sms-conversation-header,
  .sms-composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .sms-bubble {
    max-width: 92%;
  }

  .sms-composer-tools {
    width: 100%;
  }

  .sms-composer-footer > button {
    width: 100%;
  }
}
